Add retries to curl calls

Related-Prod: PRODX-2795
Change-Id: I32040c24cdda084e59c88879da84d0f294946bb7
diff --git a/de/heat-templates/scripts/instance_boot.sh b/de/heat-templates/scripts/instance_boot.sh
index da79bf0..d052423 100644
--- a/de/heat-templates/scripts/instance_boot.sh
+++ b/de/heat-templates/scripts/instance_boot.sh
@@ -148,13 +148,13 @@
 
     function download_bundles_retry {
     # Download the client certificate bundle
-        curl -k -H "Authorization: Bearer $AUTHTOKEN" https://${UCP_MASTER_HOST}/api/clientbundle -o ${tmpd}/bundle.zip
+        curl --retry 6 --retry-delay 5 -k -H "Authorization: Bearer $AUTHTOKEN" https://${UCP_MASTER_HOST}/api/clientbundle -o ${tmpd}/bundle.zip
     }
 
     function get_authtoken_retry {
     # Download the bundle https://docs.docker.com/ee/ucp/user-access/cli/
     # Create an environment variable with the user security token
-        AUTHTOKEN=$(curl -sk -d '{"username":"'$UCP_USERNAME'","password":"'$UCP_PASSWORD'"}' https://${UCP_MASTER_HOST}/auth/login | jq -r .auth_token)
+        AUTHTOKEN=$(curl --retry 6 --retry-delay 5 -sk -d '{"username":"'$UCP_USERNAME'","password":"'$UCP_PASSWORD'"}' https://${UCP_MASTER_HOST}/auth/login | jq -r .auth_token)
         if [ -z ${AUTHTOKEN} ]; then
             return -1
         fi
@@ -206,7 +206,7 @@
 }
 
 function install_kubectl {
-    curl -LO https://storage.googleapis.com/kubernetes-release/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl
+    curl --retry 6 --retry-delay 5 -LO https://storage.googleapis.com/kubernetes-release/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl
     chmod +x kubectl
     mv kubectl /usr/local/bin/
 }