ReapEater
ReapEater

Reputation: 21

gcloud app deploy behavior differs with/without bucket specified

A colleague and I have a bucket each in the same gcloud project, and are both experiencing this behavior on our respective buckets.

When I login to gcloud in local terminal and do gcloud app deploy without specifying anything, my code deploys to my bucket. If instead I do gcloud app deploy --bucket=(my bucket) a large number of files are deposited in the bucket whose names are long strings of alphanumerics. The files I want to put are compiled JS in a build folder, and these weird files seem to be all the individual JS files from the project instead. In both cases it finds the bucket fine but the first option concerns me because I worry it's only finding my bucket due to my account's permissions or something.

I'd appreciate any details anyone has on how app deploy really works because we're very confused about this. The first option appears to work but this won't do for automation and we don't want to deploy to all the buckets by accident and break everything.

Upvotes: 0

Views: 560

Answers (1)

DazWilkin
DazWilkin

Reputation: 40136

gcloud app deploy uses Google Cloud Storage buckets to stage files and potentially create containers that are used by the App Engine service:

https://cloud.google.com/sdk/gcloud/reference/app/deploy#--bucket

If you don't specify a bucket using --bucket flag, defaults are used:

  • staging.[project-id].appspot.com
  • [us.]artifacts.[project-id].appspot.com

BLOBs are stored in a GCS bucket named:

  • [project-id].appspot.com

https://cloud.google.com/appengine/docs/standard/python/googlecloudstorageclient/setting-up-cloud-storage#activating_a_cloud_storage_bucket

NB If you also use Google Container Registry you may see additional buckets named *.artifacts.[project-id].appspot.com. As with the bucket used by App Engine these contain objects representing the container layers.

Upvotes: 2

Related Questions