google-cloud-platform

Export GCP Datastore and import to a different GCP Project

ⅰ亾dé卋堺 提交于 2021-02-11 14:35:35
问题 I'm trying to copy data from DataStore in one GCP project to another - the process doesn't seem to give any errors, but also doesn't populate my target datastore. In my source project I create a bucket and export my datastore in to it as follows : gcloud datastore export gs://ctb_datatransfer I then switch to my destination project and run gcloud datastore import gs://ctb_datatransfer/2020-03-01T18:41:37_32872/2020-03-01T18:41:37_32872.overall_export_metadata Neither of these steps seem to

Python script using Cron Job Not saving output to file in Google VM Instance

这一生的挚爱 提交于 2021-02-11 14:34:04
问题 I am trying to run a python script in my Google VM Instance using Cron jobs. My script is supposed to log some data from a website and stores it in a CSV file. I tried running it using the usual python3 kb_sc.py and it worked just fine. ... #scrap the website print("checkpoint") if not (os.path.isdir(path)): os.makedirs(path) if not (os.path.isfile(path + file)): data_new.to_csv(path+file, index = False) else: data = pd.read_csv(path+file) data = data.append(data_new) data.to_csv(path+file,

Migration of GKE from Default to Shared VPC and Public to Private GKE CLuster

走远了吗. 提交于 2021-02-11 14:31:27
问题 Few queries on GKE We have few GKE CLusters running on Default VPC . Can we migrate these clusters to use SharedVPC or atleast Custom VPC ? It seems existing clusters with default VPC mode cannot be changed to SharedVPC model as per GCP documentation but can we convert to Custom VPC from default VPC How to migrate from Custom VPC to Shared VPC ? Is it creating a new Cluster from existing Cluster and select SharedVPC in networking section for new cluster and then copy the Kubernetes resources

Deploy a Dataflow with Terraform

孤人 提交于 2021-02-11 14:27:03
问题 I'm trying to deploy a Dataflow template with Terraform in GCloud. There are several tutorial which include some terraform code. There are 2 options:Use module like the following link or use resource like the following link With both options I have the following error: Error: googleapi: got HTTP response code 502 with body: <!DOCTYPE html> <html lang=en> <meta charset=utf-8> <meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width"> <title>Error 502 (Server Error)!!1<

authorization and authentication mechanism in GCP

廉价感情. 提交于 2021-02-11 14:21:54
问题 I want to create a Udemy like video platform where a user can see all videos but can watch videos only that he has purchased. I am making a rest call to get the videos from the storage bucket from an angular application, using Firebase authentication here. In my GET request to storage bucket I am passing the access token that I got from Firebase authn . Does this access token can be used to determine scope of the user to access video in a bucket? Assume if I have given read access for a video

Facing error while deploying node.js app on google cloud

懵懂的女人 提交于 2021-02-11 14:14:23
问题 I am trying to deploy node.js app on google cloud but getting following error. I am facing this error since 10th October. don't know how to resolve: Step #2: ERROR: (gcloud.beta.app.deploy) PERMISSION_DENIED: You do not have permission to act as '[xxxxxxx]@appspot.gserviceaccount.com' Step #2: - '@type': type.googleapis.com/google.rpc.ResourceInfo Step #2: description: You do not have permission to act as this service account. Step #2: resourceName: [xxxxxx]@appspot.gserviceaccount.com Step

How to resolve class file for com.google.cloud.Service not found

拜拜、爱过 提交于 2021-02-11 14:13:57
问题 I am Trying to upload JSON data to gcs. As I did not use google cloud previously I started with uploading random String to gcs but I got stuck at the beginning itself while creating a Storage service object Maven dependency <dependency> <groupId>com.google.cloud</groupId> <artifactId>google-cloud-storage</artifactId> <version>1.70.0</version> </dependency> import com.google.cloud.storage.*; Storage storage = StorageOptions.getDefaultInstance().getService(); BlobId blobId = BlobId.of("bucket

Facing error while deploying node.js app on google cloud

时光毁灭记忆、已成空白 提交于 2021-02-11 14:08:44
问题 I am trying to deploy node.js app on google cloud but getting following error. I am facing this error since 10th October. don't know how to resolve: Step #2: ERROR: (gcloud.beta.app.deploy) PERMISSION_DENIED: You do not have permission to act as '[xxxxxxx]@appspot.gserviceaccount.com' Step #2: - '@type': type.googleapis.com/google.rpc.ResourceInfo Step #2: description: You do not have permission to act as this service account. Step #2: resourceName: [xxxxxx]@appspot.gserviceaccount.com Step

Get vm uptime data from stackdriver-agent in gcp?

人盡茶涼 提交于 2021-02-11 14:07:56
问题 My GCP project vm installed below agents: google_osconfig_agent /opt/stackdriver/collectd/sbin/stackdriver-collectd. Can i use the stackdriver-agent to get some data? eg. run some commands to get all instances storage, uptime etc. 回答1: The Cloud Monitoring agent gathers metrics from VM instances and sends them to Google Cloud Monitoring. Among many there are metrics for uptime and disk utilization. Gathered metrics are represented in the customizable Dashboards of the Cloud Console. If you

Google Cloud Console Quotas You don't have permissions to perform the action on the selected resource

余生颓废 提交于 2021-02-11 14:01:40
问题 I am the admin of my organization and I visit https://console.cloud.google.com/ IAM & Admin and click on Quotas I get You don't have permissions to perform the action on the selected resource. . Why am I getting this. If I am the org admin and getting this error then who is able to view Quotas? I am logged in using incognito window. 回答1: You are not "owner" even you are "organization administrators". Please assign yourself either primitive role like "owner" or "editor" Or predefined role