blob: d4e8938c83778f497283a950c304cdf505dcaaa4 [file] [log] [blame]
Dennis Dmitriev67aea4a2018-03-14 14:20:20 +02001{% from 'cookied-mcp-pike-ovs/underlay.yaml' import HOSTNAME_CFG01 with context %}
2{% from 'cookied-mcp-pike-ovs/underlay.yaml' import HOSTNAME_CTL01 with context %}
3{% from 'cookied-mcp-pike-ovs/underlay.yaml' import HOSTNAME_CTL02 with context %}
4{% from 'cookied-mcp-pike-ovs/underlay.yaml' import HOSTNAME_CTL03 with context %}
5{% from 'cookied-mcp-pike-ovs/underlay.yaml' import HOSTNAME_GTW01 with context %}
Oleksii Butenko2e8e8ee2018-06-21 11:10:13 +03006{% from 'cookied-mcp-pike-ovs/underlay.yaml' import LAB_CONFIG_NAME with context %}
7{% from 'cookied-mcp-pike-ovs/underlay.yaml' import DOMAIN_NAME with context %}
Dennis Dmitriev67aea4a2018-03-14 14:20:20 +02008{% from 'shared-salt.yaml' import IPV4_NET_EXTERNAL_PREFIX with context %}
9{% from 'shared-salt.yaml' import IPV4_NET_TENANT_PREFIX with context %}
Oleksii Butenko2e8e8ee2018-06-21 11:10:13 +030010{% set LAB_CONFIG_NAME = os_env('LAB_CONFIG_NAME') %}
Oleksii Butenko5cd0a162018-06-14 18:18:10 +030011{% import 'shared-salt.yaml' as SHARED with context %}
12
Dennis Dmitriev67aea4a2018-03-14 14:20:20 +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 }}
59 retry: {count: 2, delay: 5}
60 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/keystonerc; 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/keystonerc; 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: 1, 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/keystonerc; 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# isntall designate
obutenko830e6f62018-07-03 16:37:13 +0300122#- description: Install bind
123# cmd: salt --hard-crash --state-output=mixed --state-verbose=False
124# -C 'I@bind:server' state.sls bind
125# node_name: {{ HOSTNAME_CFG01 }}
126# retry: {count: 1, delay: 5}
127# skip_fail: false
Dennis Dmitriev67aea4a2018-03-14 14:20:20 +0200128
obutenko830e6f62018-07-03 16:37:13 +0300129#- description: Install designate
130# cmd: salt --hard-crash --state-output=mixed --state-verbose=False
131# -C 'I@designate:server' state.sls designate -b 1
132# node_name: {{ HOSTNAME_CFG01 }}
133# retry: {count: 5, delay: 10}
134# skip_fail: false
Dennis Dmitriev67aea4a2018-03-14 14:20:20 +0200135
136- description: Check neutron agent-list
137 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
138 -C 'I@keystone:server' cmd.run '. /root/keystonerc; neutron agent-list'
139 node_name: {{ HOSTNAME_CFG01 }}
140 retry: {count: 1, delay: 5}
141 skip_fail: false
142
143
144- description: Install heat service
145 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
146 -C 'I@heat:server' state.sls heat -b 1
147 node_name: {{ HOSTNAME_CFG01 }}
148 retry: {count: 1, delay: 5}
149 skip_fail: false
150
151- description: Check heat service
152 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
153 -C 'I@keystone:server' cmd.run '. /root/keystonercv3; openstack orchestration resource type list'
154 node_name: {{ HOSTNAME_CFG01 }}
155 retry: {count: 5, delay: 10}
156 skip_fail: false
157
158
159- description: Deploy horizon dashboard
160 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
161 -C 'I@horizon:server' state.sls horizon
162 node_name: {{ HOSTNAME_CFG01 }}
163 retry: {count: 1, delay: 5}
164 skip_fail: true
165
166- description: Deploy nginx proxy
167 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
168 -C 'I@nginx:server' state.sls nginx
169 node_name: {{ HOSTNAME_CFG01 }}
170 retry: {count: 1, delay: 5}
171 skip_fail: true
172
173
174# Install compute node
175
176- description: Apply formulas for compute node
177 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply
178 node_name: {{ HOSTNAME_CFG01 }}
179 retry: {count: 1, delay: 5}
180 skip_fail: true
181
182- description: Re-apply(as in doc) formulas for compute node
183 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply
184 node_name: {{ HOSTNAME_CFG01 }}
185 retry: {count: 1, delay: 5}
186 skip_fail: false
187
188- description: Check IP on computes
189 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' cmd.run
190 'ip a'
191 node_name: {{ HOSTNAME_CFG01 }}
192 retry: {count: 10, delay: 30}
193 skip_fail: false
194
Dennis Dmitriev67aea4a2018-03-14 14:20:20 +0200195- description: Create net04_external
196 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
197 '. /root/keystonercv3; neutron net-create net04_ext --router:external True --provider:physical_network physnet1 --provider:network_type flat'
198 node_name: {{ HOSTNAME_CFG01 }}
199 retry: {count: 1, delay: 30}
200 skip_fail: false
201
202- description: Create subnet_external
203 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
204 '. /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'
205 node_name: {{ HOSTNAME_CFG01 }}
206 retry: {count: 1, delay: 30}
207 skip_fail: false
208
209- description: Create net04
210 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
211 '. /root/keystonercv3; neutron net-create net04'
212 node_name: {{ HOSTNAME_CFG01 }}
213 retry: {count: 1, delay: 30}
214 skip_fail: false
215
216- description: Create subnet_net04
217 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
218 '. /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'
219 node_name: {{ HOSTNAME_CFG01 }}
220 retry: {count: 1, delay: 30}
221 skip_fail: false
222
223- description: Create router
224 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
225 '. /root/keystonercv3; neutron router-create net04_router01'
226 node_name: {{ HOSTNAME_CFG01 }}
227 retry: {count: 1, delay: 30}
228 skip_fail: false
229
230- description: Set geteway
231 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
232 '. /root/keystonercv3; neutron router-gateway-set net04_router01 net04_ext'
233 node_name: {{ HOSTNAME_CFG01 }}
234 retry: {count: 1, delay: 30}
235 skip_fail: false
236
237- description: Add interface
238 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
239 '. /root/keystonercv3; neutron router-interface-add net04_router01 net04__subnet'
240 node_name: {{ HOSTNAME_CFG01 }}
241 retry: {count: 1, delay: 30}
242 skip_fail: false
243
Dennis Dmitriev67aea4a2018-03-14 14:20:20 +0200244- description: sync time
245 cmd: salt --hard-crash --state-output=mixed --state-verbose=False '*' cmd.run
246 'service ntp stop; ntpd -gq; service ntp start'
247 node_name: {{ HOSTNAME_CFG01 }}
248 retry: {count: 1, delay: 30}
249 skip_fail: false
250
Oleksii Butenko5cd0a162018-06-14 18:18:10 +0300251{{ SHARED.INSTALL_DOCKER_ON_GTW() }}