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