blob: 4e3bb6502ac961144ba9b8a07ea320d0908f0fc1 [file] [log] [blame]
Oleksii Butenko7d9671c2017-11-01 17:27:23 +02001{% from 'cookied-bm-mcp-dvr-vxlan/underlay.yaml' import HOSTNAME_CFG01 with context %}
Oleksii Butenkobb46b0b2017-10-24 11:11:48 +03002
3- description: Install glusterfs
4 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
5 -C 'I@glusterfs:server' state.sls glusterfs.server.service
6 node_name: {{ HOSTNAME_CFG01 }}
7 retry: {count: 1, delay: 5}
8 skip_fail: false
9
10- description: Setup glusterfs on primary controller
Oleksii Butenko7d9671c2017-11-01 17:27:23 +020011 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
Oleksii Butenkobb46b0b2017-10-24 11:11:48 +030012 -C 'I@glusterfs:server' state.sls glusterfs.server.setup -b 1
13 node_name: {{ HOSTNAME_CFG01 }}
Oleksii Butenko7d9671c2017-11-01 17:27:23 +020014 retry: {count: 2, delay: 5}
Oleksii Butenkobb46b0b2017-10-24 11:11:48 +030015 skip_fail: false
16
17- description: Check the gluster status
18 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
19 -C 'I@glusterfs:server' cmd.run 'gluster peer status; gluster volume status' -b 1
20 node_name: {{ HOSTNAME_CFG01 }}
21 retry: {count: 1, delay: 5}
22 skip_fail: false
23
Oleksii Butenko7d9671c2017-11-01 17:27:23 +020024# Install support services
Oleksii Butenko7c48def2017-10-03 12:41:05 +030025- description: Install keepalived on ctl01
26 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
27 -C 'I@keepalived:cluster and *01*' state.sls keepalived
28 node_name: {{ HOSTNAME_CFG01 }}
29 retry: {count: 1, delay: 10}
30 skip_fail: true
31
32- description: Install keepalived
33 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
34 -C 'I@keepalived:cluster' state.sls keepalived
35 node_name: {{ HOSTNAME_CFG01 }}
36 retry: {count: 1, delay: 10}
37 skip_fail: true
38
Oleksii Butenkobb46b0b2017-10-24 11:11:48 +030039- description: Check the OpenStack control VIP
Oleksii Butenko7c48def2017-10-03 12:41:05 +030040 cmd: |
Oleksii Butenkobb46b0b2017-10-24 11:11:48 +030041 OPENSTACK_CONTROL_ADDRESS=$(salt --out=newline_values_only "ctl01*" pillar.get _param:cluster_vip_address);
42 echo "_param:cluster_vip_address (vip): ${OPENSTACK_CONTROL_ADDRESS}";
Oleksii Butenko7c48def2017-10-03 12:41:05 +030043 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}
44 node_name: {{ HOSTNAME_CFG01 }}
45 retry: {count: 1, delay: 5}
46 skip_fail: false
47
Oleksii Butenko7c48def2017-10-03 12:41:05 +030048- description: Install RabbitMQ on ctl01
49 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
50 -C 'I@rabbitmq:server and *01*' state.sls rabbitmq
51 node_name: {{ HOSTNAME_CFG01 }}
52 retry: {count: 1, delay: 5}
53 skip_fail: false
54
55- description: Install RabbitMQ
56 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
57 -C 'I@rabbitmq:server' state.sls rabbitmq
58 node_name: {{ HOSTNAME_CFG01 }}
59 retry: {count: 1, delay: 5}
60 skip_fail: false
61
62- description: Check the rabbitmq status
63 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
64 -C 'I@rabbitmq:server' cmd.run 'rabbitmqctl cluster_status'
65 node_name: {{ HOSTNAME_CFG01 }}
66 retry: {count: 1, delay: 5}
67 skip_fail: false
68
69- description: Install Galera on first server
70 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
71 -C 'I@galera:master' state.sls galera
72 node_name: {{ HOSTNAME_CFG01 }}
73 retry: {count: 1, delay: 5}
74 skip_fail: false
75
76- description: Install Galera on other servers
77 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
Dennis Dmitrievc6f858c2018-03-13 22:45:22 +020078 -C 'I@galera:slave' state.sls galera -b 1
Oleksii Butenko7c48def2017-10-03 12:41:05 +030079 node_name: {{ HOSTNAME_CFG01 }}
80 retry: {count: 1, delay: 5}
81 skip_fail: false
82
83- description: Check mysql status
84 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
85 -C 'I@galera:*' mysql.status | grep -A1 -e "wsrep_incoming_addresses\|wsrep_cluster_size"
86 node_name: {{ HOSTNAME_CFG01 }}
87 retry: {count: 1, delay: 5}
88 skip_fail: true
89
90
91- description: Install haproxy
92 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
93 -C 'I@haproxy:proxy' state.sls haproxy
94 node_name: {{ HOSTNAME_CFG01 }}
95 retry: {count: 1, delay: 5}
96 skip_fail: false
97
98- description: Check haproxy status
99 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
100 -C 'I@haproxy:proxy' service.status haproxy
101 node_name: {{ HOSTNAME_CFG01 }}
102 retry: {count: 1, delay: 5}
103 skip_fail: false
104
Oleksii Butenko7c48def2017-10-03 12:41:05 +0300105- description: Install nginx on prx nodes
106 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
107 -C 'I@nginx:server' state.sls nginx
108 node_name: {{ HOSTNAME_CFG01 }}
109 retry: {count: 1, delay: 5}
110 skip_fail: false
111
112- description: Restart rsyslog
113 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
114 -C 'I@haproxy:proxy' service.restart rsyslog
115 node_name: {{ HOSTNAME_CFG01 }}
116 retry: {count: 1, delay: 5}
117 skip_fail: false
118
119- description: Install memcached on all controllers
120 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
121 -C 'I@memcached:server' state.sls memcached
122 node_name: {{ HOSTNAME_CFG01 }}
123 retry: {count: 1, delay: 5}
124 skip_fail: false