blob: 6fea7952a6588a94dac894f95e3d5443a96571f4 [file] [log] [blame]
Tatyana Leontovichb0b68d92018-01-11 13:27:08 +02001{% from 'virtual-pike-ovs-dpdk/underlay.yaml' import HOSTNAME_CFG01 with context %}
2{% from 'virtual-pike-ovs-dpdk/underlay.yaml' import HOSTNAME_CTL01 with context %}
3{% from 'virtual-pike-ovs-dpdk/underlay.yaml' import HOSTNAME_CTL02 with context %}
4{% from 'virtual-pike-ovs-dpdk/underlay.yaml' import HOSTNAME_CTL03 with context %}
Tatyana Leontovich56005da2017-12-11 13:16:51 +02005{% from 'shared-salt.yaml' import IPV4_NET_EXTERNAL_PREFIX with context %}
6{% from 'shared-salt.yaml' import IPV4_NET_TENANT_PREFIX with context %}
7
Tatyana Leontovich0eb5ca32018-07-13 22:05:17 +03008{% set DOMAIN_NAME = os_env('DOMAIN_NAME', 'virtual-pike-ovs-dpdk') %}
9{% import 'shared-backup-restore.yaml' as BACKUP with context %}
10{% import 'shared-salt.yaml' as SHARED with context %}
11
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
Tatyana Leontovichb0b68d92018-01-11 13:27:08 +020071 -C 'I@keystone:server' cmd.run '. /root/keystonerc; glance image-list'
Tatyana Leontovich56005da2017-12-11 13:16:51 +020072 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
Tatyana Leontovichb0b68d92018-01-11 13:27:08 +020086 -C 'I@keystone:server' cmd.run '. /root/keystonerc; nova service-list'
Tatyana Leontovich56005da2017-12-11 13:16:51 +020087 node_name: {{ HOSTNAME_CFG01 }}
Tatyana Leontovichb0b68d92018-01-11 13:27:08 +020088 retry: {count: 1, delay: 5}
Tatyana Leontovich56005da2017-12-11 13:16:51 +020089 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 }}
Tatyana Leontovichb0b68d92018-01-11 13:27:08 +020096 retry: {count: 1, delay: 5}
Tatyana Leontovich56005da2017-12-11 13:16:51 +020097 skip_fail: false
98
99- description: Check cinder list
100 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
Tatyana Leontovichb0b68d92018-01-11 13:27:08 +0200101 -C 'I@keystone:server' cmd.run '. /root/keystonerc; cinder list'
Tatyana Leontovich56005da2017-12-11 13:16:51 +0200102 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
Tatyana Leontovichb0b68d92018-01-11 13:27:08 +0200121
Tatyana Leontovich56005da2017-12-11 13:16:51 +0200122- description: Check neutron agent-list
123 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
Tatyana Leontovichb0b68d92018-01-11 13:27:08 +0200124 -C 'I@keystone:server' cmd.run '. /root/keystonerc; neutron agent-list'
Tatyana Leontovich56005da2017-12-11 13:16:51 +0200125 node_name: {{ HOSTNAME_CFG01 }}
126 retry: {count: 1, delay: 5}
127 skip_fail: false
128
129
130- description: Install heat service
131 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
132 -C 'I@heat:server' state.sls heat -b 1
133 node_name: {{ HOSTNAME_CFG01 }}
134 retry: {count: 1, delay: 5}
135 skip_fail: false
136
137- description: Check heat service
138 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
139 -C 'I@keystone:server' cmd.run '. /root/keystonercv3; openstack orchestration resource type list'
140 node_name: {{ HOSTNAME_CFG01 }}
141 retry: {count: 5, delay: 10}
142 skip_fail: false
143
144
145- description: Deploy horizon dashboard
146 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
147 -C 'I@horizon:server' state.sls horizon
148 node_name: {{ HOSTNAME_CFG01 }}
149 retry: {count: 1, delay: 5}
150 skip_fail: true
151
152- description: Deploy nginx proxy
153 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
154 -C 'I@nginx:server' state.sls nginx
155 node_name: {{ HOSTNAME_CFG01 }}
156 retry: {count: 1, delay: 5}
157 skip_fail: true
158
159
160# Install compute node
161
162- description: Apply formulas for compute node
163 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply
164 node_name: {{ HOSTNAME_CFG01 }}
165 retry: {count: 1, delay: 5}
166 skip_fail: true
167
168- description: Re-apply(as in doc) formulas for compute node
169 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply
170 node_name: {{ HOSTNAME_CFG01 }}
171 retry: {count: 1, delay: 5}
Oleksii Butenko9f2601c2018-02-08 15:13:21 +0200172 skip_fail: false
Tatyana Leontovich56005da2017-12-11 13:16:51 +0200173
174- description: Check IP on computes
175 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' cmd.run
176 'ip a'
177 node_name: {{ HOSTNAME_CFG01 }}
178 retry: {count: 10, delay: 30}
179 skip_fail: false
180
181
182 # Upload cirros image
183
184- description: Upload cirros image on ctl01
185 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
186 'wget http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-i386-disk.img'
187 node_name: {{ HOSTNAME_CFG01 }}
188 retry: {count: 2, delay: 30}
189 skip_fail: false
190
Tatyana Leontovichb0b68d92018-01-11 13:27:08 +0200191- description: Register image in glance
192 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
193 '. /root/keystonercv3; glance --timeout 120 image-create --name cirros --visibility public --disk-format qcow2 --container-format bare --progress < /root/cirros-0.3.4-i386-disk.img'
194 node_name: {{ HOSTNAME_CFG01 }}
195 retry: {count: 1, delay: 30}
196 skip_fail: false
197
Tatyana Leontovich56005da2017-12-11 13:16:51 +0200198- description: Create net04_external
199 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
200 '. /root/keystonercv3; neutron net-create net04_ext --router:external True --provider:physical_network physnet1 --provider:network_type flat'
201 node_name: {{ HOSTNAME_CFG01 }}
202 retry: {count: 1, delay: 30}
203 skip_fail: false
204
205- description: Create subnet_external
206 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
207 '. /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'
208 node_name: {{ HOSTNAME_CFG01 }}
209 retry: {count: 1, delay: 30}
210 skip_fail: false
211
212- description: Create net04
213 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
Tatyana Leontovichb0b68d92018-01-11 13:27:08 +0200214 '. /root/keystonercv3; neutron net-create net04 --provider:network_type gre'
Tatyana Leontovich56005da2017-12-11 13:16:51 +0200215 node_name: {{ HOSTNAME_CFG01 }}
216 retry: {count: 1, delay: 30}
217 skip_fail: false
218
219- description: Create subnet_net04
220 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
221 '. /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'
222 node_name: {{ HOSTNAME_CFG01 }}
223 retry: {count: 1, delay: 30}
224 skip_fail: false
225
226- description: Create router
227 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
Tatyana Leontovichb0b68d92018-01-11 13:27:08 +0200228 '. /root/keystonercv3; neutron router-create net04_router01 --ha False'
Tatyana Leontovich56005da2017-12-11 13:16:51 +0200229 node_name: {{ HOSTNAME_CFG01 }}
230 retry: {count: 1, delay: 30}
231 skip_fail: false
232
233- description: Set geteway
234 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
235 '. /root/keystonercv3; neutron router-gateway-set net04_router01 net04_ext'
236 node_name: {{ HOSTNAME_CFG01 }}
237 retry: {count: 1, delay: 30}
238 skip_fail: false
239
240- description: Add interface
241 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
242 '. /root/keystonercv3; neutron router-interface-add net04_router01 net04__subnet'
243 node_name: {{ HOSTNAME_CFG01 }}
244 retry: {count: 1, delay: 30}
245 skip_fail: false
246
Tatyana Leontovichb0b68d92018-01-11 13:27:08 +0200247# Configure cinder-volume salt-call
248- description: Set disks 01
249 cmd: salt-call cmd.run 'echo -e "nn\np\n\n\n\nw" | fdisk /dev/vdb'
250 node_name: {{ HOSTNAME_CTL01 }}
Tatyana Leontovich56005da2017-12-11 13:16:51 +0200251 retry: {count: 1, delay: 30}
252 skip_fail: false
253
Tatyana Leontovichb0b68d92018-01-11 13:27:08 +0200254- description: Set disks 02
255 cmd: salt-call cmd.run 'echo -e "nn\np\n\n\n\nw" | fdisk /dev/vdb'
256 node_name: {{ HOSTNAME_CTL02 }}
Tatyana Leontovich56005da2017-12-11 13:16:51 +0200257 retry: {count: 1, delay: 30}
258 skip_fail: false
259
Tatyana Leontovichb0b68d92018-01-11 13:27:08 +0200260- description: Set disks 03
261 cmd: salt-call cmd.run 'echo -e "nn\np\n\n\n\nw" | fdisk /dev/vdb'
262 node_name: {{ HOSTNAME_CTL03 }}
Tatyana Leontovich56005da2017-12-11 13:16:51 +0200263 retry: {count: 1, delay: 30}
264 skip_fail: false
265
Tatyana Leontovichb0b68d92018-01-11 13:27:08 +0200266- description: Create partitions 01
267 cmd: salt-call cmd.run 'pvcreate /dev/vdb1'
268 node_name: {{ HOSTNAME_CTL01 }}
Tatyana Leontovich56005da2017-12-11 13:16:51 +0200269 retry: {count: 1, delay: 30}
270 skip_fail: false
271
Tatyana Leontovichb0b68d92018-01-11 13:27:08 +0200272- description: Create partitions 02
273 cmd: salt-call cmd.run 'pvcreate /dev/vdb1'
274 node_name: {{ HOSTNAME_CTL02 }}
Tatyana Leontovich56005da2017-12-11 13:16:51 +0200275 retry: {count: 1, delay: 30}
276 skip_fail: false
277
Tatyana Leontovichb0b68d92018-01-11 13:27:08 +0200278- description: Create partitions 03
279 cmd: salt-call cmd.run 'pvcreate /dev/vdb1'
280 node_name: {{ HOSTNAME_CTL03 }}
Tatyana Leontovich56005da2017-12-11 13:16:51 +0200281 retry: {count: 1, delay: 30}
282 skip_fail: false
Tatyana Leontovich0eb5ca32018-07-13 22:05:17 +0300283
284{{ SHARED.INSTALL_DOCKER_ON_GTW() }}
285{{ BACKUP.MACRO_WR_NGINX_MASTER() }}
286{{ BACKUP.MACRO_BACKUP_BACKUPNINJA() }}
287{{ BACKUP.MACRO_BACKUP_XTRABACKUP() }}