summaryrefslogtreecommitdiffstats
path: root/bootstrap
diff options
context:
space:
mode:
authorLusheng Ji <lji@research.att.com>2017-10-25 13:36:54 -0400
committerLusheng Ji <lji@research.att.com>2017-10-25 13:37:01 -0400
commit557c2cd33a111c48212d400860637f65edb4fcb6 (patch)
tree9189286b1b8a79cacacba3129fa9559c615e6a3c /bootstrap
parentc5f346e5c41f17dd2b7066bd7c9584308626cead (diff)
Fix wget and sleep 180
1. Fix the wget of cent_os and cosul_cluster BPs not over-writing old copies. 2. Replace sleep 180 after launching CM VM to a ping wait Issue-Id: DCAEGEN2-128 Change-Id: I9ff8f770a320291c1c26d3c1159a52764d677f98 Signed-off-by: Lusheng Ji <lji@research.att.com>
Diffstat (limited to 'bootstrap')
-rwxr-xr-xbootstrap/installer-docker.sh-template16
1 files changed, 13 insertions, 3 deletions
diff --git a/bootstrap/installer-docker.sh-template b/bootstrap/installer-docker.sh-template
index 867dc1a..ddf330d 100755
--- a/bootstrap/installer-docker.sh-template
+++ b/bootstrap/installer-docker.sh-template
@@ -110,10 +110,12 @@ sed -e "s#key_filename:.*#key_filename: $PVTKEY#" < ${INPUTS} > /tmp/local_input
# Now install the VM
# Don't exit on error after this point--keep container running so we can do uninstalls after a failure
set +e
-if wget -P ./blueprints/ {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_blueprints_releases }}/blueprints/centos_vm.yaml; then
+if wget -O /tmp/centos_vm.yaml {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_blueprints_releases }}/blueprints/centos_vm.yaml; then
+ mv -f /tmp/centos_vm.yaml ./blueprints/
echo "Succeeded in getting the newest centos_vm.yaml"
else
echo "Failed to update centos_vm.yaml, using default version"
+ rm -f /tmp/centos_vm.yaml
fi
set -e
cfy local init --install-plugins -p ./blueprints/centos_vm.yaml -i /tmp/local_inputs -i "datacenter=$LOCATION"
@@ -122,7 +124,13 @@ PUBIP=$(cfy local outputs | grep -Po '"public_ip": "\K.*?(?=")')
## It's probably not completely ready when the installation finish, so wait
-sleep 180
+#sleep 180
+while [ $( ping -c 1 $PUBIP 2> /dev/null | grep icmp* | wc -l ) -eq 0 ];
+do
+ sleep 5
+ echo "."
+done
+sleep 10
echo "Installing Cloudify Manager on ${PUBIP}."
@@ -282,10 +290,12 @@ cfy use -t ${PUBIP}
echo "Deploying Consul VM"
set +e
-if wget -P ../blueprints/ {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_blueprints_releases }}/consul_cluster.yaml; then
+if wget -O /tmp/consul_cluster.yaml {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_blueprints_releases }}/blueprints/consul_cluster.yaml; then
+ mv -f /tmp/consul_cluster.yaml ../blueprints/
echo "Succeeded in getting the newest consul_cluster.yaml"
else
echo "Failed to update consul_cluster.yaml, using default version"
+ rm -f /tmp/consul_cluster.yaml
fi
set -e
cfy install -p ../blueprints/consul_cluster.yaml -d consul -i ../${INPUTS} -i "datacenter=$LOCATION"