Merge "Add devstack plugin"

This commit is contained in:
Jenkins 2015-12-11 19:16:27 +00:00 committed by Gerrit Code Review
commit a24885451a
4 changed files with 54 additions and 4 deletions

View File

@ -34,6 +34,7 @@ GITDIR["python-ironicclient"]=$DEST/python-ironicclient
GITDIR["ironic-lib"]=$DEST/ironic-lib
IRONIC_DIR=$DEST/ironic
IRONIC_DEVSTACK_DIR=$IRONIC_DIR/devstack
IRONIC_PYTHON_AGENT_DIR=$DEST/ironic-python-agent
IRONIC_DATA_DIR=$DATA_DIR/ironic
IRONIC_STATE_PATH=/var/lib/ironic
@ -60,8 +61,8 @@ IRONIC_IPMIINFO_FILE=${IRONIC_IPMIINFO_FILE:-$IRONIC_DATA_DIR/hardware_info}
# Set up defaults for functional / integration testing
IRONIC_NODE_UUID=${IRONIC_NODE_UUID:-`uuidgen`}
IRONIC_SCRIPTS_DIR=${IRONIC_SCRIPTS_DIR:-$TOP_DIR/tools/ironic/scripts}
IRONIC_TEMPLATES_DIR=${IRONIC_TEMPLATES_DIR:-$TOP_DIR/tools/ironic/templates}
IRONIC_SCRIPTS_DIR=${IRONIC_SCRIPTS_DIR:-$IRONIC_DEVSTACK_DIR/tools/ironic/scripts}
IRONIC_TEMPLATES_DIR=${IRONIC_TEMPLATES_DIR:-$IRONIC_DEVSTACK_DIR/tools/ironic/templates}
IRONIC_BAREMETAL_BASIC_OPS=$(trueorfalse False IRONIC_BAREMETAL_BASIC_OPS)
IRONIC_ENABLED_DRIVERS=${IRONIC_ENABLED_DRIVERS:-fake,pxe_ssh,pxe_ipmitool}
IRONIC_SSH_USERNAME=${IRONIC_SSH_USERNAME:-`whoami`}
@ -177,7 +178,7 @@ function is_deployed_with_ipa_ramdisk {
return 1
}
# install_ironic() - Collect source and prepare
# install_ironic() - Install the things!
function install_ironic {
# make sure all needed service were enabled
local req_services="key"
@ -195,7 +196,6 @@ function install_ironic {
setup_dev_lib "ironic-lib"
fi
git_clone $IRONIC_REPO $IRONIC_DIR $IRONIC_BRANCH
setup_develop $IRONIC_DIR
if [[ "$IRONIC_IPXE_ENABLED" == "True" ]] ; then

5
devstack/override-defaults Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
# NOTE(jroll) this is used for the transition to a devstack plugin in
# the ironic tree, and can be removed when the transition is complete.
IRONIC_USING_PLUGIN=True

44
devstack/plugin.sh Normal file
View File

@ -0,0 +1,44 @@
#!/bin/bash
# plugin.sh - devstack plugin for ironic
echo_summary "ironic's plugin.sh was called..."
source $DEST/ironic/devstack/lib/ironic
if is_service_enabled ir-api ir-cond; then
if [[ "$1" == "stack" && "$2" == "install" ]]; then
echo_summary "Installing Ironic"
install_ironic
install_ironicclient
cleanup_ironic
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
echo_summary "Configuring Ironic"
configure_ironic
if is_service_enabled key; then
create_ironic_accounts
fi
elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
# Initialize ironic
init_ironic
# Start the ironic API and ironic taskmgr components
echo_summary "Starting Ironic"
start_ironic
if [[ "$IRONIC_BAREMETAL_BASIC_OPS" = "True" ]]; then
prepare_baremetal_basic_ops
fi
fi
if [[ "$1" == "unstack" ]]; then
stop_ironic
if [[ "$IRONIC_BAREMETAL_BASIC_OPS" = "True" ]]; then
cleanup_baremetal_basic_ops
fi
fi
if [[ "$1" == "clean" ]]; then
cleanup_ironic
fi
fi

1
devstack/settings Normal file
View File

@ -0,0 +1 @@
enable_service ironic ir-api ir-cond