continuous delivery with containerskrumba.ch/presentations/2018/all_things_open_2018...jenkins-1...
TRANSCRIPT
![Page 1: Continuous Delivery with Containerskrumba.ch/presentations/2018/All_Things_Open_2018...Jenkins-1 Jenkins-2 GitLab Tests Tests Legacy Infrastructure + Containers Continue running your](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec6684c03fbe15f90107c85/html5/thumbnails/1.jpg)
Continuous Delivery with Containers
Elizabeth K. Joseph@pleia2
All Things Open 2018
![Page 2: Continuous Delivery with Containerskrumba.ch/presentations/2018/All_Things_Open_2018...Jenkins-1 Jenkins-2 GitLab Tests Tests Legacy Infrastructure + Containers Continue running your](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec6684c03fbe15f90107c85/html5/thumbnails/2.jpg)
Elizabeth K. Joseph@pleia2
Spent the past 2 years working containers with Apache Mesos and Kubernetes
4 years working on CI/CD for OpenStack
10+ years in Linux systems administration and engineering roles
Author of The Official Ubuntu Book and Common OpenStack Deployments
![Page 3: Continuous Delivery with Containerskrumba.ch/presentations/2018/All_Things_Open_2018...Jenkins-1 Jenkins-2 GitLab Tests Tests Legacy Infrastructure + Containers Continue running your](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec6684c03fbe15f90107c85/html5/thumbnails/3.jpg)
Definition: Continuous Delivery
Continuous Delivery (CD) is a software engineering approach in which teams produce software in short cycles, ensuring that the software can be reliably released at any time.
Via https://en.wikipedia.org/wiki/Continuous_delivery
![Page 4: Continuous Delivery with Containerskrumba.ch/presentations/2018/All_Things_Open_2018...Jenkins-1 Jenkins-2 GitLab Tests Tests Legacy Infrastructure + Containers Continue running your](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec6684c03fbe15f90107c85/html5/thumbnails/4.jpg)
Traditional Delivery
Months (or years!) between releases
Customers don’t see new features quickly
Developers lose track of features they worked on
![Page 5: Continuous Delivery with Containerskrumba.ch/presentations/2018/All_Things_Open_2018...Jenkins-1 Jenkins-2 GitLab Tests Tests Legacy Infrastructure + Containers Continue running your](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec6684c03fbe15f90107c85/html5/thumbnails/5.jpg)
Goal: A Modern Release Process with CD
Week 1: Project planning and release
Develop > Test > Stage > Release
Week 2: Customer Feedback and release
Develop > Test > Stage > Release
Week 3: Customer Feedback and release
Develop > Test > Stage > Release
...
![Page 6: Continuous Delivery with Containerskrumba.ch/presentations/2018/All_Things_Open_2018...Jenkins-1 Jenkins-2 GitLab Tests Tests Legacy Infrastructure + Containers Continue running your](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec6684c03fbe15f90107c85/html5/thumbnails/6.jpg)
The CI/CD Pipeline
git push
git repository CI/CD staging production
artifacts
image
test
![Page 7: Continuous Delivery with Containerskrumba.ch/presentations/2018/All_Things_Open_2018...Jenkins-1 Jenkins-2 GitLab Tests Tests Legacy Infrastructure + Containers Continue running your](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec6684c03fbe15f90107c85/html5/thumbnails/7.jpg)
How?
![Page 8: Continuous Delivery with Containerskrumba.ch/presentations/2018/All_Things_Open_2018...Jenkins-1 Jenkins-2 GitLab Tests Tests Legacy Infrastructure + Containers Continue running your](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec6684c03fbe15f90107c85/html5/thumbnails/8.jpg)
Run in containers!
CC BY 2.0: https://www.flickr.com/photos/rubbermaid/6909787969/
![Page 9: Continuous Delivery with Containerskrumba.ch/presentations/2018/All_Things_Open_2018...Jenkins-1 Jenkins-2 GitLab Tests Tests Legacy Infrastructure + Containers Continue running your](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec6684c03fbe15f90107c85/html5/thumbnails/9.jpg)
Organize everything efficiently!
CC BY-ND 2.0: https://www.flickr.com/photos/96227967@N05/24954030641/
![Page 10: Continuous Delivery with Containerskrumba.ch/presentations/2018/All_Things_Open_2018...Jenkins-1 Jenkins-2 GitLab Tests Tests Legacy Infrastructure + Containers Continue running your](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec6684c03fbe15f90107c85/html5/thumbnails/10.jpg)
Sidebar:Can’t I just use VMs for
testing?
Sure! But consider...
● VMs take longer to provision● You may not need all they
provide (kernel, system libraries…)
● An identical container image is simple to run in development, testing, staging and production
![Page 11: Continuous Delivery with Containerskrumba.ch/presentations/2018/All_Things_Open_2018...Jenkins-1 Jenkins-2 GitLab Tests Tests Legacy Infrastructure + Containers Continue running your](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec6684c03fbe15f90107c85/html5/thumbnails/11.jpg)
Bare Metal/VMs vs. Containers
Traditional Datacenter
Siloed servers
Low utilization
12-15% for bare metal
30% for virtual machines
Containerization Platform
Integrated cluster (service discovery, authentication, etc)
Workload multiplexing on the same machines
![Page 12: Continuous Delivery with Containerskrumba.ch/presentations/2018/All_Things_Open_2018...Jenkins-1 Jenkins-2 GitLab Tests Tests Legacy Infrastructure + Containers Continue running your](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec6684c03fbe15f90107c85/html5/thumbnails/12.jpg)
Does everything go in containers? Up to you.
![Page 13: Continuous Delivery with Containerskrumba.ch/presentations/2018/All_Things_Open_2018...Jenkins-1 Jenkins-2 GitLab Tests Tests Legacy Infrastructure + Containers Continue running your](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec6684c03fbe15f90107c85/html5/thumbnails/13.jpg)
Everything Running in Containers
Security &Governance
Container Orchestration
Monitoring & Operations
User Interface & Command Line
GitLab Jenkins Microservice Microservice Microservice
Microservice Artifactory Microservice Prometheus Microservice
Kubernetes, Docker Swarm, Apache Mesos
Services & Containers
Linux ServerLinux Server Linux Server Linux Server
Bare Metal, OpenStack, AWS, Azure, GCP
![Page 14: Continuous Delivery with Containerskrumba.ch/presentations/2018/All_Things_Open_2018...Jenkins-1 Jenkins-2 GitLab Tests Tests Legacy Infrastructure + Containers Continue running your](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec6684c03fbe15f90107c85/html5/thumbnails/14.jpg)
Everything Running in Containers
Traditional Datacenter Containerization Platform
Jenkins-1
Jenkins-2
GitLab
Tests
Tests
![Page 15: Continuous Delivery with Containerskrumba.ch/presentations/2018/All_Things_Open_2018...Jenkins-1 Jenkins-2 GitLab Tests Tests Legacy Infrastructure + Containers Continue running your](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec6684c03fbe15f90107c85/html5/thumbnails/15.jpg)
Legacy Infrastructure + Containers
Continue running your legacy systems on Bare Metal or VMs
Send all tests to a new, independent containerization platform
Tests
Tests
Tests
GitLab
![Page 16: Continuous Delivery with Containerskrumba.ch/presentations/2018/All_Things_Open_2018...Jenkins-1 Jenkins-2 GitLab Tests Tests Legacy Infrastructure + Containers Continue running your](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec6684c03fbe15f90107c85/html5/thumbnails/16.jpg)
Legacy Infrastructure + hosted + Containers
Continue running your legacy systems on Bare Metal or VMs
Send all tests to a new, independent containerization platform
Tests
Tests
Tests
Jenkins
![Page 17: Continuous Delivery with Containerskrumba.ch/presentations/2018/All_Things_Open_2018...Jenkins-1 Jenkins-2 GitLab Tests Tests Legacy Infrastructure + Containers Continue running your](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec6684c03fbe15f90107c85/html5/thumbnails/17.jpg)
Fully hosted with GitHub
Hosted CI/CD system
CircleCI
Travis CI
TeamCity
...
Test on cloud-hosted Kubernetes service:
● Google Kubernetes Engine (GKE)
● Azure Kubernetes Service (AKS)
● Amazon Elastic Container Service for Kubernetes (Amazon EKS)
![Page 18: Continuous Delivery with Containerskrumba.ch/presentations/2018/All_Things_Open_2018...Jenkins-1 Jenkins-2 GitLab Tests Tests Legacy Infrastructure + Containers Continue running your](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec6684c03fbe15f90107c85/html5/thumbnails/18.jpg)
Fully hosted with GitLab.com
Use GitLab.com (hosted GitLab) for repository, artifact store, test runner
And connect it to a cloud-hosted Kubernetes service:
● Google Kubernetes Engine (GKE)● Azure Kubernetes Service (AKS)● Amazon Elastic Container
Service for Kubernetes (Amazon EKS)
![Page 19: Continuous Delivery with Containerskrumba.ch/presentations/2018/All_Things_Open_2018...Jenkins-1 Jenkins-2 GitLab Tests Tests Legacy Infrastructure + Containers Continue running your](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec6684c03fbe15f90107c85/html5/thumbnails/19.jpg)
Or a combination of these!
![Page 20: Continuous Delivery with Containerskrumba.ch/presentations/2018/All_Things_Open_2018...Jenkins-1 Jenkins-2 GitLab Tests Tests Legacy Infrastructure + Containers Continue running your](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec6684c03fbe15f90107c85/html5/thumbnails/20.jpg)
Walkthrough:
Setting up a pipeline on with Auto DevOps
and KubernetesVisit https://docs.gitlab.com/ee/topics/autodevops/quick_start_guide.html
![Page 21: Continuous Delivery with Containerskrumba.ch/presentations/2018/All_Things_Open_2018...Jenkins-1 Jenkins-2 GitLab Tests Tests Legacy Infrastructure + Containers Continue running your](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec6684c03fbe15f90107c85/html5/thumbnails/21.jpg)
Select a project template
![Page 22: Continuous Delivery with Containerskrumba.ch/presentations/2018/All_Things_Open_2018...Jenkins-1 Jenkins-2 GitLab Tests Tests Legacy Infrastructure + Containers Continue running your](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec6684c03fbe15f90107c85/html5/thumbnails/22.jpg)
Set up project with template
![Page 23: Continuous Delivery with Containerskrumba.ch/presentations/2018/All_Things_Open_2018...Jenkins-1 Jenkins-2 GitLab Tests Tests Legacy Infrastructure + Containers Continue running your](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec6684c03fbe15f90107c85/html5/thumbnails/23.jpg)
Enable Kubernetes in Google Cloud
![Page 24: Continuous Delivery with Containerskrumba.ch/presentations/2018/All_Things_Open_2018...Jenkins-1 Jenkins-2 GitLab Tests Tests Legacy Infrastructure + Containers Continue running your](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec6684c03fbe15f90107c85/html5/thumbnails/24.jpg)
“Add Kubernetes Cluster”
![Page 25: Continuous Delivery with Containerskrumba.ch/presentations/2018/All_Things_Open_2018...Jenkins-1 Jenkins-2 GitLab Tests Tests Legacy Infrastructure + Containers Continue running your](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec6684c03fbe15f90107c85/html5/thumbnails/25.jpg)
Create new Cluster on GKE
![Page 26: Continuous Delivery with Containerskrumba.ch/presentations/2018/All_Things_Open_2018...Jenkins-1 Jenkins-2 GitLab Tests Tests Legacy Infrastructure + Containers Continue running your](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec6684c03fbe15f90107c85/html5/thumbnails/26.jpg)
Enter the details for your Kubernetes cluster
![Page 27: Continuous Delivery with Containerskrumba.ch/presentations/2018/All_Things_Open_2018...Jenkins-1 Jenkins-2 GitLab Tests Tests Legacy Infrastructure + Containers Continue running your](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec6684c03fbe15f90107c85/html5/thumbnails/27.jpg)
The cluster exists!
![Page 28: Continuous Delivery with Containerskrumba.ch/presentations/2018/All_Things_Open_2018...Jenkins-1 Jenkins-2 GitLab Tests Tests Legacy Infrastructure + Containers Continue running your](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec6684c03fbe15f90107c85/html5/thumbnails/28.jpg)
Enable Applications
![Page 29: Continuous Delivery with Containerskrumba.ch/presentations/2018/All_Things_Open_2018...Jenkins-1 Jenkins-2 GitLab Tests Tests Legacy Infrastructure + Containers Continue running your](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec6684c03fbe15f90107c85/html5/thumbnails/29.jpg)
Enable GitLab Auto DevOps
![Page 30: Continuous Delivery with Containerskrumba.ch/presentations/2018/All_Things_Open_2018...Jenkins-1 Jenkins-2 GitLab Tests Tests Legacy Infrastructure + Containers Continue running your](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec6684c03fbe15f90107c85/html5/thumbnails/30.jpg)
View pipelines
![Page 31: Continuous Delivery with Containerskrumba.ch/presentations/2018/All_Things_Open_2018...Jenkins-1 Jenkins-2 GitLab Tests Tests Legacy Infrastructure + Containers Continue running your](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec6684c03fbe15f90107c85/html5/thumbnails/31.jpg)
A pipeline!
![Page 32: Continuous Delivery with Containerskrumba.ch/presentations/2018/All_Things_Open_2018...Jenkins-1 Jenkins-2 GitLab Tests Tests Legacy Infrastructure + Containers Continue running your](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec6684c03fbe15f90107c85/html5/thumbnails/32.jpg)
What do these all mean?
Via: https://docs.gitlab.com/ee/topics/autodevops/quick_start_guide.html#deploying-the-application
![Page 33: Continuous Delivery with Containerskrumba.ch/presentations/2018/All_Things_Open_2018...Jenkins-1 Jenkins-2 GitLab Tests Tests Legacy Infrastructure + Containers Continue running your](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec6684c03fbe15f90107c85/html5/thumbnails/33.jpg)
Navigate to deployed application
![Page 34: Continuous Delivery with Containerskrumba.ch/presentations/2018/All_Things_Open_2018...Jenkins-1 Jenkins-2 GitLab Tests Tests Legacy Infrastructure + Containers Continue running your](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec6684c03fbe15f90107c85/html5/thumbnails/34.jpg)
Simple site in production!
![Page 35: Continuous Delivery with Containerskrumba.ch/presentations/2018/All_Things_Open_2018...Jenkins-1 Jenkins-2 GitLab Tests Tests Legacy Infrastructure + Containers Continue running your](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec6684c03fbe15f90107c85/html5/thumbnails/35.jpg)
Metrics! Via Prometheus in the GitLab UI
![Page 36: Continuous Delivery with Containerskrumba.ch/presentations/2018/All_Things_Open_2018...Jenkins-1 Jenkins-2 GitLab Tests Tests Legacy Infrastructure + Containers Continue running your](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec6684c03fbe15f90107c85/html5/thumbnails/36.jpg)
Make a change
![Page 37: Continuous Delivery with Containerskrumba.ch/presentations/2018/All_Things_Open_2018...Jenkins-1 Jenkins-2 GitLab Tests Tests Legacy Infrastructure + Containers Continue running your](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec6684c03fbe15f90107c85/html5/thumbnails/37.jpg)
Tests run again!
![Page 38: Continuous Delivery with Containerskrumba.ch/presentations/2018/All_Things_Open_2018...Jenkins-1 Jenkins-2 GitLab Tests Tests Legacy Infrastructure + Containers Continue running your](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec6684c03fbe15f90107c85/html5/thumbnails/38.jpg)
View console details of jobs running
![Page 39: Continuous Delivery with Containerskrumba.ch/presentations/2018/All_Things_Open_2018...Jenkins-1 Jenkins-2 GitLab Tests Tests Legacy Infrastructure + Containers Continue running your](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec6684c03fbe15f90107c85/html5/thumbnails/39.jpg)
Successfully deployed!
![Page 40: Continuous Delivery with Containerskrumba.ch/presentations/2018/All_Things_Open_2018...Jenkins-1 Jenkins-2 GitLab Tests Tests Legacy Infrastructure + Containers Continue running your](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec6684c03fbe15f90107c85/html5/thumbnails/40.jpg)
Advanced CD Strategies
![Page 41: Continuous Delivery with Containerskrumba.ch/presentations/2018/All_Things_Open_2018...Jenkins-1 Jenkins-2 GitLab Tests Tests Legacy Infrastructure + Containers Continue running your](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec6684c03fbe15f90107c85/html5/thumbnails/41.jpg)
Advanced Strategies: Canary Deployments
“Canary release is a technique to reduce the risk of introducing a new software version in production by slowly rolling out the change to a small subset of users before rolling it out to the entire infrastructure and making it available to everybody.”
https://martinfowler.com/bliki/CanaryRelease.html
![Page 42: Continuous Delivery with Containerskrumba.ch/presentations/2018/All_Things_Open_2018...Jenkins-1 Jenkins-2 GitLab Tests Tests Legacy Infrastructure + Containers Continue running your](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec6684c03fbe15f90107c85/html5/thumbnails/42.jpg)
Advanced Strategies: Blue/Green Deployments
“One of the challenges with automating deployment is the cut-over itself, taking software from the final stage of testing to live production. You usually need to do this quickly in order to minimize downtime. The blue-green deployment approach does this by ensuring you have two production environments, as identical as possible. At any time one of them, let's say blue for the example, is live. As you prepare a new release of your software you do your final stage of testing in the green environment. Once the software is working in the green environment, you switch the router so that all incoming requests go to the green environment - the blue one is now idle.”
https://martinfowler.com/bliki/BlueGreenDeployment.html
![Page 43: Continuous Delivery with Containerskrumba.ch/presentations/2018/All_Things_Open_2018...Jenkins-1 Jenkins-2 GitLab Tests Tests Legacy Infrastructure + Containers Continue running your](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec6684c03fbe15f90107c85/html5/thumbnails/43.jpg)
Advanced tooling exists!
Many containerization platforms allow for enough deployment strategies to define a canary or blue/green strategy yourself.
Tooling like Vamp can also help.
https://vamp.io/documentation/installation/v1.0.0/kubernetes/
https://vamp.io/documentation/installation/v1.0.0/dcos/
![Page 44: Continuous Delivery with Containerskrumba.ch/presentations/2018/All_Things_Open_2018...Jenkins-1 Jenkins-2 GitLab Tests Tests Legacy Infrastructure + Containers Continue running your](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec6684c03fbe15f90107c85/html5/thumbnails/44.jpg)
Questions?Elizabeth K. Joseph
@pleia2
https://princessleia.com/