Merge lp:~bbaqar/charms/bundles/plumgrid-ons/single-controller-halfdome-500 into lp:~plumgrid-team/charms/bundles/plumgrid-ons/single-controller

Proposed by Bilal Baqar
Status: Needs review
Proposed branch: lp:~bbaqar/charms/bundles/plumgrid-ons/single-controller-halfdome-500
Merge into: lp:~plumgrid-team/charms/bundles/plumgrid-ons/single-controller
Diff against target: 521 lines (+214/-200)
3 files modified
bundle-cli.yaml (+96/-55)
bundle.yaml (+0/-145)
setup_lcm.sh (+118/-0)
To merge this branch: bzr merge lp:~bbaqar/charms/bundles/plumgrid-ons/single-controller-halfdome-500
Reviewer Review Type Date Requested Status
Plum grid team Pending
Review via email: mp+294930@code.launchpad.net
To post a comment you must log in.
34. By Bilal Baqar

bundle changes for 5.0

35. By Bilal Baqar

Changes for 5.0

Unmerged revisions

35. By Bilal Baqar

Changes for 5.0

34. By Bilal Baqar

bundle changes for 5.0

33. By Bilal Baqar

bundle changes for 5.0

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bundle-cli.yaml'
2--- bundle-cli.yaml 2016-01-25 23:18:17 +0000
3+++ bundle-cli.yaml 2016-05-17 18:38:21 +0000
4@@ -1,9 +1,44 @@
5-plumgrid-ons:
6+# This bundle file containts the following bundles:
7+# 1. plumgrid-ons-phase1:
8+# This bundle deploys 3 nodes in total:
9+# - 1 x Compute
10+# - 1 x Controller
11+# - 1 x Gateways
12+# Please note that the JUJU Bootstrap node is a seperate node
13+# This bundle waits for all the nodes to be deployed before it exits
14+#
15+# 2. plumgrid-ons-phase2:
16+# This bundle deploys all the required charms to bring up OpenStack with PLUMgrid
17+#
18+# 3. plumgrid-configs:
19+# This bundle overwrites the configs in plumgrid-ons-phase2
20+#
21+# 4. plumgrid-kilo:
22+# This bundle overwrites the source and openstack-origin configs to deploy OpenStack Kilo with PLUMgrid
23+#
24+
25+plumgrid-ons-phase1:
26+ series: trusty
27+ services:
28+ controller-node:
29+ charm: "cs:trusty/ubuntu"
30+ num_units: 1
31+ constraints: tags=controller
32+ compute-node:
33+ charm: "cs:trusty/ubuntu"
34+ num_units: 1
35+ constraints: tags=compute
36+ gateway-node:
37+ charm: "cs:trusty/ubuntu"
38+ num_units: 1
39+ constraints: tags=gateway
40+plumgrid-ons-phase2:
41+ inherits: plumgrid-ons-phase1
42 series: 'trusty'
43 relations:
44 - ['mysql', 'keystone']
45 - ['nova-cloud-controller', 'mysql']
46- - [nova-cloud-controller, rabbitmq-server]
47+ - ['nova-cloud-controller', 'rabbitmq-server']
48 - ['nova-cloud-controller', 'glance']
49 - ['nova-cloud-controller', 'keystone']
50 - ['nova-compute', 'nova-cloud-controller']
51@@ -12,11 +47,6 @@
52 - ['nova-compute', 'glance']
53 - ['glance', 'mysql']
54 - ['glance', 'keystone']
55- - ['glance', 'cinder']
56- - ['mysql', 'cinder']
57- - ['cinder', 'rabbitmq-server']
58- - ['cinder', 'nova-cloud-controller']
59- - ['cinder', 'keystone']
60 - ['openstack-dashboard', 'keystone']
61 - ['neutron-api', 'mysql']
62 - ['neutron-api', 'keystone']
63@@ -29,126 +59,137 @@
64 - ['plumgrid-director', 'plumgrid-gateway']
65 services:
66 mysql:
67- charm: cs:trusty/mysql-26
68+ charm: cs:trusty/percona-cluster-32
69 num_units: 1
70 annotations:
71 "gui-x": "-250"
72 "gui-y": "250"
73- to: 'lxc:plumgrid-director=0'
74+ to: 'lxc:controller-node=0'
75 rabbitmq-server:
76- charm: cs:trusty/rabbitmq-server-33
77+ charm: cs:trusty/rabbitmq-server-43
78 num_units: 1
79 annotations:
80 "gui-x": "-750"
81 "gui-y": "250"
82- to: 'lxc:plumgrid-director=0'
83+ to: 'lxc:controller-node=0'
84 keystone:
85- charm: cs:trusty/keystone-28
86+ charm: cs:trusty/keystone-33
87 num_units: 1
88 options:
89 admin-password: plumgrid
90- openstack-origin: cloud:trusty-kilo
91+ use-https: "no"
92 annotations:
93 "gui-x": "0"
94 "gui-y": "0"
95- to: 'lxc:plumgrid-director=0'
96+ to: 'lxc:controller-node=0'
97 nova-cloud-controller:
98- charm: cs:~openstack-charmers-next/trusty/nova-cloud-controller-1
99+ charm: cs:trusty/nova-cloud-controller-66
100 num_units: 1
101 options:
102 console-access-protocol: novnc
103 network-manager: Neutron
104- openstack-origin: cloud:trusty-kilo
105 quantum-security-groups: 'yes'
106 annotations:
107 "gui-x": "-500"
108 "gui-y": "0"
109- to: 'lxc:plumgrid-director=0'
110+ to: 'lxc:controller-node=0'
111 glance:
112- charm: cs:trusty/glance-24
113+ charm: cs:trusty/glance-30
114 num_units: 1
115- options:
116- openstack-origin: cloud:trusty-kilo
117 annotations:
118 "gui-x": "-250"
119 "gui-y": "-250"
120- to: 'lxc:plumgrid-director=0'
121+ to: 'lxc:controller-node=0'
122 openstack-dashboard:
123- charm: cs:trusty/openstack-dashboard-16
124+ charm: cs:trusty/openstack-dashboard-21
125 num_units: 1
126- options:
127- openstack-origin: cloud:trusty-kilo
128 annotations:
129 "gui-x": "0"
130 "gui-y": "-500"
131- to: 'lxc:plumgrid-director=0'
132- cinder:
133- charm: cs:trusty/cinder-26
134- num_units: 1
135- options:
136- openstack-origin: cloud:trusty-kilo
137- annotations:
138- "gui-x": "250"
139- "gui-y": "-250"
140- to: 'lxc:plumgrid-director=0'
141+ to: 'lxc:controller-node=0'
142 neutron-api:
143- charm: cs:~openstack-charmers-next/trusty/neutron-api-1
144+ charm: cs:trusty/neutron-api-23
145 num_units: 1
146 options:
147 neutron-plugin: plumgrid
148 neutron-security-groups: True
149- openstack-origin: cloud:trusty-kilo
150 plumgrid-password: plumgrid
151 plumgrid-username: plumgrid
152- plumgrid-virtual-ip: 192.168.100.250
153 annotations:
154 "gui-x": "500"
155 "gui-y": "0"
156- to: 'lxc:plumgrid-director=0'
157+ to: 'lxc:controller-node=0'
158 neutron-api-plumgrid:
159- charm: cs:~plumgrid-team/trusty/neutron-api-plumgrid
160+ charm: cs:~plumgrid-team/trusty/neutron-api-plumgrid-15
161 options:
162- enable-metadata: True
163- #install_sources: "deb http://37.48.126.173/ build413b18/"
164+ enable-metadata: "True"
165+ networking-plumgrid-version: "2015.1.5rc2"
166 annotations:
167 "gui-x": "750"
168 "gui-y": "250"
169 plumgrid-director:
170- charm: cs:~plumgrid-team/trusty/plumgrid-director
171+ charm: cs:~plumgrid-team/trusty/plumgrid-director-29
172 num_units: 1
173- options:
174- plumgrid-virtual-ip: 192.168.100.250
175- #install_sources: "deb http://37.48.126.173/ build413b18/"
176 annotations:
177 "gui-x": "0"
178 "gui-y": "500"
179+ to:
180+ - "controller-node=0"
181 nova-compute:
182- charm: cs:~openstack-charmers-next/trusty/nova-compute-1
183+ charm: cs:trusty/nova-compute-36
184 num_units: 1
185 options:
186 enable-live-migration: true
187 enable-resize: true
188 migration-auth-type: ssh
189- openstack-origin: cloud:trusty-kilo
190 manage-neutron-plugin-legacy-mode: False
191 #virt-type: qemu
192 annotations:
193 "gui-x": "250"
194 "gui-y": "250"
195- to: '0'
196+ to:
197+ - "compute-node=0"
198 plumgrid-edge:
199- charm: cs:~plumgrid-team/trusty/plumgrid-edge
200- options:
201- metadata-shared-key: "plumgrid"
202- #install_sources: "deb http://37.48.126.173/ build413b18/"
203+ charm: cs:~plumgrid-team/trusty/plumgrid-edge-25
204 annotations:
205 "gui-x": "500"
206 "gui-y": "500"
207 plumgrid-gateway:
208- charm: cs:~plumgrid-team/trusty/plumgrid-gateway
209- #options:
210- #install_sources: "deb http://37.48.126.173/ build413b18/"
211+ charm: cs:~plumgrid-team/trusty/plumgrid-gateway-25
212 num_units: 1
213 annotations:
214 "gui-x": "-500"
215 "gui-y": "500"
216+ to:
217+ - "gateway-node=0"
218+
219+plumgrid-configs:
220+ inherits: plumgrid-ons-phase2
221+ overrides:
222+ plumgrid-virtual-ip: 192.168.100.250
223+
224+ # Provide apt repository for PLUMgrid packages
225+ install_sources: "deb http://37.48.126.173/ build500b14/"
226+
227+ # Use this value if pulling packages from LCM
228+ #install_sources: |
229+ # - "deb http://<LCM-IP>:81/plumgrid plumgrid halfdome-500"
230+ # - "deb http://<LCM-IP>:81/plumgrid-images plumgrid halfdome-500"
231+
232+ #plumgrid-build:
233+ #iovisor-build:
234+
235+ # Interfaces on gateway node for external connectivity
236+ external-interfaces: '{"DEFAULT":"eth2"}'
237+
238+ # Uncomment for seperate fabric/data network
239+ # Interfaces on all PLUMgrid nodes connected to fabric/data network
240+ #fabric-interfaces: '{"DEFAULT":"eth1"}'
241+ # Fabric/data network
242+ #os-data-network: "192.168.101.0/24"
243+
244+plumgrid-kilo:
245+ inherits: plumgrid-configs
246+ overrides:
247+ source: cloud:trusty-kilo
248+ openstack-origin: cloud:trusty-kilo
249
250=== removed file 'bundle.yaml'
251--- bundle.yaml 2015-09-29 15:39:33 +0000
252+++ bundle.yaml 1970-01-01 00:00:00 +0000
253@@ -1,145 +0,0 @@
254-series: 'trusty'
255-relations:
256- - ['mysql', 'keystone']
257- - ['nova-cloud-controller', 'mysql']
258- - [nova-cloud-controller, rabbitmq-server]
259- - ['nova-cloud-controller', 'glance']
260- - ['nova-cloud-controller', 'keystone']
261- - ['nova-compute', 'nova-cloud-controller']
262- - ['nova-compute', 'mysql']
263- - ['nova-compute', 'rabbitmq-server']
264- - ['nova-compute', 'glance']
265- - ['glance', 'mysql']
266- - ['glance', 'keystone']
267- - ['glance', 'cinder']
268- - ['mysql', 'cinder']
269- - ['cinder', 'rabbitmq-server']
270- - ['cinder', 'nova-cloud-controller']
271- - ['cinder', 'keystone']
272- - ['openstack-dashboard', 'keystone']
273- - ['neutron-api', 'mysql']
274- - ['neutron-api', 'keystone']
275- - ['neutron-api', 'rabbitmq-server']
276- - ['neutron-api', 'nova-cloud-controller']
277- - ['neutron-api', 'neutron-api-plumgrid']
278- - ['neutron-api-plumgrid', 'plumgrid-edge']
279- - ['plumgrid-director', 'plumgrid-edge']
280- - ['nova-compute', 'plumgrid-edge']
281- - ['plumgrid-director', 'plumgrid-gateway']
282-services:
283- mysql:
284- charm: cs:trusty/mysql-26
285- num_units: 1
286- annotations:
287- "gui-x": "-250"
288- "gui-y": "250"
289- to: 'lxc:plumgrid-director=0'
290- rabbitmq-server:
291- charm: cs:trusty/rabbitmq-server-33
292- num_units: 1
293- annotations:
294- "gui-x": "-750"
295- "gui-y": "250"
296- to: 'lxc:plumgrid-director=0'
297- keystone:
298- charm: cs:trusty/keystone-28
299- num_units: 1
300- options:
301- admin-password: plumgrid
302- openstack-origin: cloud:trusty-kilo
303- annotations:
304- "gui-x": "0"
305- "gui-y": "0"
306- to: 'lxc:plumgrid-director=0'
307- nova-cloud-controller:
308- charm: cs:~openstack-charmers-next/trusty/nova-cloud-controller-1
309- num_units: 1
310- options:
311- console-access-protocol: novnc
312- network-manager: Neutron
313- openstack-origin: cloud:trusty-kilo
314- quantum-security-groups: 'yes'
315- annotations:
316- "gui-x": "-500"
317- "gui-y": "0"
318- to: 'lxc:plumgrid-director=0'
319- glance:
320- charm: cs:trusty/glance-24
321- num_units: 1
322- options:
323- openstack-origin: cloud:trusty-kilo
324- annotations:
325- "gui-x": "-250"
326- "gui-y": "-250"
327- to: 'lxc:plumgrid-director=0'
328- openstack-dashboard:
329- charm: cs:trusty/openstack-dashboard-16
330- num_units: 1
331- options:
332- openstack-origin: cloud:trusty-kilo
333- annotations:
334- "gui-x": "0"
335- "gui-y": "-500"
336- to: 'lxc:plumgrid-director=0'
337- cinder:
338- charm: cs:trusty/cinder-26
339- num_units: 1
340- options:
341- openstack-origin: cloud:trusty-kilo
342- annotations:
343- "gui-x": "250"
344- "gui-y": "-250"
345- to: 'lxc:plumgrid-director=0'
346- neutron-api:
347- charm: cs:~openstack-charmers-next/trusty/neutron-api-1
348- num_units: 1
349- options:
350- neutron-plugin: plumgrid
351- neutron-security-groups: True
352- openstack-origin: cloud:trusty-kilo
353- plumgrid-password: plumgrid
354- plumgrid-username: plumgrid
355- plumgrid-virtual-ip: 192.168.100.250
356- annotations:
357- "gui-x": "500"
358- "gui-y": "0"
359- to: 'lxc:plumgrid-director=0'
360- neutron-api-plumgrid:
361- charm: cs:trusty/neutron-api-plumgrid-1
362- options:
363- enable-metadata: True
364- annotations:
365- "gui-x": "750"
366- "gui-y": "250"
367- plumgrid-director:
368- charm: cs:trusty/plumgrid-director-1
369- num_units: 1
370- options:
371- plumgrid-virtual-ip: 192.168.100.250
372- annotations:
373- "gui-x": "0"
374- "gui-y": "500"
375- nova-compute:
376- charm: cs:~openstack-charmers-next/trusty/nova-compute-1
377- num_units: 1
378- options:
379- enable-live-migration: true
380- enable-resize: true
381- migration-auth-type: ssh
382- openstack-origin: cloud:trusty-kilo
383- manage-neutron-plugin-legacy-mode: False
384- annotations:
385- "gui-x": "250"
386- "gui-y": "250"
387- to: '0'
388- plumgrid-edge:
389- charm: cs:trusty/plumgrid-edge-0
390- annotations:
391- "gui-x": "500"
392- "gui-y": "500"
393- plumgrid-gateway:
394- charm: cs:trusty/plumgrid-gateway-1
395- num_units: 1
396- annotations:
397- "gui-x": "-500"
398- "gui-y": "500"
399
400=== added file 'setup_lcm.sh'
401--- setup_lcm.sh 1970-01-01 00:00:00 +0000
402+++ setup_lcm.sh 2016-05-17 18:38:21 +0000
403@@ -0,0 +1,118 @@
404+#!/bin/bash
405+set -e
406+
407+if [ "$EUID" -ne 0 ]
408+ then echo "Please run script with sudo"
409+ exit
410+fi
411+
412+function usage() {
413+ cat <<DELIM__
414+usage: $(basename $0) [options]
415+
416+Options:
417+ --clobber Will clear stored configurations and do a fresh run
418+DELIM__
419+}
420+
421+TEMP=$(getopt -o c --long ,clobber -- "$@")
422+if [[ $? -ne 0 ]]; then
423+ usage
424+ exit 1
425+fi
426+
427+eval set -- "$TEMP"
428+
429+while true; do
430+ case "$1" in
431+ --clobber) clobber=1; shift ;;
432+ --) shift; break ;;
433+ *) usage; exit 1
434+ ;;
435+ esac
436+done
437+
438+mkdir -p $HOME/.pginstall
439+
440+function read_raw() {
441+ eval "local=\$${2}"
442+ if [[ -n "$local" && "$local" =~ $3 ]]; then
443+ ## the value stored in the destination variable is already OK
444+ echo "Using provided value [${local}] for: $1"
445+ return 0
446+ fi
447+
448+ if [[ $# -eq 5 ]]; then
449+ echo -n "${1} (default [${5}])"
450+ dfl="$5"
451+ else
452+ echo -n "${1}"
453+ dfl=""
454+ fi
455+
456+ while true; do
457+ local=""
458+ echo -n ": "
459+ read local
460+ [[ $local == "" ]] && local="$dfl"
461+ if [[ "$local" =~ $3 ]]; then
462+ break
463+ fi
464+ echo " Please try again. [${local}] is not a valid value: $4"
465+ done
466+ eval $2="\"$local\""
467+}
468+
469+function read_nonempty() {
470+ if [[ $# -eq 3 ]]; then
471+ read_raw "$1" "$2" "[^ ]+" "must be non-empty" "$3"
472+ else
473+ read_raw "$1" "$2" "[^ ]+" "must be non-empty"
474+ fi
475+}
476+
477+function read_alnum() {
478+ if [[ $# -eq 3 ]]; then
479+ read_raw "$1" "$2" "^[0-9a-zA-Z]+$" "must use alphanumeric characters only" "$3"
480+ else
481+ read_raw "$1" "$2" "^[0-9a-zA-Z]+$" "must use alphanumeric characters only"
482+ fi
483+}
484+
485+function read_url() {
486+ read_raw "$1" "$2" "^(ftp|http|https)://[^ ]+" "invalid schema (e.g. http://IP)"
487+}
488+
489+function write_default_file() {
490+ cat > $HOME/.pginstall/config <<DELIM__
491+MAAS_CONTROLLER_REGION_ADMIN_USERNAME="${MAAS_CONTROLLER_REGION_ADMIN_USERNAME}"
492+plumgrid_repo_url="${plumgrid_repo_url}"
493+lvm_keypath_content="${lvm_keypath_content}"
494+zone_name="${zone_name}"
495+DELIM__
496+ return 0
497+}
498+
499+function lcm_key_check() {
500+ zone_name_=${zone_name}
501+ while true; do
502+ zone_name="${zone_name_}"
503+ read_alnum 'Enter LCM Canonical zone name' zone_name
504+ read_url "Enter LCM repository base url" plumgrid_repo_url
505+ echo -n "Checking ssh key on LCM for your deployment..."
506+ ret=$(curl -Lks ${plumgrid_repo_url}/files/ssh_keys/zones/$zone_name/id_rsa.pub -o /tmp/id_rsa.pub -w '%{http_code}' || true)
507+ [ $ret -eq 200 ] && break
508+ echo "Unable to get ssh key from LCM for your deployment."
509+ echo "Check zone name or retry after running canonical-pg-refresh.sh --key-only script on LCM and make sure your deployment shows up."
510+ zone_name_=""
511+ done
512+ echo "OK"
513+ mkdir -p /var/lib/plumgrid/zones/$zone_name
514+ mv /tmp/id_rsa.pub /var/lib/plumgrid/zones/$zone_name/id_rsa.pub
515+ lvm_keypath_content="/var/lib/plumgrid/zones/${zone_name}/id_rsa.pub"
516+}
517+
518+[[ -r $HOME/.pginstall/config && $clobber != 1 ]] && . $HOME/.pginstall/config
519+read_nonempty "Username of MAAS Region Admin User" MAAS_CONTROLLER_REGION_ADMIN_USERNAME "root"
520+lcm_key_check
521+write_default_file

Subscribers

People subscribed via source and target branches

to all changes: