From f1e12d1433689c89179d0ad110346c99d6106c48 Mon Sep 17 00:00:00 2001 From: michaelawyu Date: Thu, 7 Dec 2017 13:37:06 -0800 Subject: [PATCH] Removed --stage-bucket param from README files (#532) * Removed the "--stage-bucket" param from README files * Minor Fix * Another Minor Fix --- functions/datastore/README.md | 12 +++--------- functions/gcs/README.md | 8 +++----- functions/imagemagick/README.md | 18 +++++------------- functions/pubsub/README.md | 15 +++------------ functions/uuid/README.md | 12 ++---------- 5 files changed, 16 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..17cd154c2c 100644 --- a/functions/imagemagick/README.md +++ b/functions/imagemagick/README.md @@ -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: diff --git a/functions/pubsub/README.md b/functions/pubsub/README.md index 3cbbe55385..67353ecc24 100644 --- a/functions/pubsub/README.md +++ b/functions/pubsub/README.md @@ -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. diff --git a/functions/uuid/README.md b/functions/uuid/README.md index 4c62270131..1708e7a2e1 100644 --- a/functions/uuid/README.md +++ b/functions/uuid/README.md @@ -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: