blob: f2859340edb4d39c1fc1aea4549527b89d1fa30d [file] [log] [blame]
Tatyana Leontovichb0b68d92018-01-11 13:27:08 +02001{% from 'virtual-mcp-pike-dvr-ceph-rgw/underlay.yaml' import HOSTNAME_CFG01 with context %}
Tatyana Leontovich56005da2017-12-11 13:16:51 +02002
Tatyana Leontovich26756912018-06-06 20:11:05 +03003{% import 'shared-backup-restore.yaml' as BACKUP with context %}
4
Tatyana Leontovich56005da2017-12-11 13:16:51 +02005# Install support services
6- description: Install keepalived on ctl01
7 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
8 -C 'I@keepalived:cluster and *01*' state.sls keepalived
9 node_name: {{ HOSTNAME_CFG01 }}
10 retry: {count: 1, delay: 10}
11 skip_fail: true
12
13- description: Install keepalived
14 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
15 -C 'I@keepalived:cluster' state.sls keepalived
16 node_name: {{ HOSTNAME_CFG01 }}
17 retry: {count: 1, delay: 10}
18 skip_fail: true
19
Tatyana Leontovich56005da2017-12-11 13:16:51 +020020- 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 }}
24 retry: {count: 1, delay: 5}
25 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 }}
31 retry: {count: 2, delay: 5}
32 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 }}
38 retry: {count: 1, delay: 5}
39 skip_fail: false
40
41- description: Install RabbitMQ on ctl01
42 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
43 -C 'I@rabbitmq:server and *01*' state.sls rabbitmq
44 node_name: {{ HOSTNAME_CFG01 }}
45 retry: {count: 1, delay: 5}
46 skip_fail: false
47
48- description: Install RabbitMQ
49 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
50 -C 'I@rabbitmq:server' state.sls rabbitmq
51 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
Dennis Dmitrievc6f858c2018-03-13 22:45:22 +020071 -C 'I@galera:slave' state.sls galera -b 1
Tatyana Leontovich56005da2017-12-11 13:16:51 +020072 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
Dennis Dmitriev89ba0312018-05-22 14:05:04 +0300111
112- description: Check the VIP
113 cmd: |
114 OPENSTACK_CONTROL_ADDRESS=`salt-call --out=newline_values_only pillar.get _param:openstack_control_address`;
115 echo "_param:openstack_control_address (vip): ${OPENSTACK_CONTROL_ADDRESS}";
116 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}
117 node_name: {{ HOSTNAME_CFG01 }}
118 retry: {count: 3, delay: 10}
119 skip_fail: false
Tatyana Leontovich26756912018-06-06 20:11:05 +0300120
121{{ BACKUP.MACRO_BACKUP_BACKUPNINJA() }}
122{{ BACKUP.MACRO_BACKUP_XTRABACKUP() }}
123