beginning to change trove-integration

This commit changes trove-integration and the artifacts that were
brought over from that repository and brings them into the trove
repository.

The things (specifically) done in this commit are:

1. get rid of .gitreview; this is no longer a repository of its own,
it is a part of the trove repository.

2. Update the readme (README.md)

3. Make the elements work in this directory structure

4. Rename the elements and get rid of the name 'reddwarf', change the
name redstack to trovestack

5. Refactor all scripts and make them reflect the new directory
structure.

Change-Id: Iae67fe231b6c7964ca3f31fc593fc9fa4111d5be
This commit is contained in:
Amrith Kumar 2016-10-10 20:27:50 -04:00
parent b120be1772
commit 490492b967
19 changed files with 88 additions and 92 deletions

View File

@ -1,4 +0,0 @@
[gerrit]
host=review.openstack.org
port=29418
project=openstack/trove-integration.git

View File

@ -35,25 +35,26 @@ Install a fresh Ubuntu 14.04 (Trusty Tahr) image ( _We suggest creating a develo
#### Login with ubuntu: #### Login with ubuntu:
# su ubuntu # su ubuntu
$ cd ~ $ mkdir -p /opt/stack
$ cd /opt/stack
#### Clone this repo: #### Clone this repo:
$ git clone https://github.com/openstack/trove-integration.git $ git clone https://github.com/openstack/trove.git
#### Go into the scripts directory: #### Go into the scripts directory:
$ cd trove-integration/scripts/ $ cd trove/integration/scripts/
#### Running redstack is the core script: #### Running trovestack is the core script:
*Run this to get the command list with a short description of each* *Run this to get the command list with a short description of each*
$ ./redstack $ ./trovestack
#### Install all the dependencies and then install trove via redstack. #### Install all the dependencies and then install trove via trovestack.
*This brings up trove (rd-api rd-tmgr) and initializes the trove database.* *This brings up trove (rd-api rd-tmgr) and initializes the trove database.*
$ ./redstack install $ ./trovestack install
*** ***
@ -103,17 +104,17 @@ Allows the services to continue running in the background
#### Kick start the build/test-init/build-image commands #### Kick start the build/test-init/build-image commands
*Add mysql as a parameter to set build and add the mysql guest image. This will also populate /etc/trove/test.conf with appropriate values for running the integration tests.* *Add mysql as a parameter to set build and add the mysql guest image. This will also populate /etc/trove/test.conf with appropriate values for running the integration tests.*
$ ./redstack kick-start mysql $ ./trovestack kick-start mysql
*Optional commands if you did not run kick-start* *Optional commands if you did not run kick-start*
#### Initialize the test configuration and set up test users (overwrites /etc/trove/test.conf) #### Initialize the test configuration and set up test users (overwrites /etc/trove/test.conf)
$ ./redstack test-init $ ./trovestack test-init
#### Build the image and add it to glance #### Build the image and add it to glance
$ ./redstack build-image mysql $ ./trovestack build-image mysql
*** ***
@ -123,22 +124,22 @@ Allows the services to continue running in the background
$ killall -9 screen $ killall -9 screen
$ screen -wipe $ screen -wipe
$ RECLONE=yes ./redstack install $ RECLONE=yes ./trovestack install
$ ./redstack kick-start mysql $ ./trovestack kick-start mysql
or or
$ RECLONE=yes ./redstack install $ RECLONE=yes ./trovestack install
$ ./redstack test-init $ ./trovestack test-init
$ ./redstack build-image mysql $ ./trovestack build-image mysql
*** ***
### Recover after reboot ### Recover after reboot
If the VM was restarted, then the process for bringing up Openstack and Trove is quite simple If the VM was restarted, then the process for bringing up Openstack and Trove is quite simple
$./redstack start-deps $./trovestack start-deps
$./redstack start $./trovestack start
Use screen to ensure all modules have started without error Use screen to ensure all modules have started without error
@ -159,15 +160,15 @@ should be:
Once Trove is running on DevStack, you can use the dev scripts to run the integration tests locally. Once Trove is running on DevStack, you can use the dev scripts to run the integration tests locally.
$./redstack int-tests $./trovestack int-tests
This will runs all of the blackbox tests by default. Use the --group option to run a different group: This will runs all of the blackbox tests by default. Use the --group option to run a different group:
$./redstack int-tests --group=simple_blackbox $./trovestack int-tests --group=simple_blackbox
You can also specify the TESTS_USE_INSTANCE_ID environment variable to have the integration tests use an existing instance for the tests rather than creating a new one. You can also specify the TESTS_USE_INSTANCE_ID environment variable to have the integration tests use an existing instance for the tests rather than creating a new one.
$./TESTS_DO_NOT_DELETE_INSTANCE=True TESTS_USE_INSTANCE_ID=INSTANCE_UUID ./redstack int-tests --group=simple_blackbox $./TESTS_DO_NOT_DELETE_INSTANCE=True TESTS_USE_INSTANCE_ID=INSTANCE_UUID ./trovestack int-tests --group=simple_blackbox
*** ***
@ -184,7 +185,7 @@ Running Ubuntu with KVM or Qemu can be extremely slow without certain optimizati
4. After setting these create a snapshot so that in cases where things break down you can revert to a clean snapshot. 4. After setting these create a snapshot so that in cases where things break down you can revert to a clean snapshot.
5. Boot up the VM and run the `./redstack install` 5. Boot up the VM and run the `./trovestack install`
6. To verify that KVM is setup properly after the devstack installation you can run these commands. 6. To verify that KVM is setup properly after the devstack installation you can run these commands.
``` ```

View File

@ -10,7 +10,7 @@ source $_LIB/die
BRANCH_OVERRIDE=${BRANCH_OVERRIDE:-default} BRANCH_OVERRIDE=${BRANCH_OVERRIDE:-default}
ADD_BRANCH=$(basename ${BRANCH_OVERRIDE}) ADD_BRANCH=$(basename ${BRANCH_OVERRIDE})
REQUIREMENTS_FILE=${REDSTACK_SCRIPTS}/files/requirements/fedora-requirements-${ADD_BRANCH}.txt REQUIREMENTS_FILE=${TROVESTACK_SCRIPTS}/files/requirements/fedora-requirements-${ADD_BRANCH}.txt
[ -n "$TMP_HOOKS_PATH" ] || die "Temp hook path not set" [ -n "$TMP_HOOKS_PATH" ] || die "Temp hook path not set"
[ -e ${REQUIREMENTS_FILE} ] || die "Requirements not found" [ -e ${REQUIREMENTS_FILE} ] || die "Requirements not found"

View File

@ -14,8 +14,8 @@ source $_LIB/die
[ -n "${GUEST_USERNAME}" ] || die "GUEST_USERNAME needs to be set to the user for the guest image" [ -n "${GUEST_USERNAME}" ] || die "GUEST_USERNAME needs to be set to the user for the guest image"
[ -n "${HOST_SCP_USERNAME}" ] || die "HOST_SCP_USERNAME needs to be set to the user for the host instance" [ -n "${HOST_SCP_USERNAME}" ] || die "HOST_SCP_USERNAME needs to be set to the user for the host instance"
[ -n "${CONTROLLER_IP}" ] || die "CONTROLLER_IP needs to be set to the ip address that guests will use to contact the controller" [ -n "${CONTROLLER_IP}" ] || die "CONTROLLER_IP needs to be set to the ip address that guests will use to contact the controller"
[ -n "${ESCAPED_PATH_TROVE}" ] || die "ESCAPED_PATH_TROVE needs to be set to the path to the trove directory on the redstack host" [ -n "${ESCAPED_PATH_TROVE}" ] || die "ESCAPED_PATH_TROVE needs to be set to the path to the trove directory on the trovestack host"
[ -n "${REDSTACK_SCRIPTS}" ] || die "REDSTACK_SCRIPTS needs to be set to the trove-integration scripts dir" [ -n "${TROVESTACK_SCRIPTS}" ] || die "TROVESTACK_SCRIPTS needs to be set to the trove/integration/scripts dir"
[ -n "${ESCAPED_GUEST_LOGDIR}" ] || die "ESCAPED_GUEST_LOGDIR must be set to the escaped guest log dir" [ -n "${ESCAPED_GUEST_LOGDIR}" ] || die "ESCAPED_GUEST_LOGDIR must be set to the escaped guest log dir"
sed "s/GUEST_USERNAME/${GUEST_USERNAME}/g;s/GUEST_LOGDIR/${ESCAPED_GUEST_LOGDIR}/g;s/HOST_SCP_USERNAME/${HOST_SCP_USERNAME}/g;s/CONTROLLER_IP/${CONTROLLER_IP}/g;s/PATH_TROVE/${ESCAPED_PATH_TROVE}/g" ${REDSTACK_SCRIPTS}/files/trove-guest.systemd.conf > ${TMP_HOOKS_PATH}/trove-guest.service sed "s/GUEST_USERNAME/${GUEST_USERNAME}/g;s/GUEST_LOGDIR/${ESCAPED_GUEST_LOGDIR}/g;s/HOST_SCP_USERNAME/${HOST_SCP_USERNAME}/g;s/CONTROLLER_IP/${CONTROLLER_IP}/g;s/PATH_TROVE/${ESCAPED_PATH_TROVE}/g" ${TROVESTACK_SCRIPTS}/files/trove-guest.systemd.conf > ${TMP_HOOKS_PATH}/trove-guest.service

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# CONTEXT: GUEST during CONSTRUCTION as ROOT # CONTEXT: GUEST during CONSTRUCTION as ROOT
# PURPOSE: Install trove guest python dependencies - see redstack functions_qemu # PURPOSE: Install trove guest python dependencies - see trovestack functions_qemu
set -e set -e
set -o xtrace set -o xtrace

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# CONTEXT: GUEST during CONSTRUCTION as ROOT # CONTEXT: GUEST during CONSTRUCTION as ROOT
# PURPOSE: Install trove guest python dependencies - see redstack functions_qemu # PURPOSE: Install trove guest python dependencies - see trovestack functions_qemu
set -e set -e
set -o xtrace set -o xtrace

View File

@ -17,7 +17,7 @@
e.g. export DATASTORE_PKG_LOCATION="http://www.foo.com/db2/v10.5_linuxx64_expc.tar.gz" e.g. export DATASTORE_PKG_LOCATION="http://www.foo.com/db2/v10.5_linuxx64_expc.tar.gz"
- download the package and place it in any directory on the local - download the package and place it in any directory on the local
filesystem that the trove-integration scripts can access. Set the filesystem that the trovestack script can access. Set the
environment variable DATASTORE_PKG_LOCATION with the full path to environment variable DATASTORE_PKG_LOCATION with the full path to
the downloaded package. the downloaded package.
e.g. export DATASTORE_PKG_LOCATION="/home/stack/db2/v10.5_linuxx64_expc.tar.gz" e.g. export DATASTORE_PKG_LOCATION="/home/stack/db2/v10.5_linuxx64_expc.tar.gz"

View File

@ -10,7 +10,7 @@ source $_LIB/die
BRANCH_OVERRIDE=${BRANCH_OVERRIDE:-default} BRANCH_OVERRIDE=${BRANCH_OVERRIDE:-default}
ADD_BRANCH=$(basename ${BRANCH_OVERRIDE}) ADD_BRANCH=$(basename ${BRANCH_OVERRIDE})
REQUIREMENTS_FILE=${REDSTACK_SCRIPTS}/files/requirements/ubuntu-requirements-${ADD_BRANCH}.txt REQUIREMENTS_FILE=${TROVESTACK_SCRIPTS}/files/requirements/ubuntu-requirements-${ADD_BRANCH}.txt
[ -n "$TMP_HOOKS_PATH" ] || die "Temp hook path not set" [ -n "$TMP_HOOKS_PATH" ] || die "Temp hook path not set"
[ -e ${REQUIREMENTS_FILE} ] || die "Requirements not found" [ -e ${REQUIREMENTS_FILE} ] || die "Requirements not found"

View File

@ -14,8 +14,8 @@ source $_LIB/die
[ -n "${GUEST_USERNAME}" ] || die "GUEST_USERNAME needs to be set to the user for the guest image" [ -n "${GUEST_USERNAME}" ] || die "GUEST_USERNAME needs to be set to the user for the guest image"
[ -n "${HOST_SCP_USERNAME}" ] || die "HOST_SCP_USERNAME needs to be set to the user for the host instance" [ -n "${HOST_SCP_USERNAME}" ] || die "HOST_SCP_USERNAME needs to be set to the user for the host instance"
[ -n "${CONTROLLER_IP}" ] || die "CONTROLLER_IP needs to be set to the ip address that guests will use to contact the controller" [ -n "${CONTROLLER_IP}" ] || die "CONTROLLER_IP needs to be set to the ip address that guests will use to contact the controller"
[ -n "${ESCAPED_PATH_TROVE}" ] || die "ESCAPED_PATH_TROVE needs to be set to the path to the trove directory on the redstack host" [ -n "${ESCAPED_PATH_TROVE}" ] || die "ESCAPED_PATH_TROVE needs to be set to the path to the trove directory on the trovestack host"
[ -n "${REDSTACK_SCRIPTS}" ] || die "REDSTACK_SCRIPTS needs to be set to the trove-integration scripts dir" [ -n "${TROVESTACK_SCRIPTS}" ] || die "TROVESTACK_SCRIPTS needs to be set to the trove/integration/scripts dir"
[ -n "${ESCAPED_GUEST_LOGDIR}" ] || die "ESCAPED_GUEST_LOGDIR must be set to the escaped guest log dir" [ -n "${ESCAPED_GUEST_LOGDIR}" ] || die "ESCAPED_GUEST_LOGDIR must be set to the escaped guest log dir"
sed "s/GUEST_USERNAME/${GUEST_USERNAME}/g;s/GUEST_LOGDIR/${ESCAPED_GUEST_LOGDIR}/g;s/HOST_SCP_USERNAME/${HOST_SCP_USERNAME}/g;s/CONTROLLER_IP/${CONTROLLER_IP}/g;s/PATH_TROVE/${ESCAPED_PATH_TROVE}/g" ${REDSTACK_SCRIPTS}/files/trove-guest.upstart.conf > ${TMP_HOOKS_PATH}/trove-guest.conf sed "s/GUEST_USERNAME/${GUEST_USERNAME}/g;s/GUEST_LOGDIR/${ESCAPED_GUEST_LOGDIR}/g;s/HOST_SCP_USERNAME/${HOST_SCP_USERNAME}/g;s/CONTROLLER_IP/${CONTROLLER_IP}/g;s/PATH_TROVE/${ESCAPED_PATH_TROVE}/g" ${TROVESTACK_SCRIPTS}/files/trove-guest.upstart.conf > ${TMP_HOOKS_PATH}/trove-guest.conf

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# CONTEXT: GUEST during CONSTRUCTION as ROOT # CONTEXT: GUEST during CONSTRUCTION as ROOT
# PURPOSE: Install trove guest python dependencies - see redstack functions_qemu # PURPOSE: Install trove guest python dependencies - see trovestack functions_qemu
set -e set -e
set -o xtrace set -o xtrace

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# CONTEXT: GUEST during CONSTRUCTION as ROOT # CONTEXT: GUEST during CONSTRUCTION as ROOT
# PURPOSE: Install trove guest python dependencies - see redstack functions_qemu # PURPOSE: Install trove guest python dependencies - see trovestack functions_qemu
set -e set -e
set -o xtrace set -o xtrace

View File

@ -36,14 +36,14 @@ function build_vm() {
export HOST_SCP_USERNAME export HOST_SCP_USERNAME
export GUEST_USERNAME export GUEST_USERNAME
export CONTROLLER_IP export CONTROLLER_IP
export REDSTACK_SCRIPTS export TROVESTACK_SCRIPTS
export SERVICE_TYPE export SERVICE_TYPE
export PATH_TROVE export PATH_TROVE
export ESCAPED_PATH_TROVE export ESCAPED_PATH_TROVE
export SSH_DIR export SSH_DIR
export GUEST_LOGDIR export GUEST_LOGDIR
export ESCAPED_GUEST_LOGDIR export ESCAPED_GUEST_LOGDIR
export ELEMENTS_PATH=$REDSTACK_SCRIPTS/files/elements export ELEMENTS_PATH=$TROVESTACK_SCRIPTS/files/elements
export ELEMENTS_PATH+=:$PATH_DISKIMAGEBUILDER/elements export ELEMENTS_PATH+=:$PATH_DISKIMAGEBUILDER/elements
export ELEMENTS_PATH+=:$PATH_TRIPLEO_ELEMENTS/elements export ELEMENTS_PATH+=:$PATH_TRIPLEO_ELEMENTS/elements
export DIB_CLOUD_INIT_DATASOURCES="ConfigDrive" export DIB_CLOUD_INIT_DATASOURCES="ConfigDrive"
@ -83,7 +83,7 @@ function build_guest_image() {
ESCAPED_GUEST_LOGDIR=`echo $GUEST_LOGDIR | sed 's/\//\\\\\//g'` ESCAPED_GUEST_LOGDIR=`echo $GUEST_LOGDIR | sed 's/\//\\\\\//g'`
USERNAME=`whoami` USERNAME=`whoami`
# To change the distro, edit the redstack.rc file # To change the distro, edit the trovestack.rc file
readonly IMAGENAME=${DISTRO}_${SERVICE_TYPE} readonly IMAGENAME=${DISTRO}_${SERVICE_TYPE}
readonly VM_PATH=$USERHOME/images/${IMAGENAME} readonly VM_PATH=$USERHOME/images/${IMAGENAME}
readonly VM_PATH_NAME=${VM_PATH}/${IMAGENAME} readonly VM_PATH_NAME=${VM_PATH}/${IMAGENAME}

View File

@ -1,3 +1,2 @@
diskimage-builder diskimage-builder
tripleo-image-elements tripleo-image-elements
trove

View File

@ -13,7 +13,7 @@
# as the order of inserting the files is not guaranteed. # as the order of inserting the files is not guaranteed.
# #
# All files are inherently included by default - to exclude a file, # All files are inherently included by default - to exclude a file,
# add a variable 'FILENAME_IN_UPPERCASE_MINUS_RC=false' in redstack.rc # add a variable 'FILENAME_IN_UPPERCASE_MINUS_RC=false' in trovestack.rc
# For Example: USING_VAGRANT=false (for the using_vagrant.rc file). # For Example: USING_VAGRANT=false (for the using_vagrant.rc file).
# #
# Symbolic links are followed, so additional files can be loaded # Symbolic links are followed, so additional files can be loaded
@ -21,7 +21,7 @@
# local.conf.d (this should allow complete flexibility in setting # local.conf.d (this should allow complete flexibility in setting
# up testing options). # up testing options).
# For Example: # For Example:
# cd /path/to/trove-integration/scripts/local.conf.d # cd /path/to/trove/integration/scripts/local.conf.d
# ln -s $HOME/local.conf.d local.conf.d # ln -s $HOME/local.conf.d local.conf.d
# cp /path/to/my_conf.rc $HOME/local.conf.d # cp /path/to/my_conf.rc $HOME/local.conf.d

View File

@ -4,7 +4,7 @@ $TROVE_PRESENT_TAG
# Note: This file contains autogenerated parts. # Note: This file contains autogenerated parts.
# All lines are removed from between the tag/end of tag # All lines are removed from between the tag/end of tag
# markers (lines with '$MARKER_TOKEN' at beginning and end) and # markers (lines with '$MARKER_TOKEN' at beginning and end) and
# are replaced by trove-integration. # are replaced by trovestack.
# Edits to these sections will not persist. # Edits to these sections will not persist.
# #
# See the '$USER_OPTS_TAG' section # See the '$USER_OPTS_TAG' section
@ -29,7 +29,7 @@ $USER_OPTS_TAG
$USER_OPTS_TAG_END $USER_OPTS_TAG_END
# #
# Additional options here were inserted by trove-integration # Additional options here were inserted by trovestack
# automatically from files in $LOCAL_CONF_D # automatically from files in $LOCAL_CONF_D
# #

View File

@ -1,4 +1,4 @@
# These passwords originally come from redstack.rc. # These passwords originally come from trovestack.rc.
MYSQL_PASSWORD=$MYSQL_PASSWORD MYSQL_PASSWORD=$MYSQL_PASSWORD
RABBIT_PASSWORD=$RABBIT_PASSWORD RABBIT_PASSWORD=$RABBIT_PASSWORD
SERVICE_TOKEN=$SERVICE_TOKEN SERVICE_TOKEN=$SERVICE_TOKEN
@ -6,6 +6,7 @@ ADMIN_PASSWORD=$ADMIN_PASSWORD
SERVICE_PASSWORD=$SERVICE_PASSWORD SERVICE_PASSWORD=$SERVICE_PASSWORD
PUBLIC_INTERFACE=eth0 PUBLIC_INTERFACE=eth0
IP_VERSION=4
TROVE_LOGDIR=$TROVE_LOGDIR TROVE_LOGDIR=$TROVE_LOGDIR
TROVE_AUTH_CACHE_DIR=$TROVE_AUTH_CACHE_DIR TROVE_AUTH_CACHE_DIR=$TROVE_AUTH_CACHE_DIR

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
############################################################################### ###############################################################################
# RedStack, the Trove Dev Machine Controller # # Trove Stack Builder, the Trove Dev Machine Controller #
############################################################################### ###############################################################################
# # # #
# This script provides all the functionality to run all the steps from # # This script provides all the functionality to run all the steps from #
@ -9,8 +9,8 @@
# # # #
############################################################################### ###############################################################################
REDSTACK_SCRIPTS=${REDSTACK_SCRIPTS:-`pwd`} TROVESTACK_SCRIPTS=${TROVESTACK_SCRIPTS:-`pwd`}
REDSTACK_TESTS=$REDSTACK_SCRIPTS/../tests/ TROVESTACK_TESTS=$TROVESTACK_SCRIPTS/../tests/
DEFAULT_LOCAL_CONF=local.conf.rc DEFAULT_LOCAL_CONF=local.conf.rc
DEFAULT_LOCALRC=localrc.rc DEFAULT_LOCALRC=localrc.rc
@ -21,11 +21,11 @@ USER_LOCAL_CONF_NAME=.devstack.$LOCAL_CONF
USERHOME=$HOME USERHOME=$HOME
# Load options not checked into VCS. # Load options not checked into VCS.
if [ -f $USERHOME/.redstack.options.rc ]; then if [ -f $USERHOME/.trovestack.options.rc ]; then
. $USERHOME/.redstack.options.rc . $USERHOME/.trovestack.options.rc
fi fi
if [ -f $REDSTACK_SCRIPTS/options.rc ]; then if [ -f $TROVESTACK_SCRIPTS/options.rc ]; then
. $REDSTACK_SCRIPTS/options.rc . $TROVESTACK_SCRIPTS/options.rc
fi fi
# NOTE(mriedem): The gate-trove-functional-dsvm-* job config in project-config # NOTE(mriedem): The gate-trove-functional-dsvm-* job config in project-config
@ -45,12 +45,12 @@ function get_default_host_ip() {
} }
# Load functions devstack style # Load functions devstack style
. $REDSTACK_SCRIPTS/functions . $TROVESTACK_SCRIPTS/functions
. $REDSTACK_SCRIPTS/functions_qemu . $TROVESTACK_SCRIPTS/functions_qemu
# Load global configuration variables. # Load global configuration variables.
. $REDSTACK_SCRIPTS/redstack.rc . $TROVESTACK_SCRIPTS/trovestack.rc
. $REDSTACK_SCRIPTS/reviews.rc . $TROVESTACK_SCRIPTS/reviews.rc
# allow overrides from devstack if already set # allow overrides from devstack if already set
[[ -f $PATH_DEVSTACK_SRC/functions-common ]] && source $PATH_DEVSTACK_SRC/functions-common [[ -f $PATH_DEVSTACK_SRC/functions-common ]] && source $PATH_DEVSTACK_SRC/functions-common
@ -65,7 +65,7 @@ set +e
[[ -f $PATH_DEVSTACK_SRC/$LOCALRC_AUTO ]] && source $PATH_DEVSTACK_SRC/$LOCALRC_AUTO [[ -f $PATH_DEVSTACK_SRC/$LOCALRC_AUTO ]] && source $PATH_DEVSTACK_SRC/$LOCALRC_AUTO
set -e set -e
# Set up variables for the CONF files - this has to happen after loading redstack.rc, since # Set up variables for the CONF files - this has to happen after loading trovestack.rc, since
# TROVE_CONF_DIR is defined there - these will be used by devstack too # TROVE_CONF_DIR is defined there - these will be used by devstack too
export TROVE_CONF=$TROVE_CONF_DIR/trove.conf export TROVE_CONF=$TROVE_CONF_DIR/trove.conf
export TROVE_TASKMANAGER_CONF=$TROVE_CONF_DIR/trove-taskmanager.conf export TROVE_TASKMANAGER_CONF=$TROVE_CONF_DIR/trove-taskmanager.conf
@ -94,7 +94,7 @@ TROVE_AUTH_ENDPOINT=$KEYSTONE_AUTH_PROTOCOL://$KEYSTONE_AUTH_HOST:$KEYSTONE_AUTH
# PATH_TROVE more than likely has file separators, which sed does not like # PATH_TROVE more than likely has file separators, which sed does not like
# This will escape them # This will escape them
ESCAPED_PATH_TROVE=$(echo $PATH_TROVE | sed 's/\//\\\//g') ESCAPED_PATH_TROVE=$(echo $PATH_TROVE | sed 's/\//\\\//g')
ESCAPED_REDSTACK_SCRIPTS=$(echo $REDSTACK_SCRIPTS | sed 's/\//\\\//g') ESCAPED_TROVESTACK_SCRIPTS=$(echo $TROVESTACK_SCRIPTS | sed 's/\//\\\//g')
TROVE_AUTH_CACHE_DIR=${TROVE_AUTH_CACHE_DIR:-/var/cache/trove} TROVE_AUTH_CACHE_DIR=${TROVE_AUTH_CACHE_DIR:-/var/cache/trove}
TROVE_LOGDIR=${TROVE_LOGDIR:-$DEST/logs} TROVE_LOGDIR=${TROVE_LOGDIR:-$DEST/logs}
# DATASTORE_PKG_LOCATION defines the location from where the datastore packages # DATASTORE_PKG_LOCATION defines the location from where the datastore packages
@ -300,8 +300,8 @@ function install_devstack_code() {
fi fi
# Clones all of the code to where devstack expects it to be # Clones all of the code to where devstack expects it to be
pushd $PATH_DEVSTACK_OUTPUT pushd $PATH_DEVSTACK_OUTPUT
cmd_clone_projects do_not_force_update $REDSTACK_SCRIPTS/projects-list \ cmd_clone_projects do_not_force_update $TROVESTACK_SCRIPTS/projects-list \
$REDSTACK_SCRIPTS/image-projects-list $TROVESTACK_SCRIPTS/image-projects-list
popd popd
} }
@ -377,7 +377,7 @@ function add_file_contents() {
local PARSE_FILE=${4:-true} local PARSE_FILE=${4:-true}
local BLANK_LINE_TO_START=${5:-false} local BLANK_LINE_TO_START=${5:-false}
TEMP_FILE=".redstack.$$" TEMP_FILE=".trovestack.$$"
rm -f "$TEMP_FILE" rm -f "$TEMP_FILE"
if [ "$BLANK_LINE_TO_START" = "true" ]; then if [ "$BLANK_LINE_TO_START" = "true" ]; then
echo "" > "$TEMP_FILE" echo "" > "$TEMP_FILE"
@ -404,7 +404,7 @@ function run_devstack() {
rm -rf "$USERHOME/nova_locks" rm -rf "$USERHOME/nova_locks"
mkdir -p "$USERHOME/nova_locks" mkdir -p "$USERHOME/nova_locks"
TROVE_PRESENT_TAG="# Trove-integration" TROVE_PRESENT_TAG="# generated-by-trovestack"
LOCAL_CONF_D=local.conf.d LOCAL_CONF_D=local.conf.d
CONF_MATCH="*.rc" CONF_MATCH="*.rc"
MARKER_TOKEN="#####" MARKER_TOKEN="#####"
@ -435,12 +435,12 @@ function run_devstack() {
echo "Please remove and try again." echo "Please remove and try again."
exit 1 exit 1
fi fi
# Otherwise append the redstack version to the existing file # Otherwise append the trovestack version to the existing file
eval echo "\"$(cat "$REDSTACK_SCRIPTS/$DEFAULT_LOCALRC")\"" >> "$DEVSTACK_LOCAL_CONF" eval echo "\"$(cat "$TROVESTACK_SCRIPTS/$DEFAULT_LOCALRC")\"" >> "$DEVSTACK_LOCAL_CONF"
fi fi
else else
# If a devstack config file doesn't exist, create it # If a devstack config file doesn't exist, create it
eval echo "\"$(cat "$REDSTACK_SCRIPTS/$DEFAULT_LOCAL_CONF")\"" > "$DEVSTACK_LOCAL_CONF" eval echo "\"$(cat "$TROVESTACK_SCRIPTS/$DEFAULT_LOCAL_CONF")\"" > "$DEVSTACK_LOCAL_CONF"
fi fi
# We can only replace sections from the LOCAL_CONF style files # We can only replace sections from the LOCAL_CONF style files
@ -453,8 +453,8 @@ function run_devstack() {
# Add the main localrc file # Add the main localrc file
PARSE_FILE="true" PARSE_FILE="true"
BLANK_LINE_TO_START="true" BLANK_LINE_TO_START="true"
if [ -f "$REDSTACK_SCRIPTS/$DEFAULT_LOCALRC" ]; then if [ -f "$TROVESTACK_SCRIPTS/$DEFAULT_LOCALRC" ]; then
add_file_contents "$DEVSTACK_LOCAL_CONF" "$REDSTACK_SCRIPTS/$DEFAULT_LOCALRC" "$LOCALRC_OPTS_TAG" "$PARSE_FILE" "$BLANK_LINE_TO_START" add_file_contents "$DEVSTACK_LOCAL_CONF" "$TROVESTACK_SCRIPTS/$DEFAULT_LOCALRC" "$LOCALRC_OPTS_TAG" "$PARSE_FILE" "$BLANK_LINE_TO_START"
fi fi
# Add any user options # Add any user options
@ -466,7 +466,7 @@ function run_devstack() {
# Add all the files in the LOCAL_CONF_D directory that match CONF_MATCH (except for sample files) # Add all the files in the LOCAL_CONF_D directory that match CONF_MATCH (except for sample files)
# and that aren't excluded. Files are excluded by having a variable # and that aren't excluded. Files are excluded by having a variable
# 'FILENAME_IN_UPPERCASE_MINUS_RC=false' in redstack.rc # 'FILENAME_IN_UPPERCASE_MINUS_RC=false' in trovestack.rc
# For Example: USING_VAGRANT=false (for the using_vagrant.rc file). # For Example: USING_VAGRANT=false (for the using_vagrant.rc file).
PARSE_FILE="true" PARSE_FILE="true"
BLANK_LINE_TO_START="false" BLANK_LINE_TO_START="false"
@ -479,7 +479,7 @@ function run_devstack() {
echo "Skipping $CONF_FILE" echo "Skipping $CONF_FILE"
echo "Use $FILE_NAME_VAR=true to include" echo "Use $FILE_NAME_VAR=true to include"
fi fi
done < <(find "$REDSTACK_SCRIPTS/${LOCAL_CONF_D}" -name "${CONF_MATCH}" -follow -not -name "sample*.rc" -type f -print0) done < <(find "$TROVESTACK_SCRIPTS/${LOCAL_CONF_D}" -name "${CONF_MATCH}" -follow -not -name "sample*.rc" -type f -print0)
# this is to add a blank line for readability # this is to add a blank line for readability
add_file_contents "$DEVSTACK_LOCAL_CONF" "" "$ADD_OPTS_TAG" add_file_contents "$DEVSTACK_LOCAL_CONF" "" "$ADD_OPTS_TAG"
fi fi
@ -665,20 +665,20 @@ function install_test_packages() {
function mod_confs() { function mod_confs() {
DATASTORE_TYPE=$1 DATASTORE_TYPE=$1
sudo install -b --mode 0664 $REDSTACK_SCRIPTS/conf/test_begin.conf $TEST_CONF sudo install -b --mode 0664 $TROVESTACK_SCRIPTS/conf/test_begin.conf $TEST_CONF
TROVE_REPORT_DIR=$REDSTACK_SCRIPTS/../report/ TROVE_REPORT_DIR=$TROVESTACK_SCRIPTS/../report/
EXTRA_CONF=$REDSTACK_SCRIPTS/conf/test.extra.conf EXTRA_CONF=$TROVESTACK_SCRIPTS/conf/test.extra.conf
if [ -e $EXTRA_CONF ]; then if [ -e $EXTRA_CONF ]; then
cat $EXTRA_CONF >> $TEST_CONF cat $EXTRA_CONF >> $TEST_CONF
fi fi
# Append datastore specific configuration file # Append datastore specific configuration file
DATASTORE_CONF=$REDSTACK_SCRIPTS/conf/$DATASTORE_TYPE.conf DATASTORE_CONF=$TROVESTACK_SCRIPTS/conf/$DATASTORE_TYPE.conf
if [ ! -f $DATASTORE_CONF ]; then if [ ! -f $DATASTORE_CONF ]; then
exclaim "Datastore configuration file ${DATASTORE_CONF} not found" exclaim "Datastore configuration file ${DATASTORE_CONF} not found"
exit 1 exit 1
fi fi
cat $DATASTORE_CONF | sudo tee -a $TEST_CONF > /dev/null cat $DATASTORE_CONF | sudo tee -a $TEST_CONF > /dev/null
cat $REDSTACK_SCRIPTS/conf/test_end.conf | sudo tee -a $TEST_CONF > /dev/null cat $TROVESTACK_SCRIPTS/conf/test_end.conf | sudo tee -a $TEST_CONF > /dev/null
#Add the paths to the test conf #Add the paths to the test conf
sed -i "s,%report_directory%,$TROVE_REPORT_DIR,g" $TEST_CONF sed -i "s,%report_directory%,$TROVE_REPORT_DIR,g" $TEST_CONF
@ -795,7 +795,7 @@ function cmd_build_image() {
install_devstack_code install_devstack_code
cmd_clone_projects do_not_force_update $REDSTACK_SCRIPTS/image-projects-list cmd_clone_projects do_not_force_update $TROVESTACK_SCRIPTS/image-projects-list
exclaim "Use tripleo-diskimagebuilder to actually build the Trove Guest Agent Image." exclaim "Use tripleo-diskimagebuilder to actually build the Trove Guest Agent Image."
build_guest_image $IMAGE_DATASTORE_TYPE build_guest_image $IMAGE_DATASTORE_TYPE
@ -980,7 +980,7 @@ function cmd_int_tests() {
if [ ! $USAGE_ENDPOINT ]; then if [ ! $USAGE_ENDPOINT ]; then
export USAGE_ENDPOINT=trove.tests.util.usage.FakeVerifier export USAGE_ENDPOINT=trove.tests.util.usage.FakeVerifier
fi fi
cd $REDSTACK_SCRIPTS cd $TROVESTACK_SCRIPTS
if [ $# -lt 1 ]; then if [ $# -lt 1 ]; then
args="--group=blackbox" args="--group=blackbox"
else else
@ -990,14 +990,14 @@ function cmd_int_tests() {
# -- verbose makes it prettier. # -- verbose makes it prettier.
# -- logging-clear-handlers keeps the novaclient and other things from # -- logging-clear-handlers keeps the novaclient and other things from
# spewing logs to stdout. # spewing logs to stdout.
args="$INT_TEST_OPTIONS -B $REDSTACK_TESTS/integration/int_tests.py --verbose --logging-clear-handlers $args" args="$INT_TEST_OPTIONS -B $TROVESTACK_TESTS/integration/int_tests.py --verbose --logging-clear-handlers $args"
echo "python $args" echo "python $args"
python $args python $args
} }
function cmd_int_tests_simple() { function cmd_int_tests_simple() {
exclaim "Running Trove Simple Integration Tests..." exclaim "Running Trove Simple Integration Tests..."
cd $REDSTACK_SCRIPTS cd $TROVESTACK_SCRIPTS
if [ $# -lt 1 ]; then if [ $# -lt 1 ]; then
args="--group=simple_blackbox" args="--group=simple_blackbox"
else else
@ -1007,7 +1007,7 @@ function cmd_int_tests_simple() {
# -- verbose makes it prettier. # -- verbose makes it prettier.
# -- logging-clear-handlers keeps the novaclient and other things from # -- logging-clear-handlers keeps the novaclient and other things from
# spewing logs to stdout. # spewing logs to stdout.
args="$INT_TEST_OPTIONS -B $REDSTACK_TESTS/integration/int_tests.py --verbose --logging-clear-handlers $args" args="$INT_TEST_OPTIONS -B $TROVESTACK_TESTS/integration/int_tests.py --verbose --logging-clear-handlers $args"
echo "python $args" echo "python $args"
python $args python $args
} }
@ -1028,7 +1028,7 @@ function cmd_example_tests() {
sleep 3 sleep 3
echo " echo "
{ {
\"directory\": \"$REDSTACK_TESTS/../apidocs/src/resources/samples/\", \"directory\": \"$TROVESTACK_TESTS/../apidocs/src/resources/samples/\",
\"auth_url\":\"http://$KEYSTONE_AUTH_HOST:35357/v2.0/tokens\", \"auth_url\":\"http://$KEYSTONE_AUTH_HOST:35357/v2.0/tokens\",
\"api_url\":\"http://$SERVICE_HOST:8779\", \"api_url\":\"http://$SERVICE_HOST:8779\",
\"replace_host\":\"https://ord.databases.api.rackspacecloud.com\", \"replace_host\":\"https://ord.databases.api.rackspacecloud.com\",
@ -1037,8 +1037,8 @@ function cmd_example_tests() {
\"password\":\"examples\", \"password\":\"examples\",
\"tenant\":\"trove\" \"tenant\":\"trove\"
}" > /tmp/example-tests.conf }" > /tmp/example-tests.conf
python $REDSTACK_TESTS/examples/examples/example_generation.py /tmp/example-tests.conf python $TROVESTACK_TESTS/examples/examples/example_generation.py /tmp/example-tests.conf
pushd $REDSTACK_TESTS/../apidocs pushd $TROVESTACK_TESTS/../apidocs
mvn clean mvn clean
mvn generate-sources mvn generate-sources
popd popd
@ -1230,10 +1230,9 @@ function cmd_dsvm_gate_tests() {
sudo iptables -D openstack-INPUT -j REJECT --reject-with icmp-host-prohibited || true sudo iptables -D openstack-INPUT -j REJECT --reject-with icmp-host-prohibited || true
sudo chown -R $(whoami) /etc/trove sudo chown -R $(whoami) /etc/trove
sudo chown -R $(whoami) $DEST/trove-integration
iniset $TROVE_GUESTAGENT_CONF DEFAULT rabbit_host $CONTROLLER_IP iniset $TROVE_GUESTAGENT_CONF DEFAULT rabbit_host $CONTROLLER_IP
iniset $TROVE_GUESTAGENT_CONF oslo_messaging_rabbit rabbit_hosts $CONTROLLER_IP iniset $TROVE_GUESTAGENT_CONF oslo_messaging_rabbit rabbit_hosts $CONTROLLER_IP
cd $DEST/trove-integration/scripts cd $TROVESTACK_SCRIPTS
sudo -H $HTTP_PROXY pip install --upgrade pip dib-utils sudo -H $HTTP_PROXY pip install --upgrade pip dib-utils
cmd_kick_start $DATASTORE_TYPE cmd_kick_start $DATASTORE_TYPE
@ -1347,7 +1346,7 @@ function print_usage() {
--helper for environment-- --helper for environment--
kick-start - kick start the setup of trove. kick-start - kick start the setup of trove.
(redstack test-init/build-image in one step) (trovestack test-init/build-image in one step)
[mysql no-clean] no clean avoids rebuilding packages from scratch [mysql no-clean] no clean avoids rebuilding packages from scratch
- Set REBUILD_IMAGE=True to force rebuild (won't use cached image) - Set REBUILD_IMAGE=True to force rebuild (won't use cached image)
@ -1417,8 +1416,8 @@ function run_command() {
"run-fake" ) shift; cmd_run_fake $@;; "run-fake" ) shift; cmd_run_fake $@;;
"start-fake" ) shift; cmd_start_fake $@;; "start-fake" ) shift; cmd_start_fake $@;;
"update-projects" ) cmd_clone_projects force_update \ "update-projects" ) cmd_clone_projects force_update \
$REDSTACK_SCRIPTS/projects-list \ $TROVESTACK_SCRIPTS/projects-list \
$REDSTACK_SCRIPTS/image-projects-list;; $TROVESTACK_SCRIPTS/image-projects-list;;
"reset-task" ) shift; cmd_reset_task $@;; "reset-task" ) shift; cmd_reset_task $@;;
"wipe-queues" ) shift; cmd_wipe_queues $@;; "wipe-queues" ) shift; cmd_wipe_queues $@;;
"example-tests" ) shift; cmd_example_tests $@;; "example-tests" ) shift; cmd_example_tests $@;;

View File

@ -63,7 +63,7 @@ PATH_TROVE_DASHBOARD=$DEST/trove-dashboard
PATH_DISKIMAGEBUILDER=$DEST/diskimage-builder PATH_DISKIMAGEBUILDER=$DEST/diskimage-builder
PATH_TRIPLEO_ELEMENTS=$DEST/tripleo-image-elements PATH_TRIPLEO_ELEMENTS=$DEST/tripleo-image-elements
# Save the state of TROVE_BRANCH first, since it's used in redstack # Save the state of TROVE_BRANCH first, since it's used in trovestack
TROVE_BRANCH_ORIG=${TROVE_BRANCH} TROVE_BRANCH_ORIG=${TROVE_BRANCH}
# Devstack and OpenStack git repo source paths, etc. # Devstack and OpenStack git repo source paths, etc.
GIT_BASE=${GIT_BASE:-git://git.openstack.org} GIT_BASE=${GIT_BASE:-git://git.openstack.org}
@ -109,7 +109,7 @@ DISTRO=${DISTRO:-ubuntu}
# The following values can be used to tweak how devstack sets # The following values can be used to tweak how devstack sets
# up Trove. If not explicitly set, the defaults in the code are used. # up Trove. If not explicitly set, the defaults in the code are used.
# To make changes without modifying the repo, add these variables # To make changes without modifying the repo, add these variables
# to options.rc or ~/redstack.options.rc # to options.rc or ~/trovestack.options.rc
#export TROVE_MAX_ACCEPTED_VOLUME_SIZE=10 #export TROVE_MAX_ACCEPTED_VOLUME_SIZE=10
#export TROVE_MAX_INSTANCES_PER_TENANT=10 #export TROVE_MAX_INSTANCES_PER_TENANT=10
#export TROVE_MAX_VOLUMES_PER_TENANT=40 #export TROVE_MAX_VOLUMES_PER_TENANT=40

View File

@ -136,7 +136,7 @@ def import_tests():
# trove.tests.int_tests module # trove.tests.int_tests module
from trove.tests import int_tests from trove.tests import int_tests
# Groups defined in trove-integration, or any other externally # Groups defined in trove/integration, or any other externally
# defined groups can be registered here # defined groups can be registered here
heavy_black_box_groups = [ heavy_black_box_groups = [
"dbaas.api.instances.pagination", "dbaas.api.instances.pagination",