Add devstack plugin
This adds the actual devstack plugin, with a signal to devstack that the plugin is in use, and devstack should not run the ironic code in the devstack tree. Note that this is not yet configured to run in the gate. Change-Id: I147ea059f75720132dd82ff9e7cd3bfdff7fa584
This commit is contained in:
parent
b21873588a
commit
a0dcef410e
@ -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
5
devstack/override-defaults
Executable 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
44
devstack/plugin.sh
Normal 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
1
devstack/settings
Normal file
@ -0,0 +1 @@
|
||||
enable_service ironic ir-api ir-cond
|
Loading…
Reference in New Issue
Block a user