-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Migrate gsutil usage to gcloud storage #13719
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -15,11 +15,11 @@ Before you can run or deploy the sample, you will need to do the following: | |||||
|
|
||||||
| 2. 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://[your-bucket-name] | ||||||
| $ gcloud storage buckets create gs://[your-bucket-name] | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The When UBLA is enabled, ACLs are disabled. This will cause the next step, To maintain the original behavior and ensure the sample works as described, you should explicitly disable UBLA during bucket creation.
Suggested change
|
||||||
|
|
||||||
| 3. 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://[your-bucket-name] | ||||||
| $ gcloud storage buckets update gs://[your-bucket-name] --predefined-default-object-acl=public-read | ||||||
|
|
||||||
| 4. Update the environment variables in ``app.yaml``. | ||||||
|
|
||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
gcloud storage buckets createcommand enables Uniform Bucket-Level Access (UBLA) by default. This is a change fromgsutil mb, which created buckets with fine-grained access controls (ACLs enabled) by default.When UBLA is enabled, ACLs are disabled. This will cause the next step,
gcloud storage buckets update ... --predefined-default-object-acl=public-read, to fail. The application code, which usesblob.make_public(), would also fail.To maintain the original behavior and ensure the sample works as described, you should explicitly disable UBLA during bucket creation.