more work on jenkins stuff

This commit is contained in:
Anthony Young 2011-11-08 17:25:12 -06:00
parent b996b2b855
commit ccd4ea37b8
7 changed files with 106 additions and 0 deletions

17
tools/jenkins/README.md Normal file
View file

@ -0,0 +1,17 @@
Getting Started With Jenkins and Devstack
=========================================
This little corner of devstack is to show how to get an Openstack jenkins
environment up and running quickly, using the rcb configuration methodology.
To manually set up a testing environment
----------------------------------------
./build_configuration.sh [EXECUTOR_NUMBER] [CONFIGURATION]
For now, use "./build_configuration.sh $EXECUTOR_NUMBER kvm"
To manually run a test
----------------------
./run_test.sh [EXECUTOR_NUMBER] [ADAPTER]
For now, use "./run_test.sh $EXECUTOR_NUMBER [euca|floating]"

3
tools/jenkins/adapters/euca.sh Executable file
View file

@ -0,0 +1,3 @@
#!/bin/bash
echo "$0 SUCCESS!"

View file

@ -0,0 +1,3 @@
#!/bin/bash
echo "$0 SUCCESS!"

View file

@ -0,0 +1,19 @@
#!/bin/bash
EXECUTOR_NUMBER=$1
CONFIGURATION=$2
function usage() {
echo "Usage: $0 - Build a configuration"
echo ""
echo "$0 [EXECUTOR_NUMBER] [CONFIGURATION]"
exit 1
}
# Validate inputs
if [[ "$EXECUTOR_NUMBER" = "" || "$CONFIGURATION" = "" ]]; then
usage
fi
# Execute configuration script
cd configurations && ./$CONFIGURATION.sh $EXECUTOR_NUMBER $CONFIGURATION

View file

@ -0,0 +1,45 @@
#!/bin/bash
EXECUTOR_NUMBER=$1
CONFIGURATION=$2
function usage() {
echo "Usage: $0 - Build a test configuration"
echo ""
echo "$0 [EXECUTOR_NUMBER] [CONFIGURATION]"
exit 1
}
# Validate inputs
if [[ "$EXECUTOR_NUMBER" = "" || "$CONFIGURATION" = "" ]]; then
usage
fi
# This directory
CUR_DIR=$(cd $(dirname "$0") && pwd)
# devstack directory
cd ../../..
TOP_DIR=(pwd)
# Name test instance based on executor
NAME=executor-$EXECUTOR_NUMBER
virsh destroy `virsh list | grep $NAME | cut -d " " -f1` || true
# Configure localrc
cat <<EOF >localrc
RECLONE=yes
GUEST_NETWORK=$EXECUTOR_NUMBER
GUEST_NAME=$NAME
FLOATING_RANGE=192.168.$EXECUTOR_NUMBER.128/27
GUEST_CORES=4
GUEST_RAM=10000000
MYSQL_PASSWORD=chicken
RABBIT_PASSWORD=chicken
SERVICE_TOKEN=chicken
ADMIN_PASSWORD=chicken
USERNAME=admin
TENANT=admin
EOF
cd tools
sudo ./build_uec.sh

19
tools/jenkins/run_test.sh Executable file
View file

@ -0,0 +1,19 @@
#!/bin/bash
EXECUTOR_NUMBER=$1
ADAPTER=$2
function usage() {
echo "Usage: $0 - Run a test"
echo ""
echo "$0 [EXECUTOR_NUMBER] [ADAPTER]"
exit 1
}
# Validate inputs
if [[ "$EXECUTOR_NUMBER" = "" || "$ADAPTER" = "" ]]; then
usage
fi
# Execute configuration script
cd adapters && ./$ADAPTER.sh $EXECUTOR_NUMBER $ADAPTER