Add a helper to deploy testenvironments.

Automation++.

Change-Id: I8b7b81855097d8a6161fddf4649f74f0e4ca6add
This commit is contained in:
Robert Collins
2014-01-31 15:57:48 +13:00
parent 8b4c68e8e6
commit dda7ac5c94
3 changed files with 26 additions and 1 deletions

View File

@@ -0,0 +1,23 @@
#!/bin/bash
#
# This is a helper to get tripleo-cd admins to deploy testenvs repeatably.
set -eux
set -o pipefail
if heat stack-show testenv > /dev/null; then
HEAT_OP=update
else
HEAT_OP=create
fi
python /opt/stack/tripleo-heat-templates/tripleo_heat_merge/merge.py \
--scale testenv=10 --output testenv-workers-built.yaml \
/opt/stack/tripleo-ci/heat-templates/testenv-workers.yaml
heat stack-$HEAT_OP \
-f testenv-workers-built.yaml \
-P AuthPassword=$(awk '$1=="tripleo-ci" { print $2 }' < /os-asserted-users) \
-P AuthUrl=http://10.10.16.175:5000/v2.0 \
-P GearmanHost=192.168.1.1 \
-P NetworkName=tripleo-bm-test \
-P PublicInterface=eth2 \
-P Hosts="10.10.16.175 ci-overcloud.tripleo.org" \
testenv

View File

@@ -35,4 +35,6 @@ fi
mkdir -p ~root/.cache/image-create
ln -s /var/cache/pypi-mirror/pypi ~root/.cache/image-create
install -m 0755 -o root -g root $(dirname $0)/../tripleo-cd.sh /usr/local/bin
for f in `ls $(dirname $0)/../bin`; do
install -m 0755 -o root -g root $(dirname $0)/../bin/$f /usr/local/bin/$f
done