MitocGroup / MitocGroup/deepify

Blue-green deployments process

Open
#219 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement not testable on hold
Dominant language
JavaScript
Stars
3
Forks
0
PR merge metrics
No merged PRs in 30d

Description

I would like to bring back an older conversation about blue-green deployments and implement it as deepify command(s):

  • What is the expected functionality?
    • I would like to be able to publish an environment by promoting seamlessly stage to prod (use case A) or gradually allowing increase in traffic between 2 different prod environments (use case B). For example: "blue env" vs "green env" => 90% vs 10%, then 80% vs 20%, ... and finally 0% vs 100%
    • After a more careful analysis, it looks like use case A is a sub-case from use case B, where "blue env" is stage and "green env" is prod, while traffic is 0% vs 100%
  • What are the expected commands?
    • deepify publish --blue X --green Y --data-replicate true|false - manage traffic between blue-green deployments. Complete list of parameters (required marked with star):
      • blue (e. g. abcd1234, stage:abcd1234, etc)
      • green (e.g. wxyz0987, prod:wxyz0987, etc)
      • ratio (e.g. 9:1, 4:1, etc)
      • data-replicate (will enable automatically data replication)
      • domain-name* (e.g. www.deep.mg, todo.deep.mg, etc)
      • hosted zone of domain-name MUST BE IN ROUTE53 (if it's not, operation should fail)
      • values abcd1234 and wxyz0987 MUST BE DIFFERENT (if they are the same, operation should fail, unless it's used in [env]:[hash] format and environments are different)
      • blue-percent (e.g. 0, ..., 50, ..., 100; default - 0)
      • green-percent (e.g. 0, ..., 50, ..., 100; default - 100)
      • if either blue-percent or green-percent is not specified, the other one MUST BE COMPUTED as difference between 100 and specified parameter value
      • sum of blue-percent and green-percent MUST BE EQUAL TO 100 (if it's not, operation should fail)
    • deepify replicate - manage data replication between blue-green deployments. Complete list of commands and parameters (required marked with star):
      • deepify replicate [command] --blue-env X --green-env Y --resources A,B,C - filter the list of DynamoDB tables in "blue env"
        • blue (e. g. abcd1234, stage:abcd1234, etc)
        • green (e.g. wxyz0987, prod:wxyz0987, etc)
        • tables (e.g. list of tables, comma separated values)
        • private-ignore (e.g. ignore files in private S3 bucket)
        • public-ignore (e.g. ignore files in public S3 bucket)
      • deepify replicate prepare - enable streaming for each DynamoDB table in "blue env" and replicate older data using "eventual consistency" approach into DynamoDB table in "green env"; as well as upload corresponding Lambda function(s) that will be used to replicate each stream
      • deepify replicate status - report status of the replication (e.g. -100% ... -1% => catching up replication in "prepare" phase; 0% ... 100% => catching up replication in "stream" phase)
      • deepify replicate start - attach Lambda function that will parse each DynamoDB stream in "blue env", replicate data into DynamoDB table in "green env" using "strong consistency" approach and remove data from the stream
      • deepify replicate stop - detach Lambda function from corresponding (or all) DynamoDB stream in "blue env"
      • deepify replicate terminate - remove Lambda functions (doesn't matter if it's attached or not) and DynamoDB streams from "blue env"

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The proposed entry points are the deepify publish command and the deepify replicate commands (prepare, status, start, stop, and terminate). Start by reviewing the existing CLI structure and the older blue-green deployment discussion; done requires agreed behavior for traffic shifting, DynamoDB replication, and all listed command parameters.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, javascript
Domain
cli, cloud, databases, devops
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.