Merge lp:~thomnico/orange-box-examples/serie-of-small-bugfixes into lp:orange-box-examples

Proposed by Nicolas Thomas
Status: Merged
Approved by: Nicolas Thomas
Approved revision: 99
Merged at revision: 96
Proposed branch: lp:~thomnico/orange-box-examples/serie-of-small-bugfixes
Merge into: lp:orange-box-examples
Diff against target: 337 lines (+118/-26)
5 files modified
bin/bundle2local.sh (+82/-0)
bin/orange-box-import-SA-keys (+1/-1)
contrail/contrail.yaml (+2/-1)
openstack/icehouse/trusty/icehouseOB-local.yaml (+21/-19)
telco/mydomain-bundle.sh (+12/-5)
To merge this branch: bzr merge lp:~thomnico/orange-box-examples/serie-of-small-bugfixes
Reviewer Review Type Date Requested Status
Nicolas Thomas (community) Approve
Review via email: mp+265489@code.launchpad.net

This proposal supersedes a proposal from 2015-07-22.

To post a comment you must log in.
Revision history for this message
Nicolas Thomas (thomnico) : Posted in a previous version of this proposal
review: Approve
Revision history for this message
Nicolas Thomas (thomnico) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file 'bin/bundle2local.sh'
--- bin/bundle2local.sh 1970-01-01 00:00:00 +0000
+++ bin/bundle2local.sh 2015-07-22 09:07:53 +0000
@@ -0,0 +1,82 @@
1#!/bin/bash
2#
3# bundle2local
4# Copyright (C) 2014 Canonical Ltd.
5#
6# Authors: Nicolas Thomas <nicolas.thomas@canonical.com>
7#
8# This program is free software: you can redistribute it and/or modify
9# it under the terms of the GNU General Public License as published by
10# the Free Software Foundation, version 3 of the License.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.
16#
17# You should have received a copy of the GNU General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19
20## TODO start from juju-deployer to do the same but more beautifully ..
21set -ex
22
23
24bundle2local()
25{
26
27[ -d charmstore/trusty ] || mkdir -p charmstore/trusty
28[ -d charmstore/precise ] || mkdir -p charmstore/precise
29TMPFILE=`mktemp`
30CACHEDIRS=`mktemp`
31ROOTDIR=$PWD
32
33### this is THE biggest hack deployer know how to match charmstore to specific version reuse that and turn it into local charms. bonus it is super fast
34juju-deployer -vbu -c $1 2>&1 | grep "Cache dir" |awk '{print $5}' > $CACHEDIRS
35
36## regex to get serie and charm name.
37grep "charm:" $1 | sed -r 's!.*charm\s*.*.*(trusty|precise)\/(.*)!\1:\2!' > $TMPFILE
38#normalise if there is " or ' some bundle don't have them
39sed -ie 's|["'\'']||g' $TMPFILE
40while IFS=: read serie charm
41do
42 canonicalcharm=`echo $charm | sed -r 's!(.*)-.*[0-9]$!\1!'`
43 CHARMDIR=`grep $serie_$charm $CACHEDIRS`
44 [ -d charmstore/$serie/$charm ] || mkdir -p charmstore/$serie/$charm
45 cp -rf $CHARMDIR/* charmstore/$serie/$charm/
46cd $ROOTDIR
47done <$TMPFILE
48## Now create a -local version of the bundle:
49BASEFILE=`basename $1 .yaml`
50cat $1 | sed -r 's!(^.*\s)charm:\s*(.*)*(trusty|precise)\/(.*)*"$!\1charm: local:\3/\4!' > ${BASEFILE}-local.yaml
51cat <<EOF
52You can now do:
53export JUJU_REPOSITORY=$ROOTDIR/charmstore
54juju-deployer -c ${BASEFILE}-local.yaml
55
56To use your locally copied charms
57If your bundle was already using some local charms you will have to copy them in $ROOTDIR/charmstore
58EOF
59
60}
61
62usage()
63{
64cat << EOF
65
66bundle2local - create a local usable copy of charms and create a local version of the bundle
67
68USAGE: bundle2local mybundle.yaml
69 Be sure to have charm-tools installed
70 If already downloaded a pull request will be done.
71 the charmstore will be local to the directory you run the script in.
72EOF
73exit 0
74}
75
76
77[ $# -lt 1 ] && usage
78[ -f $1 ] || usage
79BUNDLE=$1
80
81bundle2local $1
82
083
=== modified file 'bin/orange-box-import-SA-keys'
--- bin/orange-box-import-SA-keys 2015-05-12 23:30:15 +0000
+++ bin/orange-box-import-SA-keys 2015-07-22 09:07:53 +0000
@@ -4,7 +4,7 @@
4mv ~/.ssh/authorized_keys ~/.ssh/authorized_keys.old4mv ~/.ssh/authorized_keys ~/.ssh/authorized_keys.old
55
6#copy maas user's ssh key6#copy maas user's ssh key
7sudo cat /home/maas/.ssh/id_rsa.pub > ~/.ssh/authorized_keys7sudo cat ~maas/.ssh/id_rsa.pub > ~/.ssh/authorized_keys
88
9#sabdfl9#sabdfl
10ssh-import-id sabdfl10ssh-import-id sabdfl
1111
=== modified file 'contrail/contrail.yaml'
--- contrail/contrail.yaml 2015-05-12 22:13:31 +0000
+++ contrail/contrail.yaml 2015-07-22 09:07:53 +0000
@@ -118,7 +118,8 @@
118 - [ contrail-control, contrail-configuration ]118 - [ contrail-control, contrail-configuration ]
119 - [ nova-compute, neutron-contrail ]119 - [ nova-compute, neutron-contrail ]
120 - [ contrail-webui, keystone ]120 - [ contrail-webui, keystone ]
121 - [ contrail-webui, contrail-configuration ]121 - - "contrail-webui:contrail_discovery"
122 - "contrail-configuration:contrail-discovery"
122 - [ neutron-contrail, contrail-control ]123 - [ neutron-contrail, contrail-control ]
123 - [ neutron-contrail, neutron-gateway ]124 - [ neutron-contrail, neutron-gateway ]
124 - [ neutron-contrail, contrail-configuration ]125 - [ neutron-contrail, contrail-configuration ]
125126
=== modified file 'openstack/icehouse/trusty/icehouseOB-local.yaml'
--- openstack/icehouse/trusty/icehouseOB-local.yaml 2015-02-07 17:59:14 +0000
+++ openstack/icehouse/trusty/icehouseOB-local.yaml 2015-07-22 09:07:53 +0000
@@ -1,25 +1,26 @@
1icehouse:1icehouse:
2 overrides:2 overrides:
3 openstack-origin: "cloud:trusty-icehouse"3 openstack-origin: "cloud:trusty-icehouse"
4 source: "distro"
4 services:5 services:
5 ceph:6 ceph:
6 branch: "lp:charms/ceph"7 charm: "local:trusty/ceph-27"
7 num_units: 38 num_units: 3
8 constraints: tags=physical9 constraints: tags=physical
9 options:10 options:
10 fsid: "9e7aac42-4bf4-11e3-b4b7-5254006a039c"11 fsid: "9e7aac42-4bf4-11e3-b4b7-5254006a039c"
11 "monitor-secret": AQAAvoJSOAv/NRAAgvXP8d7iXN7lWYbvDZzm2Q==12 "monitor-secret": AQAAvoJSOAv/NRAAgvXP8d7iXN7lWYbvDZzm2Q==
12 "osd-devices": "/srv"13 "osd-devices": "/srv /dev/sdb"
13 "osd-reformat": "yes"14 "osd-reformat": "yes"
14 annotations:15 annotations:
15 "gui-x": "2648.6688842773438"16 "gui-x": "2648.6688842773438"
16 "gui-y": "708.3873901367188"17 "gui-y": "708.3873901367188"
17 ubuntu:18 ubuntu:
18 branch: "lp:charms/ubuntu"19 charm: "local:trusty/ubuntu"
19 num_units: 120 num_units: 1
20 constraints: tags=physical21 constraints: tags=physical
21 keystone: 22 keystone:
22 branch: "lp:charms/keystone"23 charm: "local:trusty/keystone-5"
23 num_units: 124 num_units: 1
24 to: lxc:ubuntu=025 to: lxc:ubuntu=0
25 options: 26 options:
@@ -29,7 +30,7 @@
29 "gui-x": "2013.905517578125"30 "gui-x": "2013.905517578125"
30 "gui-y": "75.58013916015625"31 "gui-y": "75.58013916015625"
31 "nova-compute":32 "nova-compute":
32 branch: "lp:charms/nova-compute"33 charm: "local:trusty/nova-compute-11"
33 num_units: 334 num_units: 3
34 to: [ceph=0, ceph=1, ceph=2]35 to: [ceph=0, ceph=1, ceph=2]
35 options:36 options:
@@ -38,7 +39,7 @@
38 "gui-x": "776.1040649414062"39 "gui-x": "776.1040649414062"
39 "gui-y": "-81.22811031341553"40 "gui-y": "-81.22811031341553"
40 "neutron-gateway":41 "neutron-gateway":
41 branch: "lp:charms/quantum-gateway"42 charm: "local:trusty/quantum-gateway-3"
42 num_units: 143 num_units: 1
43 constraints: tags=virtual44 constraints: tags=virtual
44 options:45 options:
@@ -48,30 +49,31 @@
48 "gui-x": "329.0572509765625"49 "gui-x": "329.0572509765625"
49 "gui-y": "46.4658203125"50 "gui-y": "46.4658203125"
50 "nova-cloud-controller": 51 "nova-cloud-controller":
51 branch: "lp:charms/nova-cloud-controller"52 charm: "local:trusty/nova-cloud-controller-50"
52 num_units: 153 num_units: 1
53 to: lxc:ubuntu=054 to: lxc:ubuntu=0
54 options: 55 options:
55 "network-manager": Neutron56 "network-manager": Neutron
57 "console-access-protocol": novnc
56 annotations:58 annotations:
57 "gui-x": "1388.40185546875"59 "gui-x": "1388.40185546875"
58 "gui-y": "-118.01156234741211"60 "gui-y": "-118.01156234741211"
59 rabbitmq: 61 rabbitmq:
60 branch: "lp:charms/rabbitmq-server"62 charm: "local:trusty/rabbitmq-server-4"
61 num_units: 163 num_units: 1
62 to: lxc:ubuntu=064 to: lxc:ubuntu=0
63 annotations:65 annotations:
64 "gui-x": "633.8120727539062"66 "gui-x": "633.8120727539062"
65 "gui-y": "862.6530151367188"67 "gui-y": "862.6530151367188"
66 glance: 68 glance:
67 branch: "lp:charms/glance"69 charm: "local:trusty/glance-3"
68 num_units: 170 num_units: 1
69 to: lxc:ubuntu=071 to: lxc:ubuntu=0
70 annotations:72 annotations:
71 "gui-x": "1147.3269653320312"73 "gui-x": "1147.3269653320312"
72 "gui-y": "1389.5643157958984"74 "gui-y": "1389.5643157958984"
73 cinder: 75 cinder:
74 branch: "lp:charms/cinder"76 charm: "local:trusty/cinder-4"
75 num_units: 177 num_units: 1
76 to: lxc:ubuntu=078 to: lxc:ubuntu=0
77 options: 79 options:
@@ -80,20 +82,20 @@
80 "gui-x": "1752.32568359375"82 "gui-x": "1752.32568359375"
81 "gui-y": "1365.716194152832"83 "gui-y": "1365.716194152832"
82 "ceph-radosgw":84 "ceph-radosgw":
83 branch: "lp:charms/ceph-radosgw"85 charm: "local:trusty/ceph-radosgw-3"
84 num_units: 186 num_units: 1
85 to: lxc:ubuntu=087 to: lxc:ubuntu=0
86 annotations:88 annotations:
87 "gui-x": "2216.68212890625"89 "gui-x": "2216.68212890625"
88 "gui-y": "697.16796875"90 "gui-y": "697.16796875"
89 cinder-ceph:91 cinder-ceph:
90 branch: "lp:charms/cinder-ceph"92 charm: "local:trusty/cinder-ceph-1"
91 num_units: 093 num_units: 0
92 annotations:94 annotations:
93 "gui-x": "2257.5515747070312"95 "gui-x": "2257.5515747070312"
94 "gui-y": "1231.2130126953125"96 "gui-y": "1231.2130126953125"
95 "openstack-dashboard": 97 "openstack-dashboard":
96 branch: "lp:charms/openstack-dashboard"98 charm: "local:trusty/openstack-dashboard-4"
97 num_units: 199 num_units: 1
98 to: lxc:ubuntu=0100 to: lxc:ubuntu=0
99 options:101 options:
@@ -102,7 +104,7 @@
102 "gui-x": "2353.6898193359375"104 "gui-x": "2353.6898193359375"
103 "gui-y": "-94.2642593383789"105 "gui-y": "-94.2642593383789"
104 mysql: 106 mysql:
105 branch: "lp:charms/mysql"107 charm: "local:trusty/mysql-1"
106 num_units: 1108 num_units: 1
107 to: lxc:ubuntu=0109 to: lxc:ubuntu=0
108 options:110 options:
@@ -111,34 +113,34 @@
111 "gui-x": "364.4567565917969"113 "gui-x": "364.4567565917969"
112 "gui-y": "1067.5167846679688"114 "gui-y": "1067.5167846679688"
113 mongodb:115 mongodb:
114 branch: "lp:charms/mongodb"116 charm: "local:trusty/mongodb-0"
115 num_units: 1117 num_units: 1
116 to: lxc:ubuntu=0118 to: lxc:ubuntu=0
117 annotations:119 annotations:
118 "gui-x": "-70.0399979352951"120 "gui-x": "-70.0399979352951"
119 "gui-y": "1282.8224487304688"121 "gui-y": "1282.8224487304688"
120 ceilometer:122 ceilometer:
121 branch: "lp:charms/ceilometer"123 charm: "local:trusty/ceilometer-0"
122 num_units: 1124 num_units: 1
123 to: lxc:ubuntu=0125 to: lxc:ubuntu=0
124 annotations:126 annotations:
125 "gui-x": "-78.13333225250244"127 "gui-x": "-78.13333225250244"
126 "gui-y": "919.3128051757812"128 "gui-y": "919.3128051757812"
127 ceilometer-agent:129 ceilometer-agent:
128 branch: "lp:charms/ceilometer-agent"130 charm: "local:trusty/ceilometer-agent-0"
129 num_units: 0131 num_units: 0
130 annotations:132 annotations:
131 "gui-x": "-90.9158582687378"133 "gui-x": "-90.9158582687378"
132 "gui-y": "562.5347595214844"134 "gui-y": "562.5347595214844"
133 heat:135 heat:
134 branch: "lp:charms/heat"136 charm: "local:trusty/heat-0"
135 num_units: 1137 num_units: 1
136 to: lxc:ubuntu=0138 to: lxc:ubuntu=0
137 annotations:139 annotations:
138 "gui-x": "494.94012451171875"140 "gui-x": "494.94012451171875"
139 "gui-y": "1363.6024169921875"141 "gui-y": "1363.6024169921875"
140 ntp:142 ntp:
141 branch: "lp:charms/ntp"143 charm: "local:trusty/ntp-4"
142 num_units: 0144 num_units: 0
143 annotations:145 annotations:
144 "gui-x": "-104.57728099822998"146 "gui-x": "-104.57728099822998"
145147
=== modified file 'telco/mydomain-bundle.sh'
--- telco/mydomain-bundle.sh 2015-02-18 16:44:51 +0000
+++ telco/mydomain-bundle.sh 2015-07-22 09:07:53 +0000
@@ -28,7 +28,9 @@
28 annotations: 28 annotations:
29 "gui-x": "400"29 "gui-x": "400"
30 "gui-y": "0"30 "gui-y": "0"
31 "clearwater-homer": 31 to:
32 - lxc:clearwater-bono=0
33 clearwater-homer:
32 charm: "cs:~thomnico/precise/clearwater-homer"34 charm: "cs:~thomnico/precise/clearwater-homer"
33 num_units: 135 num_units: 1
34 options: 36 options:
@@ -48,7 +50,8 @@
48 annotations: 50 annotations:
49 "gui-x": "200"51 "gui-x": "200"
50 "gui-y": "300"52 "gui-y": "300"
51 "clearwater-sprout": 53 to: lxc:clearwater-homer=0
54 clearwater-sprout:
52 charm: "cs:~thomnico/precise/clearwater-sprout"55 charm: "cs:~thomnico/precise/clearwater-sprout"
53 num_units: 156 num_units: 1
54 options: 57 options:
@@ -68,7 +71,8 @@
68 annotations: 71 annotations:
69 "gui-x": "1000"72 "gui-x": "1000"
70 "gui-y": "450"73 "gui-y": "450"
71 "telscale-load-balancer": 74 to: lxc:clearwater-bono=0
75 telscale-load-balancer:
72 charm: "cs:~thomnico/trusty/telscale-load-balancer"76 charm: "cs:~thomnico/trusty/telscale-load-balancer"
73 num_units: 177 num_units: 1
74 expose: true78 expose: true
@@ -83,14 +87,16 @@
83 annotations: 87 annotations:
84 "gui-x": "-500.8215242215981"88 "gui-x": "-500.8215242215981"
85 "gui-y": "698.5485784445332"89 "gui-y": "698.5485784445332"
86 sipml5: 90 to: lxc:telscale-load-balancer=0
91 sipml5:
87 charm: "cs:~thomnico/trusty/sipml5"92 charm: "cs:~thomnico/trusty/sipml5"
88 num_units: 193 num_units: 1
89 expose: true94 expose: true
90 annotations: 95 annotations:
91 "gui-x": "1383.4697265625"96 "gui-x": "1383.4697265625"
92 "gui-y": "423.10858154296875"97 "gui-y": "423.10858154296875"
93 "telscale-restcomm": 98 to: lxc:clearwater-bono=0
99 telscale-restcomm:
94 charm: "cs:~thomnico/trusty/telscale-restcomm"100 charm: "cs:~thomnico/trusty/telscale-restcomm"
95 num_units: 1101 num_units: 1
96 constraints: arch=amd64 mem=2G102 constraints: arch=amd64 mem=2G
@@ -98,6 +104,7 @@
98 annotations: 104 annotations:
99 "gui-x": "-500.625244140625"105 "gui-x": "-500.625244140625"
100 "gui-y": "547.9537963867188"106 "gui-y": "547.9537963867188"
107 to: lxc:telscale-load-balancer=0
101 relations: 108 relations:
102 - - "clearwater-bono:scscf"109 - - "clearwater-bono:scscf"
103 - "clearwater-sprout:pcscf"110 - "clearwater-sprout:pcscf"

Subscribers

People subscribed via source and target branches