blob: 70112b7ef4e911c65afb272d0299921037f73330 [file] [log] [blame]
Tatyana Leontovich460f7df2017-11-13 15:45:06 +02001{% from 'virtual-mcp-ocata-ovs-ceph/underlay.yaml' import HOSTNAME_CFG01 with context %}
2
3# Install support services
4- description: Install keepalived on ctl01
5 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
6 -C 'I@keepalived:cluster and *01*' state.sls keepalived
7 node_name: {{ HOSTNAME_CFG01 }}
8 retry: {count: 1, delay: 10}
9 skip_fail: true
10
11- description: Install keepalived
12 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
13 -C 'I@keepalived:cluster' state.sls keepalived
14 node_name: {{ HOSTNAME_CFG01 }}
15 retry: {count: 1, delay: 10}
16 skip_fail: true
17
Tatyana Leontovich460f7df2017-11-13 15:45:06 +020018- description: Install glusterfs
19 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
20 -C 'I@glusterfs:server' state.sls glusterfs.server.service
21 node_name: {{ HOSTNAME_CFG01 }}
22 retry: {count: 1, delay: 5}
23 skip_fail: false
24
25- description: Setup glusterfs on primary controller
26 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
27 -C 'I@glusterfs:server' state.sls glusterfs.server.setup -b 1
28 node_name: {{ HOSTNAME_CFG01 }}
29 retry: {count: 2, delay: 5}
30 skip_fail: false
31
32- description: Check the gluster status
33 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
34 -C 'I@glusterfs:server' cmd.run 'gluster peer status; gluster volume status' -b 1
35 node_name: {{ HOSTNAME_CFG01 }}
36 retry: {count: 1, delay: 5}
37 skip_fail: false
38
39- description: Install RabbitMQ on ctl01
40 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
41 -C 'I@rabbitmq:server and *01*' state.sls rabbitmq
42 node_name: {{ HOSTNAME_CFG01 }}
43 retry: {count: 1, delay: 5}
44 skip_fail: false
45
46- description: Install RabbitMQ
47 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
48 -C 'I@rabbitmq:server' state.sls rabbitmq
49 node_name: {{ HOSTNAME_CFG01 }}
50 retry: {count: 1, delay: 5}
51 skip_fail: false
52
53- description: Check the rabbitmq status
54 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
55 -C 'I@rabbitmq:server' cmd.run 'rabbitmqctl cluster_status'
56 node_name: {{ HOSTNAME_CFG01 }}
57 retry: {count: 1, delay: 5}
58 skip_fail: false
59
60- description: Install Galera on first server
61 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
62 -C 'I@galera:master' state.sls galera
63 node_name: {{ HOSTNAME_CFG01 }}
64 retry: {count: 1, delay: 5}
65 skip_fail: false
66
67- description: Install Galera on other servers
68 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
Dennis Dmitrievc6f858c2018-03-13 22:45:22 +020069 -C 'I@galera:slave' state.sls galera -b 1
Tatyana Leontovich460f7df2017-11-13 15:45:06 +020070 node_name: {{ HOSTNAME_CFG01 }}
71 retry: {count: 1, delay: 5}
72 skip_fail: false
73
74- description: Check mysql status
75 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
76 -C 'I@galera:*' mysql.status | grep -A1 -e "wsrep_incoming_addresses\|wsrep_cluster_size"
77 node_name: {{ HOSTNAME_CFG01 }}
78 retry: {count: 1, delay: 5}
79 skip_fail: true
80
Tatyana Leontovich460f7df2017-11-13 15:45:06 +020081- description: Install haproxy
82 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
83 -C 'I@haproxy:proxy' state.sls haproxy
84 node_name: {{ HOSTNAME_CFG01 }}
85 retry: {count: 1, delay: 5}
86 skip_fail: false
87
88- description: Check haproxy status
89 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
90 -C 'I@haproxy:proxy' service.status haproxy
91 node_name: {{ HOSTNAME_CFG01 }}
92 retry: {count: 1, delay: 5}
93 skip_fail: false
94
95- description: Restart rsyslog
96 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
97 -C 'I@haproxy:proxy' service.restart rsyslog
98 node_name: {{ HOSTNAME_CFG01 }}
99 retry: {count: 1, delay: 5}
100 skip_fail: false
101
102- description: Install memcached on all controllers
103 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
104 -C 'I@memcached:server' state.sls memcached
105 node_name: {{ HOSTNAME_CFG01 }}
106 retry: {count: 1, delay: 5}
107 skip_fail: false
Dennis Dmitriev89ba0312018-05-22 14:05:04 +0300108
109- description: Check the VIP
110 cmd: |
111 OPENSTACK_CONTROL_ADDRESS=`salt-call --out=newline_values_only pillar.get _param:openstack_control_address`;
112 echo "_param:openstack_control_address (vip): ${OPENSTACK_CONTROL_ADDRESS}";
113 salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@keepalived:cluster' cmd.run "ip a | grep ${OPENSTACK_CONTROL_ADDRESS}" | grep -B1 ${OPENSTACK_CONTROL_ADDRESS}
114 node_name: {{ HOSTNAME_CFG01 }}
115 retry: {count: 3, delay: 10}
116 skip_fail: false