summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build-gluster-org/jobs/distributed-regression.yml9
-rwxr-xr-xbuild-gluster-org/scripts/distributed-regression.sh11
2 files changed, 11 insertions, 9 deletions
diff --git a/build-gluster-org/jobs/distributed-regression.yml b/build-gluster-org/jobs/distributed-regression.yml
index 04f3e4a..df1fdad 100644
--- a/build-gluster-org/jobs/distributed-regression.yml
+++ b/build-gluster-org/jobs/distributed-regression.yml
@@ -31,6 +31,11 @@
default: '8'
description: Number of machines to launch
name: MACHINES_COUNT
+ - string:
+ default: 'ORD'
+ description: Rackspace region to launch instances
+ name: RAX_REGION
+
builders:
- shell: !include-raw: ../scripts/distributed-regression.sh
@@ -49,8 +54,8 @@
- credentials-binding:
- username-password-separated:
credential-id: e423d7f9-edaf-45ea-aa8f-9c3f8e6563f1
- username: USERNAME
- password: PASSWORD
+ username: RAX_USERNAME
+ password: RAX_API_KEY
- file:
credential-id: http_int_credential
variable: LOG_KEY
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