Skip to content

Commit

Permalink
Removed --stage-bucket param from README files (#532)
Browse files Browse the repository at this point in the history
* Removed the "--stage-bucket" param from README files

* Minor Fix

* Another Minor Fix
  • Loading branch information
michaelawyu authored and Ace Nassri committed Dec 7, 2017
1 parent 52c0252 commit f1e12d1
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 49 deletions.
12 changes: 3 additions & 9 deletions functions/datastore/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,21 @@ Functions for your project.
git clone https://github.com/GoogleCloudPlatform/nodejs-docs-samples.git
cd nodejs-docs-samples/functions/datastore

1. Create a Cloud Storage Bucket to stage our deployment:

gsutil mb gs://YOUR_BUCKET_NAME

* Replace `YOUR_BUCKET_NAME` here and in subsequent commands with the name of your Cloud Storage Bucket.

1. Ensure the Cloud Datastore API is enabled:

[Click here to enable the Cloud Datastore API](https://console.cloud.google.com/flows/enableapi?apiid=datastore.googleapis.com&redirect=https://github.com/GoogleCloudPlatform/nodejs-docs-samples/tree/master/functions/datastore)

1. Deploy the "get" function with an HTTP trigger:

gcloud beta functions deploy get --stage-bucket YOUR_BUCKET_NAME --trigger-http
gcloud beta functions deploy get --trigger-http

1. Deploy the "set" function with an HTTP trigger:

gcloud beta functions deploy set --stage-bucket YOUR_BUCKET_NAME --trigger-http
gcloud beta functions deploy set --trigger-http

1. Deploy the "del" function with an HTTP trigger:

gcloud beta functions deploy del --stage-bucket YOUR_BUCKET_NAME --trigger-http
gcloud beta functions deploy del --trigger-http

1. Call the "set" function to create a new entity:

Expand Down
8 changes: 3 additions & 5 deletions functions/gcs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Functions for your project.
git clone https://github.com/GoogleCloudPlatform/nodejs-docs-samples.git
cd nodejs-docs-samples/functions/gcs

1. Create a Cloud Storage Bucket to stage our deployment:
1. Create a Cloud Storage Bucket:

gsutil mb gs://YOUR_BUCKET_NAME

Expand All @@ -32,13 +32,11 @@ Functions for your project.

1. Deploy the "wordCount" function with an HTTP trigger:

gcloud alpha functions deploy wordCount --stage-bucket YOUR_BUCKET_NAME --trigger-http

* Replace `YOUR_BUCKET_NAME` with the name of your Cloud Storage Bucket.
gcloud beta functions deploy wordCount --trigger-http

1. Call the "wordCount" function using the sample file:

gcloud alpha functions call wordCount --data '{"bucket":"YOUR_BUCKET_NAME","file":"sample.txt"}'
gcloud beta functions call wordCount --data '{"bucket":"YOUR_BUCKET_NAME","file":"sample.txt"}'

* Replace `YOUR_BUCKET_NAME` with the name of your Cloud Storage Bucket.

Expand Down
18 changes: 5 additions & 13 deletions functions/imagemagick/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,19 @@ Functions for your project.
git clone https://github.com/GoogleCloudPlatform/nodejs-docs-samples.git
cd nodejs-docs-samples/functions/imagemagick

1. Create a Cloud Storage bucket for storing images (if you already have one you
want to use, you can skip this step):
1. Create a Cloud Storage Bucket:

gsutil mb gs://YOUR_BUCKET_NAME

* Replace `YOUR_BUCKET_NAME` with the name of your image Bucket.

1. Create a Cloud Storage Bucket to stage our deployment:

gsutil mb gs://YOUR_STAGE_BUCKET_NAME

* Replace `YOUR_STAGE_BUCKET_NAME` with the name of your Cloud Storage Bucket.
This storage bucket is used to upload images for the function to check.

1. Deploy the `blurOffensiveImages` function with a Storage trigger:

gcloud alpha functions deploy blurOffensiveImages --trigger-bucket=YOUR_BUCKET_NAME --stage-bucket=YOUR_STAGE_BUCKET_NAME
gcloud beta functions deploy blurOffensiveImages --trigger-bucket=YOUR_BUCKET_NAME

* Replace `YOUR_BUCKET_NAME` with the name of your image Cloud Storage Bucket.
* Replace `YOUR_STAGE_BUCKET_NAME` with the name of your Cloud Storage Bucket.
* Replace `YOUR_BUCKET_NAME` with the name of the Cloud Storage Bucket you created earlier.

1. Upload an offensive image to your image Storage bucket, such as this image of
1. Upload an offensive image to the Storage bucket, such as this image of
a flesh-eating zombie: https://cdn.pixabay.com/photo/2015/09/21/14/24/zombie-949916_1280.jpg

1. Check the logs for the `blurOffensiveImages` function:
Expand Down
15 changes: 3 additions & 12 deletions functions/pubsub/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,28 +26,19 @@ can skip this step):

* Replace `YOUR_TOPIC_NAME` with the name of your Pub/Sub Topic.

1. Create a Cloud Storage Bucket to stage our deployment:

gsutil mb gs://YOUR_BUCKET_NAME

* Replace `YOUR_BUCKET_NAME` with the name of your Cloud Storage Bucket.

1. Deploy the `publish` function with an HTTP trigger:

gcloud alpha functions deploy publish --stage-bucket YOUR_BUCKET_NAME --trigger-http

* Replace `YOUR_BUCKET_NAME` with the name of your Cloud Storage Bucket.
gcloud beta functions deploy publish --trigger-http

1. Deploy the `subscribe` function with the Pub/Sub topic as a trigger:

gcloud alpha functions deploy subscribe --stage-bucket YOUR_BUCKET_NAME --trigger-topic YOUR_TOPIC_NAME
gcloud beta functions deploy subscribe --trigger-topic YOUR_TOPIC_NAME

* Replace `YOUR_BUCKET_NAME` with the name of your Cloud Storage Bucket.
* Replace `YOUR_TOPIC_NAME` with the name of your Pub/Sub Topic.

1. Call the `publish` function:

gcloud alpha functions call publish --data '{"topic":"YOUR_TOPIC_NAME","message":"Hello World!"}'
gcloud beta functions call publish --data '{"topic":"YOUR_TOPIC_NAME","message":"Hello World!"}'

* Replace `YOUR_TOPIC_NAME` with the name of your Pub/Sub Topic.

Expand Down
12 changes: 2 additions & 10 deletions functions/uuid/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,13 @@ Functions for your project.
git clone https://github.com/GoogleCloudPlatform/nodejs-docs-samples.git
cd nodejs-docs-samples/functions/uuid

1. Create a Cloud Storage Bucket to stage our deployment:

gsutil mb gs://[YOUR_BUCKET_NAME]

* Replace `[YOUR_BUCKET_NAME]` with the name of your Cloud Storage Bucket.

1. Deploy the `uuid` function with an HTTP trigger:

gcloud alpha functions deploy uuid --bucket [YOUR_BUCKET_NAME] --trigger-http

* Replace `[YOUR_BUCKET_NAME]` with the name of your Cloud Storage Bucket.
gcloud beta functions deploy uuid --trigger-http

1. Call the `uuid` function:

gcloud alpha functions call uuid
gcloud beta functions call uuid

You should see something like this in your console:

Expand Down

0 comments on commit f1e12d1

Please sign in to comment.