Merge lp:~zulcss/openstack-charm-testing/lxd-refactor into lp:openstack-charm-testing

Proposed by Chuck Short
Status: Merged
Merged at revision: 123
Proposed branch: lp:~zulcss/openstack-charm-testing/lxd-refactor
Merge into: lp:openstack-charm-testing
Diff against target: 1333 lines (+1062/-200)
13 files modified
bundles/dev/nc-lxd-3host.yaml (+0/-199)
bundles/lxd/lxd.yaml (+310/-0)
bundles/lxd/source/cinder-master.yaml (+10/-0)
bundles/lxd/source/glance-master.yaml (+10/-0)
bundles/lxd/source/horizon-master.yaml (+10/-0)
bundles/lxd/source/keystone-master.yaml (+10/-0)
bundles/lxd/source/lxd.yaml (+367/-0)
bundles/lxd/source/neutron-master.yaml (+19/-0)
bundles/lxd/source/nova-master.yaml (+19/-0)
configure (+1/-1)
profiles/lxd (+69/-0)
tools/images-lxd-convert.sh (+221/-0)
tools/images_lxd.sh (+16/-0)
To merge this branch: bzr merge lp:~zulcss/openstack-charm-testing/lxd-refactor
Reviewer Review Type Date Requested Status
Ryan Beisner Approve
Review via email: mp+265980@code.launchpad.net

Description of the change

LXD refactor.

