google cloud storage client library - google-app-engine

How to enable default bucket for GCS library.
I cant below options in my project console.
If your app doesn't have a default bucket, create one:
In the Google Cloud Platform Console, go to the Application settings.
Scroll to the bottom of the page to Cloud Integration.
Click Create and wait for the bucket to be created. The bucket will be completely set up and ready for use.
Note: AM using Free account.

You need to enable billing in order to use Google Cloud Storage.
https://cloud.google.com/storage/docs/signup?hl=en
Note: For most projects, Google Cloud Storage is enabled by default. You will still need to enable billing before using Google Cloud Storage.

Related

How to link/connect Firebase and Google App Engine for image resizing

I'm using Firebase and I'm trying to leverage the image resizing service that AppEngine has with get_serving_url(). https://medium.com/google-cloud/uploading-resizing-and-serving-images-with-google-cloud-platform-ca9631a2c556.
I'm confused about how to go about linking my google app engine image resizing service to my firebase cloud storage instance.
I see this quote in the documentation https://firebase.google.com/docs/storage/gcp-integration
The Firebase SDKs for Cloud Storage use the Google App Engine default
bucket, which means that if you build an App Engine app, you can use
the built in App Engine APIs to share data between Firebase and App
Engine. This is useful for performing audio encoding, video
transcoding, and image transformations, as well as other computation
intensive background processing.
How can I point to this Google App Engine default bucket? I don't see it in the google app engine dashboard interface anywhere.
I've already set up a firebase project and I then created an app engine project - but I don't see any way to point my app engine to the default bucket that firebase created. Is that based on some sort of account id? Where in the admin interface or tools can I set up that linkage so that the files I'm uploading to the firebase default storage bucket are available to be resized by the app engine image server?
It doesn't seem to be possible to link existing firebase projects with an existing google cloud platform (GCP) / app engine project.
First create the GCP app engine project
Then, on firebase, go to Add Project -> Open the "Project name" drop-down and select the existing GCP project.
The firebase project ID will then be the same as the GCP project ID, the GCP default bucket gs://<project_id>.appspot.com is the default firebase storage bucket, and you can select additional GCP buckets on the firebase storage page.
If you have an existing Firebase project, then the corresponding Google Cloud project is created for you automatically.
Just go to Google Cloud console (https://console.cloud.google.com) and there you'll be able to select the project with the same name (as your Firebase project's). If you deploy your GAE app to that project then it should be able to access your data.

App cannot enable Google Cloud Storage?

My primary app id has a very limited set of options in the Cloud Console for some reason. Notably, I cannot access "APIs & Auth" to enable GCS. Here's the menu I see on the left side. Billing is enabled and my app is actively serving traffic. Other apps I create work just fine.
Here is what I see:
Overview
Permissions
Settings
Support
Preview App Engine
Preview Cloud Datastore
BigQuery
Here is what I expect (and see from other projects):
Overview
APIs & auth
Permissions
Settings
Support
Preview App Engine
Compute Engine
Cloud Storage
Preview Cloud Datastore
Cloud SQL
BigQuery
Cloud Development
I had a similar problem where I did not see "Google Cloud Storage" on my Cloud Console. The solution I got from Google a while back was the following:
Sign in to AppEngine under the account that created the App. (via appengine.google.com)
Click "Application Settings" under the Administration Settings
There you should find a button to enable Google Cloud Console, under a section called Cloud Integration
This should tie your application as you expect it.

Adding domain to Google Cloud Storage hosted web-app

I am new to Google Cloud Storage.
I want to try Google Cloud Storage to host my web-app. Is it possible to upload my website to Google Cloud Storage and connect own domain without Google Apps premium subscription?
If yes, please check my steps below, how I tried to make it works, and let me know where I where wrong?
I have created Cloud Console project for my web-app. My Project ID: rippl-io
Then linked the domain of the web-app to existing Google Apps account as a secondary (as I were redirected to Google Apps after trying to add new domain from the cloud console). Domain name I am going to use: rippl.io
In App Engine settings in Google Apps I am clicking "Add new url" and selecting rippl.io domain. But it returns error.
I am guessing I can add only primary domain and that must be a reason of error. So, next, to change rippl.io to primary domain I need to upgrade Google Apps to premium. Are any other ways to add own domain to my website on Google Cloud Storage other than buying premium Google Apps?
To add domain # Google Cloud Storage, first you need to verify it from Google Webmaster Tools, then create a bucket exactly matching your domain name e.g. www.example.com upload your data, files etc, then add CNAMEentry www.example.com IN CNAME c.storage.googleapis.com.
Please remember, Google Cloud Storage will work for plain html webpages it will not execute any server side codes like php
gsutil web set -m index.html -e missing.html gs://www.example.com
If you still have php page, you can use below code, but php code will get displayed in webpage view source, it will not get execute:
gsutil setmeta -h Content-Type:text/html gs://www.example.com/demo.php
To add domain # Google App Engine, you need Google Apps for Business account to verify it.

Missing Cloud Storage Feature in Project

I have an existing project in Google Clouds that only showing this 3 features: App Engine, BigQuery, and Cloud Datastore. The project is not accessible from Google APIs Console (not showing in the dropdown). How can I add Google Cloud Storage to this project?
*If I create a new project now in either Google Clouds or Google APIs, it will come with App Engine, Compute Engine, Cloud Storage, BigQuery, APIs, Cloud Datastore, and Cloud SQL. But I want to use back my existing project because it has whitelisted to use gaeforphp.
Thanks.
App Engine projects created in the past may not be connected to the rest of the Google Cloud APIs. You can enable this by:
visiting: https://appengine.google.com/
Choose Application Settings from the administration section on the left.
Scroll to the very bottom, the Cloud Integration section.
Click the add project button.

google cloud-storage for existing appengine accounts

i have existing appengine accounts that need to have cloud storage capability.
but it seems that i cant add it to an existing app engine account.
https://cloud.google.com/products/cloud-storage
instead i must create a new 'project' which creates a new appengine account.
is there a difference when having the cloud storage in a different 'project' beside having a different name?
thanks
-lp
i found the solution.
the appengine settings page has a button for enabling 'Cloud Integration'
Administration->application settings->cloud integration
click the button and an existing appengine project will become a cloud project and there is now a option in the cloud console to add the cloud storage.
Google Cloud Storage documentation is quite explicit about enabling GCS for existing AppEngine projects:
GCS Docs - enabling for old style AppEngine apps

Resources