1

I am new to google cloud and I am going to start a project on it based on cloud functions and bigQuery

I googled to find answer to my questions to be prepared for it, I couldn't find articles about it.

In classic way of software development usually we have different environment for Dev,QA,Staging,UAT and production and for databases such as SQL Server, we keep the scripts in source control and we have different copy of database for each environment, for example on dev environment v1.6 we add a field to a table, and on QA environment v1.5 table doesn't have the field yet until we promote v1.6, and so on

Now my question is, in google cloud environment how we should have different environment and versioning, should it be 5 different projects? What about google cloud functions, how should I manage different code for different branches for same function (for example fixing a bug in a cloud function) ?

Graham Polley
  • 14,393
  • 4
  • 44
  • 80
Reza
  • 18,865
  • 13
  • 88
  • 163
  • I found this https://cloud.google.com/appengine/docs/standard/go/creating-separate-dev-environments btw there might be more solutions too – Reza Jan 24 '18 at 18:32

1 Answers1

2

The environment strategy depends on the particular GCP product being used.

With Google App Engine apps, as you observed, multiple strategies can be used, each with their own pros and cons. See related post: Advantages of implementing CI/CD environments at GAE project/app level vs service/module level?

But Cloud Functions do not have a versioning info associated with them (at least not yet), so deploying a different version of a function using the same name will overwrite the previous deployed version. So using different projects is your only option in this case.

Another theoretically possible approach would be to encode the environment/versioning info into the function name, which would also allow functions deployed from different environments to co-exist, but IMHO that would be an unnecessary complication.

Dan Cornilescu
  • 39,470
  • 12
  • 57
  • 97