blob: 74d3c6889b741792f5980981d63a0f509963ba18 [file] [log] [blame]
Dennis Dmitrieveea5bb32017-09-03 23:20:54 +03001{% from 'cookied-mcp-ocata-dvr-vxlan/underlay.yaml' import HOSTNAME_CFG01 with context %}
Dennis Dmitriev9dada8a2017-08-30 17:38:55 +03002
Dennis Dmitrievc035c242017-10-06 17:12:08 +03003- description: Refresh grains
4 cmd: salt --hard-crash --state-output=mixed --state-verbose=False '*' state.sls salt.minion.grains
5 node_name: {{ HOSTNAME_CFG01 }}
6 retry: {count: 1, delay: 15}
7 skip_fail: false
8
Dennis Dmitriev9dada8a2017-08-30 17:38:55 +03009# Install support services
10- description: Install keepalived on ctl01
11 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
12 -C 'I@keepalived:cluster and *01*' state.sls keepalived
13 node_name: {{ HOSTNAME_CFG01 }}
14 retry: {count: 1, delay: 10}
15 skip_fail: true
16
17- description: Install keepalived
18 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
19 -C 'I@keepalived:cluster' state.sls keepalived
20 node_name: {{ HOSTNAME_CFG01 }}
21 retry: {count: 1, delay: 10}
22 skip_fail: true
23
24- description: Check the VIP
25 cmd: |
26 OPENSTACK_CONTROL_ADDRESS=`salt-call --out=newline_values_only pillar.get _param:openstack_control_address`;
27 echo "_param:openstack_control_address (vip): ${OPENSTACK_CONTROL_ADDRESS}";
28 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}
29 node_name: {{ HOSTNAME_CFG01 }}
30 retry: {count: 1, delay: 5}
31 skip_fail: false
32
33
34- description: Install glusterfs
35 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
36 -C 'I@glusterfs:server' state.sls glusterfs.server.service
37 node_name: {{ HOSTNAME_CFG01 }}
38 retry: {count: 1, delay: 5}
39 skip_fail: false
40
41- description: Setup glusterfs on primary controller
42 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
43 -C 'I@glusterfs:server' state.sls glusterfs.server.setup -b 1
44 node_name: {{ HOSTNAME_CFG01 }}
Dennis Dmitrieva95a6d42017-10-24 15:09:04 +030045 retry: {count: 2, delay: 5}
Dennis Dmitriev9dada8a2017-08-30 17:38:55 +030046 skip_fail: false
47
48- description: Check the gluster status
49 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
50 -C 'I@glusterfs:server' cmd.run 'gluster peer status; gluster volume status' -b 1
51 node_name: {{ HOSTNAME_CFG01 }}
52 retry: {count: 1, delay: 5}
53 skip_fail: false
54
55- description: Install RabbitMQ on ctl01
56 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
57 -C 'I@rabbitmq:server and *01*' state.sls rabbitmq
58 node_name: {{ HOSTNAME_CFG01 }}
59 retry: {count: 1, delay: 5}
60 skip_fail: false
61
62- description: Install RabbitMQ
63 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
64 -C 'I@rabbitmq:server' state.sls rabbitmq
65 node_name: {{ HOSTNAME_CFG01 }}
66 retry: {count: 1, delay: 5}
67 skip_fail: false
68
69- description: Check the rabbitmq status
70 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
71 -C 'I@rabbitmq:server' cmd.run 'rabbitmqctl cluster_status'
72 node_name: {{ HOSTNAME_CFG01 }}
73 retry: {count: 1, delay: 5}
74 skip_fail: false
75
76- description: Install Galera on first server
77 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
78 -C 'I@galera:master' state.sls galera
79 node_name: {{ HOSTNAME_CFG01 }}
80 retry: {count: 1, delay: 5}
81 skip_fail: false
82
83- description: Install Galera on other servers
84 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
85 -C 'I@galera:slave' state.sls galera
86 node_name: {{ HOSTNAME_CFG01 }}
87 retry: {count: 1, delay: 5}
88 skip_fail: false
89
90- description: Check mysql status
91 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
92 -C 'I@galera:*' mysql.status | grep -A1 -e "wsrep_incoming_addresses\|wsrep_cluster_size"
93 node_name: {{ HOSTNAME_CFG01 }}
94 retry: {count: 1, delay: 5}
95 skip_fail: true
96
97
98- description: Install haproxy
99 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
100 -C 'I@haproxy:proxy' state.sls haproxy
101 node_name: {{ HOSTNAME_CFG01 }}
102 retry: {count: 1, delay: 5}
103 skip_fail: false
104
105- description: Check haproxy status
106 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
107 -C 'I@haproxy:proxy' service.status haproxy
108 node_name: {{ HOSTNAME_CFG01 }}
109 retry: {count: 1, delay: 5}
110 skip_fail: false
111
Dennis Dmitrievc7b17312017-10-01 00:08:11 +0300112- description: Run salt minion to create cert files for nginx
113 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
114 -C 'I@nginx:server' state.sls salt.minion
115 node_name: {{ HOSTNAME_CFG01 }}
116 retry: {count: 1, delay: 10}
117 skip_fail: false
118
Dennis Dmitriev910a8002017-08-31 14:53:47 +0300119- description: Install nginx on prx nodes
120 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
121 -C 'I@nginx:server' state.sls nginx
122 node_name: {{ HOSTNAME_CFG01 }}
123 retry: {count: 1, delay: 5}
124 skip_fail: false
125
Dennis Dmitriev9dada8a2017-08-30 17:38:55 +0300126- description: Restart rsyslog
127 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
128 -C 'I@haproxy:proxy' service.restart rsyslog
129 node_name: {{ HOSTNAME_CFG01 }}
130 retry: {count: 1, delay: 5}
131 skip_fail: false
132
133- description: Install memcached on all controllers
134 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
135 -C 'I@memcached:server' state.sls memcached
136 node_name: {{ HOSTNAME_CFG01 }}
137 retry: {count: 1, delay: 5}
138 skip_fail: false