Continuous Integration Continuous Delivery Via Containers PDF
Continuous Integration Continuous Delivery Via Containers PDF
AGENDA
CI/CD for Infrastructure
Docker Tagging and Genealogy
Testing in the context that is deployed to production
Docker factory floor from OS image to production
Build Slaves
Dockerfile builds via Jenkins
Docker container build slaves for Jenkins
Production image build
Satellite 6 and container builds
Patch cycle with Containers
Continuous Delivery
Tagging
Docker tags
By using symbolic tags you automatically update your inputs to the next step
of the factory build with Dockerfiles via the FROM value
For example:
OS:latest always the most current OS update that finished a docker build
Platform:latest the most current platform installed onto OS:latest
YourApp:latest the most current application deployed on Platform:latest
Docker tags:versions
Multiple factory lines can coexist. All Docker images that are the same input
and steps are cached and reused in the build process.
For example:
YourApp:Latest always the most current update that finished a Docker build
YourApp:QA the version undergoing testing
YourApp:Tested the version that passed integrated testing
YourApp:Production the most current version running in production
YourApp:Next the next version to deploy to production
YourApp:Tested-datestamp save a tag by date that passed the build and testing for
archive
Genealogy
Docker genealogy
Testing
New way:
Developers are responsible for writing tests to catch broken
apps before deployment
Operations provides correct testing OS+Platform containers
Factory
Jenkins will build from the point of change all the way to the end of the factory
Fan out strategy for variants you need to support such as multiple jdk versions
Fan out for for multiple os versions or patch levels, latest/tested/production/next
Restart containers with new code early and often in the latest track
Restart containers with the latest versions of other tracks as they are promoted
Always make sure you can build an app only change in the production and next tracks
Create build slaves that share the common ancestor image of the deployment container
Unit tests should be written that catch changes in operating system or platform that break
the application
Restrict build jobs to the proper labeled build slave
Factory Overview
Containers can use RHEL6 and RHEL7 repos on this host with the
advantage of content management capabilities
Library matches latest content from Red Hat Network
Lifecycle environments can match your needs for managed changes
QA
Next
PRD
Kubernetes Concepts
Pods
Collection of co-located containers with a unique ip address
Connect containers in the pod to each other via localhost networking
Shared volume(s)
Labels for Replication Controllers and Services to select
Kubernetes Concepts
Replication Controllers
Services
Update the pods of frontend by just changing the image, and keeping the old name
$ kubectl rolling-update yourapp --image=yourapp:v2
Portability
Where you build does not have to be where you run
Docker images can run anywhere RHEL can run via registry servers
Physical
Virtual
OpenStack
Public Cloud
Developer Laptops
Other benefits
Only Backup/Restore or make DR ready what is needed
Jenkins server
Satellite 6
Source code repositories
Databases and systems of record
Critical security patch: promote errata in Satellite 6 and rebuild production factory