gcloud

How to fix “`The --custom_entrypoint flag must be set for custom runtimes`”?

核能气质少年 提交于 2019-11-30 03:47:38
问题 I get this error on appengine when I run gcloud preview app run app.yaml : The --custom_entrypoint flag must be set for custom runtimes My app.yaml looks like: version: 0-1-1 runtime: custom vm: true api_version: 1 manual_scaling: instances: 1 handlers: - url: .* script: dynamic My dockerfile is just: FROM google/nodejs-runtime I reinstalled gcloud to get the latest version, did something change in the yaml config for managed VMs? This makes it impossible for me to test my app. 回答1: There

gcloud command not found - while installing Google Cloud SDK

自作多情 提交于 2019-11-29 20:25:00
I am on a mac and am trying to install the Google Cloud SDK (including the gcloud command line utility) using this command in terminal curl https://sdk.cloud.google.com | bash as seen at https://cloud.google.com/sdk/ It got all the way to the end and finished but even after I restarted my shell, the gcloud command still says it's not found. Why isn't this installation working? So below is my previous fix for this problem, but it turns out it isn't permanent. It works but every time you restart Terminal, you'd have to do the same thing which isn't practical. So that is why I suggest you delete

gcloud: The user does not have access to service account “default”

拈花ヽ惹草 提交于 2019-11-29 19:52:59
问题 I attempting to use an activated service account scoped to create and delete gcloud container clusters (k8s clusters), using the following commands: gcloud config configurations create my-svc-account \ --no-activate \ --project myProject gcloud auth activate-service-account my-svc-account@my-project.iam.gserviceaccount.com \ --key-file=/path/to/keyfile.json \ --configuration my-svc-account gcloud container clusters create a-new-cluster \ --configuration my-svc-account \ --project= my-project

How to stop creating extra instances when using google managed vms?

扶醉桌前 提交于 2019-11-29 16:02:54
Every time I deploy to Google's Managed VM service, the console automatically creates a duplicated instance. I am up to 15 instances running in parallel. I even tried using the command: gcloud preview app deploy "...\app.yaml" --set-default I tried doing some research and it looks like even deleting these duplicated instances can be a pain . Thoughts on how to stop this duplication? You can deploy over the same version each time: gcloud preview app deploy "...\app.yaml" --set-default --version=version-name This will stop creating VMs. 来源: https://stackoverflow.com/questions/31484826/how-to

Google Container Registry access denied when pushing docker container

余生颓废 提交于 2019-11-29 09:30:15
I try to push my docker container to the google container registry, using this tutorial , but when I run gcloud docker push b.gcr.io/my-bucket/image-name I get the error : The push refers to a repository [b.gcr.io/my-bucket/my-image] (len: 1) Sending image list Error: Status 403 trying to push repository my-bucket/my-image: "Access denied." I couldn't find any more explanation (no -D, --debug, --verbose arguments were recognized), gcloud auth list and docker info tell me I'm connected to both services. Anything I'm missing ? When you create you Google Cloud VM instance, make sure it has the

What does google cloud ml-engine do when a Json request contains “_bytes” or “b64”?

血红的双手。 提交于 2019-11-29 06:53:41
The google cloud documentation (see Binary data in prediction input) states: Your encoded string must be formatted as a JSON object with a single key named b64. The following Python example encodes a buffer of raw JPEG data using the base64 library to make an instance: {"image_bytes":{"b64": base64.b64encode(jpeg_data)}} In your TensorFlow model code, you must name the aliases for your input and output tensors so that they end with '_bytes'. I would like to understand more about how this process works on the google cloud side. Is the ml-engine automatically decoding any content after the "b64"

How do I list the roles associated with a gcp service account?

拜拜、爱过 提交于 2019-11-29 05:47:29
In the google cloud gui console I went to "IAM & admin" > "Service accounts" and created a service account named "my-service-account" with the viewer role. I then ran this command: gcloud iam service-accounts get-iam-policy my-service-account@mydomain.iam.gserviceaccount.com and saw this output: etag: ACAB According to the docs this means this service account has no policy associated with it. So I assigned it a "role" which is not included in its "policy". How do I list the roles associated with a service account? In Google Cloud you have IAM policies for projects and for service accounts.

Unable to start App Engine application after updating it via Google Cloud SDK

让人想犯罪 __ 提交于 2019-11-29 03:32:43
Recently, I have updated Google App Engine from 1.9.17 to 1.9.18 via Google Cloud SDK by using command 'gcloud components update' in Windows 7 64 bit. After that I wasn't able to start any project using the App Engine launcher. Getting this error: Traceback (most recent call last): File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\dev_appserver.py", line 83, in <module> _run_file(__file__, globals()) File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\dev_appserver.py", line 79, in _run_file execfile(_PATHS.script_file(script_name

Install Google Cloud components error from gcloud command

六眼飞鱼酱① 提交于 2019-11-29 02:12:24
问题 I am trying to install several GCP components from gcloud command line and get the same error always: $ gcloud components list Your current Cloud SDK version is: 146.0.0 The latest available version is: 146.0.0 ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │ Components │ ├───────────────┬──────────────────────────────────────────────────────┬──────────────────────────┬───────────┤ │ Status │ Name │ ID │ Size │ ├───────────────┼

Get service account auth token without gcloud?

笑着哭i 提交于 2019-11-29 01:30:38
Is it possible to get an authorization bearer token for a Google Cloud service account without the use of gcloud ? That is, I would like to make an HTTP request (presumably signed in some way by my JSON key file) that would provide me the equivalent of gcloud auth application-default print-access-token This request would be made on my own server, where I may not wish to install gcloud and where I do not have access to any internal server metadata that might provide this (e.g., as is the case with Compute Engine). Is there some oauth endpoint that provides something like this? Alternately, is