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