Add them as nodes with the tag "devstack-IMAGE" where IMAGE is, eg, oneiric, with a single executor. Change the reap job to delete these jenkins nodes. Change the delete script to simply mark them for deletion. It should then be called by a new job that is a post-build step for the devstack gate job. Another new job should be called as the first build step in the devstack gate, and it should invoke devstack-vm-inprogress.py to disable the node that the job just started running on. In this manner, we end up with single-use jenkins slaves. Change the gate script to expect to be run the host itself, so it no longer needs to ssh and scp/rsync files around. Add a new script, devstack-vm-gate-wrap.sh, which assists running the gate job on a separate devstack host, as is currently done, to test it out without requiring the full Jenkins infrastructure. Change-Id: I28902918406670163d32ae7c2a644055233dc1fa
71 lines
1.9 KiB
Bash
Executable File
71 lines
1.9 KiB
Bash
Executable File
#!/bin/bash -x
|
|
|
|
# Script that is run on the devstack vm; configures and
|
|
# invokes devstack.
|
|
|
|
# Copyright (C) 2011-2012 OpenStack LLC.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
# implied.
|
|
#
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
set -o errexit
|
|
|
|
export DEST=$WORKSPACE
|
|
|
|
cd $DEST/devstack
|
|
|
|
ENABLED_SERVICES=g-api,g-reg,key,n-api,n-crt,n-obj,n-cpu,n-net,n-vol,n-sch,horizon,mysql,rabbit
|
|
|
|
if [ "$DEVSTACK_GATE_TEMPEST" -eq "1" ]; then
|
|
ENABLED_SERVICES=$ENABLED_SERVICES,tempest
|
|
fi
|
|
|
|
cat <<EOF >localrc
|
|
ACTIVE_TIMEOUT=60
|
|
BOOT_TIMEOUT=90
|
|
ASSOCIATE_TIMEOUT=60
|
|
MYSQL_PASSWORD=secret
|
|
RABBIT_PASSWORD=secret
|
|
ADMIN_PASSWORD=secret
|
|
SERVICE_PASSWORD=secret
|
|
SERVICE_TOKEN=111222333444
|
|
SWIFT_HASH=1234123412341234
|
|
ROOTSLEEP=0
|
|
ENABLED_SERVICES=$ENABLED_SERVICES
|
|
SKIP_EXERCISES=boot_from_volume,client-env,swift
|
|
SERVICE_HOST=127.0.0.1
|
|
SYSLOG=True
|
|
SCREEN_LOGDIR=$WORKSPACE/screen-logs
|
|
FIXED_RANGE=10.1.0.0/24
|
|
FIXED_NETWORK_SIZE=256
|
|
EOF
|
|
|
|
if [ "$DEVSTACK_GATE_TEMPEST" -eq "1" ]; then
|
|
# We need to disable ratelimiting when running
|
|
# Tempest tests since so many requests are executed
|
|
echo "API_RATE_LIMIT=False" >> localrc
|
|
# Volume tests in Tempest require a number of volumes
|
|
# to be created, each of 1G size. Devstack's default
|
|
# volume backing file size is 2G, so we increase to 4G
|
|
echo "VOLUME_BACKING_FILE_SIZE=4G" >> localrc
|
|
fi
|
|
|
|
./stack.sh
|
|
./exercise.sh
|
|
if [ "$DEVSTACK_GATE_TEMPEST" -eq "1" ]; then
|
|
./tools/configure_tempest.sh
|
|
cd $DEST/tempest
|
|
nosetests --with-xunit -sv $DEVSTACK_GATE_TEMPEST_TESTS
|
|
fi
|