From d83efffdf04f9829347c6fd5f6b84e005e0bb4a0 Mon Sep 17 00:00:00 2001 From: Gary Wu Date: Tue, 9 Jan 2018 16:47:30 -0800 Subject: Add support for lab apt proxies Change-Id: Ic30d45f3ac088637fb680f77bbaf7871a07a6428 Issue-ID: INT-278 Signed-off-by: Gary Wu (cherry picked from commit 3e2711149d797ad2731fe3fd4773ad2eaa12e7c8) --- test/ete/labs/gwu/apt-proxy.sh | 7 ++ test/ete/labs/gwu/onap-openrc | 9 ++ test/ete/labs/gwu/onap-openstack-template.env | 142 ++++++++++++++++++++++++++ test/ete/labs/huawei/apt-proxy.sh | 7 ++ test/ete/scripts/deploy-onap.sh | 34 ++++-- 5 files changed, 191 insertions(+), 8 deletions(-) create mode 100755 test/ete/labs/gwu/apt-proxy.sh create mode 100644 test/ete/labs/gwu/onap-openrc create mode 100644 test/ete/labs/gwu/onap-openstack-template.env create mode 100755 test/ete/labs/huawei/apt-proxy.sh (limited to 'test') diff --git a/test/ete/labs/gwu/apt-proxy.sh b/test/ete/labs/gwu/apt-proxy.sh new file mode 100755 index 000000000..14b272566 --- /dev/null +++ b/test/ete/labs/gwu/apt-proxy.sh @@ -0,0 +1,7 @@ +#!/bin/bash +sed -i '/#!\/bin\/bash/a\ + cat > /etc/apt/apt.conf.d/30proxy< /etc/apt/apt.conf.d/30proxy< ${ENV_FILE} -pushd ${ONAP_WORKDIR}/demo -echo " # Rest of the file was AUTO-GENERATED from" +echo " # Rest of the file was AUTO-GENERATED from" | tee -a ${ENV_FILE} echo " #" $(git config --get remote.origin.url) heat/ONAP/onap_openstack.env $(git rev-parse HEAD) | tee -a ${ENV_FILE} popd sed "1,/${SENTINEL}/d" ${ONAP_WORKDIR}/demo/heat/ONAP/onap_openstack.env >> ${ENV_FILE} cat ${ENV_FILE} +# generate final heat template +# add apt proxy to heat template if applicable +if [ -x $LAB_DIR/apt-proxy.sh ]; then + $LAB_DIR/apt-proxy.sh ${YAML_FILE} + diff ${ONAP_WORKDIR}/demo/heat/ONAP/onap_openstack.yaml ${YAML_FILE} +fi + + +#exit 0 + #diff ${LAB_DIR}/onap-openstack-template.env ${LAB_DIR}/onap-openstack.env + +# tear down old deployment +$WORKSPACE/test/ete/scripts/teardown-onap.sh + +# create new stack +STACK="ete-$(uuidgen | cut -c-8)" +echo "New Stack Name: ${STACK}" openstack stack create -t ${YAML_FILE} -e ${LAB_DIR}/onap-openstack.env $STACK while [ "CREATE_IN_PROGRESS" == "$(openstack stack show -c stack_status -f value $STACK)" ]; do -- cgit 1.2.3-korg