From d093121f3a605b6b8373e3a061e25c1d101c3bae Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Thu, 4 Oct 2012 16:06:44 -0400 Subject: [PATCH] clone tempest if enabled add auto cloning of the tempest tree if it's an enabled service just reduces one step in getting tempest up in a new environment Change-Id: Ia8a2feee96f26dffe96c87d572a31735d90cdabb --- lib/tempest | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++ stack.sh | 7 +++++++ 2 files changed, 63 insertions(+) create mode 100644 lib/tempest diff --git a/lib/tempest b/lib/tempest new file mode 100644 index 0000000000..115c91181f --- /dev/null +++ b/lib/tempest @@ -0,0 +1,56 @@ +# lib/tempest + +# Dependencies: +# ``functions`` file +# ``SERVICE_{TENANT_NAME|PASSWORD}`` must be defined +# + +# ``stack.sh`` calls the entry points in this order: +# +# install_XXXX +# configure_XXXX +# init_XXXX +# start_XXXX +# stop_XXXX +# cleanup_XXXX + +# Save trace setting +XTRACE=$(set +o | grep xtrace) +set +o xtrace + + +# Defaults +# -------- + +# + +# Set up default directories +TEMPEST_DIR=$DEST/tempest +TEMPEST_CONF_DIR=$DEST/tempest/etc + +# Entry Points +# ------------ + + +# configure_tempest() - Set config files, create data dirs, etc +function configure_tempest() { + # sudo python setup.py deploy + # iniset $tempest_CONF ... + # This function intentionally left blank + # + # TODO(sdague) actually move the guts of configure tempest + # into this function + cd tools + ./configure_tempest.sh + cd .. +} + + +# install_tempest() - Collect source and prepare +function install_tempest() { + git_clone $TEMPEST_REPO $TEMPEST_DIR $TEMPEST_BRANCH +} + + +# Restore xtrace +$XTRACE diff --git a/stack.sh b/stack.sh index 118c2ef885..957bbd6348 100755 --- a/stack.sh +++ b/stack.sh @@ -313,6 +313,7 @@ source $TOP_DIR/lib/n-vol source $TOP_DIR/lib/ceilometer source $TOP_DIR/lib/heat source $TOP_DIR/lib/quantum +source $TOP_DIR/lib/tempest # Set the destination directories for OpenStack projects HORIZON_DIR=$DEST/horizon @@ -871,6 +872,9 @@ fi if is_service_enabled ceilometer; then install_ceilometer fi +if is_service_enabled tempest; then + install_tempest +fi # Initialization @@ -917,6 +921,9 @@ fi if is_service_enabled cinder; then configure_cinder fi +if is_service_enabled tempest; then + configure_tempest +fi if [[ $TRACK_DEPENDS = True ]] ; then $DEST/.venv/bin/pip freeze > $DEST/requires-post-pip