diff --git a/appengine/storage/flexible/README.md b/appengine/storage/flexible/README.md index de65b02ee3..771f214895 100644 --- a/appengine/storage/flexible/README.md +++ b/appengine/storage/flexible/README.md @@ -12,13 +12,13 @@ Before you can run or deploy the sample, you will need to do the following: 1. Create a Cloud Storage Bucket. You can do this with the [Google Cloud SDK](https://cloud.google.com/sdk) with the following command: - gsutil mb gs:// + gcloud storage buckets create gs:// 1. Set the default ACL on your bucket to public read in order to serve files directly from Cloud Storage. You can do this with the [Google Cloud SDK](https://cloud.google.com/sdk) with the following command: - gsutil defacl set public-read gs:// + gcloud storage buckets update gs:// --predefined-default-object-acl=publicRead 1. Update the environment variables in `app.yaml`. diff --git a/appengine/storage/flexible_nodejs16_and_earlier/README.md b/appengine/storage/flexible_nodejs16_and_earlier/README.md index de65b02ee3..771f214895 100644 --- a/appengine/storage/flexible_nodejs16_and_earlier/README.md +++ b/appengine/storage/flexible_nodejs16_and_earlier/README.md @@ -12,13 +12,13 @@ Before you can run or deploy the sample, you will need to do the following: 1. Create a Cloud Storage Bucket. You can do this with the [Google Cloud SDK](https://cloud.google.com/sdk) with the following command: - gsutil mb gs:// + gcloud storage buckets create gs:// 1. Set the default ACL on your bucket to public read in order to serve files directly from Cloud Storage. You can do this with the [Google Cloud SDK](https://cloud.google.com/sdk) with the following command: - gsutil defacl set public-read gs:// + gcloud storage buckets update gs:// --predefined-default-object-acl=publicRead 1. Update the environment variables in `app.yaml`. diff --git a/appengine/storage/standard/README.md b/appengine/storage/standard/README.md index 784d5eebea..9e2c63c220 100644 --- a/appengine/storage/standard/README.md +++ b/appengine/storage/standard/README.md @@ -12,13 +12,13 @@ Before you can run or deploy the sample, you will need to do the following: 1. Create a Cloud Storage Bucket. You can do this with the [Google Cloud SDK](https://cloud.google.com/sdk) with the following command: - gsutil mb gs:// + gcloud storage buckets create gs:// 1. Set the default ACL on your bucket to public read in order to serve files directly from Cloud Storage. You can do this with the [Google Cloud SDK](https://cloud.google.com/sdk) with the following command: - gsutil defacl set public-read gs:// + gcloud storage buckets update --predefined-default-object-acl=publicRead gs:// 1. Update the environment variables in `app.yaml`. diff --git a/eventarc/audit-storage/README.md b/eventarc/audit-storage/README.md index 1c5444ae30..ba95b13305 100644 --- a/eventarc/audit-storage/README.md +++ b/eventarc/audit-storage/README.md @@ -35,8 +35,8 @@ gcloud run deploy $MY_RUN_SERVICE \ Create a _single region_ Cloud Storage bucket: ```sh -gsutil mb -p $(gcloud config get-value project) \ - -l us-central1 \ +gcloud storage buckets create --project=$(gcloud config get-value project) \ + --location=us-central1 \ gs://"$MY_GCS_BUCKET" ``` @@ -56,7 +56,7 @@ gcloud beta eventarc triggers create my-gcs-trigger \ Test your Cloud Run service by creating a GCS event: ```sh -gsutil defstorageclass set NEARLINE gs://"$MY_GCS_BUCKET" +gcloud storage buckets update --default-storage-class=NEARLINE gs://"$MY_GCS_BUCKET" ``` Observe the Cloud Run service printing upon receiving an event in Cloud Logging: diff --git a/functions/imagemagick/README.md b/functions/imagemagick/README.md index cb086b55ee..6f2962f7ff 100644 --- a/functions/imagemagick/README.md +++ b/functions/imagemagick/README.md @@ -21,13 +21,13 @@ Functions for your project. 1. Create a Cloud Storage Bucket: - gsutil mb gs://YOUR_INPUT_BUCKET_NAME + gcloud storage buckets create gs://YOUR_INPUT_BUCKET_NAME This storage bucket is used to upload images for the function to check. 1. Create a second Cloud Storage Bucket: - gsutil mb gs://YOUR_OUTPUT_BUCKET_NAME + gcloud storage buckets create gs://YOUR_OUTPUT_BUCKET_NAME This second storage bucket is used to store blurred images. (Un-blurred images will not be saved to this bucket.) diff --git a/functions/v2/imagemagick/README.md b/functions/v2/imagemagick/README.md index cb086b55ee..6f2962f7ff 100644 --- a/functions/v2/imagemagick/README.md +++ b/functions/v2/imagemagick/README.md @@ -21,13 +21,13 @@ Functions for your project. 1. Create a Cloud Storage Bucket: - gsutil mb gs://YOUR_INPUT_BUCKET_NAME + gcloud storage buckets create gs://YOUR_INPUT_BUCKET_NAME This storage bucket is used to upload images for the function to check. 1. Create a second Cloud Storage Bucket: - gsutil mb gs://YOUR_OUTPUT_BUCKET_NAME + gcloud storage buckets create gs://YOUR_OUTPUT_BUCKET_NAME This second storage bucket is used to store blurred images. (Un-blurred images will not be saved to this bucket.) diff --git a/memorystore/redis/gce_deployment/deploy.sh b/memorystore/redis/gce_deployment/deploy.sh index 474181d345..3897d84631 100644 --- a/memorystore/redis/gce_deployment/deploy.sh +++ b/memorystore/redis/gce_deployment/deploy.sh @@ -36,7 +36,7 @@ fi #Upload the tar to GCS tar -cvf app.tar -C .. package.json server.js -gsutil cp app.tar gs://"$GCS_BUCKET_NAME"/gce/ +gcloud storage cp app.tar gs://"$GCS_BUCKET_NAME"/gce/ # Create an instance gcloud compute instances create my-instance \ diff --git a/memorystore/redis/gce_deployment/startup-script.sh b/memorystore/redis/gce_deployment/startup-script.sh index a6462b21dd..c25f08e323 100644 --- a/memorystore/redis/gce_deployment/startup-script.sh +++ b/memorystore/redis/gce_deployment/startup-script.sh @@ -34,7 +34,7 @@ apt-get install -yq ca-certificates supervisor nodejs build-essential curl -s "https://storage.googleapis.com/signals-agents/logging/google-fluentd-install.sh" | bash service google-fluentd restart & -gsutil cp gs://"$GCS_BUCKET_NAME"/gce/app.tar /app.tar +gcloud storage cp gs://"$GCS_BUCKET_NAME"/gce/app.tar /app.tar mkdir -p /app tar -x -f /app.tar -C /app cd /app diff --git a/run/image-processing/test/e2e_test_cleanup.yaml b/run/image-processing/test/e2e_test_cleanup.yaml index a4f0d3f8d7..78e71aa8c4 100644 --- a/run/image-processing/test/e2e_test_cleanup.yaml +++ b/run/image-processing/test/e2e_test_cleanup.yaml @@ -24,13 +24,13 @@ steps: "gcloud pubsub subscriptions delete ${_SERVICE}_sub" - id: 'Delete GCS buckets' - name: 'gcr.io/cloud-builders/gsutil:latest' + name: 'gcr.io/cloud-builders/gcloud:latest' entrypoint: /bin/bash args: - '-c' - | - ./test/retry.sh "gsutil rm -r gs://${_SERVICE}_input" - ./test/retry.sh "gsutil rm -r gs://${_SERVICE}_output" + ./test/retry.sh "gcloud storage rm --recursive gs://${_SERVICE}_input" + ./test/retry.sh "gcloud storage rm --recursive gs://${_SERVICE}_output" substitutions: _SERVICE: image-processing diff --git a/run/image-processing/test/e2e_test_setup.yaml b/run/image-processing/test/e2e_test_setup.yaml index 736f812eb9..cabe08794d 100644 --- a/run/image-processing/test/e2e_test_setup.yaml +++ b/run/image-processing/test/e2e_test_setup.yaml @@ -30,24 +30,24 @@ steps: --update-env-vars=BLURRED_BUCKET_NAME=${_SERVICE}_output" - id: 'Create GCS buckets with Pub/Sub notification' - name: 'gcr.io/cloud-builders/gsutil:latest' + name: 'gcr.io/cloud-builders/gcloud:latest' entrypoint: /bin/bash args: - '-c' - | # Create Buckets - ./test/retry.sh "gsutil mb -p ${PROJECT_ID} gs://${_SERVICE}_input" - ./test/retry.sh "gsutil mb -p ${PROJECT_ID} gs://${_SERVICE}_output" + ./test/retry.sh "gcloud storage buckets create --project=${PROJECT_ID} gs://${_SERVICE}_input" + ./test/retry.sh "gcloud storage buckets create --project=${PROJECT_ID} gs://${_SERVICE}_output" # Create Pub/Sub notification - ./test/retry.sh "gsutil notification create -t ${_SERVICE} -f json gs://${_SERVICE}_input" + ./test/retry.sh "gcloud storage buckets notifications create --topic=${_SERVICE} --payload-format=json gs://${_SERVICE}_input" ./test/retry.sh "gcloud pubsub subscriptions create ${_SERVICE}_sub \ --topic ${_SERVICE} \ --push-endpoint $(gcloud run services describe ${_SERVICE} --project=${PROJECT_ID} --platform=${_PLATFORM} --region=${_REGION} --format='value(status.url)') \ --push-auth-service-account cloud-run-invoker@${PROJECT_ID}.iam.gserviceaccount.com" sleep 5 # Upload photo - ./test/retry.sh "gsutil cp test/zombie.jpg gs://${_SERVICE}_input" + ./test/retry.sh "gcloud storage cp test/zombie.jpg gs://${_SERVICE}_input" sleep 30