blob: f4654ad3bc75d5487e41b7a927fea050021fc254 [file] [log] [blame]
Dennis Dmitrievab83ea42017-05-12 16:52:45 +03001{% from 'mk22-lab-ovs/map.jinja' import DOMAIN_NAME with context %}
2{% from 'mk22-lab-ovs/map.jinja' import HOSTNAME_CFG01 with context %}
dis2b2d8632016-12-08 17:56:57 +02003
4# Install support services
5
6- description: Install keepalived
7 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
8 -C 'I@keepalived:cluster' state.sls keepalived -b 1
9 node_name: {{ HOSTNAME_CFG01 }}
10 retry: {count: 10, delay: 10}
11 skip_fail: true
12
13- description: Check the VIP
14 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
15 -C 'I@keepalived:cluster' cmd.run 'ip a | grep 172.16.10.2' | grep -B1 172.16.10.2
16 node_name: {{ HOSTNAME_CFG01 }}
17 retry: {count: 3, delay: 5}
18 skip_fail: false
19
20
21- description: Install glusterfs
22 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
23 -C 'I@glusterfs:server' state.sls glusterfs.server.service
24 node_name: {{ HOSTNAME_CFG01 }}
25 retry: {count: 3, delay: 5}
26 skip_fail: false
27
28- description: Setup glusterfs on primary controller
29 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
30 -C 'I@glusterfs:server' state.sls glusterfs.server.setup -b 1
31 node_name: {{ HOSTNAME_CFG01 }}
32 retry: {count: 3, delay: 5}
33 skip_fail: false
34
35- description: Check the gluster status
36 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
37 -C 'I@glusterfs:server' cmd.run 'gluster peer status; gluster volume status' -b 1
38 node_name: {{ HOSTNAME_CFG01 }}
39 retry: {count: 3, delay: 5}
40 skip_fail: false
41
42
43- description: Install RabbitMQ
44 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
45 -C 'I@rabbitmq:server' state.sls rabbitmq
46 node_name: {{ HOSTNAME_CFG01 }}
47 retry: {count: 3, delay: 5}
48 skip_fail: false
49
50- description: Check the rabbitmq status
51 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
52 -C 'I@rabbitmq:server' cmd.run 'rabbitmqctl cluster_status'
53 node_name: {{ HOSTNAME_CFG01 }}
54 retry: {count: 3, delay: 5}
55 skip_fail: false
56
dis2b2d8632016-12-08 17:56:57 +020057- description: Install Galera on first server
58 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
59 -C 'I@galera:master' state.sls galera
60 node_name: {{ HOSTNAME_CFG01 }}
61 retry: {count: 3, delay: 5}
62 skip_fail: false
63
64- description: Install Galera on other servers
65 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
66 -C 'I@galera:slave' state.sls galera
67 node_name: {{ HOSTNAME_CFG01 }}
68 retry: {count: 3, delay: 5}
69 skip_fail: false
70
71- description: Check mysql status
72 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
73 -C 'I@galera:*' mysql.status | grep -A1 -e "wsrep_incoming_addresses\|wsrep_cluster_size"
74 node_name: {{ HOSTNAME_CFG01 }}
75 retry: {count: 3, delay: 5}
76 skip_fail: true
77
78
79- description: Install haproxy
80 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
81 -C 'I@haproxy:proxy' state.sls haproxy
82 node_name: {{ HOSTNAME_CFG01 }}
83 retry: {count: 3, delay: 5}
84 skip_fail: false
85
86- description: Check haproxy status
87 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
88 -C 'I@haproxy:proxy' service.status haproxy
89 node_name: {{ HOSTNAME_CFG01 }}
90 retry: {count: 3, delay: 5}
91 skip_fail: false
92
93- description: Restart rsyslog
94 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
95 -C 'I@haproxy:proxy' service.restart rsyslog
96 node_name: {{ HOSTNAME_CFG01 }}
97 retry: {count: 3, delay: 5}
98 skip_fail: false
99
100- description: Install memcached on all controllers
101 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
102 -C 'I@memcached:server' state.sls memcached
103 node_name: {{ HOSTNAME_CFG01 }}
104 retry: {count: 3, delay: 5}
105 skip_fail: false