google-cloud-platform

AttributeError 'NoneType' object has no attribute 'upload_from_filename'

余生颓废 提交于 2021-02-19 06:07:44
问题 I'm using Python 2.7.9 on Linux and I am following Google's example on Google-Cloud Server SDK. My goal is to upload an image to Google Cloud Platform, but I'm getting the error below. File "/home/pi/test.py", line 15, in <module> zebraBlob.upload_from_filename(filename='/home/pi/Pictures/testimg.jpg') AttributeError: 'NoneType' object has no attribute 'upload_from_filename' Code: from firebase import firebase from google.cloud import storage import os firebase = firebase.FirebaseApplication(

Terraform google bucket for static website for google storage - 403

﹥>﹥吖頭↗ 提交于 2021-02-19 05:23:07
问题 Trying to create a google bucket for the static website. provider "google" { project = "myprojectname-123" credentials = "${file("storage-admin.json")}" region = "us-central1" zone = "us-central1-c" } resource "google_storage_bucket" "STANDARD" { name = "mywebsite.com" storage_class = "STANDARD" location = "US" website { main_page_suffix = "index.html" not_found_page = "404.html" } } > terraform apply googleapi: Error 403: The bucket you tried to create is a domain name owned by another user.

How to get delegated credentials objects for invoking google apis?

不想你离开。 提交于 2021-02-19 05:21:40
问题 I am trying to fetch gsuite alerts via API. I have created a service account as per their docs and I have assigned that service account to my google cloud function. I do not want to use environment variables or upload credentials along with source code but I want leverage default service account used by function. from googleapiclient.discovery import build def get_credentials(): # if one knows credentials file location(when one uploads the json credentials file or specify them in environment

“java.lang.IllegalArgumentException: No filesystem found for scheme gs” when running dataflow in google cloud platform

淺唱寂寞╮ 提交于 2021-02-19 05:01:47
问题 I am running my google dataflow job in Google Cloud Platform(GCP). When I run this job locally it worked well, but when running it on GCP, I got this error "java.lang.IllegalArgumentException: No filesystem found for scheme gs". I have access to that google cloud URI, I can upload my jar file to that URI and I can see some temporary file for my local job. My Job id in GCP: 2019-08-08_21_47_27-162804342585245230 (beam version:2.12.0) 2019-08-09_16_41_15-11728697820819900062 (beam version:2.14

What is the default memory allocated for a pod

旧巷老猫 提交于 2021-02-19 03:23:32
问题 I am setting up a pod say test-pod on my google kubernetes engine. When I deploy the pod and see in workloads using google console, I am able to see 100m CPU getting allocated to my pod by default, but I am not able to see how much memory my pod has consumed. The memory requested section always shows 0 there. I know we can restrict memory limits and initial allocation in the deployment YAML. But I want to know how much default memory a pod gets allocated when no values are specified through

Firebase is authorised by FedRAMP?

廉价感情. 提交于 2021-02-19 02:31:27
问题 I am using Firebase as back end. I saw google service was authorised by FedRAMP and firebase has been used integrating with google cloud. So firebase is also authorised by FedRAMP? If not, is there any way to be authorised by FedRAMP in firebase? 回答1: @Tahvo., I too am developing on Firebase and Cloud Firestore within the Gov. I talked to our Google Rep and she queried the Federal team within Google. Apparently firebase didn't go through the Fedramp certification but there are plans

gcloud command not found -installing Google Cloud SDK

老子叫甜甜 提交于 2021-02-19 01:52:06
问题 I am trying to install the Google Cloud SDK on Mac using the following command in terminal curl https://sdk.cloud.google.com | bash It worked fine but when I move to the next step of gcloud init I get the following -bash: gcloud: command not found I have tried all solutions to the same question as in here, however I still get the same error message. The installer didn't prompt me with the following message either: Modify profile to update your $PATH and enable bash completion? (Y/n)? 回答1: The

How to use Google Cloud Firestore local emulator for python and for testing purpose

◇◆丶佛笑我妖孽 提交于 2021-02-18 22:50:00
问题 I tried to find out how to use firestore local emulator for python and for testing purpose. But I can not find out how-to document. Could somebody help me? 回答1: Welcome to SO :) The primary purpose of the Cloud Firestore Emulator (at the moment) seems to be to test security rules, as documented here. This section states: "The only SDK that currently supports the emulator is the Node.js SDK." Confusingly there are also these Ruby docs for the Google Cloud Client Libraries. The same thing does

Reading Data From Cloud Storage Via Cloud Functions

本小妞迷上赌 提交于 2021-02-18 22:47:40
问题 I am trying to do a quick proof of concept for building a data processing pipeline in Python. To do this, I want to build a Google Function which will be triggered when certain .csv files will be dropped into Cloud Storage. I followed along this Google Functions Python tutorial and while the sample code does trigger the Function to create some simple logs when a file is dropped, I am really stuck on what call I have to make to actually read the contents of the data. I tried to search for an

How to use Google Cloud Firestore local emulator for python and for testing purpose

孤街浪徒 提交于 2021-02-18 22:43:56
问题 I tried to find out how to use firestore local emulator for python and for testing purpose. But I can not find out how-to document. Could somebody help me? 回答1: Welcome to SO :) The primary purpose of the Cloud Firestore Emulator (at the moment) seems to be to test security rules, as documented here. This section states: "The only SDK that currently supports the emulator is the Node.js SDK." Confusingly there are also these Ruby docs for the Google Cloud Client Libraries. The same thing does