blob: 9353778bc03b9e78f2e529133b20ac89fc30db14 [file] [log] [blame]
Oleksii Butenko7c48def2017-10-03 12:41:05 +03001{% from 'cookied-bm-mcp-ocata-dvr-vxlan/underlay.yaml' import HOSTNAME_CFG01 with context %}
2
3# Install support services
Oleksii Butenkobb46b0b2017-10-24 11:11:48 +03004
5- description: Install glusterfs
6 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
7 -C 'I@glusterfs:server' state.sls glusterfs.server.service
8 node_name: {{ HOSTNAME_CFG01 }}
9 retry: {count: 1, delay: 5}
10 skip_fail: false
11
12- description: Setup glusterfs on primary controller
13 cmd: sleep 30; salt --hard-crash --state-output=mixed --state-verbose=False
14 -C 'I@glusterfs:server' state.sls glusterfs.server.setup -b 1
15 node_name: {{ HOSTNAME_CFG01 }}
16 retry: {count: 2, delay: 30}
17 skip_fail: false
18
19- description: Check the gluster status
20 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
21 -C 'I@glusterfs:server' cmd.run 'gluster peer status; gluster volume status' -b 1
22 node_name: {{ HOSTNAME_CFG01 }}
23 retry: {count: 1, delay: 5}
24 skip_fail: false
25
Oleksii Butenko7c48def2017-10-03 12:41:05 +030026- description: Install keepalived on ctl01
27 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
28 -C 'I@keepalived:cluster and *01*' state.sls keepalived
29 node_name: {{ HOSTNAME_CFG01 }}
30 retry: {count: 1, delay: 10}
31 skip_fail: true
32
33- description: Install keepalived
34 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
35 -C 'I@keepalived:cluster' state.sls keepalived
36 node_name: {{ HOSTNAME_CFG01 }}
37 retry: {count: 1, delay: 10}
38 skip_fail: true
39
Oleksii Butenkobb46b0b2017-10-24 11:11:48 +030040- description: Check the OpenStack control VIP
Oleksii Butenko7c48def2017-10-03 12:41:05 +030041 cmd: |
Oleksii Butenkobb46b0b2017-10-24 11:11:48 +030042 OPENSTACK_CONTROL_ADDRESS=$(salt --out=newline_values_only "ctl01*" pillar.get _param:cluster_vip_address);
43 echo "_param:cluster_vip_address (vip): ${OPENSTACK_CONTROL_ADDRESS}";
Oleksii Butenko7c48def2017-10-03 12:41:05 +030044 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}
45 node_name: {{ HOSTNAME_CFG01 }}
46 retry: {count: 1, delay: 5}
47 skip_fail: false
48
Oleksii Butenko7c48def2017-10-03 12:41:05 +030049- description: Install RabbitMQ on ctl01
50 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
51 -C 'I@rabbitmq:server and *01*' state.sls rabbitmq
52 node_name: {{ HOSTNAME_CFG01 }}
53 retry: {count: 1, delay: 5}
54 skip_fail: false
55
56- description: Install RabbitMQ
57 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
58 -C 'I@rabbitmq:server' state.sls rabbitmq
59 node_name: {{ HOSTNAME_CFG01 }}
60 retry: {count: 1, delay: 5}
61 skip_fail: false
62
63- description: Check the rabbitmq status
64 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
65 -C 'I@rabbitmq:server' cmd.run 'rabbitmqctl cluster_status'
66 node_name: {{ HOSTNAME_CFG01 }}
67 retry: {count: 1, delay: 5}
68 skip_fail: false
69
70- description: Install Galera on first server
71 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
72 -C 'I@galera:master' state.sls galera
73 node_name: {{ HOSTNAME_CFG01 }}
74 retry: {count: 1, delay: 5}
75 skip_fail: false
76
77- description: Install Galera on other servers
78 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
79 -C 'I@galera:slave' state.sls galera
80 node_name: {{ HOSTNAME_CFG01 }}
81 retry: {count: 1, delay: 5}
82 skip_fail: false
83
84- description: Check mysql status
85 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
86 -C 'I@galera:*' mysql.status | grep -A1 -e "wsrep_incoming_addresses\|wsrep_cluster_size"
87 node_name: {{ HOSTNAME_CFG01 }}
88 retry: {count: 1, delay: 5}
89 skip_fail: true
90
91
92- description: Install haproxy
93 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
94 -C 'I@haproxy:proxy' state.sls haproxy
95 node_name: {{ HOSTNAME_CFG01 }}
96 retry: {count: 1, delay: 5}
97 skip_fail: false
98
99- description: Check haproxy status
100 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
101 -C 'I@haproxy:proxy' service.status haproxy
102 node_name: {{ HOSTNAME_CFG01 }}
103 retry: {count: 1, delay: 5}
104 skip_fail: false
105
Oleksii Butenko7c48def2017-10-03 12:41:05 +0300106- description: Install nginx on prx nodes
107 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
108 -C 'I@nginx:server' state.sls nginx
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