-
Notifications
You must be signed in to change notification settings - Fork 588
Fixing Running the Python Bookshelf on Compute Engine Sample Code #141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -20,7 +20,8 @@ ZONE=us-central1-f | |||
GROUP=frontend-group | |||
TEMPLATE=$GROUP-tmpl | |||
MACHINE_TYPE=f1-micro | |||
IMAGE=debian-8 | |||
IMAGE_FAMILY=debian-8 | |||
IMAGE_PROJECT=debian-cloud |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Param -image is deprecated. Updated to use -image-family and -image-project.
@@ -41,7 +42,8 @@ SERVICE=frontend-web-service | |||
|
|||
# [START create_template] | |||
gcloud compute instance-templates create $TEMPLATE \ | |||
--image $IMAGE \ | |||
--image-family $IMAGE_FAMILY \ | |||
--image-project $IMAGE_PROJECT \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Param -image is deprecated. Updated to use -image-family and -image-project.
7-gce/gce/deploy.sh
Outdated
@@ -98,12 +100,14 @@ gcloud compute http-health-checks create ah-health-check \ | |||
# [START create_backend_service] | |||
gcloud compute backend-services create $SERVICE \ | |||
--http-health-checks ah-health-check | |||
--global |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Param --global is specified so that the user will not be asked to choose a region from 10+ choices when running the script.
7-gce/gce/deploy.sh
Outdated
# [END create_backend_service] | ||
|
||
# [START add_backend_service] | ||
gcloud compute backend-services add-backend $SERVICE \ | ||
--instance-group $GROUP \ | ||
--instance-zone $ZONE | ||
--global |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Param --global is specified so that the user will not be asked to choose a region from 10+ choices when running the script.
@@ -125,7 +129,7 @@ gcloud compute target-http-proxies create $SERVICE-proxy \ | |||
gcloud compute forwarding-rules create $SERVICE-http-rule \ | |||
--global \ | |||
--target-http-proxy $SERVICE-proxy \ | |||
--port-range 80 | |||
--ports=80 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Param --port-range is deprecated. Updated to use --ports.
--description "Allow port 8080 access to http-server" | ||
--description "Allow port 8080 access to http-server" | ||
fi | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Old script may fail if user has created a default-allow-http-8080 firewall rule in previous steps of the tutorial. Added a new command to create the firewall rule only when the rule has not already existed.
@@ -42,7 +42,7 @@ pip install --upgrade pip virtualenv | |||
# git requires $HOME and it's not set during the startup script. | |||
export HOME=/root | |||
git config --global credential.helper gcloud.sh | |||
git clone https://source.developers.google.com/p/$PROJECTID /opt/app | |||
git clone https://source.developers.google.com/p/$PROJECTID/r/[YOUR_REPO_NAME] /opt/app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated to use the current format of Cloud Repo addresses.
|
||
gcloud compute firewall-rules delete default-allow-http-8080 | ||
gcloud compute firewall-rules delete default-allow-http-8080 --quiet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Param --quiet is specified so that user will not be interrupted to confirm on each of the operations when running the script.
As reported in b/37979784.