manage nova ppa installation source via symlinked nova-version

This commit is contained in:
Adam Gandelman
2011-07-25 22:24:01 -07:00
parent 3fc142208d
commit 833e397f5f
3 changed files with 17 additions and 6 deletions

View File

@@ -20,10 +20,6 @@ BRIDGE_NETMASK="255.255.255.0"
DEFAULT_ETH=$(ip route | grep default | awk '{ print $5 }')
IP=$(ifconfig $DEFAULT_ETH | grep 'inet addr' | awk '{ print $2 }' | cut -d: -f2)
. /etc/lsb-release
PPA="milestone"
PPA_URL="deb http://ppa.launchpad.net/nova-core/$PPA/ubuntu $DISTRIB_CODENAME main"
function set_or_update {
# set or update a key=value config option in nova.conf
KEY=$1
@@ -97,3 +93,18 @@ function configure_network_manager {
*) echo "ERROR: Invalid network manager $1" && exit 1 ;;
esac
}
function add_ppa {
# temporarily find out what nova version we
# should be using from a source file. this
# should go away when ensemble can handle config
# better.
if [[ -e $FORMULA_DIR/nova-version ]] ; then
. $FORMULA_DIR/nova-version
. /etc/lsb-release
[[ -z $PPA ]] && return 0
PPA_URL="deb http://ppa.launchpad.net/nova-core/$PPA/ubuntu $DISTRIB_CODENAME main"
add-apt-repository "$PPA_URL" || exit 1
fi
}

View File

@@ -12,7 +12,7 @@ fi
function install_hook {
ensemble-log "Installing nova packages"
apt-get -y install python-software-properties || exit 1
add-apt-repository "$PPA_URL" || exit 1
add_ppa
apt-get update || exit 1
DEBIAN_FRONTEND=noninteractive apt-get -y \
install --no-install-recommends $PACKAGES || exit 1

View File

@@ -1,6 +1,6 @@
ensemble: formula
name: nova-cloud-controller
revision: 40
revision: 42
summary: "Openstack nova controller node."
description: |
Cloud controller node for Openstack nova. Contains nova-schedule,