Skip to content

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

Merged
merged 4 commits into from
Sep 25, 2017

Conversation

michaelawyu
Copy link
Contributor

As reported in b/37979784.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Sep 25, 2017
@@ -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
Copy link
Contributor Author

@michaelawyu michaelawyu Sep 25, 2017

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 \
Copy link
Contributor Author

@michaelawyu michaelawyu Sep 25, 2017

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.

@@ -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
Copy link
Contributor Author

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.

@theacodes theacodes merged commit b068517 into GoogleCloudPlatform:master Sep 25, 2017
# [END create_backend_service]

# [START add_backend_service]
gcloud compute backend-services add-backend $SERVICE \
--instance-group $GROUP \
--instance-zone $ZONE
--global
Copy link
Contributor Author

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
Copy link
Contributor Author

@michaelawyu michaelawyu Sep 25, 2017

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

Copy link
Contributor Author

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
Copy link
Contributor Author

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
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants