aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGary Wu <gary.i.wu@huawei.com>2018-01-12 01:17:32 -0800
committerGary Wu <gary.i.wu@huawei.com>2018-01-12 09:26:53 +0000
commitb57cc8f1088220cd9911dd88a559ea75dfb0538a (patch)
tree084c2c63f4944dc45ae4d90225aa568376fab67c
parent2b7aef3e38d07551f9c5ca184f486cd5f574c209 (diff)
Don't use insecure docker cache for dcae-bootstrap
Change-Id: Iadcbc5798f16dd79cc39fc2b852d2f4440afb24c Issue-ID: INT-278 Signed-off-by: Gary Wu <gary.i.wu@huawei.com> (cherry picked from commit ea1a5b7ade95eeda13b9ef97708040cc8f69e69c)
-rwxr-xr-xtest/ete/labs/gwu/apt-proxy.sh3
-rwxr-xr-xtest/ete/labs/huawei/apt-proxy.sh3
-rwxr-xr-xtest/ete/labs/windriver/apt-proxy.sh3
-rwxr-xr-xtest/ete/scripts/deploy-onap.sh18
4 files changed, 20 insertions, 7 deletions
diff --git a/test/ete/labs/gwu/apt-proxy.sh b/test/ete/labs/gwu/apt-proxy.sh
index 858c48be7..59ba676a3 100755
--- a/test/ete/labs/gwu/apt-proxy.sh
+++ b/test/ete/labs/gwu/apt-proxy.sh
@@ -13,3 +13,6 @@ sed -i '/#!\/bin\/bash/a\
Acquire::https::Proxy "DIRECT";\
EOF\
apt-get -y update' $1
+
+# don't use insecure docker proxy in dcae
+perl -i -0pe 's/(?<=dcae_c_vm:)(.*?)\{ get_param: nexus_docker_repo \}/$1"nexus3.onap.org:10001"/s' $1
diff --git a/test/ete/labs/huawei/apt-proxy.sh b/test/ete/labs/huawei/apt-proxy.sh
index 45c8ae09b..82cc4f7de 100755
--- a/test/ete/labs/huawei/apt-proxy.sh
+++ b/test/ete/labs/huawei/apt-proxy.sh
@@ -11,3 +11,6 @@ sed -i '/#!\/bin\/bash/a\
Acquire::https::Proxy "DIRECT";\
EOF\
apt-get -y update' $1
+
+# don't use insecure docker proxy in dcae
+perl -i -0pe 's/(?<=dcae_c_vm:)(.*?)\{ get_param: nexus_docker_repo \}/$1"nexus3.onap.org:10001"/s' $1
diff --git a/test/ete/labs/windriver/apt-proxy.sh b/test/ete/labs/windriver/apt-proxy.sh
index a492c5a30..f8bb32ff0 100755
--- a/test/ete/labs/windriver/apt-proxy.sh
+++ b/test/ete/labs/windriver/apt-proxy.sh
@@ -11,3 +11,6 @@ sed -i '/#!\/bin\/bash/a\
Acquire::https::Proxy "DIRECT";\
EOF\
apt-get -y update' $1
+
+# don't use insecure docker proxy in dcae
+perl -i -0pe 's/(?<=dcae_c_vm:)(.*?)\{ get_param: nexus_docker_repo \}/$1"nexus3.onap.org:10001"/s' $1
diff --git a/test/ete/scripts/deploy-onap.sh b/test/ete/scripts/deploy-onap.sh
index 571b380d1..96d42a0b1 100755
--- a/test/ete/scripts/deploy-onap.sh
+++ b/test/ete/scripts/deploy-onap.sh
@@ -21,27 +21,31 @@ source $WORKSPACE/test/ete/scripts/install_openstack_cli.sh
SENTINEL='Docker versions and branches'
-YAML_FILE=${LAB_DIR}/onap_openstack.yaml
-ENV_FILE=${LAB_DIR}/onap-openstack.env
+mkdir -p ${LAB_DIR}/target
+YAML_FILE=${LAB_DIR}/target/onap_openstack.yaml
+ENV_FILE=${LAB_DIR}/target/onap_openstack.env
+YAML_SRC=${ONAP_WORKDIR}/demo/heat/ONAP/onap_openstack.yaml
+ENV_SRC=${ONAP_WORKDIR}/demo/heat/ONAP/onap_openstack.env
# copy heat template to WORKSPACE
-cp ${ONAP_WORKDIR}/demo/heat/ONAP/onap_openstack.yaml ${YAML_FILE}
+cp ${YAML_SRC} ${YAML_FILE}
# generate final env file
pushd ${ONAP_WORKDIR}/demo
-cp ${ONAP_WORKDIR}/demo/heat/ONAP/onap_openstack.env ${LAB_DIR}/onap-openstack-demo.env
envsubst < ${LAB_DIR}/onap-openstack-template.env | sed -n "1,/${SENTINEL}/p" > ${ENV_FILE}
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}
+sed "1,/${SENTINEL}/d" ${ENV_SRC} >> ${ENV_FILE}
cat ${ENV_FILE}
+sdiff -w 180 ${ENV_SRC} ${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}
+ sdiff -w 180 ${YAML_SRC} ${YAML_FILE}
fi
@@ -56,7 +60,7 @@ $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
+openstack stack create -t ${YAML_FILE} -e ${ENV_FILE} $STACK
while [ "CREATE_IN_PROGRESS" == "$(openstack stack show -c stack_status -f value $STACK)" ]; do
sleep 20