blob: 394da504fcb7a1bbbff0bda1f2ce8f032f703294 [file] [log] [blame]
Dennis Dmitriev67aea4a2018-03-14 14:20:20 +02001{% from 'cookied-mcp-pike-dpdk/underlay.yaml' import HOSTNAME_CFG01 with context %}
2{% from 'cookied-mcp-pike-dpdk/underlay.yaml' import HOSTNAME_CTL01 with context %}
3{% from 'cookied-mcp-pike-dpdk/underlay.yaml' import HOSTNAME_CTL02 with context %}
4{% from 'cookied-mcp-pike-dpdk/underlay.yaml' import HOSTNAME_CTL03 with context %}
Oleksii Butenko5cd0a162018-06-14 18:18:10 +03005{% from 'cookied-mcp-pike-dpdk/underlay.yaml' import HOSTNAME_GTW01 with context %}
Oleksii Butenko2e8e8ee2018-06-21 11:10:13 +03006{% from 'cookied-mcp-pike-dpdk/underlay.yaml' import LAB_CONFIG_NAME with context %}
7{% from 'cookied-mcp-pike-dpdk/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 service-list'
87 node_name: {{ HOSTNAME_CFG01 }}
88 retry: {count: 1, 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
122- description: Check neutron agent-list
123 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
124 -C 'I@keystone:server' cmd.run '. /root/keystonerc; neutron agent-list'
125 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}
172 skip_fail: false
173
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
Tatyana Leontovich1dc28bc2018-05-25 14:50:10 +0300181- description: TMP step related to PROD-17975 for cmp
182 cmd: salt "cmp*" cmd.run ' systemctl restart openvswitch-switch.service'
183 node_name: {{ HOSTNAME_CFG01 }}
184 retry: {count: 1, delay: 30}
185 skip_fail: false
186
187- description: TMP step related to PROD-17975 for cmp
188 cmd: salt "gtw*" cmd.run ' systemctl restart openvswitch-switch.service'
189 node_name: {{ HOSTNAME_CFG01 }}
190 retry: {count: 1, delay: 30}
191 skip_fail: false
Dennis Dmitriev67aea4a2018-03-14 14:20:20 +0200192
Dennis Dmitriev67aea4a2018-03-14 14:20:20 +0200193- description: Create net04_external
194 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
195 '. /root/keystonercv3; neutron net-create net04_ext --router:external True --provider:physical_network physnet1 --provider:network_type flat'
196 node_name: {{ HOSTNAME_CFG01 }}
197 retry: {count: 1, delay: 30}
198 skip_fail: false
199
200- description: Create subnet_external
201 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
202 '. /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'
203 node_name: {{ HOSTNAME_CFG01 }}
204 retry: {count: 1, delay: 30}
205 skip_fail: false
206
207- description: Create net04
208 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
209 '. /root/keystonercv3; neutron net-create net04 --provider:network_type gre'
210 node_name: {{ HOSTNAME_CFG01 }}
211 retry: {count: 1, delay: 30}
212 skip_fail: false
213
214- description: Create subnet_net04
215 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
216 '. /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'
217 node_name: {{ HOSTNAME_CFG01 }}
218 retry: {count: 1, delay: 30}
219 skip_fail: false
220
221- description: Create router
222 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
223 '. /root/keystonercv3; neutron router-create net04_router01 --ha False'
224 node_name: {{ HOSTNAME_CFG01 }}
225 retry: {count: 1, delay: 30}
226 skip_fail: false
227
228- description: Set geteway
229 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
230 '. /root/keystonercv3; neutron router-gateway-set net04_router01 net04_ext'
231 node_name: {{ HOSTNAME_CFG01 }}
232 retry: {count: 1, delay: 30}
233 skip_fail: false
234
235- description: Add interface
236 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
237 '. /root/keystonercv3; neutron router-interface-add net04_router01 net04__subnet'
238 node_name: {{ HOSTNAME_CFG01 }}
239 retry: {count: 1, delay: 30}
240 skip_fail: false
Oleksii Butenko5cd0a162018-06-14 18:18:10 +0300241
242{{ SHARED.INSTALL_DOCKER_ON_GTW() }}
243{{ SHARED.RUN_NEW_TEMPEST() }}
244