summaryrefslogtreecommitdiffstats
path: root/build-gluster-org/scripts
diff options
context:
space:
mode:
authorDeepshikha Khandelwal <dkhandel@redhat.com>2018-09-11 15:10:37 +0530
committerDeepshikha Khandelwal <dkhandel@redhat.com>2018-09-17 09:35:28 +0000
commit22f2c6653368214c514a81faf3fad9a62b24a27b (patch)
treec938de3be116e8fce0f64b94e4b937714a33eaa9 /build-gluster-org/scripts
parent2bd6599aca987dbf9fa6b4cf51652e7eaa8993cb (diff)
Call ansible playbook for creation/deletion of instances
on Rackspace Change-Id: I338e098ba84cad8f36b7cec5cb896b496744643d Signed-off-by: Deepshikha Khandelwal <dkhandel@redhat.com>
Diffstat (limited to 'build-gluster-org/scripts')
-rwxr-xr-xbuild-gluster-org/scripts/distributed-regression.sh11
1 files changed, 4 insertions, 7 deletions
diff --git a/build-gluster-org/scripts/distributed-regression.sh b/build-gluster-org/scripts/distributed-regression.sh
index 7986c29..5ec80b3 100755
--- a/build-gluster-org/scripts/distributed-regression.sh
+++ b/build-gluster-org/scripts/distributed-regression.sh
@@ -9,18 +9,15 @@ sudo rm -rf /tmp/failed-tests /tmp/*log /tmp/*patch.tar.gz >/dev/null 2>&1
virtualenv env
. env/bin/activate
-# create SSH key pair of 4096 bits to use it for instances at Rackspace
-ssh-keygen -f "${WORKSPACE}"/key -t rsa -b 4096
-
# Install dependencies
pip install pyrax ansible
-#create the server maachines
-/opt/qa/distributed-tests/rackspace-server-manager.py create -n "${MACHINES_COUNT}"
+#create the server machines
+ansible-playbook /opt/qa/distributed-tests/create-vm.yml -e COUNT=${MACHINES_COUNT} -e NAME=${JOB_NAME}-${BUILD_ID}
for retry in $(seq 1 $MAX_ATTEMPTS)
do
- ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -i hosts --private-key=key /opt/qa/distributed-tests/distributed-server.yml -u root --skip-tags 'copy_logs'
+ ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -i hosts /opt/qa/distributed-tests/setup.yml -u root --skip-tags 'copy_logs'
ret=$?
if [ $ret -eq 0 ]; then
break
@@ -36,7 +33,7 @@ ret=$?
ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -i hosts --private-key=key /opt/qa/distributed-tests/distributed-server.yml -u root --tags 'copy_logs'
#delete the server machines
-/opt/qa/distributed-tests/rackspace-server-manager.py delete
+ansible-playbook -i hosts /opt/qa/distributed-tests/delete-vm.yml
if [ $ret -ne 0 ]; then
# Create tar file from all the failed test log files generated in /tmp
tar -czf "$WORKSPACE"/failed-tests-logs.tgz /tmp/*.log /tmp/failed-tests