if gcloud compute ssh --ssh-flag="-o LogLevel=quiet"--ssh-flag="-o ConnectTimeout=30"--project"${PROJECT}"--zone="${ZONE}""${node}"--command"echo test > /dev/null";then
if gcloud compute ssh --ssh-flag="-o LogLevel=quiet"--ssh-flag="-o ConnectTimeout=30"--project"${PROJECT}"--zone="${ZONE}""${node}"--command"echo test > /dev/null";then
if gcloud compute ssh --ssh-flag="-o LogLevel=quiet"--ssh-flag="-o ConnectTimeout=30"--project"${PROJECT}"--zone="${ZONE}""${node}"--command"echo test > /dev/null";then
if gcloud compute ssh --ssh-flag="-o LogLevel=quiet"--ssh-flag="-o ConnectTimeout=30"--project"${PROJECT}"--zone="${ZONE}""${node}"--command"echo test > /dev/null";then
#This script assumes the cloud provider is able to create a load balancer. If this not the case, you may want to check out other ways to make the frontend service accessible from outside (https://github.com/kubernetes/kubernetes/blob/master/docs/services.md#external-services)
#This script assumes the cloud provider is able to create a load balancer. If this not the case, you may want to check out other ways to make the frontend service accessible from outside (https://github.com/kubernetes/kubernetes/blob/master/docs/services.md#external-services)
function getIP {
function getIP {
echo"Waiting up to 1 min for a public IP to be assigned by the cloud provider..."
echo"Waiting up to 1 min for a public IP to be assigned by the cloud provider..."
for i in`seq 1 20`;
for i in{1..20};
do
do
PUBLIC_IP=$($kubectl get services/frontend --namespace=$NS-o template --template="{{range .status.loadBalancer.ingress}}{{.ip}}{{end}}")
PUBLIC_IP=$($kubectl get services/frontend --namespace=$NS-o template --template="{{range .status.loadBalancer.ingress}}{{.ip}}{{end}}")
if[-n"$PUBLIC_IP"];then
if[-n"$PUBLIC_IP"];then
...
@@ -249,7 +249,7 @@ function pollfor {
...
@@ -249,7 +249,7 @@ function pollfor {
pass_http=0
pass_http=0
### Test HTTP Server comes up.
### Test HTTP Server comes up.
for i in`seq 1 150`;
for i in{1..150};
do
do
### Just testing that the front end comes up. Not sure how to test total entries etc... (yet)
### Just testing that the front end comes up. Not sure how to test total entries etc... (yet)
echo"Trying curl ... $PUBLIC_IP:3000 , attempt $i . expect a few failures while pulling images... "
echo"Trying curl ... $PUBLIC_IP:3000 , attempt $i . expect a few failures while pulling images... "