From 4fc9a86870c77fe5fdeb8e9d5e7d908b29320041 Mon Sep 17 00:00:00 2001 From: michaelawyu Date: Thu, 7 Dec 2017 10:08:20 -0800 Subject: [PATCH 1/3] Removed the "--stage-bucket" param from README files --- functions/datastore/README.md | 12 +++--------- functions/gcs/README.md | 8 +++----- functions/imagemagick/README.md | 16 +--------------- functions/pubsub/README.md | 13 ++----------- functions/uuid/README.md | 10 +--------- 5 files changed, 10 insertions(+), 49 deletions(-) diff --git a/functions/datastore/README.md b/functions/datastore/README.md index 159d06afa8..d8610ef442 100644 --- a/functions/datastore/README.md +++ b/functions/datastore/README.md @@ -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: diff --git a/functions/gcs/README.md b/functions/gcs/README.md index 1df79f4a49..b5ea918b5b 100644 --- a/functions/gcs/README.md +++ b/functions/gcs/README.md @@ -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 @@ -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. diff --git a/functions/imagemagick/README.md b/functions/imagemagick/README.md index cf79a05324..a7adbc1ec7 100644 --- a/functions/imagemagick/README.md +++ b/functions/imagemagick/README.md @@ -19,25 +19,11 @@ 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): - - 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. - 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 alpha 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. 1. Upload an offensive image to your image 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 diff --git a/functions/pubsub/README.md b/functions/pubsub/README.md index 3cbbe55385..dd78cb0b1e 100644 --- a/functions/pubsub/README.md +++ b/functions/pubsub/README.md @@ -26,23 +26,14 @@ 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 alpha 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 alpha 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: diff --git a/functions/uuid/README.md b/functions/uuid/README.md index 4c62270131..e53b55732e 100644 --- a/functions/uuid/README.md +++ b/functions/uuid/README.md @@ -20,17 +20,9 @@ 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 alpha functions deploy uuid --trigger-http 1. Call the `uuid` function: From a9af70d6befb503984e1a506f6fbd7bd3b4af751 Mon Sep 17 00:00:00 2001 From: michaelawyu Date: Thu, 7 Dec 2017 10:13:18 -0800 Subject: [PATCH 2/3] Minor Fix --- functions/imagemagick/README.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/functions/imagemagick/README.md b/functions/imagemagick/README.md index a7adbc1ec7..3506ac742c 100644 --- a/functions/imagemagick/README.md +++ b/functions/imagemagick/README.md @@ -19,13 +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: + + gsutil mb gs://YOUR_BUCKET_NAME + + 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 - * Replace `YOUR_BUCKET_NAME` with the name of your image 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: From 63b50284c0832bf3dd09d08bcf8f076a362c122d Mon Sep 17 00:00:00 2001 From: michaelawyu Date: Thu, 7 Dec 2017 10:15:30 -0800 Subject: [PATCH 3/3] Another Minor Fix --- functions/imagemagick/README.md | 2 +- functions/pubsub/README.md | 6 +++--- functions/uuid/README.md | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/functions/imagemagick/README.md b/functions/imagemagick/README.md index 3506ac742c..17cd154c2c 100644 --- a/functions/imagemagick/README.md +++ b/functions/imagemagick/README.md @@ -27,7 +27,7 @@ Functions for your project. 1. Deploy the `blurOffensiveImages` function with a Storage trigger: - gcloud alpha functions deploy blurOffensiveImages --trigger-bucket=YOUR_BUCKET_NAME + gcloud beta functions deploy blurOffensiveImages --trigger-bucket=YOUR_BUCKET_NAME * Replace `YOUR_BUCKET_NAME` with the name of the Cloud Storage Bucket you created earlier. diff --git a/functions/pubsub/README.md b/functions/pubsub/README.md index dd78cb0b1e..67353ecc24 100644 --- a/functions/pubsub/README.md +++ b/functions/pubsub/README.md @@ -28,17 +28,17 @@ can skip this step): 1. Deploy the `publish` function with an HTTP trigger: - gcloud alpha functions deploy publish --trigger-http + 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 --trigger-topic YOUR_TOPIC_NAME + gcloud beta functions deploy subscribe --trigger-topic YOUR_TOPIC_NAME * 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. diff --git a/functions/uuid/README.md b/functions/uuid/README.md index e53b55732e..1708e7a2e1 100644 --- a/functions/uuid/README.md +++ b/functions/uuid/README.md @@ -22,11 +22,11 @@ Functions for your project. 1. Deploy the `uuid` function with an HTTP trigger: - gcloud alpha functions deploy uuid --trigger-http + 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: