blob: 7b85b51610501a49da7857f10bd5fafab2c62a57 [file] [log] [blame]
Dennis Dmitrievab83ea42017-05-12 16:52:45 +03001{% from 'virtual-mcp10-ovs/map.jinja' import HOSTNAME_CFG01 with context %}
dis2b2d8632016-12-08 17:56:57 +02002
3# Install support services
4
5- description: Install keepalived
6 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
7 -C 'I@keepalived:cluster' state.sls keepalived -b 1
8 node_name: {{ HOSTNAME_CFG01 }}
Dennis Dmitrievab83ea42017-05-12 16:52:45 +03009 retry: {count: 1, delay: 10}
dis2b2d8632016-12-08 17:56:57 +020010 skip_fail: true
11
12- description: Check the VIP
13 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
14 -C 'I@keepalived:cluster' cmd.run 'ip a | grep 172.16.10.2' | grep -B1 172.16.10.2
15 node_name: {{ HOSTNAME_CFG01 }}
Dennis Dmitrievab83ea42017-05-12 16:52:45 +030016 retry: {count: 1, delay: 5}
dis2b2d8632016-12-08 17:56:57 +020017 skip_fail: false
18
19
20- description: Install glusterfs
21 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
22 -C 'I@glusterfs:server' state.sls glusterfs.server.service
23 node_name: {{ HOSTNAME_CFG01 }}
Dennis Dmitrievab83ea42017-05-12 16:52:45 +030024 retry: {count: 1, delay: 5}
dis2b2d8632016-12-08 17:56:57 +020025 skip_fail: false
26
27- description: Setup glusterfs on primary controller
28 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
29 -C 'I@glusterfs:server' state.sls glusterfs.server.setup -b 1
30 node_name: {{ HOSTNAME_CFG01 }}
Dennis Dmitrieva95a6d42017-10-24 15:09:04 +030031 retry: {count: 2, delay: 5}
dis2b2d8632016-12-08 17:56:57 +020032 skip_fail: false
33
34- description: Check the gluster status
35 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
36 -C 'I@glusterfs:server' cmd.run 'gluster peer status; gluster volume status' -b 1
37 node_name: {{ HOSTNAME_CFG01 }}
Dennis Dmitrievab83ea42017-05-12 16:52:45 +030038 retry: {count: 1, delay: 5}
dis2b2d8632016-12-08 17:56:57 +020039 skip_fail: false
40
41
42- description: Install RabbitMQ
43 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
44 -C 'I@rabbitmq:server' state.sls rabbitmq
45 node_name: {{ HOSTNAME_CFG01 }}
Dennis Dmitrievab83ea42017-05-12 16:52:45 +030046 retry: {count: 1, delay: 5}
dis2b2d8632016-12-08 17:56:57 +020047 skip_fail: false
48
49- description: Check the rabbitmq status
50 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
51 -C 'I@rabbitmq:server' cmd.run 'rabbitmqctl cluster_status'
52 node_name: {{ HOSTNAME_CFG01 }}
Dennis Dmitrievab83ea42017-05-12 16:52:45 +030053 retry: {count: 1, delay: 5}
dis2b2d8632016-12-08 17:56:57 +020054 skip_fail: false
55
dis2b2d8632016-12-08 17:56:57 +020056- description: Install Galera on first server
57 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
58 -C 'I@galera:master' state.sls galera
59 node_name: {{ HOSTNAME_CFG01 }}
Dennis Dmitrievab83ea42017-05-12 16:52:45 +030060 retry: {count: 1, delay: 5}
dis2b2d8632016-12-08 17:56:57 +020061 skip_fail: false
62
63- description: Install Galera on other servers
64 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
65 -C 'I@galera:slave' state.sls galera
66 node_name: {{ HOSTNAME_CFG01 }}
Dennis Dmitrievab83ea42017-05-12 16:52:45 +030067 retry: {count: 1, delay: 5}
dis2b2d8632016-12-08 17:56:57 +020068 skip_fail: false
69
70- description: Check mysql status
71 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
72 -C 'I@galera:*' mysql.status | grep -A1 -e "wsrep_incoming_addresses\|wsrep_cluster_size"
73 node_name: {{ HOSTNAME_CFG01 }}
Dennis Dmitrievab83ea42017-05-12 16:52:45 +030074 retry: {count: 1, delay: 5}
dis2b2d8632016-12-08 17:56:57 +020075 skip_fail: true
76
77
78- description: Install haproxy
79 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
80 -C 'I@haproxy:proxy' state.sls haproxy
81 node_name: {{ HOSTNAME_CFG01 }}
Dennis Dmitrievab83ea42017-05-12 16:52:45 +030082 retry: {count: 1, delay: 5}
dis2b2d8632016-12-08 17:56:57 +020083 skip_fail: false
84
85- description: Check haproxy status
86 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
87 -C 'I@haproxy:proxy' service.status haproxy
88 node_name: {{ HOSTNAME_CFG01 }}
Dennis Dmitrievab83ea42017-05-12 16:52:45 +030089 retry: {count: 1, delay: 5}
dis2b2d8632016-12-08 17:56:57 +020090 skip_fail: false
91
92- description: Restart rsyslog
93 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
94 -C 'I@haproxy:proxy' service.restart rsyslog
95 node_name: {{ HOSTNAME_CFG01 }}
Dennis Dmitrievab83ea42017-05-12 16:52:45 +030096 retry: {count: 1, delay: 5}
dis2b2d8632016-12-08 17:56:57 +020097 skip_fail: false
98
99- description: Install memcached on all controllers
100 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
101 -C 'I@memcached:server' state.sls memcached
102 node_name: {{ HOSTNAME_CFG01 }}
Dennis Dmitrievab83ea42017-05-12 16:52:45 +0300103 retry: {count: 1, delay: 5}
dis2b2d8632016-12-08 17:56:57 +0200104 skip_fail: false