blob: 4d8b13c1679c54a02c9cb38c37c50e087bca47a9 [file] [log] [blame]
Tatyana Leontovich38be41b2017-04-12 14:45:23 +03001{% from 'virtual-mcp-ocata-ovs.jinja' import HOSTNAME_CFG01 with context %}
2
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 Leontovich38be41b2017-04-12 14:45:23 +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 Leontovich38be41b2017-04-12 14:45:23 +030014 node_name: {{ HOSTNAME_CFG01 }}
15 retry: {count: 1, delay: 10}
16 skip_fail: true
17
18- description: Check the VIP
19 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
20 -C 'I@keepalived:cluster' cmd.run 'ip a | grep 172.16.10.2' | grep -B1 172.16.10.2
21 node_name: {{ HOSTNAME_CFG01 }}
22 retry: {count: 1, delay: 5}
23 skip_fail: false
24
25
26- description: Install glusterfs
27 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
28 -C 'I@glusterfs:server' state.sls glusterfs.server.service
29 node_name: {{ HOSTNAME_CFG01 }}
30 retry: {count: 1, delay: 5}
31 skip_fail: false
32
33- description: Setup glusterfs on primary controller
34 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
35 -C 'I@glusterfs:server' state.sls glusterfs.server.setup -b 1
36 node_name: {{ HOSTNAME_CFG01 }}
37 retry: {count: 1, delay: 5}
38 skip_fail: false
39
40- description: Check the gluster status
41 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
42 -C 'I@glusterfs:server' cmd.run 'gluster peer status; gluster volume status' -b 1
43 node_name: {{ HOSTNAME_CFG01 }}
44 retry: {count: 1, delay: 5}
45 skip_fail: false
46
Tatyana Leontovich86851a22017-04-25 21:25:26 +030047- description: Install RabbitMQ on ctl01
48 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
49 -C 'I@rabbitmq:server and *01*' state.sls rabbitmq
50 node_name: {{ HOSTNAME_CFG01 }}
51 retry: {count: 1, delay: 5}
52 skip_fail: false
53
Tatyana Leontovich38be41b2017-04-12 14:45:23 +030054- description: Install RabbitMQ
55 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
Tatyana Leontovich86851a22017-04-25 21:25:26 +030056 -C 'I@rabbitmq:server' state.sls rabbitmq
Tatyana Leontovich38be41b2017-04-12 14:45:23 +030057 node_name: {{ HOSTNAME_CFG01 }}
58 retry: {count: 1, delay: 5}
59 skip_fail: false
60
61- description: Check the rabbitmq status
62 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
63 -C 'I@rabbitmq:server' cmd.run 'rabbitmqctl cluster_status'
64 node_name: {{ HOSTNAME_CFG01 }}
65 retry: {count: 1, delay: 5}
66 skip_fail: false
67
68- description: Install Galera on first server
69 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
70 -C 'I@galera:master' state.sls galera
71 node_name: {{ HOSTNAME_CFG01 }}
72 retry: {count: 1, delay: 5}
73 skip_fail: false
74
75- description: Install Galera on other servers
76 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
77 -C 'I@galera:slave' state.sls galera
78 node_name: {{ HOSTNAME_CFG01 }}
79 retry: {count: 1, delay: 5}
80 skip_fail: false
81
82- description: Check mysql status
83 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
84 -C 'I@galera:*' mysql.status | grep -A1 -e "wsrep_incoming_addresses\|wsrep_cluster_size"
85 node_name: {{ HOSTNAME_CFG01 }}
86 retry: {count: 1, delay: 5}
87 skip_fail: true
88
89
90- description: Install haproxy
91 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
92 -C 'I@haproxy:proxy' state.sls haproxy
93 node_name: {{ HOSTNAME_CFG01 }}
94 retry: {count: 1, delay: 5}
95 skip_fail: false
96
97- description: Check haproxy status
98 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
99 -C 'I@haproxy:proxy' service.status haproxy
100 node_name: {{ HOSTNAME_CFG01 }}
101 retry: {count: 1, delay: 5}
102 skip_fail: false
103
104- description: Restart rsyslog
105 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
106 -C 'I@haproxy:proxy' service.restart rsyslog
107 node_name: {{ HOSTNAME_CFG01 }}
108 retry: {count: 1, delay: 5}
109 skip_fail: false
110
111- description: Install memcached on all controllers
112 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
113 -C 'I@memcached:server' state.sls memcached
114 node_name: {{ HOSTNAME_CFG01 }}
115 retry: {count: 1, delay: 5}
116 skip_fail: false