Merge "Add mechanism to automatically load additional projects"

This commit is contained in:
Jenkins 2013-01-11 13:40:36 +00:00 committed by Gerrit Code Review
commit 9b691e6478
4 changed files with 53 additions and 14 deletions

20
extras.d/80-tempest.sh Normal file
View File

@ -0,0 +1,20 @@
# tempest.sh - DevStack extras script
source $TOP_DIR/lib/tempest
if [[ "$1" == "stack" ]]; then
# Configure Tempest last to ensure that the runtime configuration of
# the various OpenStack services can be queried.
if is_service_enabled tempest; then
echo_summary "Configuring Tempest"
install_tempest
configure_tempest
fi
fi
if [[ "$1" == "unstack" ]]; then
# no-op
:
fi

14
extras.d/README Normal file
View File

@ -0,0 +1,14 @@
The extras.d directory contains project initialization scripts to be
sourced by stack.sh at the end of its run. This is expected to be
used by external projects that want to be configured, started and
stopped with DevStack.
Order is controlled by prefixing the script names with the a two digit
sequence number. Script names must end with '.sh'. This provides a
convenient way to disable scripts by simoy renaming them.
DevStack reserves the sequence numbers 00 through 09 and 90 through 99
for its own use.
The scripts are called with an argument of 'stack' by stack.sh and
with an argument of 'unstack' by unstack.sh.

View File

@ -321,7 +321,6 @@ source $TOP_DIR/lib/swift
source $TOP_DIR/lib/ceilometer source $TOP_DIR/lib/ceilometer
source $TOP_DIR/lib/heat source $TOP_DIR/lib/heat
source $TOP_DIR/lib/quantum source $TOP_DIR/lib/quantum
source $TOP_DIR/lib/tempest
source $TOP_DIR/lib/baremetal source $TOP_DIR/lib/baremetal
# Set the destination directories for OpenStack projects # Set the destination directories for OpenStack projects
@ -776,9 +775,6 @@ if is_service_enabled ceilometer; then
install_ceilometerclient install_ceilometerclient
install_ceilometer install_ceilometer
fi fi
if is_service_enabled tempest; then
install_tempest
fi
# Initialization # Initialization
@ -1324,16 +1320,6 @@ if is_service_enabled nova && is_baremetal; then
screen_it baremetal "nova-baremetal-deploy-helper" screen_it baremetal "nova-baremetal-deploy-helper"
fi fi
# Configure Tempest last to ensure that the runtime configuration of
# the various OpenStack services can be queried.
if is_service_enabled tempest; then
echo_summary "Configuring Tempest"
configure_tempest
echo '**************************************************'
echo_summary "Finished Configuring Tempest"
echo '**************************************************'
fi
# Save some values we generated for later use # Save some values we generated for later use
CURRENT_RUN_TIME=$(date "+$TIMESTAMP_FORMAT") CURRENT_RUN_TIME=$(date "+$TIMESTAMP_FORMAT")
echo "# $CURRENT_RUN_TIME" >$TOP_DIR/.stackenv echo "# $CURRENT_RUN_TIME" >$TOP_DIR/.stackenv
@ -1343,6 +1329,16 @@ for i in BASE_SQL_CONN ENABLED_SERVICES HOST_IP LOGFILE \
done done
# Run extras
# ==========
if [[ -d $TOP_DIR/extras.d ]]; then
for i in $TOP_DIR/extras.d/*.sh; do
[[ -r $i ]] && source $i stack
done
fi
# Run local script # Run local script
# ================ # ================

View File

@ -39,6 +39,15 @@ if [[ "$1" == "--all" ]]; then
UNSTACK_ALL=${UNSTACK_ALL:-1} UNSTACK_ALL=${UNSTACK_ALL:-1}
fi fi
# Run extras
# ==========
if [[ -d $TOP_DIR/extras.d ]]; then
for i in $TOP_DIR/extras.d/*.sh; do
[[ -r $i ]] && source $i unstack
done
fi
if [[ "$Q_USE_DEBUG_COMMAND" == "True" ]]; then if [[ "$Q_USE_DEBUG_COMMAND" == "True" ]]; then
source $TOP_DIR/openrc source $TOP_DIR/openrc
teardown_quantum_debug teardown_quantum_debug