How to run Google App Engine Dev server with google cloud storage client where everything is simulated locally?

I'm running Google App Engine dev_appserver (golang) and working with a Google Cloud Storage (GCS) product so that it can read and write files over HTTPS to the actual GCS bucket. But how do I get my local dev_appserver to simulate GCS locally? I constantly see people mentioning this but can't find any documentation on how to set it up so you can use the same cloud storage client library for development where all the cloud files are stored locally.

Even google documentation implies that with devserver it is possible that you can change the storage path for "Google Cloud Storage": https://cloud.google.com/appengine/docs/go/tools/devserver

So, if I can specify where to store the Google Cloud Storage files, then how do I configure the client for Google Cloud Storage ( https://cloud.google.com/appengine/docs/go/googlecloudstorageclient/ ) to work in place?

+3


source to share


1 answer


Go dev_appserver does not currently support local Google cloud storage emulation. It is recommended that you build a real GCS bucket for testing purposes, and then you can start your dev_appserver to talk to a "test" GCS bucket.

This tutorial: https://cloud.google.com/appengine/docs/go/googlecloudstorageclient/getstarted gives detailed instructions on how you can set up your local app to use a real GCS bucket. (Make sure you follow the linked instructions carefully to enable the two cloud storage APIs and set up and upload a private key.)



Also, only FYI, google-appengine-go Google Group is a great place to ask questions like this and also search posts to find answers. There are many really helpful people on this list to help you get up and work quickly.

+1


source







All Articles