Mount Google Cloud Storage in a Custom Flex GAE - google-app-engine

I have a web application in a Custom Runtime Flex App Engine, which is deploy from a docker image, working fine.
This app is connected to a db in Google Cloud SQL to data persistence.
Now I trying to persist file data in a Cloud Storage Bucket, but I do not have found the way to mount this storage like a file system.
Gcsfuse does not work in this case due to privileges are required to tun docker.
In the app.yaml you can specify a volume, but not associate to storage.
How can persist file data with cloud storage in a Custom Flex GAE app?

Related

Google Cloud App Engine download object from Google Cloud Storage issue

I am hosting a CodeIgniter based PHP web application on Google App Engine flex environment.
I am able to allow the user to upload data like images, video to my Google Cloud Storage bucket. But what I need to do is when the image or video gets uploaded to the storage, at that same time the same object should be downloaded on Google App Engine server's source code.
i.e. There should be a copy of the uploaded image on my current App Engine source code server (App Engine current instance).

Why does writing to GCS bucket result in local dev blob store entries instead?

I use the Google App Engine Standard environment to develop my Python app using Development SDK 1.9.61.
I'm trying to learn to use Google Cloud Storage in my app by following these instructions. I verified that my default and staging buckets do exist via the cloud console, and manually uploaded a sample file to each bucket using my browser.
Next, I programmatically uploaded some files to a bucket (so I thought) via my local development app instance per Google's instructions.
However, when I checked my cloud storage buckets via my GCP Console in my browser, I could not find the files. After searching my local development SDK console, I eventually found the files located in the local "Blobstore Viewer".
I'm confused, based on Google's instructions I expected to find the files in my project's cloud storage bucket.
I searched the App Engine Python Release Notes for some potential SDK version changes to explain this behavior, but couldn't find anything relevant.
Is this the way it's supposed to work? Are Google's instructions in error?
If you upload files to a local development server, those exist in-memory on your machine. The GCP Console doesn't interact with your local development server, it interacts with the public (production) Google Cloud Storage API.
So in essence, the files on your local dev server are in a completely different namespace. If you want to interact with the production version of Google Cloud Storage and see the results in the GCP console, you'll need to use a non-dev-server deployment of your application.

Uploading Storing and Linking to Images on Google Container Engine

I am developing an app where users can upload images. The app has a NodeJs Backend an Angular Frontend with a Redis and Neo4j all dockerize and run by Kubernetes. Now I would like to store images, but there are so many service that I think could do the job that I don't know what to do... Can I use my Google Drive account and the Drive Sdk to upload the images of my users ? Should I look into Google Cloud Storage ? What about the persistence storage option in Kubernetes ? Or can I use my Flickr Account ??? Could someone point me the right direction... Thanks
For uploading and storing static files such as images in the cloud using GCP should probably be using Cloud Storage.
While both Google Drive and Google Cloud Storage provide an API to upload files, Cloud storage is more suited for your use case. I took this excerpt from here
Cloud Storage is intended to be accessed primarily through its API and
provides all the functionality necessary for developers to use it as a
backing store for their own applications.
and
Cloud Storage enables developers to store their application data in
the Google cloud (and they’re responsible for the storage their app
consumes), whereas in Drive, users allow apps to interact with the
user’s private storage and content.

Manage local cloud storage instance using gsutil

I have a GAE based application that pulls a file from cloud storage and then does some processing on that file. To run the application in the remote appengine environment, I first upload a file to cloud storage using the browser console, and then make requests to the application, which pulls the file I uploaded from cloud storage. I'd like to be able to do development locally, however there is not a sweet browser console for the local implementation of gcs, as discussed here: Local storage browser for Google Cloud Storage and dev_appserver.py.
I'm wondering if it's possible to use gsutil. It seems the local gcs implementation is accessible through a localhost endpoint, mentioned here: Google Cloud Storage on Appengine Dev Server.
Right now, what I want to do is just load a file into my local gcs instance. I could do this my writing a little utility, but it seems much better to use gsutil if I can get that to connect to my local instance.
Thank you,
Ben

Upload Local Datastore with Application

I'm using the Eclipse Plugin for App Engine, and I have my application running fine locally (able to read/write to the local Cloud Datastore).
However when I deployed to App Engine, the server copy does not seem to have any Cloud Datastore information. Do I need to upload this separately, and if so how do I do this?

Resources