gcp

Firestore: Transactions giving permission denied

霸气de小男生 提交于 2019-12-05 21:07:54
We are accessing Firestore from our Java app engine instance. Non-transactional requests are succeeding fine, but transactions are failing with the error: firestore: PERMISSION_DENIED: Missing or insufficient permissions Example Transaction final long updatedValue = 15; Firestore db = firebaseManager.getFirestore(); CollectionReference fooCollectionRef = db.collection(SOME_COLLECTION); DocumentReference fooDocumentRef = fooCollectionRef.document(fooId); final ApiFuture<Long> future = db.runTransaction(transaction -> { DocumentSnapshot snapshot = transaction.get(fooDocumentRef).get();

Google Cloud Stackdriver Monitor Compute Engine Disk Usage

。_饼干妹妹 提交于 2019-12-05 08:15:01
I have Google compute engine instances already up and running since recently. I have explored Google Cloud stackdriver for monitoring CPU Usage etc. I have installed Stackdriver agent on to one of the Compute Engine instance for testing. I have explored creating new chart on dashboard, tried with various metrics. But I could not find any metrics that can show disk usage of my instance. Yes there is list of plugins supported by Stackdriver agent to pump custom metrics but I could not find any specific metric that measure the instance disk usage. Please give me a pointer. Thanks Volume usage is

Google Cloud Certified - Professional Cloud Architect

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-03 06:46:14
因为公司从去年开始了使用云服务的策略,我们部门主要会使用GCP,所以我也趁机学习一下,先考个证。在学习过程中,确实体验到了GCP的好处,而且这个Google Cloud Certified - Professional Cloud Architect考试设计得也不错,如果你能通过那你确实学到了它的很多有用的知识和经验。相对来讲这个考试确实不容易,持续学习了一个多月时间,自己感觉差不多了,然后就去考试。但考时感觉题目真的不简单,有很多都是有两个或以上答案感觉都是对的,不知道怎么选,需要你很细致的掌握它的知识点才能选得对。一个多月的学习时间应该是不足够的,但可能运气不错,最终还是通过了,提交考试时心里完全没底,已经做好了挂掉的准备了,毕竟1千多块的考试如果继续交钱考还是挺心疼的。最终的总结就是,虽然考完了但还是要继续学习,真正让自己掌握应该掌握的东西。对于想考的人,我建议学习的时间还是要再长一些,看得再细致一些。 来源: https://www.cnblogs.com/gzedwin/p/11781159.html

Google Cloud Certified - Professional Cloud Architect

匿名 (未验证) 提交于 2019-12-03 00:16:01
因为公司从去年开始了使用云服务的策略,我们部门主要会使用GCP,所以我也趁机学习一下,先考个证。在学习过程中,确实体验到了GCP的好处,而且这个Google Cloud Certified - Professional Cloud Architect考试设计得也不错,如果你能通过那你确实学到了它的很多有用的知识和经验。相对来讲这个考试确实不容易,持续学习了一个多月时间,自己感觉差不多了,然后就去考试。但考时感觉题目真的不简单,有很多都是有两个或以上答案感觉都是对的,不知道怎么选,需要你很细致的掌握它的知识点才能选得对。一个多月的学习时间应该是不足够的,但可能运气不错,最终还是通过了,提交考试时心里完全没底,已经做好了挂掉的准备了,毕竟1千多块的考试如果继续交钱考还是挺心疼的。最终的总结就是,虽然考完了但还是要继续学习,真正让自己掌握应该掌握的东西。对于想考的人,我建议学习的时间还是要再长一些,看得再细致一些。 来源:博客园 作者: EdwinLu 链接:https://www.cnblogs.com/gzedwin/p/11781159.html

change the horizontal-pod-autoscaler-sync-period with gke

好久不见. 提交于 2019-12-02 09:46:34
horizontal-pod-autoscaler-sync-period How can I change this setting with gke? I want to change from the default 30 seconds. There is no way to add/remove flags when using GKE - that's the downside of it being managed for you and not by you . 来源: https://stackoverflow.com/questions/46317275/change-the-horizontal-pod-autoscaler-sync-period-with-gke

StackOverflow-error when applying pyspark ALS's “recommendProductsForUsers” (although cluster of >300GB Ram available)

心不动则不痛 提交于 2019-12-01 23:39:32
Looking for expertise to guide me on issue below. Background: I'm trying to get going with a basic PySpark script inspired on this example As deploy infrastructure I use a Google Cloud Dataproc Cluster. Cornerstone in my code is the function "recommendProductsForUsers" documented here which gives me back the top X products for all users in the model Issue I incur The ALS.Train script runs smoothly and scales well on GCP (Easily >1mn customers). However, applying the predictions: i.e. using funcitons 'PredictAll' or 'recommendProductsForUsers', does not scale at all. My script runs smooth for a

Google Cloud Shell is using project=cloud-devshell-dev instead of my actual project, can't find enabled APIs

别来无恙 提交于 2019-12-01 21:30:29
问题 I created a GCP project to play around with the video-intelligence API. I enabled the API on my project and launched a Cloud Shell. I then copied the code from github and followed the README instructions. However, when I try to run faces.py I get this error message: StatusCode.PERMISSION_DENIED, Google Cloud Video Intelligence API has not been used in project cloud-devshell-dev before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/videointelligence

error in creating gpu google instance

≡放荡痞女 提交于 2019-12-01 15:14:19
I have tried creating GPU instance in Google Cloud Platform but every time I try to create an instance it shows "You've reached your limit of 0 GPUs NVIDIA K80". I am trying to create an instance with 4 vCPU, 8-15 gb memory, 1 GPU and in us-east1-c/us-west1-b. Please help for the following. Follow all the steps in specified order, because otherwise GPUs won't be seen in Quotas page. You need to go to the Quotas part of IAM & Admin: https://console.cloud.google.com/projectselector/iam-admin/iam/quotas Here, in Quota type, you should select "All quotas" and find GPU quotas for your region. Then,

YouTube Reporting API using Service Account

半城伤御伤魂 提交于 2019-12-01 12:05:56
Following Google's documentation you should be able to use the YouTube Reporting API without user authentication by using a Service Account. Currently I have a very simple sample that should give me a list of available Jobs, could be empty though. But I get a 403 permission denied. Request : $client = new \Google_Client(); $client->setAuthConfig('service-account-key.json'); $client->addScope(Google_Service_YouTubeReporting::YT_ANALYTICS_MONETARY_READONLY); $client->addScope(Google_Service_YouTubeReporting::YT_ANALYTICS_READONLY); $youtube_reporting_service = new \Google_Service

YouTube Reporting API using Service Account

巧了我就是萌 提交于 2019-12-01 11:32:09
问题 Following Google's documentation you should be able to use the YouTube Reporting API without user authentication by using a Service Account. Currently I have a very simple sample that should give me a list of available Jobs, could be empty though. But I get a 403 permission denied. Request : $client = new \Google_Client(); $client->setAuthConfig('service-account-key.json'); $client->addScope(Google_Service_YouTubeReporting::YT_ANALYTICS_MONETARY_READONLY); $client->addScope(Google_Service