Merge lp:~thedac/openstack-mojo-specs/ha-automation into lp:~ost-maintainers/openstack-mojo-specs/mojo-openstack-specs-1709
- ha-automation
- Merge into mojo-openstack-specs-1709
Status: | Merged |
---|---|
Merged at revision: | 334 |
Proposed branch: | lp:~thedac/openstack-mojo-specs/ha-automation |
Merge into: | lp:~ost-maintainers/openstack-mojo-specs/mojo-openstack-specs-1709 |
Diff against target: |
676 lines (+121/-56) 16 files modified
helper/bundles/cephradosgw-ha.yaml (+1/-1) helper/bundles/ha-next.yaml (+9/-9) helper/bundles/ha.yaml (+9/-9) helper/bundles/haphase1-next.yaml (+9/-9) helper/bundles/haphase1.yaml (+9/-9) helper/bundles/haphase2-next.yaml (+9/-9) helper/bundles/haphase2.yaml (+9/-9) helper/bundles/swift-ha-proxy-phase1.yaml (+1/-1) helper/setup/preflight.py (+44/-0) specs/full_stack/next_ha_oneshot/icehouse/manifest (+3/-0) specs/full_stack/next_ha_oneshot/kilo/manifest (+3/-0) specs/full_stack/next_ha_oneshot/liberty/manifest (+3/-0) specs/full_stack/next_ha_oneshot/mitaka/manifest (+3/-0) specs/full_stack/next_ha_oneshot/newton/manifest (+3/-0) specs/full_stack/next_ha_oneshot/ocata/manifest (+3/-0) specs/full_stack/next_ha_oneshot/pike/manifest (+3/-0) |
To merge this branch: | bzr merge lp:~thedac/openstack-mojo-specs/ha-automation |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ryan Beisner | Approve | ||
Review via email: mp+330464@code.launchpad.net |
Commit message
Description of the change
HA in OSCI
Ryan Beisner (1chb1n) wrote : | # |
Bah. Awesome except the `make lint` failures. I believe the {{ foo }} needs to be in quotes.
Traceback (most recent call last):
File "./helper/
sys.
File "./helper/
check_
File "./helper/
yaml.
File "/home/
return loader.
File "/home/
return self.construct_
File "/home/
for dummy in generator:
File "/home/
value = self.construct_
File "/home/
return BaseConstructor
File "/home/
"found unacceptable key (%s)" % exc, key_node.
yaml.constructo
in "haphase2.yaml", line 29, column 14
found unacceptable key (unhashable type: 'dict')
in "haphase2.yaml", line 29, column 15
- 335. By David Ames
-
Quote template variables
Preview Diff
1 | === modified file 'helper/bundles/cephradosgw-ha.yaml' |
2 | --- helper/bundles/cephradosgw-ha.yaml 2017-02-22 16:33:11 +0000 |
3 | +++ helper/bundles/cephradosgw-ha.yaml 2017-09-11 15:47:43 +0000 |
4 | @@ -27,7 +27,7 @@ |
5 | charm: ceph-radosgw |
6 | num_units: 3 |
7 | options: |
8 | - vip: 10.5.100.10 |
9 | + vip: "{{ MOJO_OS_VIP01 }}" |
10 | cephrgw-hacluster: |
11 | charm: hacluster |
12 | relations: |
13 | |
14 | === modified file 'helper/bundles/ha-next.yaml' |
15 | --- helper/bundles/ha-next.yaml 2017-09-05 21:37:34 +0000 |
16 | +++ helper/bundles/ha-next.yaml 2017-09-11 15:47:43 +0000 |
17 | @@ -9,7 +9,7 @@ |
18 | innodb-buffer-pool-size: 200M |
19 | sst-password: changeme |
20 | root-password: changeme |
21 | - vip: 10.5.100.1 |
22 | + vip: "{{ MOJO_OS_VIP01 }}" |
23 | mysql-hacluster: |
24 | charm: hacluster |
25 | options: |
26 | @@ -37,7 +37,7 @@ |
27 | options: |
28 | admin-password: openstack |
29 | admin-token: ubuntutesting |
30 | - vip: 10.5.100.2 |
31 | + vip: "{{ MOJO_OS_VIP02 }}" |
32 | keystone-hacluster: |
33 | charm: hacluster |
34 | options: |
35 | @@ -48,7 +48,7 @@ |
36 | constraints: mem=1G |
37 | num_units: 3 |
38 | options: |
39 | - vip: 10.5.100.3 |
40 | + vip: "{{ MOJO_OS_VIP03 }}" |
41 | dashboard-hacluster: |
42 | charm: hacluster |
43 | options: |
44 | @@ -67,7 +67,7 @@ |
45 | num_units: 3 |
46 | options: |
47 | network-manager: Neutron |
48 | - vip: 10.5.100.4 |
49 | + vip: "{{ MOJO_OS_VIP04 }}" |
50 | nova-cc-hacluster: |
51 | charm: hacluster |
52 | options: |
53 | @@ -86,7 +86,7 @@ |
54 | options: |
55 | block-device: "None" |
56 | glance-api-version: 2 |
57 | - vip: 10.5.100.5 |
58 | + vip: "{{ MOJO_OS_VIP05 }}" |
59 | cinder-hacluster: |
60 | charm: hacluster |
61 | options: |
62 | @@ -99,7 +99,7 @@ |
63 | constraints: mem=1G |
64 | num_units: 3 |
65 | options: |
66 | - vip: 10.5.100.9 |
67 | + vip: "{{ MOJO_OS_VIP06 }}" |
68 | glance-hacluster: |
69 | charm: hacluster |
70 | options: |
71 | @@ -113,7 +113,7 @@ |
72 | zone-assignment: manual |
73 | replicas: 3 |
74 | swift-hash: fdfef9d4-8b06-11e2-8ac0-531c923c8fae |
75 | - vip: 10.5.100.6 |
76 | + vip: "{{ MOJO_OS_VIP07 }}" |
77 | swift-hacluster: |
78 | charm: hacluster |
79 | options: |
80 | @@ -145,7 +145,7 @@ |
81 | constraints: mem=1G |
82 | num_units: 3 |
83 | options: |
84 | - vip: 10.5.100.7 |
85 | + vip: "{{ MOJO_OS_VIP08 }}" |
86 | ceilometer-hacluster: |
87 | charm: hacluster |
88 | options: |
89 | @@ -164,7 +164,7 @@ |
90 | num_units: 3 |
91 | options: |
92 | neutron-security-groups: True |
93 | - vip: 10.5.100.8 |
94 | + vip: "{{ MOJO_OS_VIP09 }}" |
95 | flat-network-providers: physnet1 |
96 | neutron-hacluster: |
97 | charm: hacluster |
98 | |
99 | === modified file 'helper/bundles/ha.yaml' |
100 | --- helper/bundles/ha.yaml 2017-09-06 21:02:15 +0000 |
101 | +++ helper/bundles/ha.yaml 2017-09-11 15:47:43 +0000 |
102 | @@ -12,7 +12,7 @@ |
103 | innodb-buffer-pool-size: 200M |
104 | sst-password: changeme |
105 | root-password: changeme |
106 | - vip: 10.5.100.1 |
107 | + vip: "{{ MOJO_OS_VIP01 }}" |
108 | mysql-hacluster: |
109 | charm: hacluster |
110 | options: |
111 | @@ -40,7 +40,7 @@ |
112 | options: |
113 | admin-password: openstack |
114 | admin-token: ubuntutesting |
115 | - vip: 10.5.100.2 |
116 | + vip: "{{ MOJO_OS_VIP02 }}" |
117 | keystone-hacluster: |
118 | charm: hacluster |
119 | options: |
120 | @@ -51,7 +51,7 @@ |
121 | constraints: mem=1G |
122 | num_units: 3 |
123 | options: |
124 | - vip: 10.5.100.3 |
125 | + vip: "{{ MOJO_OS_VIP03 }}" |
126 | dashboard-hacluster: |
127 | charm: hacluster |
128 | options: |
129 | @@ -70,7 +70,7 @@ |
130 | num_units: 3 |
131 | options: |
132 | network-manager: Neutron |
133 | - vip: 10.5.100.4 |
134 | + vip: "{{ MOJO_OS_VIP04 }}" |
135 | nova-cc-hacluster: |
136 | charm: hacluster |
137 | options: |
138 | @@ -89,7 +89,7 @@ |
139 | options: |
140 | block-device: "None" |
141 | glance-api-version: 2 |
142 | - vip: 10.5.100.5 |
143 | + vip: "{{ MOJO_OS_VIP05 }}" |
144 | cinder-hacluster: |
145 | charm: hacluster |
146 | options: |
147 | @@ -102,7 +102,7 @@ |
148 | constraints: mem=1G |
149 | num_units: 3 |
150 | options: |
151 | - vip: 10.5.100.9 |
152 | + vip: "{{ MOJO_OS_VIP06 }}" |
153 | glance-hacluster: |
154 | charm: hacluster |
155 | options: |
156 | @@ -116,7 +116,7 @@ |
157 | zone-assignment: manual |
158 | replicas: 3 |
159 | swift-hash: fdfef9d4-8b06-11e2-8ac0-531c923c8fae |
160 | - vip: 10.5.100.6 |
161 | + vip: "{{ MOJO_OS_VIP07 }}" |
162 | swift-hacluster: |
163 | charm: hacluster |
164 | options: |
165 | @@ -148,7 +148,7 @@ |
166 | constraints: mem=1G |
167 | num_units: 3 |
168 | options: |
169 | - vip: 10.5.100.7 |
170 | + vip: "{{ MOJO_OS_VIP08 }}" |
171 | ceilometer-hacluster: |
172 | charm: hacluster |
173 | options: |
174 | @@ -167,7 +167,7 @@ |
175 | num_units: 3 |
176 | options: |
177 | neutron-security-groups: True |
178 | - vip: 10.5.100.8 |
179 | + vip: "{{ MOJO_OS_VIP09 }}" |
180 | flat-network-providers: physnet1 |
181 | neutron-hacluster: |
182 | charm: hacluster |
183 | |
184 | === modified file 'helper/bundles/haphase1-next.yaml' |
185 | --- helper/bundles/haphase1-next.yaml 2017-09-05 21:37:34 +0000 |
186 | +++ helper/bundles/haphase1-next.yaml 2017-09-11 15:47:43 +0000 |
187 | @@ -26,7 +26,7 @@ |
188 | options: |
189 | admin-password: openstack |
190 | admin-token: ubuntutesting |
191 | - vip: 10.5.100.1 |
192 | + vip: "{{ MOJO_OS_VIP01 }}" |
193 | keystone-hacluster: |
194 | charm: hacluster |
195 | openstack-dashboard: |
196 | @@ -34,7 +34,7 @@ |
197 | constraints: mem=1G |
198 | num_units: 2 |
199 | options: |
200 | - vip: 10.5.100.2 |
201 | + vip: "{{ MOJO_OS_VIP02 }}" |
202 | dashboard-hacluster: |
203 | charm: hacluster |
204 | nova-compute: |
205 | @@ -51,7 +51,7 @@ |
206 | num_units: 2 |
207 | options: |
208 | network-manager: Neutron |
209 | - vip: 10.5.100.3 |
210 | + vip: "{{ MOJO_OS_VIP02 }}" |
211 | ncc-hacluster: |
212 | charm: hacluster |
213 | neutron-gateway: |
214 | @@ -67,7 +67,7 @@ |
215 | options: |
216 | block-device: "None" |
217 | glance-api-version: 2 |
218 | - vip: 10.5.100.4 |
219 | + vip: "{{ MOJO_OS_VIP03 }}" |
220 | constraints": mem=1G |
221 | cinder-hacluster: |
222 | charm: hacluster |
223 | @@ -78,7 +78,7 @@ |
224 | constraints: mem=1G |
225 | num_units: 2 |
226 | options: |
227 | - vip: 10.5.100.5 |
228 | + vip: "{{ MOJO_OS_VIP04 }}" |
229 | glance-hacluster: |
230 | charm: hacluster |
231 | swift-proxy: |
232 | @@ -89,7 +89,7 @@ |
233 | zone-assignment: manual |
234 | replicas: 3 |
235 | swift-hash: fdfef9d4-8b06-11e2-8ac0-531c923c8fae |
236 | - vip: 10.5.100.6 |
237 | + vip: "{{ MOJO_OS_VIP05 }}" |
238 | swift-proxy-hacluster: |
239 | charm: hacluster |
240 | swift-storage-z1: |
241 | @@ -121,7 +121,7 @@ |
242 | constraints: mem=1G |
243 | num_units: 2 |
244 | options: |
245 | - vip: 10.5.100.10 |
246 | + vip: "{{ MOJO_OS_VIP06 }}" |
247 | vip_cidr: 16 |
248 | openstack-percona-database: |
249 | inherits: openstack-services |
250 | @@ -131,7 +131,7 @@ |
251 | constraints: mem=1G |
252 | num_units: 2 |
253 | options: |
254 | - vip: 10.5.100.10 |
255 | + vip: "{{ MOJO_OS_VIP07 }}" |
256 | vip_cidr: 16 |
257 | root-password: crapper |
258 | sst-password: crapper |
259 | @@ -144,7 +144,7 @@ |
260 | constraints: mem=1G |
261 | options: |
262 | neutron-security-groups: True |
263 | - vip: 10.5.108.1 |
264 | + vip: "{{ MOJO_OS_VIP08 }}" |
265 | flat-network-providers: physnet1 |
266 | neutron-api-hacluster: |
267 | charm: hacluster |
268 | |
269 | === modified file 'helper/bundles/haphase1.yaml' |
270 | --- helper/bundles/haphase1.yaml 2017-09-05 21:37:34 +0000 |
271 | +++ helper/bundles/haphase1.yaml 2017-09-11 15:47:43 +0000 |
272 | @@ -29,7 +29,7 @@ |
273 | options: |
274 | admin-password: openstack |
275 | admin-token: ubuntutesting |
276 | - vip: 10.5.100.1 |
277 | + vip: "{{ MOJO_OS_VIP01 }}" |
278 | keystone-hacluster: |
279 | charm: hacluster |
280 | openstack-dashboard: |
281 | @@ -37,7 +37,7 @@ |
282 | constraints: mem=1G |
283 | num_units: 2 |
284 | options: |
285 | - vip: 10.5.100.2 |
286 | + vip: "{{ MOJO_OS_VIP02 }}" |
287 | dashboard-hacluster: |
288 | charm: hacluster |
289 | nova-compute: |
290 | @@ -55,7 +55,7 @@ |
291 | options: |
292 | network-manager: Neutron |
293 | quantum-security-groups: "yes" |
294 | - vip: 10.5.100.3 |
295 | + vip: "{{ MOJO_OS_VIP03 }}" |
296 | ncc-hacluster: |
297 | charm: hacluster |
298 | neutron-gateway: |
299 | @@ -70,7 +70,7 @@ |
300 | options: |
301 | block-device: "None" |
302 | glance-api-version: 2 |
303 | - vip: 10.5.100.4 |
304 | + vip: "{{ MOJO_OS_VIP04 }}" |
305 | constraints": mem=1G |
306 | cinder-hacluster: |
307 | charm: hacluster |
308 | @@ -81,7 +81,7 @@ |
309 | constraints: mem=1G |
310 | num_units: 2 |
311 | options: |
312 | - vip: 10.5.100.5 |
313 | + vip: "{{ MOJO_OS_VIP05 }}" |
314 | glance-hacluster: |
315 | charm: hacluster |
316 | swift-proxy: |
317 | @@ -92,7 +92,7 @@ |
318 | zone-assignment: manual |
319 | replicas: 3 |
320 | swift-hash: fdfef9d4-8b06-11e2-8ac0-531c923c8fae |
321 | - vip: 10.5.100.6 |
322 | + vip: "{{ MOJO_OS_VIP06 }}" |
323 | swift-proxy-hacluster: |
324 | charm: hacluster |
325 | swift-storage-z1: |
326 | @@ -124,7 +124,7 @@ |
327 | constraints: mem=1G |
328 | num_units: 2 |
329 | options: |
330 | - vip: 10.5.100.10 |
331 | + vip: "{{ MOJO_OS_VIP07 }}" |
332 | vip_cidr: 16 |
333 | openstack-percona-database: |
334 | inherits: openstack-services |
335 | @@ -134,7 +134,7 @@ |
336 | constraints: mem=1G |
337 | num_units: 2 |
338 | options: |
339 | - vip: 10.5.100.10 |
340 | + vip: "{{ MOJO_OS_VIP08 }}" |
341 | vip_cidr: 16 |
342 | root-password: crapper |
343 | sst-password: crapper |
344 | @@ -147,7 +147,7 @@ |
345 | constraints: mem=1G |
346 | options: |
347 | neutron-security-groups: True |
348 | - vip: 10.5.108.1 |
349 | + vip: "{{ MOJO_OS_VIP09 }}" |
350 | neutron-api-hacluster: |
351 | charm: hacluster |
352 | options: |
353 | |
354 | === modified file 'helper/bundles/haphase2-next.yaml' |
355 | --- helper/bundles/haphase2-next.yaml 2017-09-05 21:37:34 +0000 |
356 | +++ helper/bundles/haphase2-next.yaml 2017-09-11 15:47:43 +0000 |
357 | @@ -26,7 +26,7 @@ |
358 | options: |
359 | admin-password: openstack |
360 | admin-token: ubuntutesting |
361 | - vip: 10.5.100.1 |
362 | + vip: "{{ MOJO_OS_VIP01 }}" |
363 | keystone-hacluster: |
364 | charm: hacluster |
365 | openstack-dashboard: |
366 | @@ -34,7 +34,7 @@ |
367 | constraints: mem=1G |
368 | num_units: 2 |
369 | options: |
370 | - vip: 10.5.100.2 |
371 | + vip: "{{ MOJO_OS_VIP02 }}" |
372 | dashboard-hacluster: |
373 | charm: hacluster |
374 | nova-compute: |
375 | @@ -51,7 +51,7 @@ |
376 | num_units: 2 |
377 | options: |
378 | network-manager: Neutron |
379 | - vip: 10.5.100.3 |
380 | + vip: "{{ MOJO_OS_VIP03 }}" |
381 | ncc-hacluster: |
382 | charm: hacluster |
383 | neutron-gateway: |
384 | @@ -67,7 +67,7 @@ |
385 | options: |
386 | block-device: "None" |
387 | glance-api-version: 2 |
388 | - vip: 10.5.100.4 |
389 | + vip: "{{ MOJO_OS_VIP04 }}" |
390 | constraints": mem=1G |
391 | cinder-hacluster: |
392 | charm: hacluster |
393 | @@ -78,7 +78,7 @@ |
394 | constraints: mem=1G |
395 | num_units: 2 |
396 | options: |
397 | - vip: 10.5.100.5 |
398 | + vip: "{{ MOJO_OS_VIP05 }}" |
399 | glance-hacluster: |
400 | charm: hacluster |
401 | swift-proxy: |
402 | @@ -89,7 +89,7 @@ |
403 | zone-assignment: manual |
404 | replicas: 3 |
405 | swift-hash: fdfef9d4-8b06-11e2-8ac0-531c923c8fae |
406 | - vip: 10.5.100.6 |
407 | + vip: "{{ MOJO_OS_VIP06 }}" |
408 | swift-proxy-hacluster: |
409 | charm: hacluster |
410 | swift-storage-z1: |
411 | @@ -162,7 +162,7 @@ |
412 | constraints: mem=1G |
413 | num_units: 2 |
414 | options: |
415 | - vip: 10.5.100.10 |
416 | + vip: "{{ MOJO_OS_VIP07 }}" |
417 | vip_cidr: 16 |
418 | openstack-percona-database: |
419 | inherits: |
420 | @@ -174,7 +174,7 @@ |
421 | constraints: mem=1G |
422 | num_units: 2 |
423 | options: |
424 | - vip: 10.5.100.10 |
425 | + vip: "{{ MOJO_OS_VIP08 }}" |
426 | vip_cidr: 16 |
427 | root-password: crapper |
428 | sst-password: crapper |
429 | @@ -187,7 +187,7 @@ |
430 | constraints: mem=1G |
431 | options: |
432 | neutron-security-groups: True |
433 | - vip: 10.5.108.1 |
434 | + vip: "{{ MOJO_OS_VIP09 }}" |
435 | flat-network-providers: physnet1 |
436 | neutron-api-hacluster: |
437 | charm: hacluster |
438 | |
439 | === modified file 'helper/bundles/haphase2.yaml' |
440 | --- helper/bundles/haphase2.yaml 2017-09-05 21:37:34 +0000 |
441 | +++ helper/bundles/haphase2.yaml 2017-09-11 15:47:43 +0000 |
442 | @@ -29,7 +29,7 @@ |
443 | options: |
444 | admin-password: openstack |
445 | admin-token: ubuntutesting |
446 | - vip: 10.5.100.1 |
447 | + vip: "{{ MOJO_OS_VIP01 }}" |
448 | keystone-hacluster: |
449 | charm: hacluster |
450 | openstack-dashboard: |
451 | @@ -37,7 +37,7 @@ |
452 | constraints: mem=1G |
453 | num_units: 2 |
454 | options: |
455 | - vip: 10.5.100.2 |
456 | + vip: "{{ MOJO_OS_VIP02 }}" |
457 | dashboard-hacluster: |
458 | charm: hacluster |
459 | nova-compute: |
460 | @@ -55,7 +55,7 @@ |
461 | options: |
462 | network-manager: Neutron |
463 | quantum-security-groups: "yes" |
464 | - vip: 10.5.100.3 |
465 | + vip: "{{ MOJO_OS_VIP03 }}" |
466 | ncc-hacluster: |
467 | charm: hacluster |
468 | neutron-gateway: |
469 | @@ -70,7 +70,7 @@ |
470 | options: |
471 | block-device: "None" |
472 | glance-api-version: 2 |
473 | - vip: 10.5.100.4 |
474 | + vip: "{{ MOJO_OS_VIP04 }}" |
475 | constraints": mem=1G |
476 | cinder-hacluster: |
477 | charm: hacluster |
478 | @@ -81,7 +81,7 @@ |
479 | constraints: mem=1G |
480 | num_units: 2 |
481 | options: |
482 | - vip: 10.5.100.5 |
483 | + vip: "{{ MOJO_OS_VIP05 }}" |
484 | glance-hacluster: |
485 | charm: hacluster |
486 | swift-proxy: |
487 | @@ -92,7 +92,7 @@ |
488 | zone-assignment: manual |
489 | replicas: 3 |
490 | swift-hash: fdfef9d4-8b06-11e2-8ac0-531c923c8fae |
491 | - vip: 10.5.100.6 |
492 | + vip: "{{ MOJO_OS_VIP06 }}" |
493 | swift-proxy-hacluster: |
494 | charm: hacluster |
495 | swift-storage-z1: |
496 | @@ -166,7 +166,7 @@ |
497 | constraints: mem=1G |
498 | num_units: 2 |
499 | options: |
500 | - vip: 10.5.100.10 |
501 | + vip: "{{ MOJO_OS_VIP07 }}" |
502 | vip_cidr: 16 |
503 | openstack-percona-database: |
504 | inherits: |
505 | @@ -178,7 +178,7 @@ |
506 | constraints: mem=1G |
507 | num_units: 2 |
508 | options: |
509 | - vip: 10.5.100.10 |
510 | + vip: "{{ MOJO_OS_VIP08 }}" |
511 | vip_cidr: 16 |
512 | root-password: crapper |
513 | sst-password: crapper |
514 | @@ -191,7 +191,7 @@ |
515 | constraints: mem=1G |
516 | options: |
517 | neutron-security-groups: True |
518 | - vip: 10.5.108.1 |
519 | + vip: "{{ MOJO_OS_VIP09 }}" |
520 | neutron-api-hacluster: |
521 | charm: hacluster |
522 | options: |
523 | |
524 | === modified file 'helper/bundles/swift-ha-proxy-phase1.yaml' |
525 | --- helper/bundles/swift-ha-proxy-phase1.yaml 2017-09-05 21:37:34 +0000 |
526 | +++ helper/bundles/swift-ha-proxy-phase1.yaml 2017-09-11 15:47:43 +0000 |
527 | @@ -23,7 +23,7 @@ |
528 | options: |
529 | zone-assignment: manual |
530 | replicas: 3 |
531 | - vip: 10.5.100.1 |
532 | + vip: "{{ MOJO_OS_VIP01 }}" |
533 | swift-hash: fdfef9d4-8b06-11e2-8ac0-531c923c8fae |
534 | disable-ring-balance: False |
535 | swift-storage-z1: |
536 | |
537 | === added file 'helper/setup/preflight.py' |
538 | --- helper/setup/preflight.py 1970-01-01 00:00:00 +0000 |
539 | +++ helper/setup/preflight.py 2017-09-11 15:47:43 +0000 |
540 | @@ -0,0 +1,44 @@ |
541 | +#!/usr/bin/python |
542 | + |
543 | +import logging |
544 | +import os |
545 | + |
546 | +REQUIRED = [ |
547 | + 'MOJO_STAGE', |
548 | + 'MOJO_WORKSPACE', |
549 | + 'MOJO_PROJECT', |
550 | + 'MOJO_SERIES', |
551 | + 'MOJO_SPEC', |
552 | + 'OS_REGION_NAME', |
553 | + 'OS_PASSWORD', |
554 | + 'OS_AUTH_URL', |
555 | + 'OS_USERNAME', |
556 | + 'OS_PROJECT_NAME', |
557 | + 'MOJO_OS_VIP01', |
558 | + 'MOJO_OS_VIP02', |
559 | + 'MOJO_OS_VIP03', |
560 | + 'MOJO_OS_VIP04', |
561 | + 'MOJO_OS_VIP05', |
562 | + 'MOJO_OS_VIP06', |
563 | + 'MOJO_OS_VIP07', |
564 | + 'MOJO_OS_VIP08', |
565 | + 'MOJO_OS_VIP09', |
566 | +] |
567 | + |
568 | + |
569 | +class MissingEnvVariableExeption(Exception): |
570 | + pass |
571 | + |
572 | + |
573 | +logging.info("Running pre-flight check for environment variables") |
574 | +for var in REQUIRED: |
575 | + if os.environ.get(var) is None: |
576 | + raise MissingEnvVariableExeption( |
577 | + "The variable, {}, is missing from the environment.\n" |
578 | + "Make sure all required variables in the {} " |
579 | + "script are available before running mojo\n\n" |
580 | + "Required: {}" |
581 | + "".format(var, os.path.basename(__file__), |
582 | + ", ".join(REQUIRED))) |
583 | + |
584 | +logging.debug("All required environment variables successfully found.") |
585 | |
586 | === modified file 'specs/full_stack/next_ha_oneshot/icehouse/manifest' |
587 | --- specs/full_stack/next_ha_oneshot/icehouse/manifest 2017-02-22 14:27:58 +0000 |
588 | +++ specs/full_stack/next_ha_oneshot/icehouse/manifest 2017-09-11 15:47:43 +0000 |
589 | @@ -1,3 +1,6 @@ |
590 | +# Validate env variables |
591 | +script config=preflight.py |
592 | + |
593 | # Collect the charm branches from Launchpad |
594 | collect config=collect-next-ha |
595 | |
596 | |
597 | === added symlink 'specs/full_stack/next_ha_oneshot/icehouse/preflight.py' |
598 | === target is u'../../../../helper/setup/preflight.py' |
599 | === modified file 'specs/full_stack/next_ha_oneshot/kilo/manifest' |
600 | --- specs/full_stack/next_ha_oneshot/kilo/manifest 2017-02-22 14:27:58 +0000 |
601 | +++ specs/full_stack/next_ha_oneshot/kilo/manifest 2017-09-11 15:47:43 +0000 |
602 | @@ -1,3 +1,6 @@ |
603 | +# Validate env variables |
604 | +script config=preflight.py |
605 | + |
606 | # Collect the charm branches from Launchpad |
607 | collect config=collect-next-ha |
608 | |
609 | |
610 | === added symlink 'specs/full_stack/next_ha_oneshot/kilo/preflight.py' |
611 | === target is u'../../../../helper/setup/preflight.py' |
612 | === modified file 'specs/full_stack/next_ha_oneshot/liberty/manifest' |
613 | --- specs/full_stack/next_ha_oneshot/liberty/manifest 2017-02-22 14:27:58 +0000 |
614 | +++ specs/full_stack/next_ha_oneshot/liberty/manifest 2017-09-11 15:47:43 +0000 |
615 | @@ -1,3 +1,6 @@ |
616 | +# Validate env variables |
617 | +script config=preflight.py |
618 | + |
619 | # Collect the charm branches from Launchpad |
620 | collect config=collect-next-ha |
621 | |
622 | |
623 | === added symlink 'specs/full_stack/next_ha_oneshot/liberty/preflight.py' |
624 | === target is u'../../../../helper/setup/preflight.py' |
625 | === modified file 'specs/full_stack/next_ha_oneshot/mitaka/manifest' |
626 | --- specs/full_stack/next_ha_oneshot/mitaka/manifest 2017-02-22 14:27:58 +0000 |
627 | +++ specs/full_stack/next_ha_oneshot/mitaka/manifest 2017-09-11 15:47:43 +0000 |
628 | @@ -1,3 +1,6 @@ |
629 | +# Validate env variables |
630 | +script config=preflight.py |
631 | + |
632 | # Collect the charm branches from Launchpad |
633 | collect config=collect-next-ha |
634 | |
635 | |
636 | === added symlink 'specs/full_stack/next_ha_oneshot/mitaka/preflight.py' |
637 | === target is u'../../../../helper/setup/preflight.py' |
638 | === modified file 'specs/full_stack/next_ha_oneshot/newton/manifest' |
639 | --- specs/full_stack/next_ha_oneshot/newton/manifest 2017-02-22 14:27:58 +0000 |
640 | +++ specs/full_stack/next_ha_oneshot/newton/manifest 2017-09-11 15:47:43 +0000 |
641 | @@ -1,3 +1,6 @@ |
642 | +# Validate env variables |
643 | +script config=preflight.py |
644 | + |
645 | # Collect the charm branches from Launchpad |
646 | collect config=collect-next-ha |
647 | |
648 | |
649 | === added symlink 'specs/full_stack/next_ha_oneshot/newton/preflight.py' |
650 | === target is u'../../../../helper/setup/preflight.py' |
651 | === modified file 'specs/full_stack/next_ha_oneshot/ocata/manifest' |
652 | --- specs/full_stack/next_ha_oneshot/ocata/manifest 2017-02-22 14:27:58 +0000 |
653 | +++ specs/full_stack/next_ha_oneshot/ocata/manifest 2017-09-11 15:47:43 +0000 |
654 | @@ -1,3 +1,6 @@ |
655 | +# Validate env variables |
656 | +script config=preflight.py |
657 | + |
658 | # Collect the charm branches from Launchpad |
659 | collect config=collect-next-ha |
660 | |
661 | |
662 | === added symlink 'specs/full_stack/next_ha_oneshot/ocata/preflight.py' |
663 | === target is u'../../../../helper/setup/preflight.py' |
664 | === modified file 'specs/full_stack/next_ha_oneshot/pike/manifest' |
665 | --- specs/full_stack/next_ha_oneshot/pike/manifest 2017-08-30 17:25:03 +0000 |
666 | +++ specs/full_stack/next_ha_oneshot/pike/manifest 2017-09-11 15:47:43 +0000 |
667 | @@ -1,3 +1,6 @@ |
668 | +# Validate env variables |
669 | +script config=preflight.py |
670 | + |
671 | # Collect the charm branches from Launchpad |
672 | collect config=collect-next-ha |
673 | |
674 | |
675 | === added symlink 'specs/full_stack/next_ha_oneshot/pike/preflight.py' |
676 | === target is u'../../../../helper/setup/preflight.py' |
Awesome!