diff --git a/config.yaml b/config.yaml index 06dee36..d63a08a 100644 --- a/config.yaml +++ b/config.yaml @@ -23,6 +23,10 @@ options: default: nova type: string description: Database name + virt-type: + default: kvm + type: string + description: "Virtualization flavor. Supported: kvm, xen, uml, lxc" # needed if using flatmanager bridge-interface: diff --git a/hooks/nova-compute-common b/hooks/nova-compute-common index 92e1288..cd1fb9a 100755 --- a/hooks/nova-compute-common +++ b/hooks/nova-compute-common @@ -11,6 +11,7 @@ NETWORK_BRIDGE=$(config-get bridge-interface) BRIDGE_IP=$(config-get bridge-ip) BRIDGE_NETMASK=$(config-get bridge-netmask) PPA=$(config-get nova-release) +VIRT_TYPE=$(config-get virt-type) HOSTNAME=`hostname -f` function set_or_update { diff --git a/hooks/nova-compute-relations b/hooks/nova-compute-relations index 4b490ac..c5ec8c2 100755 --- a/hooks/nova-compute-relations +++ b/hooks/nova-compute-relations @@ -9,10 +9,18 @@ else fi function install_hook { + [[ -z $VIRT_TYPE ]] && VIRT_TYPE="kvm" + case $VIRT_TYPE in + "kvm") COMPUTE_PKG="nova-compute-kvm";; + "xen") COMPUTE_PKG="nova-compute-xen";; + "uml") COMPUTE_PKG="nova-compute-uml";; + "lxc") COMPUTE_PKG="nova-compute-lxc";; + *) juju-log "ERROR: Unsupported VIRT_TYPE=$VIRT_TYPE";; + esac apt-get -y install python-software-properties || exit 1 add_ppa apt-get update || exit 1 - apt-get -y install $SERVICES || exit 1 + apt-get -y install $COMPUTE_PKG nova-network || exit 1 # XXX sudo on the juju sample AMI doesnt function # as it should (doesn't include suoders.d/*). do this diff --git a/metadata.yaml b/metadata.yaml index cc979df..486705a 100644 --- a/metadata.yaml +++ b/metadata.yaml @@ -1,6 +1,6 @@ ensemble: formula name: nova-compute -revision: 44 +revision: 48 summary: "OpenStack compute" description: | OpenStack Compute, codenamed Nova, is a cloud computing fabric controller. In