Update devstack config

Signed-off-by: Chuck Short <chuck.short@canonical.com>
This commit is contained in:
Chuck Short 2015-11-09 10:49:30 -05:00
parent 132c4cc532
commit b563eba14a
4 changed files with 23 additions and 24 deletions

View File

@ -9,7 +9,7 @@ Enabling in Devstack
2. Modify DevStack's local.conf to pull in this project by adding:
[[local|localrc]]
enable_plugin nova-compute-lxd https://github.com/lxc/nova-compute-lxd
enable_plugin nova-lxd https://github.com/lxc/nova-compute-lxd
3. run stack.sh

View File

@ -32,4 +32,3 @@ function install_lxd {
fi
echo_summary "Installing LXD"
}

View File

@ -13,75 +13,75 @@ NOVA_CONF_DIR=${NOVA_CONF_DIR:-/etc/nova}
NOVA_CONF=${NOVA_CONF:-NOVA_CONF_DIR/nova.conf}
# nova-powervm directories
NOVA_COMPUTE_LXD_DIR=${NOVA_POWERVM_DIR:-${DEST}/nova-compute-lxd}
NOVA_COMPUTE_LXD_DIR=${NOVA_POWERVM_DIR:-${DEST}/nova-lxd}
NOVA_COMPUTE_LXD_PLUGIN_DIR=$(readlink -f $(dirname ${BASH_SOURCE[0]}))
source $NOVA_COMPUTE_LXD_PLUGIN_DIR/nova-lxd-functions.sh
function pre_install_nova-compute-lxd() {
function pre_install_nova-lxd() {
# Install OS packages if necessary with "install_package ...".
install_lxd
install_pylxd
}
function install_nova-compute-lxd() {
function install_nova-lxd() {
# Install the service.
setup_develop $NOVA_COMPUTE_LXD_DIR
}
function configure_nova-compute-lxd() {
function configure_nova-lxd() {
# Configure the service.
iniset $NOVA_CONF DEFAULT compute_driver nclxd.nova.virt.lxd.LXDDriver
iniset $NOVA_CONF DEFAULT compute_driver nova_lxd.nova.virt.lxd.LXDDriver
}
function init_nova-compute-lxd() {
function init_nova-lxd() {
# Initialize and start the service.
:
}
function shutdown_nova-compute-lxd() {
function shutdown_nova-lxd() {
# Shut the service down.
:
}
function cleanup_nova-compute-lxd() {
function cleanup_nova-lxd() {
# Cleanup the service.
:
}
if is_service_enabled nova-compute-lxd; then
if is_service_enabled nova-lxd; then
if [[ "$1" == "stack" && "$2" == "pre-install" ]]; then
# Set up system services
echo_summary "Configuring system services nova-compute-lxd"
pre_install_nova-compute-lxd
echo_summary "Configuring system services nova-lxd"
pre_install_nova-lxd
elif [[ "$1" == "stack" && "$2" == "install" ]]; then
# Perform installation of service source
echo_summary "Installing nova-compute-lxd"
install_nova-compute-lxd
echo_summary "Installing nova-lxd"
install_nova-lxd
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
# Configure after the other layer 1 and 2 services have been configured
echo_summary "Configuring nova-compute-lxd"
configure_nova-compute-lxd
echo_summary "Configuring nova-lxd"
configure_nova-lxd
elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
# Initialize and start the nova-compute-lxd service
echo_summary "Initializing nova-compute-lxd"
init_nova-compute-lxd
# Initialize and start the nova-lxd service
echo_summary "Initializing nova-lxd"
init_nova-lxd
fi
if [[ "$1" == "unstack" ]]; then
# Shut down nova-compute-lxd services
# Shut down nova-lxd services
# no-op
shutdown_nova-compute-lxd
shutdown_nova-lxd
fi
if [[ "$1" == "clean" ]]; then
# Remove state and transient data
# Remember clean.sh first calls unstack.sh
# no-op
cleanup_nova-compute-lxd
cleanup_nova-lxd
fi
fi

View File

@ -1,5 +1,5 @@
# Add nova-lxd to enabled services
enable_service nova-compute-lxd
enable_service nova-lxd
# LXD install/upgrade settings
INTSALL_LXD=${INSTALL_LXD:-False}