Merge lp:~gandelman-a/charms/precise/nova-compute/trunk into lp:~charmers/charms/precise/nova-compute/trunk

Proposed by Adam Gandelman
Status: Merged
Merge reported by: Adam Gandelman
Merged at revision: not available
Proposed branch: lp:~gandelman-a/charms/precise/nova-compute/trunk
Merge into: lp:~charmers/charms/precise/nova-compute/trunk
Diff against target: 92 lines (+27/-11)
4 files modified
config.yaml (+1/-1)
hooks/nova-compute-common (+18/-6)
hooks/nova-compute-relations (+8/-2)
metadata.yaml (+0/-2)
To merge this branch: bzr merge lp:~gandelman-a/charms/precise/nova-compute/trunk
Reviewer Review Type Date Requested Status
charmers Pending
Review via email: mp+86846@code.launchpad.net

Description of the change

Adds nova-api to run on compute nodes to serve as a local meta data service to the instances running on that host.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'config.yaml'
2--- config.yaml 2011-09-30 22:52:20 +0000
3+++ config.yaml 2012-01-09 15:31:23 +0000
4@@ -26,7 +26,7 @@
5 virt-type:
6 default: kvm
7 type: string
8- description: "Virtualization flavor. Supported: kvm, xen, uml, lxc"
9+ description: "Virtualization flavor. Supported: kvm, xen, uml, lxc. qemu"
10
11 # needed if using flatmanager
12 bridge-interface:
13
14=== modified file 'hooks/nova-compute-common'
15--- hooks/nova-compute-common 2011-10-12 06:22:46 +0000
16+++ hooks/nova-compute-common 2012-01-09 15:31:23 +0000
17@@ -1,5 +1,5 @@
18 #!/bin/bash
19-SERVICES="nova-compute nova-network"
20+SERVICES="nova-compute nova-network nova-api"
21 NOVA_RELEASE=$(config-get nova-release)
22 NOVA_CONF=$(config-get nova-config)
23 RABBIT_USER=$(config-get rabbit-user)
24@@ -121,11 +121,23 @@
25 }
26
27 function add_ppa {
28- # don't setup PPA, install from archive
29+ # Install from archive instead of PPA.
30 [[ $PPA == "distro" ]] && return 0
31- juju-log "nova-compute: Configuring PPA access for $PPA"
32 . /etc/lsb-release
33- PPA_URL="deb http://ppa.launchpad.net/nova-core/$PPA/ubuntu $DISTRIB_CODENAME main"
34- echo "Executing: add-apt-repository \"$PPA_URL\"" || exit 1
35- add-apt-repository "$PPA_URL" || exit 1
36+ [[ -z $PPA ]] && return 0
37+ # if referenced by name, setup ppa to upstream PPAs
38+ if [[ "$PPA" == "trunk" ]] ||
39+ [[ "$PPA" == "milestone" ]] ||
40+ [[ "$PPA" == "milestone-proposed" ]] ; then
41+ juju-log "nova: Configuring installation from upstream PPA ($PPA)"
42+ PPA_URL="deb http://ppa.launchpad.net/nova-core/$PPA/ubuntu $DISTRIB_CODENAME main"
43+ add-apt-repository "$PPA_URL" || exit 1
44+ return
45+ fi
46+ if [[ "${PPA:0:4}" == "ppa:" ]] ; then
47+ juju-log "nova: Configuring installation from custom PPA ($PPA)"
48+ add-apt-repository -y "$PPA" || exit 1
49+ return
50+ fi
51+ juju-log "nova: No PPA specified. Falling back to installation from Ubuntu archive."
52 }
53
54=== modified file 'hooks/nova-compute-relations'
55--- hooks/nova-compute-relations 2011-10-12 06:22:46 +0000
56+++ hooks/nova-compute-relations 2012-01-09 15:31:23 +0000
57@@ -11,7 +11,7 @@
58 function install_hook {
59 [[ -z $VIRT_TYPE ]] && VIRT_TYPE="kvm"
60 case $VIRT_TYPE in
61- "kvm") COMPUTE_PKG="nova-compute-kvm";;
62+ "kvm"|"qemu") COMPUTE_PKG="nova-compute-kvm";;
63 "xen") COMPUTE_PKG="nova-compute-xen";;
64 "uml") COMPUTE_PKG="nova-compute-uml";;
65 "lxc") COMPUTE_PKG="nova-compute-lxc";;
66@@ -20,7 +20,13 @@
67 apt-get -y install python-software-properties || exit 1
68 add_ppa
69 apt-get update || exit 1
70- apt-get -y install $COMPUTE_PKG nova-network || exit 1
71+ apt-get -y install $COMPUTE_PKG nova-api nova-network || exit 1
72+
73+ # there is no nova-compute-qemu pkg. Install kvm and reconfigure
74+ # manually for qemu.
75+ if [[ "$VIRT_TYPE" == "qemu" ]] ; then
76+ sed -i 's/\(\-\-libvirt_type=\).*/\1qemu/g' /etc/nova/nova-compute.conf
77+ fi
78
79 # XXX sudo on the juju sample AMI doesnt function
80 # as it should (doesn't include suoders.d/*). do this
81
82=== modified file 'metadata.yaml'
83--- metadata.yaml 2011-10-12 06:22:46 +0000
84+++ metadata.yaml 2012-01-09 15:31:23 +0000
85@@ -15,7 +15,5 @@
86 interface: rabbitmq
87 image-service:
88 interface: glance
89- cloud-controller:
90- interface: nova
91 nova-network:
92 interface: nova

Subscribers

People subscribed via source and target branches