Skip to content
This repository was archived by the owner on Jul 18, 2024. It is now read-only.

Address blue/green deployment of new database versions #79

Open
krook opened this issue Oct 23, 2017 · 2 comments
Open

Address blue/green deployment of new database versions #79

krook opened this issue Oct 23, 2017 · 2 comments
Assignees

Comments

@krook
Copy link
Contributor

krook commented Oct 23, 2017

  • The credentials may or may not change, but at least assume the database name does.
  • Can we add a new credential key on the fly?
  • Should this be in a text file that's pushed?
@jzaccone
Copy link
Contributor

secrets are created at "deploy-time" and should be created by the CI/CD script. Secrets should be handled in a password manager, but we can use a text file for this POC. I guess my question is do we need to handle dynamically switching between database green and blue by changing the routing. That gets a little complicated since we have to dynamically change those keys to the new database, or create an abstraction in front that knows about both.

@krook krook changed the title Address blue/green deployment of new database names Address blue/green deployment of new database versions Oct 23, 2017
@krook
Copy link
Contributor Author

krook commented Oct 23, 2017

Here is the proposed update process that needs to be confirmed:

Start with a v1 app and v1 db schema. As new v2 apps are deployed, they should in turn only connect to a new v2 database instance, while the v1 apps stay connected to the v1 database.

At some point there is probably a CLI worker job that handles any necessary migration after the roll in is complete, or the v1 app database goes read only once v2 apps start to be deployed.

  • The first step is to migrate v1 data to a v2 database and schema to use as its baseline.
  • Make the v1 database read-only and bring up the new v2 database as read/write.
  • v2 apps can start to be deployed, connecting only to the v2 database.
  • Once the v1 apps are completely removed and only v2 apps remain, archive the v1 database.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants