From eab8a2b3bb2d8e6f992e4c288fed4275a675f082 Mon Sep 17 00:00:00 2001 From: Narinder Gupta Date: Thu, 26 Jan 2017 00:21:35 -0600 Subject: did some cleanupm job. Change-Id: I998482d0cba2bf6eb774d68124d2383ba869a08b Signed-off-by: Narinder Gupta --- ci/deploy.sh | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) (limited to 'ci/deploy.sh') diff --git a/ci/deploy.sh b/ci/deploy.sh index 4d79ec8d..f92f5032 100755 --- a/ci/deploy.sh +++ b/ci/deploy.sh @@ -105,28 +105,25 @@ createresource() { #copy the files and create extra resources needed for HA deployment # in case of default VM labs. deploy() { - + if [ ! -f ./deployment.yaml ] && [ -e ~/.juju/deployment.yaml ]; then + cp ~/.juju/deployment.yaml ./deployment.yaml + elif [ ! -f ./deployment.yaml ] && [ -e ~/joid_config/deployment.yaml ]; then + cp ~/joid_config/deployment.yaml ./deployment.yaml + fi + + if [[ "$jujuver" > "2" ]]; then + if [ ! -f ./labconfig.yaml ] && [ -e ~/joid_config/labconfig.yaml ]; then + cp ~/joid_config/labconfig.yaml ./labconfig.yaml + fi + if [ ! -f ./deployconfig.yaml ] && [ -e ~/joid_config/deployconfig.yaml ]; then + cp ~/joid_config/deployconfig.yaml ./deployconfig.yaml + fi + else if [ ! -f ./environments.yaml ] && [ -e ~/.juju/environments.yaml ]; then cp ~/.juju/environments.yaml ./environments.yaml elif [ ! -f ./environments.yaml ] && [ -e ~/joid_config/environments.yaml ]; then cp ~/joid_config/environments.yaml ./environments.yaml fi - if [ ! -f ./deployment.yaml ] && [ -e ~/.juju/deployment.yaml ]; then - cp ~/.juju/deployment.yaml ./deployment.yaml - elif [ ! -f ./deployment.yaml ] && [ -e ~/joid_config/deployment.yaml ]; then - cp ~/joid_config/deployment.yaml ./deployment.yaml - fi - if [ ! -f ./labconfig.yaml ] && [ -e ~/.juju/labconfig.yaml ]; then - cp ~/.juju/labconfig.yaml ./labconfig.yaml - elif [ ! -f ./labconfig.yaml ] && [ -e ~/joid_config/labconfig.yaml ]; then - cp ~/joid_config/labconfig.yaml ./labconfig.yaml - fi - if [ ! -f ./deployconfig.yaml ] && [ -e ~/.juju/deployconfig.yaml ]; then - cp ~/.juju/deployconfig.yaml ./deployconfig.yaml - elif [ ! -f ./deployconfig.yaml ] && [ -e ~/joid_config/deployconfig.yaml ]; then - cp ~/joid_config/deployconfig.yaml ./deployconfig.yaml - fi - #copy the script which needs to get deployed as part of ofnfv release echo "...... deploying now ......" echo " " >> environments.yaml @@ -134,9 +131,11 @@ deploy() { echo " enable-os-upgrade: false" >> environments.yaml echo " admin-secret: admin" >> environments.yaml echo " default-series: $opnfvdistro" >> environments.yaml - cp environments.yaml ~/.juju/ cp environments.yaml ~/joid_config/ + fi + + if [[ "$opnfvtype" = "ha" && "$opnfvlab" = "default" ]]; then createresource -- cgit 1.2.3-korg