Integrate functest with ARM Architecture 89/38689/7
authorDelia Popescu <delia.popescu@enea.com>
Thu, 3 Aug 2017 14:28:28 +0000 (17:28 +0300)
committerDelia Popescu <delia.popescu@enea.com>
Wed, 23 Aug 2017 13:40:34 +0000 (13:40 +0000)
Reads architecture of first compute node found on MCP installer
and sends it as env variable when creating the conatiner.
It is needed by https://gerrit.opnfv.org/gerrit/#/c/39991/
JIRA: ARMBAND-279

Change-Id: I7eec485507bd182190e95c0478182f506db4c821
Signed-off-by: Delia Popescu <delia.popescu@enea.com>
jjb/functest/set-functest-env.sh

index f6071e3..10f949a 100755 (executable)
@@ -48,6 +48,12 @@ envs="-e INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} \
     -e NODE_NAME=${NODE_NAME} -e DEPLOY_SCENARIO=${DEPLOY_SCENARIO} \
     -e BUILD_TAG=${BUILD_TAG} -e CI_DEBUG=${CI_DEBUG} -e DEPLOY_TYPE=${DEPLOY_TYPE}"
 
+if [[ ${INSTALLER_TYPE} == 'fuel' && ! -z ${SALT_MASTER_IP} ]]; then
+  HOST_ARCH=$(ssh -l ubuntu ${SALT_MASTER_IP} -i ${SSH_KEY} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no \
+  "sudo salt 'cmp*' grains.get cpuarch --out yaml |awk '{print \$2; exit}'")
+  envs="${envs} -e POD_ARCH=${HOST_ARCH}"
+fi
+
 if [[ ${INSTALLER_TYPE} == 'compass' && ${DEPLOY_SCENARIO} == *'os-nosdn-openo-ha'* ]]; then
     ssh_options="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
     openo_msb_port=${openo_msb_port:-80}