blob: 61d693bacba6e45eedf65ff773becaa15b9ff476 [file] [log] [blame]
Oleksii Butenko7d9671c2017-11-01 17:27:23 +02001{% from 'cookied-bm-mcp-dvr-vxlan/underlay.yaml' import HOSTNAME_CFG01 with context %}
2{% from 'cookied-bm-mcp-dvr-vxlan/underlay.yaml' import HOSTNAME_CTL01 with context %}
3{% from 'cookied-bm-mcp-dvr-vxlan/underlay.yaml' import HOSTNAME_GTW01 with context %}
Oleksii Butenko336e4412018-05-21 14:59:27 +03004{% from 'cookied-bm-mcp-dvr-vxlan/underlay.yaml' import HOSTNAME_GTW02 with context %}
Oleksii Butenko7c48def2017-10-03 12:41:05 +03005{% from 'shared-salt.yaml' import IPV4_NET_EXTERNAL_PREFIX with context %}
6{% from 'shared-salt.yaml' import IPV4_NET_TENANT_PREFIX with context %}
Oleksii Butenko336e4412018-05-21 14:59:27 +03007{% import 'shared-salt.yaml' as SHARED with context %}
Oleksii Butenko7c48def2017-10-03 12:41:05 +03008
9# Install OpenStack control services
10
11- description: Install glance on all controllers
12 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
13 -C 'I@glance:server' state.sls glance -b 1
14 node_name: {{ HOSTNAME_CFG01 }}
15 retry: {count: 1, delay: 5}
16 skip_fail: false
17
18- description: Install keystone service (note that different fernet keys are created on different nodes)
19 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
20 -C 'I@keystone:server' state.sls keystone.server -b 1
21 node_name: {{ HOSTNAME_CFG01 }}
Oleksii Butenko7d9671c2017-11-01 17:27:23 +020022 retry: {count: 2, delay: 15}
Oleksii Butenko7c48def2017-10-03 12:41:05 +030023 skip_fail: false
24
25- description: Restart apache due to PROD-10477
26 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl*' cmd.run "systemctl restart apache2"
27 node_name: {{ HOSTNAME_CFG01 }}
28 retry: {count: 1, delay: 15}
29 skip_fail: false
30
31- description: Check apache status to PROD-10477
32 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl*' cmd.run "systemctl status apache2"
33 node_name: {{ HOSTNAME_CFG01 }}
34 retry: {count: 1, delay: 15}
35 skip_fail: false
36
37- description: Mount glusterfs.client volumes (resuires created 'keystone' and 'glusterfs' system users)
38 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
39 -C 'I@glance:server' state.sls glusterfs.client
40 node_name: {{ HOSTNAME_CFG01 }}
41 retry: {count: 1, delay: 5}
42 skip_fail: false
43
44- description: Update fernet keys for keystone server on the mounted glusterfs volume
45 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
46 -C 'I@keystone:server' state.sls keystone.server -b 1
47 node_name: {{ HOSTNAME_CFG01 }}
48 retry: {count: 1, delay: 5}
49 skip_fail: false
50
51- description: Populate keystone services/tenants/admins
52 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
53 -C 'I@keystone:client' state.sls keystone.client
54 node_name: {{ HOSTNAME_CFG01 }}
Dennis Dmitrievf073e6f2018-02-06 23:45:15 +020055 retry: {count: 2, delay: 5}
Oleksii Butenko7c48def2017-10-03 12:41:05 +030056 skip_fail: false
57
58- description: Check keystone service-list
59 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
60 -C 'I@keystone:server' cmd.run '. /root/keystonercv3; openstack service list'
61 node_name: {{ HOSTNAME_CFG01 }}
Oleksii Butenko7d9671c2017-11-01 17:27:23 +020062 retry: {count: 1, delay: 5}
Oleksii Butenko7c48def2017-10-03 12:41:05 +030063 skip_fail: false
64
65- description: Check glance image-list
66 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
67 -C 'I@keystone:server' cmd.run '. /root/keystonerc; glance image-list'
68 node_name: {{ HOSTNAME_CFG01 }}
69 retry: {count: 1, delay: 5}
70 skip_fail: false
71
72
73- description: Install nova on all controllers
74 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
75 -C 'I@nova:controller' state.sls nova -b 1
76 node_name: {{ HOSTNAME_CFG01 }}
77 retry: {count: 2, delay: 5}
78 skip_fail: false
79
80- description: Check nova service-list
81 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
82 -C 'I@keystone:server' cmd.run '. /root/keystonerc; nova --debug service-list'
83 node_name: {{ HOSTNAME_CFG01 }}
84 retry: {count: 3, delay: 5}
85 skip_fail: false
86
87
88- description: Install cinder
89 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
90 -C 'I@cinder:controller' state.sls cinder -b 1
91 node_name: {{ HOSTNAME_CFG01 }}
92 retry: {count: 1, delay: 5}
93 skip_fail: false
94
Oleksii Butenko9f2cf512017-12-19 14:03:41 +020095- description: Install cinder volume
96 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
97 -C 'I@cinder:volume' state.sls cinder
98 node_name: {{ HOSTNAME_CFG01 }}
Oleksii Butenko336e4412018-05-21 14:59:27 +030099 retry: {count: 2, delay: 5}
Oleksii Butenko9f2cf512017-12-19 14:03:41 +0200100 skip_fail: false
101
Oleksii Butenko7c48def2017-10-03 12:41:05 +0300102- description: Check cinder list
103 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
104 -C 'I@keystone:server' cmd.run '. /root/keystonerc; cinder list'
105 node_name: {{ HOSTNAME_CFG01 }}
106 retry: {count: 1, delay: 5}
107 skip_fail: false
108
109
110- description: Install neutron service
111 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
112 -C 'I@neutron:server' state.sls neutron -b 1
113 node_name: {{ HOSTNAME_CFG01 }}
114 retry: {count: 1, delay: 5}
115 skip_fail: false
116
117- description: Install neutron on gtw node
118 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
119 -C 'I@neutron:gateway' state.sls neutron
120 node_name: {{ HOSTNAME_CFG01 }}
121 retry: {count: 1, delay: 5}
122 skip_fail: false
123
Oleksii Butenko7c48def2017-10-03 12:41:05 +0300124- description: Check neutron agent-list
125 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
126 -C 'I@keystone:server' cmd.run '. /root/keystonerc; neutron agent-list'
127 node_name: {{ HOSTNAME_CFG01 }}
128 retry: {count: 1, delay: 5}
129 skip_fail: false
130
131- description: Install heat service
132 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
133 -C 'I@heat:server' state.sls heat -b 1
134 node_name: {{ HOSTNAME_CFG01 }}
135 retry: {count: 1, delay: 5}
136 skip_fail: false
137
138- description: Check heat service
139 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
140 -C 'I@keystone:server' cmd.run '. /root/keystonercv3; openstack orchestration resource type list'
141 node_name: {{ HOSTNAME_CFG01 }}
142 retry: {count: 5, delay: 10}
143 skip_fail: false
144
145
146- description: Deploy horizon dashboard
147 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
148 -C 'I@horizon:server' state.sls horizon
149 node_name: {{ HOSTNAME_CFG01 }}
150 retry: {count: 1, delay: 5}
151 skip_fail: true
152
153- description: Deploy nginx proxy
154 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
155 -C 'I@nginx:server' state.sls nginx
156 node_name: {{ HOSTNAME_CFG01 }}
157 retry: {count: 1, delay: 5}
158 skip_fail: true
159
160
161# Install compute node
162
163- description: Apply formulas for compute node
164 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply
165 node_name: {{ HOSTNAME_CFG01 }}
166 retry: {count: 1, delay: 5}
167 skip_fail: true
168
169- description: Re-apply(as in doc) formulas for compute node
170 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply
171 node_name: {{ HOSTNAME_CFG01 }}
172 retry: {count: 1, delay: 5}
Oleksii Butenko9f2601c2018-02-08 15:13:21 +0200173 skip_fail: false
Oleksii Butenko7c48def2017-10-03 12:41:05 +0300174
175- description: Check IP on computes
176 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' cmd.run
177 'ip a'
178 node_name: {{ HOSTNAME_CFG01 }}
179 retry: {count: 10, delay: 30}
180 skip_fail: false
181
Oleksii Butenko7c48def2017-10-03 12:41:05 +0300182- description: Create net04_external
183 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
Oleksii Butenko44afc962018-08-16 13:18:51 +0300184 '. /root/keystonercv3; neutron net-create net04_ext --router:external True --provider:physical_network physnet1 --provider:network_type vlan --provider:segmentation_id 2403'
Oleksii Butenko7c48def2017-10-03 12:41:05 +0300185 node_name: {{ HOSTNAME_CFG01 }}
186 retry: {count: 1, delay: 30}
187 skip_fail: false
188
189- description: Create subnet_external
190 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
Oleksii Butenko44afc962018-08-16 13:18:51 +0300191 '. /root/keystonercv3; neutron subnet-create net04_ext 172.17.42.0/26 --name net04_ext__subnet --disable-dhcp --allocation-pool start=172.17.42.10,end=172.17.42.60 --gateway 172.17.42.1'
Oleksii Butenko7c48def2017-10-03 12:41:05 +0300192 node_name: {{ HOSTNAME_CFG01 }}
193 retry: {count: 1, delay: 30}
194 skip_fail: false
195
196- description: Create net04
197 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
198 '. /root/keystonercv3; neutron net-create net04'
199 node_name: {{ HOSTNAME_CFG01 }}
200 retry: {count: 1, delay: 30}
201 skip_fail: false
202
203- description: Create subnet_net04
204 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
Oleksii Butenko336e4412018-05-21 14:59:27 +0300205 '. /root/keystonercv3; neutron subnet-create net04 192.168.0.0/24 --name net04__subnet --allocation-pool start=192.168.0.120,end=192.168.0.240'
Oleksii Butenko7c48def2017-10-03 12:41:05 +0300206 node_name: {{ HOSTNAME_CFG01 }}
207 retry: {count: 1, delay: 30}
208 skip_fail: false
209
210- description: Create router
211 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
212 '. /root/keystonercv3; neutron router-create net04_router01'
213 node_name: {{ HOSTNAME_CFG01 }}
214 retry: {count: 1, delay: 30}
215 skip_fail: false
216
217- description: Set geteway
218 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
219 '. /root/keystonercv3; neutron router-gateway-set net04_router01 net04_ext'
220 node_name: {{ HOSTNAME_CFG01 }}
221 retry: {count: 1, delay: 30}
222 skip_fail: false
223
224- description: Add interface
225 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
226 '. /root/keystonercv3; neutron router-interface-add net04_router01 net04__subnet'
227 node_name: {{ HOSTNAME_CFG01 }}
228 retry: {count: 1, delay: 30}
229 skip_fail: false
230
Oleksii Butenko336e4412018-05-21 14:59:27 +0300231{{ SHARED.INSTALL_DOCKER_ON_GTW() }}