New config option 'virt-type' which determines which nova-compute-* package

is installed.  Defaults to 'kvm'
This commit is contained in:
Adam Gandelman 2011-09-30 15:52:20 -07:00
parent 54d5963fb5
commit e5afaf6f32
4 changed files with 15 additions and 2 deletions

View File

@ -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:

View File

@ -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 {

View File

@ -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

View File

@ -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