Tutorial/tool on working with different environments (DEV, TEST, PROD...) to achieve Continuous Deployment
C
Carlos Gines
I would like to have a tutorial/tool explaining/enabling how to work with different environments (DEV, TEST, PROD...), so that I can set an automated pipeline for CD.
Should we create a new cluster for each env? Do I need to change manually the Stitch App ID on the exported app, when promoting it to the next env? How to manage the connection with the different dbs/services when the app changes env? (each env must have its own dbs/services)
Thank you.
Drew DiPalma
Hi Folks!
As part of our upcoming re-brand of "Stitch" to "Realm" we'll also be migrating our feedback forum and joining the rest of MongoDB at feedback.mongodb.com, as part of that transition, we'll be shutting down this forum. We're still keeping track of this feedback and all of the related comments/discussions, but all future updates will be made here:
https://feedback.mongodb.com/forums/923521-realm/suggestions/40550617-tutorial-tool-on-working-with-different-environmen
Brandon Phillips
Yeah this is a near-show-stopper for us.
We ended up having to spend hours writing a build pipeline where we could use
node-config
(https://github.com/lorenwest/node-config) to define development
, staging
, and production
config values and have those be compiled into a stitch project (i.e. our JSON files are .json.js
and export a function that take the config and return the final JSON in addition to interpolating config into templated file names since i.e. database schema rule JSON files have the name of the database in their filename and that might change from env-to-env).Values aren't enough to parameterize a project such that a single codebase can be deployed to multiple stitch apps since the names of JSON files according to the application schema contain environment-dependent values (i.e. as mentioned above the JSON files that describe the database schema contain the name of the database) AND you can't use values anywhere you want in any JSON config file.
Dave Tapley
As part of this: It seems like the Stitch CLI tool expects to be run by a human (e.g. it prompts for 'y' on 'stitch-cli import'). This makes it hard to integrate in to CD.
Drew DiPalma
Dave Tapley: Hi Dave – These prompts can be suppressed with --yes or -y. I don't think this is well documented at the moment, so I'll look into getting it covered.
C
Carlos Gines
Any comments on this?