To post a comment you must log in.
Revision history for this message
Ryan Beisner (1chb1n) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== removed file 'bundles/dev/nc-lxd-3host.yaml'
2--- bundles/dev/nc-lxd-3host.yaml 2015-07-21 13:28:13 +0000
3+++ bundles/dev/nc-lxd-3host.yaml 1970-01-01 00:00:00 +0000
4@@ -1,199 +0,0 @@
5-# An experimental bare metal bundle to test nc-lxd. Recommend vivid-kilo
6-# for lxd testing. A three-machine smoosh. Temporarily uses kilo-support
7-# branches.
8-#
9-# NOTES(beisner) Feb 23, 2015:
10-# /!\ Beware, YMMV. This might be crazy, ill-advised for production use.
11-# Ceph is excluded, as it would need 3 units for quorum.
12-#
13-# USAGE EXAMPLE:
14-# Ensure default-series: vivid is defined in environments.yaml.
15-# juju switch maas
16-# juju bootstrap --series=vivid --upload-tools --constraints arch=amd64
17-# juju-deployer -v -c <this_file>.yaml -d three-smoosh
18-#=============================================================================
19-three-smoosh:
20- series: vivid
21- services:
22- "juju-gui":
23- charm: "cs:trusty/juju-gui"
24- num_units: 1
25- annotations:
26- "gui-x": "500"
27- "gui-y": "1000"
28- to:
29- - "lxc:0"
30- keystone:
31- branch: lp:~openstack-charmers/charms/trusty/keystone/next
32- num_units: 1
33- options:
34- "admin-password": openstack
35- annotations:
36- "gui-x": "500"
37- "gui-y": "0"
38- to:
39- - "lxc:0"
40- neutron-gateway:
41- branch: lp:~openstack-charmers/charms/trusty/neutron-gateway/next
42- num_units: 1
43- options:
44- "ext-port": eth1
45- annotations:
46- "gui-x": "0"
47- "gui-y": "0"
48- to:
49- - "0"
50- neutron-api:
51- branch: lp:~openstack-charmers/charms/trusty/neutron-api/next
52- num_units: 1
53- options:
54- "neutron-security-groups": true
55- annotations:
56- "gui-x": "500"
57- "gui-y": "500"
58- to:
59- - "lxc:nova-compute=0"
60- neutron-openvswitch:
61- branch: lp:~openstack-charmers/charms/trusty/neutron-openvswitch/next
62- num_units: 0
63- annotations:
64- "gui-x": "250"
65- "gui-y": "500"
66- mysql:
67- branch: lp:~openstack-charmers/charms/trusty/percona-cluster/next
68- num_units: 1
69- options:
70- "max-connections": 20000
71- annotations:
72- "gui-x": "0"
73- "gui-y": "250"
74- to:
75- - "lxc:0"
76- nova-compute:
77- branch: lp:~zulcss/charms/trusty/nova-compute/nova-compute-lxd
78- num_units: 2
79- constraints: mem=8G
80- options:
81- openstack-origin: "ppa:zulcss/lxd-testing-vivid"
82- virt-type: lxd
83-# lxd-block-device: /mnt/disk.img|100G
84- lxd-block-device: /dev/sdb /dev/vdb
85- enable-live-migration: True
86- enable-resize: True
87- "enable-live-migration": true
88- "enable-resize": true
89- "migration-auth-type": ssh
90- annotations:
91- "gui-x": "250"
92- "gui-y": "250"
93- glance:
94- branch: lp:~openstack-charmers/charms/trusty/glance/next
95- num_units: 1
96- annotations:
97- "gui-x": "250"
98- "gui-y": "0"
99- to:
100- - "lxc:nova-compute=1"
101- nova-cloud-controller:
102- branch: lp:~openstack-charmers/charms/trusty/nova-cloud-controller/next
103- num_units: 1
104- options:
105- "network-manager": Neutron
106- "quantum-security-groups": "yes"
107- annotations:
108- "gui-x": "0"
109- "gui-y": "500"
110- to:
111- - "lxc:nova-compute=0"
112- openstack-dashboard:
113- branch: lp:~openstack-charmers/charms/trusty/openstack-dashboard/next
114- num_units: 1
115- annotations:
116- "gui-x": "500"
117- "gui-y": "-250"
118- to:
119- - "lxc:0"
120- rabbitmq-server:
121- branch: lp:~openstack-charmers/charms/trusty/rabbitmq-server/next
122- num_units: 1
123- annotations:
124- "gui-x": "500"
125- "gui-y": "250"
126- to:
127- - "lxc:0"
128- cinder:
129- branch: lp:~openstack-charmers/charms/trusty/cinder/next
130- num_units: 1
131- options:
132- "block-device": /dev/sdb /dev/vdb
133- "glance-api-version": 2
134- annotations:
135- "gui-x": "750"
136- "gui-y": "0"
137- to:
138- - "lxc:0"
139- ntp:
140- charm: "cs:trusty/ntp-6"
141- num_units: 0
142- annotations:
143- "gui-x": "1000"
144- "gui-y": "0"
145- relations:
146- - - "nova-compute:amqp"
147- - "rabbitmq-server:amqp"
148- - - "neutron-gateway:amqp"
149- - "rabbitmq-server:amqp"
150- - - "keystone:shared-db"
151- - "mysql:shared-db"
152- - - "nova-cloud-controller:identity-service"
153- - "keystone:identity-service"
154- - - "glance:identity-service"
155- - "keystone:identity-service"
156- - - "neutron-api:identity-service"
157- - "keystone:identity-service"
158- - - "neutron-openvswitch:neutron-plugin-api"
159- - "neutron-api:neutron-plugin-api"
160- - - "neutron-api:shared-db"
161- - "mysql:shared-db"
162- - - "neutron-api:amqp"
163- - "rabbitmq-server:amqp"
164- - - "neutron-gateway:neutron-plugin-api"
165- - "neutron-api:neutron-plugin-api"
166- - - "glance:shared-db"
167- - "mysql:shared-db"
168- - - "glance:amqp"
169- - "rabbitmq-server:amqp"
170- - - "nova-cloud-controller:image-service"
171- - "glance:image-service"
172- - - "nova-compute:image-service"
173- - "glance:image-service"
174- - - "nova-cloud-controller:cloud-compute"
175- - "nova-compute:cloud-compute"
176- - - "nova-cloud-controller:amqp"
177- - "rabbitmq-server:amqp"
178- - - "nova-cloud-controller:quantum-network-service"
179- - "neutron-gateway:quantum-network-service"
180- - - "nova-compute:neutron-plugin"
181- - "neutron-openvswitch:neutron-plugin"
182- - - "neutron-openvswitch:amqp"
183- - "rabbitmq-server:amqp"
184- - - "openstack-dashboard:identity-service"
185- - "keystone:identity-service"
186- - - "nova-cloud-controller:shared-db"
187- - "mysql:shared-db"
188- - - "nova-cloud-controller:neutron-api"
189- - "neutron-api:neutron-api"
190- - - "cinder:image-service"
191- - "glance:image-service"
192- - - "cinder:amqp"
193- - "rabbitmq-server:amqp"
194- - - "cinder:identity-service"
195- - "keystone:identity-service"
196- - - "cinder:cinder-volume-service"
197- - "nova-cloud-controller:cinder-volume-service"
198- - - "cinder:shared-db"
199- - "mysql:shared-db"
200- - - "ntp:juju-info"
201- - "nova-compute:juju-info"
202- - - "ntp:juju-info"
203- - "neutron-gateway:juju-info"
204
205=== added directory 'bundles/lxd'
206=== added file 'bundles/lxd/lxd.yaml'
207--- bundles/lxd/lxd.yaml 1970-01-01 00:00:00 +0000
208+++ bundles/lxd/lxd.yaml 2015-07-27 14:48:51 +0000
209@@ -0,0 +1,310 @@
210+# vim: set ts=2 et:
211+# deployer bundle for development ('next') charms
212+# UOSCI relies on this for OS-on-OS deployment testing
213+openstack-services:
214+ services:
215+ mysql:
216+ branch: lp:~openstack-charmers/charms/trusty/percona-cluster/next
217+ constraints: mem=1G
218+ options:
219+ dataset-size: 50%
220+ rabbitmq-server:
221+ branch: lp:~openstack-charmers/charms/trusty/rabbitmq-server/next
222+ constraints: mem=1G
223+ ceph:
224+ branch: lp:~openstack-charmers/charms/trusty/ceph/next
225+ num_units: 3
226+ constraints: mem=1G
227+ options:
228+ monitor-count: 3
229+ fsid: 6547bd3e-1397-11e2-82e5-53567c8d32dc
230+ monitor-secret: AQCXrnZQwI7KGBAAiPofmKEXKxu5bUzoYLVkbQ==
231+ osd-devices: /dev/vdb
232+ osd-reformat: "yes"
233+ ephemeral-unmount: /mnt
234+ keystone:
235+ branch: lp:~openstack-charmers/charms/trusty/keystone/next
236+ constraints: mem=1G
237+ options:
238+ admin-password: openstack
239+ admin-token: ubuntutesting
240+ openstack-dashboard:
241+ branch: lp:~openstack-charmers/charms/trusty/openstack-dashboard/next
242+ constraints: mem=1G
243+ nova-compute:
244+ branch: lp:~zulcss/charms/trusty/nova-compute/nova-compute-lxd
245+ num_units: 3
246+ constraints: mem=4G
247+ options:
248+ enable-live-migration: True
249+ enable-resize: True
250+ migration-auth-type: ssh
251+ virt-type: lxd
252+ nova-cloud-controller:
253+ branch: lp:~openstack-charmers/charms/trusty/nova-cloud-controller/next
254+ constraints: mem=1G
255+ options:
256+ network-manager: Neutron
257+ quantum-security-groups: "yes"
258+ neutron-gateway:
259+ branch: lp:~openstack-charmers/charms/trusty/neutron-gateway/next
260+ constraints: mem=1G
261+ options:
262+ instance-mtu: 1300
263+ cinder:
264+ branch: lp:~openstack-charmers/charms/trusty/cinder/next
265+ options:
266+ block-device: "None"
267+ glance-api-version: 2
268+ constraints: mem=1G
269+ cinder-ceph:
270+ branch: lp:~openstack-charmers/charms/trusty/cinder-ceph/next
271+ glance:
272+ branch: lp:~openstack-charmers/charms/trusty/glance/next
273+ constraints: mem=1G
274+ swift-proxy:
275+ branch: lp:~openstack-charmers/charms/trusty/swift-proxy/next
276+ constraints: mem=1G
277+ options:
278+ zone-assignment: manual
279+ replicas: 3
280+ swift-hash: fdfef9d4-8b06-11e2-8ac0-531c923c8fae
281+ swift-storage-z1:
282+ branch: lp:~openstack-charmers/charms/trusty/swift-storage/next
283+ constraints: mem=1G
284+ options:
285+ zone: 1
286+ block-device: vdb
287+ overwrite: "true"
288+ swift-storage-z2:
289+ branch: lp:~openstack-charmers/charms/trusty/swift-storage/next
290+ constraints: mem=1G
291+ options:
292+ zone: 2
293+ block-device: vdb
294+ overwrite: "true"
295+ swift-storage-z3:
296+ branch: lp:~openstack-charmers/charms/trusty/swift-storage/next
297+ constraints: mem=1G
298+ options:
299+ zone: 3
300+ block-device: vdb
301+ overwrite: "true"
302+ ceilometer:
303+ branch: lp:~openstack-charmers/charms/trusty/ceilometer/next
304+ constraints: mem=1G
305+ ceilometer-agent:
306+ branch: lp:~openstack-charmers/charms/trusty/ceilometer-agent/next
307+ heat:
308+ branch: lp:~openstack-charmers/charms/trusty/heat/next
309+ mongodb:
310+ branch: lp:charms/trusty/mongodb
311+ constraints: mem=1G
312+ lxd:
313+ branch: lp:~zulcss/+junk/lxd-container
314+ options:
315+ lxd-block-device: /mnt/disk.img|20G
316+ lxd-origin: ppa:ubuntu-lxc/lxd-git-master
317+ lxd-use-source: True
318+ lxd-trust-password: blah
319+ relations:
320+ - [ keystone, mysql ]
321+ - [ nova-cloud-controller, mysql ]
322+ - [ nova-cloud-controller, rabbitmq-server ]
323+ - [ nova-cloud-controller, glance ]
324+ - [ nova-cloud-controller, keystone ]
325+ - [ nova-compute, nova-cloud-controller ]
326+ - [ nova-compute, lxd ]
327+ - [ nova-compute, mysql ]
328+ - - nova-compute
329+ - rabbitmq-server:amqp
330+ - [ nova-compute, glance ]
331+ - [ nova-compute, ceph ]
332+ - [ glance, mysql ]
333+ - [ glance, keystone ]
334+ - [ glance, ceph ]
335+ - [ glance, cinder ]
336+ - [ cinder, mysql ]
337+ - [ cinder, rabbitmq-server ]
338+ - [ cinder, nova-cloud-controller ]
339+ - [ cinder, keystone ]
340+ - [ cinder, cinder-ceph ]
341+ - [ cinder-ceph, ceph ]
342+ - [ neutron-gateway, mysql ]
343+ - [ neutron-gateway, nova-cloud-controller ]
344+ - [ openstack-dashboard, keystone ]
345+ - [ swift-proxy, keystone ]
346+ - [ swift-proxy, swift-storage-z1 ]
347+ - [ swift-proxy, swift-storage-z2 ]
348+ - [ swift-proxy, swift-storage-z3 ]
349+ - - ceilometer
350+ - keystone:identity-service
351+ - [ ceilometer, rabbitmq-server ]
352+ - [ ceilometer, mongodb ]
353+ - [ ceilometer-agent, nova-compute ]
354+ - [ ceilometer-agent, ceilometer ]
355+ - [ heat, mysql ]
356+ - [ heat, keystone ]
357+ - [ heat, rabbitmq-server ]
358+openstack-singlerabbit:
359+ inherits: openstack-services
360+ relations:
361+ - [ "neutron-gateway:amqp", rabbitmq-server ]
362+openstack-icehouse:
363+ inherits: openstack-singlerabbit
364+ services:
365+ neutron-api:
366+ branch: lp:~openstack-charmers/charms/trusty/neutron-api/next
367+ constraints: mem=1G
368+ options:
369+ neutron-security-groups: True
370+ neutron-openvswitch:
371+ branch: lp:~openstack-charmers/charms/trusty/neutron-openvswitch/next
372+ relations:
373+ - [ neutron-api, mysql ]
374+ - [ neutron-api, rabbitmq-server ]
375+ - [ neutron-api, nova-cloud-controller ]
376+ - [ neutron-api, neutron-openvswitch ]
377+ - [ neutron-api, keystone ]
378+ - [ neutron-api, neutron-gateway ]
379+ - [ neutron-openvswitch, nova-compute ]
380+ - [ neutron-openvswitch, rabbitmq-server ]
381+openstack-icehouse-msg-split:
382+ inherits: openstack-services
383+ services:
384+ neutron-api:
385+ branch: lp:~openstack-charmers/charms/trusty/neutron-api/next
386+ constraints: mem=1G
387+ options:
388+ neutron-security-groups: True
389+ neutron-openvswitch:
390+ branch: lp:~openstack-charmers/charms/trusty/neutron-openvswitch/next
391+ rabbitmq-server-neutron:
392+ branch: lp:charms/trusty/rabbitmq-server
393+ constraints: mem=1G
394+ relations:
395+ - [ neutron-api, mysql ]
396+ - [ neutron-api, rabbitmq-server-neutron ]
397+ - [ neutron-api, nova-cloud-controller ]
398+ - [ neutron-api, neutron-openvswitch ]
399+ - [ neutron-api, keystone ]
400+ - [ neutron-api, neutron-gateway ]
401+ - [ neutron-openvswitch, nova-compute ]
402+ - [ neutron-openvswitch, rabbitmq-server-neutron ]
403+ - [ "neutron-gateway:amqp-nova", rabbitmq-server ]
404+ - [ "neutron-gateway:amqp", rabbitmq-server-neutron ]
405+# icehouse
406+precise-icehouse:
407+ inherits: openstack-singlerabbit
408+ series: precise
409+ overrides:
410+ openstack-origin: cloud:precise-icehouse
411+ source: cloud:precise-icehouse
412+precise-icehouse-proposed:
413+ inherits: precise-icehouse
414+ overrides:
415+ openstack-origin: cloud:precise-icehouse/proposed
416+ source: cloud:precise-updates/icehouse
417+precise-icehouse-staging:
418+ inherits: precise-icehouse
419+ overrides:
420+ openstack-origin: ppa:ubuntu-cloud-archive/icehouse-staging
421+ source: ppa:ubuntu-cloud-archive/icehouse-staging
422+precise-icehouse-trunk:
423+ inherits: precise-icehouse
424+ overrides:
425+ openstack-origin: ppa:openstack-ubuntu-testing/icehouse
426+ source: ppa:openstack-ubuntu-testing/icehouse
427+trusty-icehouse:
428+ inherits: openstack-icehouse
429+ series: trusty
430+trusty-icehouse-msg-split:
431+ inherits: openstack-icehouse-msg-split
432+ series: trusty
433+trusty-icehouse-proposed:
434+ inherits: trusty-icehouse
435+ overrides:
436+ source: proposed
437+ openstack-origin: distro-proposed
438+trusty-icehouse-trunk:
439+ inherits: trusty-icehouse
440+ overrides:
441+ openstack-origin: ppa:openstack-ubuntu-testing/icehouse
442+ source: ppa:openstack-ubuntu-testing/icehouse
443+ offline-compression: "no"
444+# juno
445+trusty-juno:
446+ inherits: openstack-icehouse
447+ series: trusty
448+ overrides:
449+ openstack-origin: cloud:trusty-juno
450+ source: cloud:trusty-juno
451+trusty-juno-proposed:
452+ inherits: trusty-juno
453+ overrides:
454+ openstack-origin: cloud:trusty-juno/proposed
455+ source: cloud:trusty-juno/proposed
456+trusty-juno-staging:
457+ inherits: trusty-juno
458+ overrides:
459+ openstack-origin: ppa:ubuntu-cloud-archive/juno-staging
460+ source: ppa:ubuntu-cloud-archive/juno-staging
461+utopic-juno:
462+ inherits: openstack-icehouse
463+ series: utopic
464+utopic-juno-proposed:
465+ inherits: utopic-juno
466+ overrides:
467+ source: proposed
468+ openstack-origin: distro-proposed
469+# kilo
470+trusty-kilo:
471+ inherits: openstack-icehouse
472+ series: trusty
473+ overrides:
474+ openstack-origin: cloud:trusty-kilo
475+ source: cloud:trusty-kilo
476+trusty-kilo-proposed:
477+ inherits: trusty-kilo
478+ overrides:
479+ openstack-origin: cloud:trusty-kilo/proposed
480+ source: cloud:trusty-kilo/proposed
481+trusty-kilo-staging:
482+ inherits: trusty-kilo
483+ overrides:
484+ openstack-origin: ppa:ubuntu-cloud-archive/kilo-staging
485+ source: ppa:ubuntu-cloud-archive/kilo-staging
486+vivid-kilo:
487+ inherits: openstack-icehouse
488+ series: vivid
489+vivid-kilo-proposed:
490+ inherits: vivid-kilo
491+ overrides:
492+ source: proposed
493+ openstack-origin: distro-proposed
494+# liberty
495+trusty-liberty:
496+ inherits: openstack-icehouse
497+ series: trusty
498+ overrides:
499+ openstack-origin: cloud:trusty-liberty
500+ source: cloud:trusty-liberty
501+trusty-liberty-proposed:
502+ inherits: trusty-liberty
503+ overrides:
504+ openstack-origin: cloud:trusty-liberty/proposed
505+ source: cloud:trusty-liberty/proposed
506+trusty-liberty-staging:
507+ inherits: trusty-liberty
508+ overrides:
509+ openstack-origin: ppa:ubuntu-cloud-archive/liberty-staging
510+ source: ppa:ubuntu-cloud-archive/liberty-staging
511+wily-liberty:
512+ inherits: openstack-icehouse
513+ series: wily
514+wily-liberty-proposed:
515+ inherits: wily-liberty
516+ overrides:
517+ source: proposed
518+ openstack-origin: distro-proposed
519+
520
521=== added directory 'bundles/lxd/source'
522=== added file 'bundles/lxd/source/cinder-master.yaml'
523--- bundles/lxd/source/cinder-master.yaml 1970-01-01 00:00:00 +0000
524+++ bundles/lxd/source/cinder-master.yaml 2015-07-27 14:48:51 +0000
525@@ -0,0 +1,10 @@
526+repositories:
527+ - {name: requirements,
528+ repository: 'git://github.com/openstack/requirements',
529+ branch: master}
530+ - {name: cinder,
531+ repository: 'git://github.com/openstack/cinder',
532+ branch: master}
533+directory: /mnt/openstack-git
534+http_proxy: http://squid.internal:3128
535+https_proxy: http://squid.internal:3128
536
537=== added file 'bundles/lxd/source/glance-master.yaml'
538--- bundles/lxd/source/glance-master.yaml 1970-01-01 00:00:00 +0000
539+++ bundles/lxd/source/glance-master.yaml 2015-07-27 14:48:51 +0000
540@@ -0,0 +1,10 @@
541+repositories:
542+ - {name: requirements,
543+ repository: 'git://github.com/openstack/requirements',
544+ branch: master}
545+ - {name: glance,
546+ repository: 'git://github.com/openstack/glance',
547+ branch: master}
548+directory: /mnt/openstack-git
549+http_proxy: http://squid.internal:3128
550+https_proxy: http://squid.internal:3128
551
552=== added file 'bundles/lxd/source/horizon-master.yaml'
553--- bundles/lxd/source/horizon-master.yaml 1970-01-01 00:00:00 +0000
554+++ bundles/lxd/source/horizon-master.yaml 2015-07-27 14:48:51 +0000
555@@ -0,0 +1,10 @@
556+repositories:
557+ - {name: requirements,
558+ repository: 'git://github.com/openstack/requirements',
559+ branch: master}
560+ - {name: horizon,
561+ repository: 'git://github.com/openstack/horizon',
562+ branch: master}
563+directory: /mnt/openstack-git
564+http_proxy: http://squid.internal:3128
565+https_proxy: http://squid.internal:3128
566
567=== added file 'bundles/lxd/source/keystone-master.yaml'
568--- bundles/lxd/source/keystone-master.yaml 1970-01-01 00:00:00 +0000
569+++ bundles/lxd/source/keystone-master.yaml 2015-07-27 14:48:51 +0000
570@@ -0,0 +1,10 @@
571+repositories:
572+ - {name: requirements,
573+ repository: 'git://github.com/openstack/requirements',
574+ branch: master}
575+ - {name: keystone,
576+ repository: 'git://github.com/openstack/keystone',
577+ branch: master}
578+directory: /mnt/openstack-git
579+http_proxy: http://squid.internal:3128
580+https_proxy: http://squid.internal:3128
581
582=== added file 'bundles/lxd/source/lxd.yaml'
583--- bundles/lxd/source/lxd.yaml 1970-01-01 00:00:00 +0000
584+++ bundles/lxd/source/lxd.yaml 2015-07-27 14:48:51 +0000
585@@ -0,0 +1,367 @@
586+# vim: set ts=2 et:
587+# deployer bundle for development ('lxd') charms
588+# UOSCI relies on this for OS-on-OS deployment testing
589+openstack-services:
590+ services:
591+ mysql:
592+ branch: lp:~openstack-charmers/charms/trusty/percona-cluster/next
593+ constraints: mem=1G
594+ options:
595+ dataset-size: 50%
596+ rabbitmq-server:
597+ branch: lp:~openstack-charmers/charms/trusty/rabbitmq-server/next
598+ constraints: mem=1G
599+ ceph:
600+ branch: lp:~openstack-charmers/charms/trusty/ceph/next
601+ num_units: 3
602+ constraints: mem=1G
603+ options:
604+ monitor-count: 3
605+ fsid: 6547bd3e-1397-11e2-82e5-53567c8d32dc
606+ monitor-secret: AQCXrnZQwI7KGBAAiPofmKEXKxu5bUzoYLVkbQ==
607+ osd-devices: /dev/vdb
608+ osd-reformat: "yes"
609+ ephemeral-unmount: /mnt
610+ keystone:
611+ branch: lp:~openstack-charmers/charms/trusty/keystone/next
612+ constraints: mem=1G
613+ options:
614+ admin-password: openstack
615+ admin-token: ubuntutesting
616+ openstack-dashboard:
617+ branch: lp:~openstack-charmers/charms/trusty/openstack-dashboard/next
618+ constraints: mem=1G
619+ nova-compute:
620+ branch: lp:~zulcss/charms/trusty/nova-compute/nova-compute-lxd
621+ num_units: 3
622+ constraints: mem=4G
623+ options:
624+ enable-live-migration: True
625+ enable-resize: True
626+ virt-type: lxd
627+ nova-cloud-controller:
628+ branch: lp:~openstack-charmers/charms/trusty/nova-cloud-controller/next
629+ constraints: mem=1G
630+ options:
631+ network-manager: Neutron
632+ quantum-security-groups: "yes"
633+ neutron-gateway:
634+ branch: lp:~openstack-charmers/charms/trusty/neutron-gateway/next
635+ constraints: mem=1G
636+ options:
637+ instance-mtu: 1300
638+ cinder:
639+ branch: lp:~openstack-charmers/charms/trusty/cinder/next
640+ options:
641+ block-device: "None"
642+ glance-api-version: 2
643+ constraints: mem=1G
644+# cinder-ceph:
645+# branch: lp:~openstack-charmers/charms/trusty/cinder-ceph/next
646+ glance:
647+ branch: lp:~openstack-charmers/charms/trusty/glance/next
648+ constraints: mem=1G
649+ swift-proxy:
650+ branch: lp:~openstack-charmers/charms/trusty/swift-proxy/next
651+ constraints: mem=1G
652+ options:
653+ zone-assignment: manual
654+ replicas: 3
655+ swift-hash: fdfef9d4-8b06-11e2-8ac0-531c923c8fae
656+ swift-storage-z1:
657+ branch: lp:~openstack-charmers/charms/trusty/swift-storage/next
658+ constraints: mem=1G
659+ options:
660+ zone: 1
661+ block-device: vdb
662+ overwrite: "true"
663+ swift-storage-z2:
664+ branch: lp:~openstack-charmers/charms/trusty/swift-storage/next
665+ constraints: mem=1G
666+ options:
667+ zone: 2
668+ block-device: vdb
669+ overwrite: "true"
670+ swift-storage-z3:
671+ branch: lp:~openstack-charmers/charms/trusty/swift-storage/next
672+ constraints: mem=1G
673+ options:
674+ zone: 3
675+ block-device: vdb
676+ overwrite: "true"
677+ ceilometer:
678+ branch: lp:~openstack-charmers/charms/trusty/ceilometer/next
679+ constraints: mem=1G
680+ ceilometer-agent:
681+ branch: lp:~openstack-charmers/charms/trusty/ceilometer-agent/next
682+ heat:
683+ branch: lp:~openstack-charmers/charms/trusty/heat/next
684+ mongodb:
685+ branch: lp:charms/trusty/mongodb
686+ constraints: mem=1G
687+ lxd:
688+ branch: lp:~zulcss/+junk/lxd-container
689+ options:
690+ lxd-block-device: /mnt/disk.img|20G
691+ lxd-origin: ppa:ubuntu-lxc/lxd-git-master
692+ lxd-use-source: True
693+ lxd-trust-password: blah
694+ relations:
695+ - [ keystone, mysql ]
696+ - [ nova-cloud-controller, mysql ]
697+ - [ nova-cloud-controller, rabbitmq-server ]
698+ - [ nova-cloud-controller, glance ]
699+ - [ nova-cloud-controller, keystone ]
700+ - [ nova-compute, nova-cloud-controller ]
701+ - [ nova-compute, mysql ]
702+ - [ nova-compute, lxd ]
703+ - - nova-compute
704+ - rabbitmq-server:amqp
705+ - [ nova-compute, glance ]
706+ - [ nova-compute, ceph ]
707+ - [ glance, mysql ]
708+ - [ glance, keystone ]
709+ - [ glance, ceph ]
710+ - [ glance, cinder ]
711+ - [ cinder, mysql ]
712+ - [ cinder, rabbitmq-server ]
713+ - [ cinder, nova-cloud-controller ]
714+ - [ cinder, keystone ]
715+ - [ cinder, ceph ]
716+# - [ cinder, cinder-ceph ]
717+# - [ cinder-ceph, ceph ]
718+ - [ neutron-gateway, mysql ]
719+ - [ neutron-gateway, nova-cloud-controller ]
720+ - [ openstack-dashboard, keystone ]
721+ - [ swift-proxy, keystone ]
722+ - [ swift-proxy, swift-storage-z1 ]
723+ - [ swift-proxy, swift-storage-z2 ]
724+ - [ swift-proxy, swift-storage-z3 ]
725+ - - ceilometer
726+ - keystone:identity-service
727+ - [ ceilometer, rabbitmq-server ]
728+ - [ ceilometer, mongodb ]
729+ - [ ceilometer-agent, nova-compute ]
730+ - [ ceilometer-agent, ceilometer ]
731+ - [ heat, mysql ]
732+ - [ heat, keystone ]
733+ - [ heat, rabbitmq-server ]
734+openstack-singlerabbit:
735+ inherits: openstack-services
736+ relations:
737+ - [ "neutron-gateway:amqp", rabbitmq-server ]
738+openstack-icehouse:
739+ inherits: openstack-singlerabbit
740+ services:
741+ neutron-api:
742+ branch: lp:~openstack-charmers/charms/trusty/neutron-api/next
743+ constraints: mem=1G
744+ options:
745+ neutron-security-groups: True
746+ neutron-openvswitch:
747+ branch: lp:~openstack-charmers/charms/trusty/neutron-openvswitch/next
748+ relations:
749+ - [ neutron-api, mysql ]
750+ - [ neutron-api, rabbitmq-server ]
751+ - [ neutron-api, nova-cloud-controller ]
752+ - [ neutron-api, neutron-openvswitch ]
753+ - [ neutron-api, keystone ]
754+ - [ neutron-api, neutron-gateway ]
755+ - [ neutron-openvswitch, nova-compute ]
756+ - [ neutron-openvswitch, rabbitmq-server ]
757+openstack-icehouse-msg-split:
758+ inherits: openstack-services
759+ services:
760+ neutron-api:
761+ branch: lp:~openstack-charmers/charms/trusty/neutron-api/next
762+ constraints: mem=1G
763+ options:
764+ neutron-security-groups: True
765+ neutron-openvswitch:
766+ branch: lp:~openstack-charmers/charms/trusty/neutron-openvswitch/next
767+ rabbitmq-server-neutron:
768+ branch: lp:charms/trusty/rabbitmq-server
769+ constraints: mem=1G
770+ relations:
771+ - [ neutron-api, mysql ]
772+ - [ neutron-api, rabbitmq-server-neutron ]
773+ - [ neutron-api, nova-cloud-controller ]
774+ - [ neutron-api, neutron-openvswitch ]
775+ - [ neutron-api, keystone ]
776+ - [ neutron-api, neutron-gateway ]
777+ - [ neutron-openvswitch, nova-compute ]
778+ - [ neutron-openvswitch, rabbitmq-server-neutron ]
779+ - [ "neutron-gateway:amqp-nova", rabbitmq-server ]
780+ - [ "neutron-gateway:amqp", rabbitmq-server-neutron ]
781+# icehouse
782+openstack-icehouse-git:
783+ inherits: openstack-icehouse
784+ services:
785+ keystone:
786+ options:
787+ openstack-origin-git: include-file://keystone-icehouse.yaml
788+ glance:
789+ options:
790+ openstack-origin-git: include-file://glance-icehouse.yaml
791+ cinder:
792+ options:
793+ openstack-origin-git: include-file://cinder-icehouse.yaml
794+ neutron-api:
795+ options:
796+ openstack-origin-git: include-file://neutron-icehouse.yaml
797+ neutron-gateway:
798+ options:
799+ openstack-origin-git: include-file://neutron-icehouse.yaml
800+ neutron-openvswitch:
801+ options:
802+ openstack-origin-git: include-file://neutron-icehouse.yaml
803+ openstack-dashboard:
804+ options:
805+ openstack-origin-git: include-file://horizon-icehouse.yaml
806+ nova-compute:
807+ options:
808+ openstack-origin-git: include-file://nova-icehouse.yaml
809+ nova-cloud-controller:
810+ options:
811+ openstack-origin-git: include-file://nova-icehouse.yaml
812+precise-icehouse:
813+ inherits: openstack-icehouse-git
814+ series: precise
815+ overrides:
816+ openstack-origin: cloud:precise-icehouse
817+ source: cloud:precise-icehouse
818+trusty-icehouse:
819+ inherits: openstack-icehouse-git
820+ series: trusty
821+# juno
822+openstack-juno-git:
823+ inherits: openstack-icehouse
824+ services:
825+ keystone:
826+ options:
827+ openstack-origin-git: include-file://keystone-juno.yaml
828+ glance:
829+ options:
830+ openstack-origin-git: include-file://glance-juno.yaml
831+ cinder:
832+ options:
833+ openstack-origin-git: include-file://cinder-juno.yaml
834+ neutron-api:
835+ options:
836+ openstack-origin-git: include-file://neutron-juno.yaml
837+ neutron-gateway:
838+ options:
839+ openstack-origin-git: include-file://neutron-juno.yaml
840+ neutron-openvswitch:
841+ options:
842+ openstack-origin-git: include-file://neutron-juno.yaml
843+ openstack-dashboard:
844+ options:
845+ openstack-origin-git: include-file://horizon-juno.yaml
846+ nova-compute:
847+ options:
848+ openstack-origin-git: include-file://nova-juno.yaml
849+ nova-cloud-controller:
850+ options:
851+ openstack-origin-git: include-file://nova-juno.yaml
852+trusty-juno:
853+ inherits: openstack-juno-git
854+ series: trusty
855+ overrides:
856+ openstack-origin: cloud:trusty-juno
857+ source: cloud:trusty-juno
858+utopic-juno:
859+ inherits: openstack-juno-git
860+ series: utopic
861+# kilo
862+openstack-kilo-git:
863+ inherits: openstack-icehouse
864+ services:
865+ keystone:
866+ options:
867+ openstack-origin-git: include-file://keystone-kilo.yaml
868+ glance:
869+ options:
870+ openstack-origin-git: include-file://glance-kilo.yaml
871+ cinder:
872+ options:
873+ openstack-origin-git: include-file://cinder-kilo.yaml
874+ neutron-api:
875+ options:
876+ openstack-origin-git: include-file://neutron-kilo.yaml
877+ neutron-gateway:
878+ options:
879+ openstack-origin-git: include-file://neutron-kilo.yaml
880+ neutron-openvswitch:
881+ options:
882+ openstack-origin-git: include-file://neutron-kilo.yaml
883+ openstack-dashboard:
884+ options:
885+ openstack-origin-git: include-file://horizon-kilo.yaml
886+ nova-compute:
887+ options:
888+ openstack-origin-git: include-file://nova-kilo.yaml
889+ nova-cloud-controller:
890+ options:
891+ openstack-origin-git: include-file://nova-kilo.yaml
892+trusty-kilo:
893+ inherits: openstack-kilo-git
894+ series: trusty
895+ overrides:
896+ openstack-origin: cloud:trusty-kilo
897+ source: cloud:trusty-kilo
898+trusty-kilo-proposed:
899+ inherits: openstack-kilo-git
900+ series: trusty
901+ overrides:
902+ openstack-origin: cloud:trusty-kilo/proposed
903+ source: cloud:trusty-kilo/proposed
904+vivid-kilo:
905+ inherits: openstack-kilo-git
906+ series: vivid
907+# master
908+openstack-master-git:
909+ inherits: openstack-icehouse
910+ services:
911+ keystone:
912+ options:
913+ openstack-origin-git: include-file://keystone-master.yaml
914+ glance:
915+ options:
916+ openstack-origin-git: include-file://glance-master.yaml
917+ cinder:
918+ options:
919+ openstack-origin-git: include-file://cinder-master.yaml
920+ neutron-api:
921+ options:
922+ openstack-origin-git: include-file://neutron-master.yaml
923+ neutron-gateway:
924+ options:
925+ openstack-origin-git: include-file://neutron-master.yaml
926+ neutron-openvswitch:
927+ options:
928+ openstack-origin-git: include-file://neutron-master.yaml
929+ openstack-dashboard:
930+ options:
931+ openstack-origin-git: include-file://horizon-master.yaml
932+ nova-compute:
933+ options:
934+ openstack-origin-git: include-file://nova-master.yaml
935+ nova-cloud-controller:
936+ options:
937+ openstack-origin-git: include-file://nova-master.yaml
938+trusty-master:
939+ inherits: openstack-master-git
940+ series: trusty
941+ overrides:
942+ openstack-origin: cloud:trusty-kilo
943+ source: cloud:trusty-kilo
944+trusty-master-proposed:
945+ inherits: openstack-master-git
946+ series: trusty
947+ overrides:
948+ openstack-origin: cloud:trusty-kilo/proposed
949+ source: cloud:trusty-kilo/proposed
950+vivid-master:
951+ inherits: openstack-master-git
952+ series: vivid
953
954=== added file 'bundles/lxd/source/neutron-master.yaml'
955--- bundles/lxd/source/neutron-master.yaml 1970-01-01 00:00:00 +0000
956+++ bundles/lxd/source/neutron-master.yaml 2015-07-27 14:48:51 +0000
957@@ -0,0 +1,19 @@
958+repositories:
959+ - {name: requirements,
960+ repository: 'git://github.com/openstack/requirements',
961+ branch: master}
962+ - {name: neutron-fwaas,
963+ repository: 'git://github.com/openstack/neutron-fwaas',
964+ branch: master}
965+ - {name: neutron-lbaas,
966+ repository: 'git://github.com/openstack/neutron-lbaas',
967+ branch: master}
968+ - {name: neutron-vpnaas,
969+ repository: 'git://github.com/openstack/neutron-vpnaas',
970+ branch: master}
971+ - {name: neutron,
972+ repository: 'git://github.com/openstack/neutron',
973+ branch: master}
974+directory: /mnt/openstack-git
975+http_proxy: http://squid.internal:3128
976+https_proxy: http://squid.internal:3128
977
978=== added file 'bundles/lxd/source/nova-master.yaml'
979--- bundles/lxd/source/nova-master.yaml 1970-01-01 00:00:00 +0000
980+++ bundles/lxd/source/nova-master.yaml 2015-07-27 14:48:51 +0000
981@@ -0,0 +1,19 @@
982+repositories:
983+ - {name: requirements,
984+ repository: 'git://github.com/openstack/requirements',
985+ branch: master}
986+ - {name: neutron,
987+ repository: 'git://github.com/openstack/neutron',
988+ branch: master}
989+ - {name: pylxd,
990+ repository: 'https://github.com/lxc/pylxd',
991+ branch: master}
992+ - {name: nova-compute-lxd,
993+ repository: 'https://github.com/lxc/nova-compute-lxd',
994+ branch: master}
995+ - {name: nova,
996+ repository: 'git://github.com/openstack/nova',
997+ branch: master}
998+directory: /mnt/openstack-git
999+http_proxy: http://squid.internal:3128
1000+https_proxy: http://squid.internal:3128
1001
1002=== modified file 'configure'
1003--- configure 2015-07-15 09:26:36 +0000
1004+++ configure 2015-07-27 14:48:51 +0000
1005@@ -1,6 +1,6 @@
1006 #!/bin/sh
1007
1008-valid="stsstack dellstack kernelstack ppc64el powerkvm"
1009+valid="stsstack dellstack kernelstack ppc64el powerkvm lxd"
1010
1011 usage() {
1012 echo "$0 <profile>"
1013
1014=== added file 'profiles/lxd'
1015--- profiles/lxd 1970-01-01 00:00:00 +0000
1016+++ profiles/lxd 2015-07-27 14:48:51 +0000
1017@@ -0,0 +1,69 @@
1018+#!/bin/bash
1019+
1020+set -ex
1021+
1022+# Set serverstack defaults, if not already set.
1023+[[ -z "$GATEWAY" ]] && export GATEWAY="10.5.0.1"
1024+[[ -z "$CIDR_EXT" ]] && export CIDR_EXT="10.5.0.0/16"
1025+[[ -z "$FIP_RANGE" ]] && export FIP_RANGE="10.5.150.0:10.5.200.254"
1026+[[ -z "$NAMESERVER" ]] && export NAMESERVER="10.245.160.2"
1027+[[ -z "$CIDR_PRIV" ]] && export CIDR_PRIV="192.168.21.0/24"
1028+[[ -z "$SWIFT_IP" ]] && export SWIFT_IP="10.245.160.50"
1029+
1030+# Accept network type as first parameter, assume gre if unspecified
1031+net_type=${1:-"gre"}
1032+
1033+# If not on bare metal, add extra port to overcloud neutron-gateway and configure charm to use it
1034+if [[ "${BARE_METAL^^}" != "TRUE" ]]; then
1035+ source ~/novarc
1036+ ./bin/post-deploy-config neutron-gateway
1037+fi
1038+
1039+# Configure neutron networking on overcloud
1040+source novarc
1041+./bin/quantum-ext-net --network-type $net_type -g $GATEWAY -c $CIDR_EXT -f $FIP_RANGE ext_net
1042+./bin/quantum-tenant-net --network-type $net_type -t admin -r provider-router -N $NAMESERVER private $CIDR_PRIV
1043+
1044+# Create demo/testing users, tenants and flavor
1045+keystone tenant-create --name demo
1046+keystone user-create --name demo --tenant demo --pass pass --enabled true --email demo@dev.null
1047+keystone user-role-add --user demo --role Member --tenant demo || :
1048+keystone tenant-create --name alt_demo
1049+keystone user-create --name alt_demo --tenant alt_demo --pass secret --enabled true --email alt_demo@dev.null
1050+keystone user-role-add --user alt_demo --role Member --tenant alt_demo || :
1051+
1052+nova flavor-create m1.cirros 6 64 1 1
1053+nova flavor-create m1.tempest 7 256 5 1
1054+nova flavor-create m2.tempest 8 512 5 1
1055+
1056+# Gather vars for tempest template
1057+access=$(keystone --os-username demo --os-password pass --os-tenant-name demo ec2-credentials-create | grep access | awk '{ print $4 }')
1058+secret=$(keystone ec2-credentials-get --access $access | grep secret | awk '{ print $4 }')
1059+image_id=$(glance image-list | grep cirros | awk '{ print $2 }')
1060+image_alt_id=$(glance image-list | grep precise | awk '{ print $2 }')
1061+ext_net=$(neutron net-list | grep ext_net | awk '{ print $2 }')
1062+router=$(neutron router-list | grep provider-router | awk '{ print $2}')
1063+keystone=$(juju-deployer -f keystone)
1064+dashboard=$(juju-deployer -f openstack-dashboard)
1065+ncc=$(juju-deployer -f nova-cloud-controller)
1066+http=${OS_AUTH_PROTOCOL:-http}
1067+
1068+# Insert vars into tempest conf
1069+sed -e "s/__IMAGE_ID__/$image_id/g" -e "s/__IMAGE_ALT_ID__/$image_alt_id/g" \
1070+ -e "s/__DASHBOARD__/$dashboard/g" -e "s/__KEYSTONE__/$keystone/g" \
1071+ -e "s/__EXT_NET__/$ext_net/g" -e "s/__PROTO__/$http/g" \
1072+ -e "s/__SWIFT__/$SWIFT_IP/g" \
1073+ -e "s/__NCC__/$ncc/g" -e "s/__SECRET__/$secret/g" -e "s/__ACCESS__/$access/g" \
1074+ templates/tempest/tempest.conf.template > tempest.conf
1075+
1076+# Install dependencies and CLI tools
1077+# See also requirements.txt in tempest (probably need to sudo pip install -r requirements.txt)
1078+sudo apt-get install git testrepository subunit python-nose python-lxml python-boto \
1079+ python-junitxml python-subunit python-testresources python-oslotest python-stevedore \
1080+ python-cinderclient python-glanceclient python-heatclient python-keystoneclient \
1081+ python-neutronclient python-novaclient python-swiftclient python-ceilometerclient \
1082+ openvswitch-test openvswitch-common -y
1083+
1084+# Git tempest, place the rendered tempest template
1085+[ -d tempest ] || git clone https://github.com/openstack/tempest
1086+cp tempest.conf tempest/etc
1087
1088=== added file 'tools/images-lxd-convert.sh'
1089--- tools/images-lxd-convert.sh 1970-01-01 00:00:00 +0000
1090+++ tools/images-lxd-convert.sh 2015-07-27 14:48:51 +0000
1091@@ -0,0 +1,221 @@
1092+#!/bin/bash
1093+
1094+VERBOSITY=0
1095+TEMP_D=""
1096+UC_PREP="/usr/share/lxc/hooks/ubuntu-cloud-prep"
1097+
1098+error() { echo "$@" 1>&2; }
1099+fail() { [ $# -eq 0 ] || error "$@"; exit 1; }
1100+
1101+Usage() {
1102+ cat <<EOF
1103+Usage: ${0##*/} [ options ] input-tar output-tarball
1104+
1105+ convert cloud-image-root.tar.gz into lxd compatible format,
1106+ and stuff nocloud seed in on the way.
1107+
1108+ options:
1109+ -h|--help this help
1110+ -v|--verbose
1111+ --metadata file to include as metadata.yaml
1112+ -u|--userdata U user-data for seed.
1113+ -S|--auth-key P pubkey to insert
1114+ -C|--cloud C do not seed instance
1115+ --zip Z compress with tar option Z (default 'J')
1116+EOF
1117+}
1118+
1119+bad_Usage() { Usage 1>&2; [ $# -eq 0 ] || error "$@"; return 1; }
1120+cleanup() {
1121+ [ -z "${TEMP_D}" -o ! -d "${TEMP_D}" ] || rm -Rf "${TEMP_D}"
1122+}
1123+
1124+debug() {
1125+ local level=${1}; shift;
1126+ [ "${level}" -gt "${VERBOSITY}" ] && return
1127+ error "${@}"
1128+}
1129+
1130+default_mdyaml() {
1131+cat <<EOF
1132+architecture: "$(uname -m)"
1133+creation_date: $(date "+%s")
1134+name: "$1"
1135+properties:
1136+ description: Ubuntu 14.04 LTS Intel 64bit
1137+ os: Ubuntu
1138+EOF
1139+}
1140+
1141+default_userdata() {
1142+ cat <<EOF
1143+#cloud-config
1144+manage_etc_hosts: localhost
1145+password: ubuntu
1146+chpasswd: { expire: false; }
1147+
1148+# pollinate hangs without socket timeout if it can't reach network
1149+random_seed:
1150+ command: null
1151+
1152+# growpart and resize_rootfs dont make sense, and should dtrt, but be sure.
1153+growpart:
1154+ mode: off
1155+resize_rootfs: null
1156+EOF
1157+}
1158+
1159+main() {
1160+ local short_opts="Chu:S:v"
1161+ local long_opts="auth-key:,cloud,help,metadata:,userdata:,verbose,zip:"
1162+ local getopt_out=""
1163+ local pt=""
1164+ getopt_out=$(getopt --name "${0##*/}" \
1165+ --options "${short_opts}" --long "${long_opts}" -- "$@") &&
1166+ eval set -- "${getopt_out}" ||
1167+ { bad_Usage; return; }
1168+
1169+ local cur="" next="" input="" output="" authkey="" z_opt="J" vflags=""
1170+ local ud=""
1171+ pt=( )
1172+
1173+ while [ $# -ne 0 ]; do
1174+ cur="$1"; next="$2";
1175+ case "$cur" in
1176+ -h|--help) Usage ; exit 0;;
1177+ -v|--verbose) VERBOSITY=$((${VERBOSITY}+1))
1178+ vflags="${vflags}v";;
1179+ --metadata) mdyaml="$next";;
1180+ -u|--userdata)
1181+ ud="$next"; pt[${#pt[@]}]="--userdata=$next"; shift;;
1182+ -S|--auth-key) pt[${#pt[@]}]="--auth-key=$next"; shift;;
1183+ -C|--cloud) pt[${#pt[@]}]="--cloud=$next"; shift;;
1184+ --zip) z_opt=$next; shift;;
1185+ --) shift; break;;
1186+ esac
1187+ shift;
1188+ done
1189+ [ -z "$vflags" ] || vflags="-$vflags"
1190+
1191+ [ $# -ne 0 ] || { bad_Usage "must provide arguments"; return; }
1192+ [ $# -eq 2 ] ||
1193+ { bad_Usage "confused by args. got $# expected 2 [$*]"; return; }
1194+
1195+ input=$1
1196+ output=$2
1197+
1198+ TEMP_D=$(mktemp -d "${TMPDIR:-/tmp}/${0##*/}.XXXXXX") ||
1199+ fail "failed to make tempdir"
1200+ trap cleanup EXIT
1201+
1202+ [ "$(id -u)" = "0" ] || { error "you're not root"; return 1; }
1203+ command -v "$UC_PREP" >/dev/null 2>&1 ||
1204+ { error "$UC_PREP not available"; return 1; }
1205+ [ "$input" = "-" -o -f "$input" ] ||
1206+ { error "$input: not a file or -"; return 1; }
1207+ [ -n "$output" ] || { error "$output: not a file or -"; return 1; }
1208+ [ -z "$mdyaml" -o -f "$mdyaml" ] ||
1209+ { error "$mdyaml: not a file"; return 1; }
1210+
1211+ if [ -z "$ud" ]; then
1212+ ud="$TEMP_D/user-data"
1213+ default_userdata > "$ud"
1214+ pt[${#pt[@]}]="--userdata=$ud"
1215+ fi
1216+
1217+ local extract create ucprep
1218+ mkdir -p "${TEMP_D}/rootfs" || { error "failed to make rootfs"; return 1; }
1219+ extract=(
1220+ tar -C "${TEMP_D}/rootfs"
1221+ --xattrs "--xattrs-include=*"
1222+ --anchored "--exclude=dev/*"
1223+ --numeric-owner -Sxpf "$input" )
1224+
1225+ create=(
1226+ tar -C "${TEMP_D}/"
1227+ --xattrs "--xattrs-include=*"
1228+ -cp${z_opt}f "$output" metadata.yaml rootfs )
1229+ create_pxz=(
1230+ bash -c 'set -o pipefail;
1231+ tar -C "$1" --xattrs "--xattrs-include=*" \
1232+ -cpf - metadata.yaml rootfs |
1233+ pxz -cv - > "$2"' -- "${TEMP_D}" "$output"
1234+ )
1235+ command -v pxz >/dev/null 2>&1 && create=( "${create_pxz[@]}" )
1236+
1237+ ucprep=(
1238+ "${UC_PREP}" $vflags "${pt[@]}" "${TEMP_D}/rootfs" )
1239+
1240+ if [ -n "$metadata" ]; then
1241+ cp "$metadata" "${TEMP_D}/metadata.yaml" ||
1242+ { error "failed cp '$metadata' metadata.yaml"; return 1; }
1243+ debug 1 "copied metadata.yaml from '$metadata'"
1244+ else
1245+ local tname=""
1246+ tname=${input%.gz};
1247+ tname=${tname%.tar};
1248+ [ "$input" = "-" ] && tname="unknown name"
1249+ default_mdyaml "$tname" > "${TEMP_D}/metadata.yaml" ||
1250+ { error "failed write metadata.yaml"; return 1; }
1251+ debug 1 "wrote questionable metadata.yaml file"
1252+ fi
1253+
1254+ debug 1 "extracting tar to tempdir"
1255+ debug 2 "cmd: ${extract[*]}"
1256+ "${extract[@]}" || { error "failed extraction"; return 1; }
1257+
1258+ debug 1 "hacking/fixing for lxd"
1259+ debug 2 "gettys just dont make sense, and upstart restarts"
1260+ ( cd "${TEMP_D}/rootfs" &&
1261+ for f in etc/init/tty*.conf; do
1262+ [ -f "$f" ] || continue
1263+ #[ "${f##*/}" = "tty1.conf" ] || continue
1264+ o=${f%.conf}.override
1265+ debug 3 "manual > $o"
1266+ echo "manual" > "$o"
1267+ done
1268+ )
1269+
1270+ debug 2 "update-motd runs from mounted-run.conf on mounted tmpfs"
1271+ # this is too late to fix via bootcmd
1272+ nox="
1273+ etc/update-motd.d/90-updates-available
1274+ etc/update-motd.d/91-release-upgrade
1275+ usr/lib/ubuntu-release-upgrader/release-upgrade-motd
1276+ usr/lib/update-notifier/apt-check
1277+ usr/lib/update-notifier/update-motd-updates-available
1278+ "
1279+ ( cd "${TEMP_D}/rootfs" &&
1280+ for f in $nox; do [ -e "$f" ] &&
1281+ debug 3 "chmod -x '$f'" && chmod -x "$f"; done )
1282+
1283+ debug 2 "pollinate is heavy, disabling"
1284+ ( cd "${TEMP_D}/rootfs"
1285+ f=etc/init/pollinate.conf
1286+ c=${f%.conf}.override
1287+ [ -f "$f" ] && debug 3 "manual > $c" && echo "manual" > "$c"
1288+ )
1289+
1290+ debug 2 "mot.d is annoying here (LP: #1426023)"
1291+ # this affects ssh in time. as mot.d is run on ssh login
1292+ ( cd "$TEMP_D/rootfs" &&
1293+ sudo sed -i '/^[^#].*pam_motd/s/^/#/' etc/pam.d/sshd )
1294+
1295+ debug 2 "disabling irqbalance (LP: #1454273)"
1296+ ( cd "$TEMP_D/rootfs" &&
1297+ f=etc/init/irqbalance.conf
1298+ c=${f%.conf}.override
1299+ [ -f "$f" ] && debug 3 "manual > $c" && echo "manual" > "$c" )
1300+
1301+ debug 1 "running ucprep: ${ucprep[*]}"
1302+ "${ucprep[@]}" ||
1303+ { error "failed to run ${ucprep[*]}"; return 1; }
1304+
1305+ debug 1 "writing tar to $out: ${create[*]}"
1306+ debug 2 "cmd: ${create[*]}"
1307+ "${create[@]}" || fail "failed writing tar to $out"
1308+ debug 1 "finished [${SECONDS}]"
1309+}
1310+
1311+main "$@"
1312+# vi: ts=4 noexpandtab
1313
1314=== added file 'tools/images_lxd.sh'
1315--- tools/images_lxd.sh 1970-01-01 00:00:00 +0000
1316+++ tools/images_lxd.sh 2015-07-27 14:48:51 +0000
1317@@ -0,0 +1,16 @@
1318+#!/bin/bash -e
1319+# Download LX images and add to glance
1320+
1321+# Download images if not already present
1322+mkdir -p ~/images
1323+[ -f ~/images/trusty-server-cloudimg-amd64-root.tar.gz ] || {
1324+ wget -O ~/images/trusty-server-cloudimg-amd64-root.tar.gz http://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-root.tar.gz
1325+}
1326+
1327+sudo images-lxd-convert.sh ~/images/trusty-server-cloudimg-amd64-root.tar.gz \
1328+ ~/images/trusty-server-cloudimg-amd64-lxd.tar.gz
1329+
1330+# Upload glance images to overcloud
1331+glance image-create --name="trusty-lxd-amd64" --is-public=true --progress \
1332+ --container-format=bare --disk-format=qcow2 < ~/images/trusty-server-cloudimg-amd64-lxd.tar.gz
1333+

Subscribers

People subscribed via source and target branches

to status/vote changes: