summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Coldrick <adam.coldrick@codethink.co.uk>2014-10-15 08:36:54 (GMT)
committerAdam Coldrick <adam.coldrick@codethink.co.uk>2014-10-27 09:09:20 (GMT)
commitd975746c51ec75b0aa6d2f49d4922fd1de67181e (patch)
tree205650c3637f7bd816780bd1bef52c3e632d7574
parentf199ddc09831e8eb0111069f3495de8c1bd71471 (diff)
downloaddefinitions-d975746c51ec75b0aa6d2f49d4922fd1de67181e.tar.gz
Make mason.conf contain everything it needs to
This adds TEST_INFRASTRUCTURE_TYPE and OPENSTACK_NETWORK_ID to mason.conf, as well as ending the confusion of using both MASON_TEST_HOST and TEST_VM_HOST_SSH_URL to mean the same thing in different places.
-rw-r--r--mason.configure4
-rw-r--r--mason/ansible/mason-setup.yml6
-rwxr-xr-xmason/mason.sh4
-rw-r--r--mason/share/mason.conf4
4 files changed, 15 insertions, 3 deletions
diff --git a/mason.configure b/mason.configure
index 4d11feb..995e098 100644
--- a/mason.configure
+++ b/mason.configure
@@ -24,6 +24,8 @@
# * MASON_DEFINITIONS_REF
# * MASON_DISTBUILD_ARCH
# * MASON_TEST_HOST
+# * OPENSTACK_NETWORK_ID
+# * TEST_INFRASTRUCTURE_TYPE
# * TROVE_HOST
# * TROVE_ID
# * CONTROLLERHOST
@@ -108,6 +110,8 @@ mason_configuration={
'MASON_DEFINITIONS_REF': os.environ['MASON_DEFINITIONS_REF'],
'MASON_DISTBUILD_ARCH': os.environ['MASON_DISTBUILD_ARCH'],
'MASON_TEST_HOST': os.environ['MASON_TEST_HOST'],
+ 'OPENSTACK_NETWORK_ID': os.environ['OPENSTACK_NETWORK_ID'],
+ 'TEST_INFRASTRUCTURE_TYPE': os.environ['TEST_INFRASTRUCTURE_TYPE'],
'TROVE_ID': os.environ['TROVE_ID'],
'TROVE_HOST': os.environ['TROVE_HOST'],
'CONTROLLERHOST': os.environ['CONTROLLERHOST'],
diff --git a/mason/ansible/mason-setup.yml b/mason/ansible/mason-setup.yml
index 70c7787..3b73d6d 100644
--- a/mason/ansible/mason-setup.yml
+++ b/mason/ansible/mason-setup.yml
@@ -29,6 +29,12 @@
- fail: msg='CONTROLLERHOST is mandatory'
when: CONTROLLERHOST is not defined
+ - fail: msg='TEST_INFRASTRUCTURE_TYPE is mandatory'
+ when: TEST_INFRASTRUCTURE_TYPE is not defined
+
+ - fail: msg='OPENSTACK_NETWORK_ID is mandatory when TEST_INFRASTRUCTURE_TYPE=openstack'
+ when: TEST_INFRASTRUCTURE_TYPE == "openstack" and OPENSTACK_NETWORK_ID is not defined
+
- name: Create the Mason configuration file
template: src=/usr/share/mason-setup/{{ item }} dest=/etc/{{ item }}
with_items:
diff --git a/mason/mason.sh b/mason/mason.sh
index 7b56b8c..4356e81 100755
--- a/mason/mason.sh
+++ b/mason/mason.sh
@@ -64,14 +64,14 @@ fi
if [ "$TEST_INFRASTRUCTURE_TYPE" = "openstack" ]; then
"scripts/release-test-os" \
- --deployment-host "$DISTBUILD_ARCH":"$TEST_VM_HOST_SSH_URL" \
+ --deployment-host "$DISTBUILD_ARCH":"$MASON_TEST_HOST" \
--trove-host "$UPSTREAM_TROVE_ADDRESS" \
--trove-id "$TROVE_ID" \
--net-id "$OPENSTACK_NETWORK_ID" \
"$BUILD_CLUSTER_MORPHOLOGY"
elif [ "$TEST_INFRASTRUCTURE_TYPE" = "kvmhost" ]; then
"scripts/release-test" \
- --deployment-host "$DISTBUILD_ARCH":"$TEST_VM_HOST_SSH_URL" \
+ --deployment-host "$DISTBUILD_ARCH":"$MASON_TEST_HOST" \
--trove-host "$UPSTREAM_TROVE_ADDRESS" \
--trove-id "$TROVE_ID" \
"$BUILD_CLUSTER_MORPHOLOGY"
diff --git a/mason/share/mason.conf b/mason/share/mason.conf
index b323896..abbf357 100644
--- a/mason/share/mason.conf
+++ b/mason/share/mason.conf
@@ -9,4 +9,6 @@ DISTBUILD_ARCH={{ MASON_DISTBUILD_ARCH|quote }}
DISTBUILD_CONTROLLER_ADDRESS={{ CONTROLLERHOST|quote }}
TROVE_ID={{ TROVE_ID|quote }}
BUILD_CLUSTER_MORPHOLOGY={{ MASON_CLUSTER_MORPHOLOGY|quote }}
-TEST_VM_HOST_SSH_URL={{ MASON_TEST_HOST|quote }}
+MASON_TEST_HOST={{ MASON_TEST_HOST|quote }}
+TEST_INFRASTRUCTURE_TYPE={{ TEST_INFRASTRUCTURE_TYPE|quote }}
+OPENSTACK_NETWORK_ID={{ OPENSTACK_NETWORK_ID|quote }}