blob: dbed2e12f243008ca0d650c49eeeaa8076e67305 [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 %}
2{% from 'virtual-mcp-pike-dvr-ceph-rgw/underlay.yaml' import HOSTNAME_CTL01 with context %}
3{% from 'virtual-mcp-pike-dvr-ceph-rgw/underlay.yaml' import HOSTNAME_CTL02 with context %}
4{% from 'virtual-mcp-pike-dvr-ceph-rgw/underlay.yaml' import HOSTNAME_CTL03 with context %}
5{% from 'virtual-mcp-pike-dvr-ceph-rgw/underlay.yaml' import HOSTNAME_GTW01 with context %}
Tatyana Leontovich56005da2017-12-11 13:16:51 +02006{% from 'shared-salt.yaml' import IPV4_NET_EXTERNAL_PREFIX with context %}
7{% from 'shared-salt.yaml' import IPV4_NET_TENANT_PREFIX with context %}
8
Oleksii Butenko5cd0a162018-06-14 18:18:10 +03009{% import 'shared-salt.yaml' as SHARED with context %}
10
Tatyana Leontovich8015f022018-07-04 11:57:51 +030011{% import 'shared-backup-restore.yaml' as BACKUP with context %}
12
Tatyana Leontovich56005da2017-12-11 13:16:51 +020013# Install OpenStack control services
14
15- description: Install glance on all controllers
16 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
17 -C 'I@glance:server' state.sls glance -b 1
18 node_name: {{ HOSTNAME_CFG01 }}
19 retry: {count: 1, delay: 5}
20 skip_fail: false
21
22- description: Install keystone service (note that different fernet keys are created on different nodes)
23 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
24 -C 'I@keystone:server' state.sls keystone.server -b 1
25 node_name: {{ HOSTNAME_CFG01 }}
26 retry: {count: 2, delay: 15}
27 skip_fail: false
28
29- description: Restart apache due to PROD-10477
30 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl*' cmd.run "systemctl restart apache2"
31 node_name: {{ HOSTNAME_CFG01 }}
32 retry: {count: 1, delay: 15}
33 skip_fail: false
34
35- description: Check apache status to PROD-10477
36 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl*' cmd.run "systemctl status apache2"
37 node_name: {{ HOSTNAME_CFG01 }}
38 retry: {count: 1, delay: 15}
39 skip_fail: false
40
41- description: Mount glusterfs.client volumes (resuires created 'keystone' and 'glusterfs' system users)
42 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
43 -C 'I@glance:server' state.sls glusterfs.client
44 node_name: {{ HOSTNAME_CFG01 }}
45 retry: {count: 1, delay: 5}
46 skip_fail: false
47
48- description: Update fernet keys for keystone server on the mounted glusterfs volume
49 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
50 -C 'I@keystone:server' state.sls keystone.server -b 1
51 node_name: {{ HOSTNAME_CFG01 }}
52 retry: {count: 1, delay: 5}
53 skip_fail: false
54
55- description: Populate keystone services/tenants/admins
56 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
57 -C 'I@keystone:client' state.sls keystone.client
58 node_name: {{ HOSTNAME_CFG01 }}
Dennis Dmitrievf073e6f2018-02-06 23:45:15 +020059 retry: {count: 2, delay: 5}
Tatyana Leontovich56005da2017-12-11 13:16:51 +020060 skip_fail: false
61
62- description: Check keystone service-list
63 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
64 -C 'I@keystone:server' cmd.run '. /root/keystonercv3; openstack service list'
65 node_name: {{ HOSTNAME_CFG01 }}
66 retry: {count: 1, delay: 5}
67 skip_fail: false
68
69- description: Check glance image-list
70 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
71 -C 'I@keystone:server' cmd.run '. /root/keystonercv3; glance image-list'
72 node_name: {{ HOSTNAME_CFG01 }}
73 retry: {count: 1, delay: 5}
74 skip_fail: false
75
76
77- description: Install nova on all controllers
78 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
79 -C 'I@nova:controller' state.sls nova -b 1
80 node_name: {{ HOSTNAME_CFG01 }}
81 retry: {count: 2, delay: 5}
82 skip_fail: false
83
84- description: Check nova service-list
85 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
86 -C 'I@keystone:server' cmd.run '. /root/keystonercv3; nova --debug service-list'
87 node_name: {{ HOSTNAME_CFG01 }}
88 retry: {count: 3, delay: 5}
89 skip_fail: false
90
91
92- description: Install cinder
93 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
94 -C 'I@cinder:controller' state.sls cinder -b 1
95 node_name: {{ HOSTNAME_CFG01 }}
96 retry: {count: 2, delay: 5}
97 skip_fail: false
98
99- description: Check cinder list
100 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
101 -C 'I@keystone:server' cmd.run '. /root/keystonercv3; cinder list'
102 node_name: {{ HOSTNAME_CFG01 }}
103 retry: {count: 1, delay: 5}
104 skip_fail: false
105
106
107- description: Install neutron service
108 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
109 -C 'I@neutron:server' state.sls neutron -b 1
110 node_name: {{ HOSTNAME_CFG01 }}
111 retry: {count: 1, delay: 5}
112 skip_fail: false
113
114- description: Install neutron on gtw node
115 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
116 -C 'I@neutron:gateway' state.sls neutron
117 node_name: {{ HOSTNAME_CFG01 }}
118 retry: {count: 1, delay: 5}
119 skip_fail: false
120
121- description: Check neutron agent-list
122 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
123 -C 'I@keystone:server' cmd.run '. /root/keystonercv3; neutron agent-list'
124 node_name: {{ HOSTNAME_CFG01 }}
125 retry: {count: 1, delay: 5}
126 skip_fail: false
127
128
129- description: Install heat service
130 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
131 -C 'I@heat:server' state.sls heat -b 1
132 node_name: {{ HOSTNAME_CFG01 }}
133 retry: {count: 1, delay: 5}
134 skip_fail: false
135
136- description: Check heat service
137 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
138 -C 'I@keystone:server' cmd.run '. /root/keystonercv3; openstack orchestration resource type list'
139 node_name: {{ HOSTNAME_CFG01 }}
140 retry: {count: 5, delay: 10}
141 skip_fail: false
142
143
144- description: Deploy horizon dashboard
145 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
146 -C 'I@horizon:server' state.sls horizon
147 node_name: {{ HOSTNAME_CFG01 }}
148 retry: {count: 1, delay: 5}
149 skip_fail: true
150
151- description: Deploy nginx proxy
152 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
153 -C 'I@nginx:server' state.sls nginx
154 node_name: {{ HOSTNAME_CFG01 }}
155 retry: {count: 1, delay: 5}
156 skip_fail: true
157
158
159# Install compute node
160
161- description: Apply formulas for compute node
162 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply
163 node_name: {{ HOSTNAME_CFG01 }}
164 retry: {count: 1, delay: 5}
165 skip_fail: true
166
167- description: Re-apply(as in doc) formulas for compute node
168 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply
169 node_name: {{ HOSTNAME_CFG01 }}
170 retry: {count: 1, delay: 5}
Oleksii Butenko9f2601c2018-02-08 15:13:21 +0200171 skip_fail: false
Tatyana Leontovich56005da2017-12-11 13:16:51 +0200172
173- description: Check IP on computes
174 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' cmd.run
175 'ip a'
176 node_name: {{ HOSTNAME_CFG01 }}
177 retry: {count: 10, delay: 30}
178 skip_fail: false
179
Tatyana Leontovich56005da2017-12-11 13:16:51 +0200180- description: Create net04_external
181 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
182 '. /root/keystonercv3; neutron net-create net04_ext --router:external True --provider:physical_network physnet1 --provider:network_type flat'
183 node_name: {{ HOSTNAME_CFG01 }}
184 retry: {count: 1, delay: 30}
185 skip_fail: false
186
187- description: Create subnet_external
188 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
189 '. /root/keystonercv3; neutron subnet-create net04_ext {{ IPV4_NET_EXTERNAL_PREFIX }}.0/24 --name net04_ext__subnet --disable-dhcp --allocation-pool start={{ IPV4_NET_EXTERNAL_PREFIX }}.150,end={{ IPV4_NET_EXTERNAL_PREFIX }}.180 --gateway {{ IPV4_NET_EXTERNAL_PREFIX }}.1'
190 node_name: {{ HOSTNAME_CFG01 }}
191 retry: {count: 1, delay: 30}
192 skip_fail: false
193
194- description: Create net04
195 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
196 '. /root/keystonercv3; neutron net-create net04'
197 node_name: {{ HOSTNAME_CFG01 }}
198 retry: {count: 1, delay: 30}
199 skip_fail: false
200
201- description: Create subnet_net04
202 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
203 '. /root/keystonercv3; neutron subnet-create net04 {{ IPV4_NET_TENANT_PREFIX }}.0/24 --name net04__subnet --allocation-pool start={{ IPV4_NET_TENANT_PREFIX }}.120,end={{ IPV4_NET_TENANT_PREFIX }}.240'
204 node_name: {{ HOSTNAME_CFG01 }}
205 retry: {count: 1, delay: 30}
206 skip_fail: false
207
208- description: Create router
209 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
210 '. /root/keystonercv3; neutron router-create net04_router01'
211 node_name: {{ HOSTNAME_CFG01 }}
212 retry: {count: 1, delay: 30}
213 skip_fail: false
214
215- description: Set geteway
216 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
217 '. /root/keystonercv3; neutron router-gateway-set net04_router01 net04_ext'
218 node_name: {{ HOSTNAME_CFG01 }}
219 retry: {count: 1, delay: 30}
220 skip_fail: false
221
222- description: Add interface
223 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
224 '. /root/keystonercv3; neutron router-interface-add net04_router01 net04__subnet'
225 node_name: {{ HOSTNAME_CFG01 }}
226 retry: {count: 1, delay: 30}
227 skip_fail: false
228
Tatyana Leontovich56005da2017-12-11 13:16:51 +0200229- description: sync time
230 cmd: salt --hard-crash --state-output=mixed --state-verbose=False '*' cmd.run
231 'service ntp stop; ntpd -gq; service ntp start'
232 node_name: {{ HOSTNAME_CFG01 }}
233 retry: {count: 1, delay: 30}
234 skip_fail: false
Tatyana Leontovich8015f022018-07-04 11:57:51 +0300235
Tatyana Leontovich92063ef2018-07-04 14:28:09 +0300236{{ BACKUP.MACRO_WR_NGINX_MASTER() }}
Tatyana Leontovich8015f022018-07-04 11:57:51 +0300237{{ BACKUP.MACRO_BACKUP_BACKUPNINJA() }}
238{{ BACKUP.MACRO_BACKUP_XTRABACKUP() }}