changes to improve debugability - more legible instance name
This commit is contained in:
parent
4c012b207c
commit
6ecc4f2839
2 changed files with 9 additions and 6 deletions
|
@ -2,16 +2,17 @@
|
||||||
|
|
||||||
EXECUTOR_NUMBER=$1
|
EXECUTOR_NUMBER=$1
|
||||||
CONFIGURATION=$2
|
CONFIGURATION=$2
|
||||||
|
ADAPTER=$3
|
||||||
|
|
||||||
function usage() {
|
function usage() {
|
||||||
echo "Usage: $0 - Build a test configuration"
|
echo "Usage: $0 - Build a test configuration"
|
||||||
echo ""
|
echo ""
|
||||||
echo "$0 [EXECUTOR_NUMBER] [CONFIGURATION]"
|
echo "$0 [EXECUTOR_NUMBER] [CONFIGURATION] [ADAPTER]"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Validate inputs
|
# Validate inputs
|
||||||
if [[ "$EXECUTOR_NUMBER" = "" || "$CONFIGURATION" = "" ]]; then
|
if [[ "$EXECUTOR_NUMBER" = "" || "$CONFIGURATION" = "" || "$ADAPTER" = ""]]; then
|
||||||
usage
|
usage
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -23,14 +24,16 @@ cd ../../..
|
||||||
TOP_DIR=(pwd)
|
TOP_DIR=(pwd)
|
||||||
|
|
||||||
# Name test instance based on executor
|
# Name test instance based on executor
|
||||||
NAME=executor-$EXECUTOR_NUMBER
|
BASE_NAME=executor-`printf "%02d" $EXECUTOR_NUMBER`
|
||||||
virsh destroy `virsh list | grep $NAME | cut -d " " -f1` || true
|
GUEST_NAME=$BASE_NAME.$ADAPTER
|
||||||
|
virsh destroy `virsh list | grep $BASE_NAME | cut -d " " -f1` || true
|
||||||
|
rm -f /var/lib/libvirt/dnsmasq/$BASE_NAME*.leases
|
||||||
|
|
||||||
# Configure localrc
|
# Configure localrc
|
||||||
cat <<EOF >localrc
|
cat <<EOF >localrc
|
||||||
RECLONE=yes
|
RECLONE=yes
|
||||||
GUEST_NETWORK=$EXECUTOR_NUMBER
|
GUEST_NETWORK=$EXECUTOR_NUMBER
|
||||||
GUEST_NAME=$NAME
|
GUEST_NAME=$GUEST_NAME
|
||||||
FLOATING_RANGE=192.168.$EXECUTOR_NUMBER.128/27
|
FLOATING_RANGE=192.168.$EXECUTOR_NUMBER.128/27
|
||||||
GUEST_CORES=4
|
GUEST_CORES=4
|
||||||
GUEST_RAM=1000000
|
GUEST_RAM=1000000
|
||||||
|
|
|
@ -58,7 +58,7 @@
|
||||||
<hudson.tasks.Shell>
|
<hudson.tasks.Shell>
|
||||||
<command>set -o errexit
|
<command>set -o errexit
|
||||||
cd tools/jenkins
|
cd tools/jenkins
|
||||||
sudo ./build_configuration.sh $EXECUTOR_NUMBER kvm</command>
|
sudo ./build_configuration.sh $EXECUTOR_NUMBER kvm $ADAPTER</command>
|
||||||
</hudson.tasks.Shell>
|
</hudson.tasks.Shell>
|
||||||
<hudson.tasks.Shell>
|
<hudson.tasks.Shell>
|
||||||
<command>set -o errexit
|
<command>set -o errexit
|
||||||
|
|
Loading…
Reference in a new issue