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