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