blob: d77ced7b662825b3f7a38a2c2e537d8a121bb036 [file] [log] [blame]
Dennis Dmitrievab83ea42017-05-12 16:52:45 +03001{% from 'virtual-mcp11-ovs/underlay.yaml' import HOSTNAME_CFG01 with context %}
Tatyana Leontovichd8bf14f2017-04-19 12:20:50 +03002
3# Install support services
Tatyana Leontovichfc976b82017-04-25 20:46:13 +03004- 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
Tatyana Leontovichd8bf14f2017-04-19 12:20:50 +030010
11- description: Install keepalived
12 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
Tatyana Leontovichfc976b82017-04-25 20:46:13 +030013 -C 'I@keepalived:cluster' state.sls keepalived
Tatyana Leontovichd8bf14f2017-04-19 12:20:50 +030014 node_name: {{ HOSTNAME_CFG01 }}
15 retry: {count: 1, delay: 10}
16 skip_fail: true
17
18- description: Check the VIP
Dennis Dmitriev4ab889c2017-04-27 14:11:04 +030019 cmd: |
20 OPENSTACK_CONTROL_ADDRESS=`salt-call --out=newline_values_only pillar.get _param:openstack_control_address`;
21 echo "_param:openstack_control_address (vip): ${OPENSTACK_CONTROL_ADDRESS}";
22 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}
Tatyana Leontovichd8bf14f2017-04-19 12:20:50 +030023 node_name: {{ HOSTNAME_CFG01 }}
24 retry: {count: 1, delay: 5}
25 skip_fail: false
26
27
28- description: Install glusterfs
29 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
30 -C 'I@glusterfs:server' state.sls glusterfs.server.service
31 node_name: {{ HOSTNAME_CFG01 }}
32 retry: {count: 1, delay: 5}
33 skip_fail: false
34
35- description: Setup glusterfs on primary controller
36 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
37 -C 'I@glusterfs:server' state.sls glusterfs.server.setup -b 1
38 node_name: {{ HOSTNAME_CFG01 }}
39 retry: {count: 1, delay: 5}
40 skip_fail: false
41
42- description: Check the gluster status
43 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
44 -C 'I@glusterfs:server' cmd.run 'gluster peer status; gluster volume status' -b 1
45 node_name: {{ HOSTNAME_CFG01 }}
46 retry: {count: 1, delay: 5}
47 skip_fail: false
48
Tatyana Leontovich86851a22017-04-25 21:25:26 +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
Tatyana Leontovichd8bf14f2017-04-19 12:20:50 +030055
56- description: Install RabbitMQ
57 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
Tatyana Leontovich86851a22017-04-25 21:25:26 +030058 -C 'I@rabbitmq:server' state.sls rabbitmq
Tatyana Leontovichd8bf14f2017-04-19 12:20:50 +030059 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
106- description: Restart rsyslog
107 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
108 -C 'I@haproxy:proxy' service.restart rsyslog
109 node_name: {{ HOSTNAME_CFG01 }}
110 retry: {count: 1, delay: 5}
111 skip_fail: false
112
113- description: Install memcached on all controllers
114 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
115 -C 'I@memcached:server' state.sls memcached
116 node_name: {{ HOSTNAME_CFG01 }}
117 retry: {count: 1, delay: 5}
118 skip_fail: false