Here is an overview about Deployment. It is part of my understanding about the concepts around the deployment automation. Work In Progress…

Concepts

Continuous integration is the process to have the code shared faster and validate it. It means "the rapid feedback and the reduction the time when some error is the detected to fix it"

  • Development + Unit Test
  • Build + Integration Test/Regression Test

Continuous Delivery the the process to get the software ready to be executed and apply in some environment to be available to the user. This process needs a validation before the deployment

The continuous deployment is similar to delivery but it does not need any approval

  • Staging + Load Test/Performance Test
  • Production + A/B Test / Canary Analysis

Pipeline is the process compused of many steps to connect the parts from code creation to user

  • commit
  • Acceptance stage
  • UAT/Capacity/ PROD

Deployment

Pratices:

  • build once
  • repitable for all envs
  • smoke-Test your deployments
  • Deploy ina similar PROD env before
  • Automation (CI/CD pipeline)
  • each change should be propagate through the pipeline
  • If pipeline fail in some part, all the pipeline should be stopped
  • Automating the release
  • Automatint unit tests and code Analysis
  • Automating Acceptence Tests
  • Deployment process must be Idempotent
  • Eliminate manual steps
  • IaC (Terraform)
  • Rollback strategy
  • Monitor

Build Tools:

  • Make
  • Ant
  • Maven

Deployment Strategies:

  • Downtime deployment
  • Rolling deployment without replacement
  • Rolling deployment with replacement
  • Blue/Green deployment: deploying the new code and infrastructure to the Green environment.
  • Canary deployment: The process of pushing a new version of code to a small subset of servers or infrastructure.
  • Feature toggle deployment
  • Promotion deployment

Other Strategies:

Testing Strategies:

  • Canary test pattern
  • A/B test pattern
  • Shadow test pattern

Releases

Rolling Back plan: Redeploy previous Good version (lead to a downtime, hard to deploy what went wrong, lose data created following the deployment).

Zero-Downtime releases (hot deployment): switching users from one release to another instantaneously

Blue/Green Deployments: instantly releasing the new version (code and features) to 100% of your users by flipping the traffic switch (usually a load balancer or router)

Canary Release: The process of exposing a new set of features or a new product version to a small subset of users.

Be continued...


References