Building System & CI/CD
The lifecycle of a piece of code
DevOps/Compiling/Integ Test/CI/CD/Pipeline/In-place vs. Blue-Green/etc.
Deployment of the first web application
App:�Write code�Copy Code to a http server�Restart the server
DB:�Update Schema/Table
Limitation?
Downtime, Unstable, Error-prone, etc
Why CI/CD
Rapid software changes
Maintain system stability & security
Archive above with 0 tolerance for outages
What are CI, CD
Continuous Integration�Regularly merge code & auto build + testing → good quality and ready to release
Continuous Delivery�After CI, deploy code changes to test/prod env; auto or half-auto
Continuous Deployment�Revisions are deployed to prod env. automatically.
Changes are ready for prod. VS. Changes are deployed into prod automatically.
Industry standard - when it comes to scale
Code Repo
Auto merge & build
Test Env
Prod Env1
Stage
Every company has its own way of DevOps life cycle.
Dev & unit test
Goal:
Roll Back:�Changes can be vetted at any stage, followed by Roll back
Roll Back
Roll Back policy is different from stage to stage.
Criteria for Roll-back� Monitoring Alarm� Monitoring Metrics� Run scripts
Action� Redeploy last successful build� Cut a ticket
Dev & Unit test
IDEs� Homemade & public
Dependency Management
Java - Ant, Maven, Gradle; C/C++ - Make; JS - Grunt; Rake, Webpack
Building
CodeGen, Compiler, Interpreter � Output: Binary, image, doc, etc
Local Unit Test
Open Question: �- Does your org. have its own IDE/Plug-in?�- Does your org. have its own build system? What are the key components?
Code Repo
Auto merge & build
Test Env
Prod Env1
Stage
Dev & unit test
CI: Code Repo & Auto merge/build
Code Repo
Auto merge & build
Test Env
Prod Env1
Stage
Dev & unit test
Continuous Delivery
Other:�IaC�Serverless/Lambda
Code Repo
Auto merge & build
Test Env
Prod Env1
Stage
Dev & unit test
CI/CD testing pyramid
Deployment to Production
Code Repo
Auto merge & build
Test Env
Prod Env1
Stage
Dev & unit test
Dynamic/centralized Configuration
Implementation
Frameworks:
Key Functions:
Status
A/B Testing:
Code deprecation
Function
API
Service
Other streamlines
AI/ML?
Resources