blob: c12ae068e549e0b51e21a6d288c162f222284e1f [file] [log] [blame]
Tatyana Leontovichd8bf14f2017-04-19 12:20:50 +03001{% from 'virtual-mcp11-dvr.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 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
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
47
48- description: Install RabbitMQ
49 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
Tatyana Leontovich0c0d2912017-04-25 19:55:08 +030050 -C 'I@rabbitmq:server' state.sls rabbitmq -b 1
Tatyana Leontovichd8bf14f2017-04-19 12:20:50 +030051 node_name: {{ HOSTNAME_CFG01 }}
52 retry: {count: 1, delay: 5}
53 skip_fail: false
54
55- description: Check the rabbitmq status
56 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
57 -C 'I@rabbitmq:server' cmd.run 'rabbitmqctl cluster_status'
58 node_name: {{ HOSTNAME_CFG01 }}
59 retry: {count: 1, delay: 5}
60 skip_fail: false
61
62- description: Install Galera on first server
63 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
64 -C 'I@galera:master' state.sls galera
65 node_name: {{ HOSTNAME_CFG01 }}
66 retry: {count: 1, delay: 5}
67 skip_fail: false
68
69- description: Install Galera on other servers
70 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
71 -C 'I@galera:slave' state.sls galera
72 node_name: {{ HOSTNAME_CFG01 }}
73 retry: {count: 1, delay: 5}
74 skip_fail: false
75
76- description: Check mysql status
77 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
78 -C 'I@galera:*' mysql.status | grep -A1 -e "wsrep_incoming_addresses\|wsrep_cluster_size"
79 node_name: {{ HOSTNAME_CFG01 }}
80 retry: {count: 1, delay: 5}
81 skip_fail: true
82
83
84- description: Install haproxy
85 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
86 -C 'I@haproxy:proxy' state.sls haproxy
87 node_name: {{ HOSTNAME_CFG01 }}
88 retry: {count: 1, delay: 5}
89 skip_fail: false
90
91- description: Check haproxy status
92 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
93 -C 'I@haproxy:proxy' service.status haproxy
94 node_name: {{ HOSTNAME_CFG01 }}
95 retry: {count: 1, delay: 5}
96 skip_fail: false
97
98- description: Restart rsyslog
99 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
100 -C 'I@haproxy:proxy' service.restart rsyslog
101 node_name: {{ HOSTNAME_CFG01 }}
102 retry: {count: 1, delay: 5}
103 skip_fail: false
104
105- description: Install memcached on all controllers
106 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
107 -C 'I@memcached:server' state.sls memcached
108 node_name: {{ HOSTNAME_CFG01 }}
109 retry: {count: 1, delay: 5}
110 skip_fail: false