google-compute-engine

google cloud compute engine /etc/hosts

喜你入骨 提交于 2021-02-10 08:42:37
问题 In my google cloud compute engine, the /etc/hosts file is overwritten automatically after a certain time. Please suggest to me why it is happening and how to prevent it. Initially the entries are as below: 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 10.128.0.2 instance-1.c.concrete-craft-123421.internal instance-1 # Added by Google and I have changed it to as below to start cloudera

What is the rate limit for GCE instance metadata service?

筅森魡賤 提交于 2021-02-08 09:11:07
问题 On a GCP compute environment, I need to get an id_token (expires every 3600s) to make service-to-service authentication (using GCF, Cloud Run etc). I get this id_token from the instance metadata service: http://metadata/computeMetadata/v1/instance/service-accounts/default/identity?audience=[...] Instead of implementing some form of caching+TTL for this identity token, I'm curious if I can call this endpoint every time I will make an outbound RPC (I might make a lot). That's why I'm curious:

What is the rate limit for GCE instance metadata service?

断了今生、忘了曾经 提交于 2021-02-08 09:08:26
问题 On a GCP compute environment, I need to get an id_token (expires every 3600s) to make service-to-service authentication (using GCF, Cloud Run etc). I get this id_token from the instance metadata service: http://metadata/computeMetadata/v1/instance/service-accounts/default/identity?audience=[...] Instead of implementing some form of caching+TTL for this identity token, I'm curious if I can call this endpoint every time I will make an outbound RPC (I might make a lot). That's why I'm curious:

How to establish a private connection between Google app engine and compute engine?

左心房为你撑大大i 提交于 2021-02-08 05:28:14
问题 I have a web app/Api which is currently running on a google app engine resource. As the calculations of the API are very computing intensive, i have outsourced the computational part to a managed auto-scaling google compute engine group, with a HTTP load balancer in the front end (to maintain a single IP address and balance load accross the several engines that are dynamically spawning). Currently, i just make an HTTP call to the load balancer IP address from the app engine. As the GAE and

How can I get the billing for a VM Instance in GCP?

好久不见. 提交于 2021-02-08 05:01:58
问题 I have a project in Google Cloud , where I have multiple instances running, and I have a billing account for the organisation. But I want to make a VM instance, say vm-01 for couple of hours then it will be deleted. I want to get the exact cost that vm-01 incurred during it's period using the API calls. Is it possible? 回答1: In your GCP Web Console, go to Billing page go to Billing export section you could either export the detail billing to BigQuery or File you could search the billing item

Is Google GPU beta available in free trial?

强颜欢笑 提交于 2021-02-07 12:29:18
问题 I am using google free trial of $300. Recently tried to launch a GPU instance as per this. I have configured the right region. But the message is " Quota 'NVIDIA_K80_GPUS' exceeded. Limit: 0.0 ". Does this mean that GPU is not available in free trial? Or is it somekind of error from gcp. 回答1: By default the quota is zero for every one. One need to request for additional quota if he needs to increase the GPU. This form is only available if we upgrade our account. In the increase quota form it

Changing External IP's Geolocation of Google Compute Engine

冷暖自知 提交于 2021-01-29 22:10:54
问题 I am creating my own VPN server. I want it to have an IP address of (say) Canada. I created an Compute Instance in the region of my choice and reserved a static IP in that region as well but when I check the external IP Geolocation it still says Mountain view CA. I tried this answer but it didn't worked. In AWS when I chose a region the IP is located in that region itself. I would like to know how to change Geolocation of External IP in Google Compute? 回答1: By Default all External IP

How do I add a SSH key to Google Cloud Compute Engine VM Linux instance?

孤者浪人 提交于 2021-01-29 14:24:33
问题 I have a Linux VM instance running in Google Cloud Platform. I tried to copy my public key to ~/.ssh/authorized_keys and I can successfully SSH to my VM. But sometimes ~/.ssh/authorized_keys is flushed and I have to copy the public key again. It is really a pain to add public key every time. How do I add a public key permanently? 回答1: This ~/.ssh/authorized_keys takes the ssh keys from the metadata. It best you keep your ssh public keys in the metadata as mentioned here and there’s also a

Shutdown script not executing on a Google Cloud VM

馋奶兔 提交于 2021-01-29 13:35:38
问题 I am trying to get a shutdown script to execute using a Google Cloud compute VM. I see this output when running gcloud compute connect-to-serial-port startup-test-v Apr 8 22:01:25 startup-test-v shutdown-script: INFO Starting shutdown scripts. Apr 8 22:01:25 startup-test-v shutdown-script: INFO Found shutdown-script in metadata. Apr 8 22:01:26 startup-test-v shutdown-script: INFO shutdown-script: No change requested; skipping update for [startup-test-v]. Apr 8 22:01:27 startup-test-v shutdown

Sign Google Cloud Storage URLs with Google Compute Engine default service account

不羁的心 提交于 2021-01-29 10:32:18
问题 I'm trying to sign GCS URLs with the GCE default service account. I gave the compute default service account the necessary "Service Account Token Creator" role. When I try to sign a url in the following Python code, I get an error: import google.auth import google.auth.iam from google.auth.transport.requests import Request as gRequest creds, _ = google.auth.default(request=gRequest(), scopes=[ 'https://www.googleapis.com/auth/cloud-platform', 'https://www.googleapis.com/auth/devstorage.read