how docker simplifies ci/cd
TRANSCRIPT
How Docker simplifies
CI/CD
Gabriel N. SchenkerDistinguished Software ArchitectPhD in Astrophysics
@gnschenker
www.lostechies.com/gabrielschenker
www.linkedin.com/in/gabrielschenker
https://github.com/gnschenker
Professional Scrum Foundations Training, Monday May 16 – Tuesday May 17
Held at Clear Measure Office
More Info/Register: http://www.scrum.org
•CI/CD – What and Why•Classical CI/CD pipeline•Containers – Quick Intro•CI using Docker•Defining a Service Stack•Blue-Green Deployment
By Dreamstime
CI/CD – What and Why• CI = Continuous Integration• Why do we need CI?
• CD = Continuous Delivery or Continuous Deployment• Why do we need CD?
Classical CI/CD pipelineYou need:• Source repository• CI Server• Multiple Environments (INT, UAT, Staging, PROD, etc.)• Infrastructure as Code• Service Discovery• Health Monitoring, Auto-Healing• Routing, Load Balancing• Blue-Green Deployment• Canary Releases• Centralized Logging & Monitoring• SLAs; Numbers and Metrics indicating Health
implement
SCMS
Push often(feature toggle OFF) Peer review
Developer 1
Developer 2Turn FeatureToggle ON Artifacts
Buildartifacts
BacklogPull story
1
3
2
8
Pull code4
5
7 Run unit-, integration-and end-2-end tests
6
Configure environment
CI-Server
when complete
QA/PO
Sign o
ff
9
10
CI
CodeRepo
Developer
Pushfeature
CI Server Integration Staging
promote
Build ArtifactsRun Unit andIntegration Tests
Infrastructure &Public Pool Tests
promote
Infrastructure andSmoke TestsA/B Testing
QAEnvironment
Full CI/CD pipeline
approve
promote
Continuous Delivery
Continuous Deployment
pull
Containers
VMs versus Containers
Operating System
Hypervisor
Guest OS
Bins/Libs
App 1
VM 1
Guest OS
Bins/Libs
App 2
VM 2
Guest OS
Bins/Libs
App 3
VM 3
Infrastructure
Operating System
Docker Host
Infrastructure
Bins/Libs
App 1
Container 1
Bins/Libs
App 2
Container 2
Bins/Libs
App 3
Container 3
A Sample Application
• APS.NET Core 1.0 RC1• Sample Template• Running on CLR-CORE
Containerizing my Application
Containerizing my Build Server
Publishing Container Images• Docker Hub• Trusted Registry
Deploying my Application
Scaling and High Availability
Blue-Green Deployment
ReverseProxy
Service Av1
Service Av2
request
ReverseProxy
Green
Blue
A/B testing
10%
90%
Centralized loggingand stats monitor
decision
collect
0% 100%
Canary ReleaseAlso called: A/B Testing