gcloud

gcloud jobs submit prediction 'can't decode json' with --data-format=TF_RECORD

旧街凉风 提交于 2019-12-10 21:49:45
问题 I pushed up some test data to gcloud for prediction as a binary tfrecord-file. Running my script I got the error ('No JSON object could be decoded', 162) . What do you think I am doing wrong? To push a prediction job to gcloud, i use this script: REGION=us-east1 MODEL_NAME=mymodel VERSION=v_hopt_22 INPUT_PATH=gs://mydb/test-data.tfr OUTPUT_PATH=gs://mydb/prediction.tfr JOB_NAME=pred_${MODEL_NAME}_${VERSION}_b args=" --model "$MODEL_NAME args+=" --version "$VERSION args+=" --data-format=TF

How to make a Rails app on Google App Engine redirect to HTTPS

让人想犯罪 __ 提交于 2019-12-10 20:01:32
问题 I have successfully deployed my Rails app to the Google App Engine (my domain is also hosted by Google), and now I would like to redirect anyone going to my http:// address to my https:// address. I have found the documentation to do so for a Python app here using the handlers element in the app.yaml file, and have attempted to replicate it in my own. My app.yaml file now contains this: handlers: - url: /.* script: config/application.rb secure: always redirect_http_response_code: 301 However

What causes Google gcloud error message “ERROR: (gcloud) Invalid choice: 'get'. Did you mean 'meta'?” mean?

匆匆过客 提交于 2019-12-10 19:56:52
问题 When I try to git push to Google cloud repository, I get the above message. It then asks me to enter my credentials. After that I get the following error: Valid choices are [auth, components, compute, config, container, deployment-manager, dns, docker, feedback, help, info, init, meta, preview, projects, source, sql, topic, version]. fatal: Authentication failed for 'https://source.developers.google.com/p/projectname/' Is there anything am missing? 回答1: As git config --list shows in your

How to use Stackdriver logging on Cloud Run

混江龙づ霸主 提交于 2019-12-10 19:25:08
问题 I'm trying to get stackdriver logging working for a simple Go app running in Google Cloud Run (fully managed). I've created simplest possible demo app based on "official" stackdriver golang example Cloud Run docs states that no additional actions should be performed to write stackdriver logs My service uses default service account I'm using Go 1.13 to compile code (Dockerfile is copied from Cloud Run example "as-is") I've tried to deploy it to different regions, with no success When running

`gcloud source repos clone` with service account is not working

北慕城南 提交于 2019-12-10 17:53:52
问题 Deploying my personal project to GCE(Google Compute Engine), I tried to clone a git repo in Google Cloud Platform. But it did not work. I guess git repo in GCP uses code.google.com internally, and that is not compatible with service accounts. It prints Cloning into '/home/...'... fatal: remote error: Invalid username/password. You may need to use your generated googlecode.com password; see https://code.google.com/hosting/settings ERROR: (gcloud.source.repos.clone) Command '['git', 'clone',

How can I find out how much space is used by my container images from the Google Container Registry

…衆ロ難τιáo~ 提交于 2019-12-10 17:04:42
问题 I have pushed container images using gcloud docker push to the Google Container Registry. Two questions: How do I see how much space all my images use? (I can see individual images but I want a total in order not to navigate to all and make a sum) 回答1: Good questions! All your Docker images are stored in a Google Cloud Storage bucket called artifacts.<PROJECT-ID>.appspot.com (Replace <PROJECT-ID> with your project's ID) To find the total space, run gsutil du gs://artifacts.<PROJECT-ID>

How to add/update the port of a backend in a Backend Service of an HTTP Load Balancer in GCP using gcloud CLI

风流意气都作罢 提交于 2019-12-10 16:42:38
问题 I can create a Backen Service using the following commands: # health check gcloud compute http-health-checks create "$HEALTH_CHECK_NAME" # backend service gcloud compute backend-services create "$BACKEND_SERVICE_NAME" --http-health-check "$HEALTH_CHECK_NAME" --port-name "http" --timeout "30" gcloud compute backend-services add-backend "$BACKEND_SERVICE_NAME" --instance-group "$GROUP_NAME" --balancing-mode "UTILIZATION" --capacity-scaler "1" --max-utilization "1" But I have to add also the

Google Cloud Pub/Sub Retry Count

帅比萌擦擦* 提交于 2019-12-10 15:31:50
问题 We are moving from an unstable messaging queue service to Google's Pub Sub in NodeJS. It seems to work well but we would like to include error handling. We would like to limit the number of retries for a particular message, say 10 times in our test environment and 100 times in production. Now if a message fails 10 times (in test), instead of it sitting in our queue and continue to be processed and fail for 7 days we would like to move it to a separate error queue and send us an email. We

Google Cloud appcfg.cmd can't deploy because can't find appengine-web.xml

自作多情 提交于 2019-12-10 12:24:02
问题 I'm just trying to get the basic hello world project built and deployed by following the instructions on https://console.developers.google.com/start/appengine. I got through all the steps but the last one, Step 6, where I got this error: D:\google-app-engine\appengine-try-java>appcfg.cmd -A aqueous-flames-561 update target\appengine-try-java Reading application configuration data... Apr 24, 2014 4:27:39 PM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml SEVERE:

How can I exclude a file from deploy in gcloud?

主宰稳场 提交于 2019-12-10 02:43:16
问题 I have built a Node.js app and what I do to deploy is cd into my project's directory and run gcloud preview app deploy . This works, but in the files I also have a JSON file which acts like the database for my application, which I do not want updated on the site when I deploy. I cannot seem to find any way of doing this. If it's not possible, being able to see the JSON file remotely and copy its data to the local one and then deploy everything would do me too, but I cannot seem to be able to