gcloud

How to configure multiple gcloud projects

走远了吗. 提交于 2021-02-11 05:08:33
问题 On my work laptop, i have gcloud configured with our prod projects. when i do gcloud config configurations list , I get only one row in result, which is ACTIVE and it's my work-project. Now for some personal testing, I have created a separate project which is associated with my personal email id. How would i configure/connect this project with my gcloud cli? I have tried gcloud auth application-default login which opened the browser, i signed in using personal email id. The webpage showed me

gcloud app deploy with private docker images

懵懂的女人 提交于 2021-02-10 19:57:28
问题 I have a project that has a Dockerfile inside and inside that Dockerfile is a base private image. When I run gcloud app deploy it will return an error with the below message Error response from daemon: pull access denied for dean, repository does not exist or may require 'docker login' I tried docker login before running gcloud app deploy but it did not work 回答1: The easiest way to get this rolling is to push the private image up to Google Container Registry. The per-project registry is

App Engine Service Deployment Stopped Working on Known Good Version

心不动则不痛 提交于 2021-02-09 12:10:36
问题 We have a service hosted in gcloud that is not actively developed and we have not deployed for a few weeks. On deployment we now get the error ERROR: gcloud crashed (TypeError): unorderable types: NoneType() > int() and the deployment fails. We get the exact same results even if we run the last deployed version through CI. This is my app.yaml runtime: aspnetcore env: flex threadsafe: true service: myapp manual_scaling: instances: 1 env_variables: service_name: myapp AWS_ACCESS_KEY_ID: {{AWS

App Engine Service Deployment Stopped Working on Known Good Version

喜你入骨 提交于 2021-02-09 11:59:12
问题 We have a service hosted in gcloud that is not actively developed and we have not deployed for a few weeks. On deployment we now get the error ERROR: gcloud crashed (TypeError): unorderable types: NoneType() > int() and the deployment fails. We get the exact same results even if we run the last deployed version through CI. This is my app.yaml runtime: aspnetcore env: flex threadsafe: true service: myapp manual_scaling: instances: 1 env_variables: service_name: myapp AWS_ACCESS_KEY_ID: {{AWS

View [welcome] not found

十年热恋 提交于 2021-02-08 08:01:08
问题 I deployed my Laravel app (with Cloud SQL integration) onto Google App Engine with the following settings. app.yaml runtime: php73 env_variables: LOG_CHANNEL: stackdriver APP_LOG: errorlog APP_KEY: [APP KEY] APP_URL: "http://example.com/" APP_STORAGE: /tmp VIEW_COMPILED_PATH: /tmp CACHE_DRIVER: database SESSION_DRIVER: database DB_DATABASE: cbt-sql DB_USERNAME: root DB_PASSWORD: [PASSWORD] DB_SOCKET: "[SOCKET DETAILS]" I ran the usual config/cache/view/route clear commands. Using gcloud beta

View [welcome] not found

会有一股神秘感。 提交于 2021-02-08 08:01:07
问题 I deployed my Laravel app (with Cloud SQL integration) onto Google App Engine with the following settings. app.yaml runtime: php73 env_variables: LOG_CHANNEL: stackdriver APP_LOG: errorlog APP_KEY: [APP KEY] APP_URL: "http://example.com/" APP_STORAGE: /tmp VIEW_COMPILED_PATH: /tmp CACHE_DRIVER: database SESSION_DRIVER: database DB_DATABASE: cbt-sql DB_USERNAME: root DB_PASSWORD: [PASSWORD] DB_SOCKET: "[SOCKET DETAILS]" I ran the usual config/cache/view/route clear commands. Using gcloud beta

Kubernetes - Find out service ip range CIDR programatically

不想你离开。 提交于 2021-02-08 05:29:20
问题 I need a way to get service cluster ip range (as CIDR) that works accross all Kubernetes clusters. I tried the following, which works fine for clusters created with kubeadm as it greps arguments of apiserver pod: $ kubectl cluster-info dump | grep service-cluster-ip-range "--service-cluster-ip-range=10.96.0.0/12", This does not work on all Kubernetes clusters, i.e. gcloud So the question is, what is the best way to get service ip range programatically? 回答1: I don't think there is a way to

Google cloud SDK code to execute via cron

試著忘記壹切 提交于 2021-02-07 21:02:27
问题 I am trying to implement an automated code to shut down and start VM Instances in my Google Cloud account via Crontab. The OS is Ubuntu 12 lts and is installed with Google service account so it can handle read/write on my Google cloud account. My actual code is in this file /home/ubu12lts/cronfiles/resetvm.sh #!/bin/bash echo Y | gcloud compute instances stop my-vm-name --zone us-central1-a sleep 120s gcloud compute instances start my-vm-name --zone us-central1-a echo "completed" When I call

Google cloud SDK code to execute via cron

不问归期 提交于 2021-02-07 20:57:20
问题 I am trying to implement an automated code to shut down and start VM Instances in my Google Cloud account via Crontab. The OS is Ubuntu 12 lts and is installed with Google service account so it can handle read/write on my Google cloud account. My actual code is in this file /home/ubu12lts/cronfiles/resetvm.sh #!/bin/bash echo Y | gcloud compute instances stop my-vm-name --zone us-central1-a sleep 120s gcloud compute instances start my-vm-name --zone us-central1-a echo "completed" When I call

Clone Google Source Repository without gcloud

可紊 提交于 2021-02-07 08:12:53
问题 I am currently cloning the git repository present in Google Cloud Source repository using gcloud source repos clone sample_repo --project=sample_project Can I clone git repository present in Google Cloud Source Repository without using gcloud? Like, git clone https://source.developers.google.com/p/sample_project/r/sample_repo 回答1: gcloud does not do much when cloning, it only sets up credentials. In fact if you run $ gcloud source repos clone default --dry-run command (with --dry-run flag)