SlideShare a Scribd company logo
Continuous Delivery with Containers:
The Good, the Bad, and the Ugly
Daniel Bryant
@danielbryantuk
Containers: Expectations versus reality
08/11/2017 @danielbryantuk
“DevOps”
Setting the scene…
• Continuous delivery is a large topic
• No business focus today (value stream etc)
• PaaS and Serverless are super interesting…
• But I’m assuming you’re all-in on containers
• Focusing today on the process and tooling
• No live coding today
• Mini-book contains more details (thanks nginx!)
08/11/2017 @danielbryantuk
bit.ly/2jWDSF7
TL;DR – Containers and CD
• Container image becomes the build pipeline ‘single binary’
• Adding metadata to containers images is vital, but challenging
• Must validate container constraints on system quality attributes (NFRs)
• Cultivate container ‘mechanical sympathy’
08/11/2017 @danielbryantuk
@danielbryantuk
• Independent Technical Consultant, CTO at SpectoLabs
• Architecture, DevOps, Java, microservices, cloud, containers
• Continuous Delivery (CI/CD) advocate
• Leading change through technology and teams
08/11/2017 @danielbryantuk
@danielbryantuk
08/11/2017 @danielbryantuk
Continuous Delivery
08/11/2017 @danielbryantuk
Continuous Delivery
• Produce valuable and robust software in short cycles
• Optimising for feedback and learning
• Not (necessarily) Continuous Deployment
08/11/2017 @danielbryantuk
Creation of a build pipeline is mandatory for continuous delivery
08/11/2017 @danielbryantuk
08/11/2017 @danielbryantuk
Feedback:
- Was our initial
hypothesis proven?
- How can we improve
business, architecture
and ops?
The impact of containers on CD
08/11/2017 @danielbryantuk
Container technology (and CD)
• OS-level virtualisation
• cgroups, namespaces, rootfs
• Package and execute software
• Container image == ‘single binary’
08/11/2017 @danielbryantuk
08/11/2017 @danielbryantuk
08/11/2017 @danielbryantuk
Microservices multiply the challenges
08/11/2017 @danielbryantuk
Creating a pipeline for containers
08/11/2017 @danielbryantuk
08/11/2017 @danielbryantuk
Make your dev environment like production
• Develop locally or copy/code in container
• Must build/test containers locally
• Perform (at least) happy path tests
• Use identical base images from production
• With same configuration
08/11/2017 @danielbryantuk
Lesson learned: Dockerfile content is super important
• OS choice
• Configuration
• Build artifacts
• Exposing ports
• Java
• JDK vs JRE and Oracle vs OpenJDK?
• Golang
• Statically compiled binary in scratch?
• Python
• Virtualenv?
08/11/2017 @danielbryantuk
Please talk to the sysadmin people:
Their operational knowledge is invaluable
08/11/2017 @danielbryantuk
Different test and prod containers?
• Create “test” version of container
• Full OS (e.g. Ubuntu)
• Test tools and data
• Easy to see app/configuration drift
• Use test sidecar containers instead
• ONTEST proposal by Alexi Ledenev
08/11/2017 @danielbryantuk
http://blog.terranillius.com/post/docker_testing/
Docker multi-stage builds
08/11/2017 @danielbryantuk
http://blog.alexellis.io/mutli-stage-docker-builds/
https://github.com/moby/moby/pull/31257
https://github.com/moby/moby/pull/32063
Java specific stuff…
08/11/2017 @danielbryantuk
github.com/oracle/docker-images/tree/master/OracleJava jdk.java.net/9/ea
Hot off the press: Modularity
• Create minimal runtime images
• “jlink delivers a self-contained
distribution of your application and
the JVM, ready to be shipped.”
• Benefits:
• Reduced footprint
• Performance
• Security
08/11/2017 @danielbryantuk
08/11/2017 @danielbryantuk
Building images with Jenkins
• My report covers this
• Build as usual…
• Build Docker Image
• Cloudbees Docker Build and Publish Plugin
• Push image to registry
08/11/2017 @danielbryantuk
Storing in an image registry (DockerHub)
08/11/2017 @danielbryantuk
Metadata – Beware of “latest” Docker Tag
• Beware of the ‘latest’ Docker tag
• “Latest” simply means
• the last build/tag that ran without
a specific tag/version specified
• Ignore “latest” tag
• Version your tags, every time
• danielbryantuk/test:2.4.1
08/11/2017 @danielbryantuk
Lesson learned: Metadata is valuable
• Application metadata
• Version / GIT SHA
• Build metadata
• Build date
• Image name
• Vendor
• Quality metadata
• QA control, signed binaries, ephemeral support
• Security profiles (AppArmor), Security audited etc
08/11/2017 @danielbryantuk
Metadata - Adding Labels at build time
• Docker Labels
• Add key/value data to image
08/11/2017 @danielbryantuk
Metadata - Adding Labels at build time
• Microscaling Systems’ Makefile
• Labelling automated builds on
DockerHub (h/t Ross Fairbanks)
• Create file ‘/hooks/build’
• label-schema.org
• microbadger.com
08/11/2017 @danielbryantuk
Metadata - Adding Labels at runtime
08/11/2017 @danielbryantuk
$ docker run -d --label
uk.co.danielbryant.lbname=frontdoor nginx
• Can ’docker commit’, but creates new image
• Not possible to update running container
• Docker Proposal: Update labels #21721
Liz Rice (and Aqua) to the rescue!
08/11/2017 @danielbryantuk
github.com/aquasecurity/manifesto
External registry with metadata support
08/11/2017 @danielbryantuk
08/11/2017 @danielbryantuk
Component testing
08/11/2017 @danielbryantuk
Testing: Jenkins Pipeline (as code)
08/11/2017 @danielbryantuk
08/11/2017 @danielbryantuk
Testing individual containers
08/11/2017 @danielbryantuk
Integration testing
08/11/2017 @danielbryantuk
Introducing Docker Compose
08/11/2017 @danielbryantuk
Docker Compose & Jenkins Pipeline
08/11/2017 @danielbryantuk
Ephemeral Kubernetes Clusters
• Kubernaut (WIP)
• Manages a pool of clusters
• ”Claim” a fresh cluster
• Use Helm to install dependencies
08/11/2017 @danielbryantuk
Testing NFRs in the build pipeline
• Performance and Load testing
• Gatling / jmeter
• Flood.io
• Security testing
• Findsecbugs / OWASP Dependency check
• Bdd-security (OWASP ZAP) / Arachni
• Gauntlt / Serverspec
• Docker Bench for Security / CoreOS Clair
08/11/2017 @danielbryantuk
08/11/2017 @danielbryantuk
www.owasp.org/index.php/OWASP_Dependency_Check
08/11/2017 @danielbryantuk
github.com/arminc/clair-scanner
Delaying NFRs to the ‘Last Responsible Moment’
Newsflash!
Sometimes the
last responsible moment
is up-front
Modern platforms/architectures
don’t necessarily make this easier
08/11/2017 @danielbryantuk
Mechanical sympathy: Docker and Java
• Watch for JVM cgroup/taskset awareness
• getAvailableProcessors() may incorrectly report the number of cpus in Docker (JDK-8140793)
• Runtime.availableProcessors() ignores Linux taskset command (JDK-6515172)
• Default fork/join thread pool sizes (and others) is based from host CPU count
• Set container memory appropriately
• JVM requirements = Heap size (Xmx) + Metaspace + JVM overhead
• Account for native thread requirements e.g. thread stack size (Xss)
• Entropy
• Host entropy can soon be exhausted by crypto operations and /dev/random blocks
• -Djava.security.egd=file:/dev/./urandom (notes on this)
08/11/2017 @danielbryantuk 48
Deployment
08/11/2017 @danielbryantuk
skillsmatter.com/skillscasts/10668-looking-forward-to-daniel-bryant-talk
docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.deploy-existing-version.html
Observability is core to continuous delivery
08/11/2017 @danielbryantuk
www.infoq.com/articles/monitoring-containers-at-scale
Containers are not a silver bullet
08/11/2017 @danielbryantuk
Moving to containers: Going all-in?
08/11/2017 @danielbryantuk
OR
Should I build my own container platform?
Probably not
(Unless you are Google, AWS or IBM)
Whatever you decide…
push it through a pipeline ASAP!
08/11/2017 @danielbryantuk
Using containers does not get rid of the need for
good architectural practices
08/11/2017 @danielbryantuk
08/11/2017 @danielbryantuk
https://speakerdeck.com/caseywest/containercon-north-america-cloud-anti-patterns
Summary
08/11/2017 @danielbryantuk
In summary
• Continuous delivery is vitally important in modern architectures/ops
• Container images must be the (single) source of truth within pipeline
• And metadata added as appropriate…
• Mechanical sympathy is important (assert properties in the pipeline)
• Not all developers are operationally aware
• The tooling is now becoming stable/mature
• We need to re-apply existing CD practices with new technologies/tooling
08/11/2017 @danielbryantuk
Bedtime reading
08/11/2017 @danielbryantuk
Thanks for listening!
• Book signing in 10 mins!
• Follow me to the O’Reilly table
• Feel free to contact me
• @danielbryantuk
• daniel.bryant@tai-dev.co.uk
08/11/2017 @danielbryantuk
bit.ly/2jWDSF7
Coming soon!
Bonus slides (for extra context)
08/11/2017 @danielbryantuk
Containerise an existing (monolithic) app?
• For
• We know the monolith well
• Allows homogenization of the
pipeline and deployment platform
• Can be a demonstrable win for
tech and the business
• Against
• Can be difficult (100+ line scripts)
• Often not designed for operation
within containers, nor cloud native
• Putting lipstick on a pig?
08/11/2017 @danielbryantuk
Key lessons learned
• Conduct an architectural review
• Architecture for Developers, by Simon Brown
• Architecture Interview, by Susan Fowler
• Look for data ingress/egress
• File system access
• Support resource constraints/transience
• Optimise for quick startup and shutdown
• Evaluate approach to concurrency
• Store configuration (secrets) remotely
08/11/2017 @danielbryantuk
New design patterns
08/11/2017 @danielbryantuk
bit.ly/2efe0TP
Microservices…
Containers and microservices are
complementary
Testing and deployment change
08/11/2017 @danielbryantuk
https://specto.io/blog/recipe-for-designing-building-testing-microservices.html
08/11/2017 @danielbryantuk
08/11/2017 @danielbryantuk
08/11/2017 @danielbryantuk
Quick Aside: Running *entire* system locally
08/11/2017 @danielbryantuk
https://news.ycombinator.com/item?id=13960107
https://opencredo.com/working-locally-with-microservices/
https://www.datawire.io/telepresence/ | https://hoverfly.io/

More Related Content

PPTX
O'Reilly SACON "Continuous Delivery Patterns for Contemporary Architecture"
PDF
JAXLondon 2017 "Continuous Delivery with Containers and Java"
PDF
DevOpsCon 2017 "Continuous Delivery with Containers"
PPTX
vJUG24 2017 "Continuous Delivery Patterns for Contemporary Architecture"
PDF
AllDayDevOps: "Microservices: The People and Organisational Impact"
PPTX
SATURN 2018 "Continuous Delivery with Containers" Extended 90 version
PPTX
ContainerSched 2017 "Continuous Delivery with Containers: The Good, the Bad, ...
PPTX
Codemotion Rome 2018 "Continuous Delivery with Containers: The Good, the Bad ...
O'Reilly SACON "Continuous Delivery Patterns for Contemporary Architecture"
JAXLondon 2017 "Continuous Delivery with Containers and Java"
DevOpsCon 2017 "Continuous Delivery with Containers"
vJUG24 2017 "Continuous Delivery Patterns for Contemporary Architecture"
AllDayDevOps: "Microservices: The People and Organisational Impact"
SATURN 2018 "Continuous Delivery with Containers" Extended 90 version
ContainerSched 2017 "Continuous Delivery with Containers: The Good, the Bad, ...
Codemotion Rome 2018 "Continuous Delivery with Containers: The Good, the Bad ...

What's hot (20)

PPTX
deliver:Agile 2018 "Continuous Delivery Patterns for Modern Architectures"
PPTX
JAX DevOps 2018 "Continuous Delivery Patterns for Modern Architectures"
PPTX
2015 03-11_todd-fritz_devnexus_2015
PPTX
O'Reilly/Nginx 2016: "Continuous Delivery with Containers: The Trials and Tri...
PDF
OOP/MM 2017: "Seven (More) Deadly Sins of Microservices"
PPTX
LSCC 2014 "Crafting DevOps: Applying Software Craftsmanship to DevOps"
PPTX
LJCConf 2013 "Chuck Norris Doesn't Need DevOps"
PPTX
Practical Approaches to Cloud Native Security
PPTX
CloudNativeLondon 2017: "What is a Service Mesh, and Do I Need One when Devel...
PDF
CNCF Webinar Series: "Creating an Effective Developer Experience on Kubernetes"
PPTX
DevSecOps in a cloudnative world
PPTX
The Tao of Docker - ITES 2018
PPTX
Docker and Devops
PPTX
An Integrated Pipeline for Private and Public Clouds with Jenkins, Artifactor...
PPTX
Kubernetes, Toolbox to fail or succeed for beginners - Demi Ben-Ari, VP R&D @...
PPTX
Accelerate your dev ops transformation with continuous automation
PDF
Alibaba Cloud Conference 2016 - Docker Open Source
PDF
Disruption from within
PPTX
KubeSecOps
PPTX
J1 2015 "Building a Microservice Ecosystem: Some Assembly Still Required"
deliver:Agile 2018 "Continuous Delivery Patterns for Modern Architectures"
JAX DevOps 2018 "Continuous Delivery Patterns for Modern Architectures"
2015 03-11_todd-fritz_devnexus_2015
O'Reilly/Nginx 2016: "Continuous Delivery with Containers: The Trials and Tri...
OOP/MM 2017: "Seven (More) Deadly Sins of Microservices"
LSCC 2014 "Crafting DevOps: Applying Software Craftsmanship to DevOps"
LJCConf 2013 "Chuck Norris Doesn't Need DevOps"
Practical Approaches to Cloud Native Security
CloudNativeLondon 2017: "What is a Service Mesh, and Do I Need One when Devel...
CNCF Webinar Series: "Creating an Effective Developer Experience on Kubernetes"
DevSecOps in a cloudnative world
The Tao of Docker - ITES 2018
Docker and Devops
An Integrated Pipeline for Private and Public Clouds with Jenkins, Artifactor...
Kubernetes, Toolbox to fail or succeed for beginners - Demi Ben-Ari, VP R&D @...
Accelerate your dev ops transformation with continuous automation
Alibaba Cloud Conference 2016 - Docker Open Source
Disruption from within
KubeSecOps
J1 2015 "Building a Microservice Ecosystem: Some Assembly Still Required"
Ad

Similar to Devoxx 2017 "Continuous Delivery with Containers: The Good, the Bad, and the Ugly" (20)

PPTX
vJUG 2017 "Continuous Delivery with Java and Docker: The Good, the Bad, and t...
PPTX
Continuous Delivery with Containers: The Good, the Bad, and the Ugly - Daniel...
PPTX
Continuous Delivery with Containers: The Good, the Bad, and the Ugly
PPTX
O'Reilly 2016: "Continuous Delivery with Containers: The Trials and Tribulati...
PPTX
CodeOne SF 2018 "Continuous Delivery with Containers: Lessons Learned"
PPTX
OReilly SACON 2016 "A Practical Guide for Continuous Delivery with Containers"
PPTX
DockerCon EU 2018 "Continuous Delivery with Docker and Java"
PDF
DCEU 18: Continuous Delivery with Docker Containers and Java: The Good, the B...
PDF
Introduction to Containers: From Docker to Kubernetes and everything in-between
PDF
All Things Containers - Docker, Kubernetes, Helm, Istio, GitOps and more
PPTX
CodeOne 2019: "Continuous Delivery with Docker and Java"
PDF
Introduction to Containers - From Docker to Kubernetes and everything in between
PPTX
DockerCon 2016 - Structured Container Delivery
PDF
Containers & Cloud Native Ops Cloud Foundry Approach
PPTX
Structured Container Delivery by Oscar Renalias, Accenture
PDF
Microservices and Docker at Scale: The PB&J of Modern Systems
PDF
Introduction to Containers - From Docker to Kubernetes and everything in between
PDF
Container Landscape in 2019
PDF
Docker in Production: How RightScale Delivers Cloud Applications
PPTX
Docker & aPaaS: Enterprise Innovation and Trends for 2015
vJUG 2017 "Continuous Delivery with Java and Docker: The Good, the Bad, and t...
Continuous Delivery with Containers: The Good, the Bad, and the Ugly - Daniel...
Continuous Delivery with Containers: The Good, the Bad, and the Ugly
O'Reilly 2016: "Continuous Delivery with Containers: The Trials and Tribulati...
CodeOne SF 2018 "Continuous Delivery with Containers: Lessons Learned"
OReilly SACON 2016 "A Practical Guide for Continuous Delivery with Containers"
DockerCon EU 2018 "Continuous Delivery with Docker and Java"
DCEU 18: Continuous Delivery with Docker Containers and Java: The Good, the B...
Introduction to Containers: From Docker to Kubernetes and everything in-between
All Things Containers - Docker, Kubernetes, Helm, Istio, GitOps and more
CodeOne 2019: "Continuous Delivery with Docker and Java"
Introduction to Containers - From Docker to Kubernetes and everything in between
DockerCon 2016 - Structured Container Delivery
Containers & Cloud Native Ops Cloud Foundry Approach
Structured Container Delivery by Oscar Renalias, Accenture
Microservices and Docker at Scale: The PB&J of Modern Systems
Introduction to Containers - From Docker to Kubernetes and everything in between
Container Landscape in 2019
Docker in Production: How RightScale Delivers Cloud Applications
Docker & aPaaS: Enterprise Innovation and Trends for 2015
Ad

More from Daniel Bryant (20)

PDF
ITKonekt 2023: The Busy Platform Engineers Guide to API Gateways
PDF
CraftConf 2023 "Microservice Testing Techniques: Mocks vs Service Virtualizat...
PDF
PlatformCon 23: "The Busy Platform Engineers Guide to API Gateways"
PDF
Java Meetup 23: 'Debugging Microservices "Remocally" in Kubernetes with Telep...
PPTX
DevRelCon 2022: "Is Product Led Growth (PLG) the “DevOps” of the DevRel World"
PDF
Fall 22: "From Kubernetes to PaaS to... err, what's next"
PDF
Building Microservice Systems Without Cooking Your Laptop: Going “Remocal” wi...
PDF
KubeCrash 22: Debugging Microservices "Remocally" in Kubernetes with Telepres...
PDF
JAX London 22: Debugging Microservices "Remocally" in Kubernetes with Telepre...
PDF
CloudBuilders 2022: "The Past, Present, and Future of Cloud Native API Gateways"
PDF
KubeCon EU 2022: From Kubernetes to PaaS to Err What's Next
PDF
Devoxx UK 22: Debugging Java Microservices "Remocally" in Kubernetes with Tel...
PDF
DevXDay KubeCon NA 2021: "From Kubernetes to PaaS to Developer Control Planes"
PDF
JAX London 2021: Jumpstart Your Cloud Native Development: An Overview of Prac...
PDF
Container Days: Easy Debugging of Microservices Running on Kubernetes with Te...
PDF
Canadian CNCF: "Emissary-ingress 101: An introduction to the CNCF incubation-...
PDF
MJC 2021: "Debugging Java Microservices Running on Kubernetes with Telepresence"
PDF
LJC 4/21"Easy Debugging of Java Microservices Running on Kubernetes with Tele...
PDF
GOTOpia 2/2021 "Cloud Native Development Without the Toil: An Overview of Pra...
PPTX
HashiCorp Webinar: "Getting started with Ambassador and Consul on Kubernetes ...
ITKonekt 2023: The Busy Platform Engineers Guide to API Gateways
CraftConf 2023 "Microservice Testing Techniques: Mocks vs Service Virtualizat...
PlatformCon 23: "The Busy Platform Engineers Guide to API Gateways"
Java Meetup 23: 'Debugging Microservices "Remocally" in Kubernetes with Telep...
DevRelCon 2022: "Is Product Led Growth (PLG) the “DevOps” of the DevRel World"
Fall 22: "From Kubernetes to PaaS to... err, what's next"
Building Microservice Systems Without Cooking Your Laptop: Going “Remocal” wi...
KubeCrash 22: Debugging Microservices "Remocally" in Kubernetes with Telepres...
JAX London 22: Debugging Microservices "Remocally" in Kubernetes with Telepre...
CloudBuilders 2022: "The Past, Present, and Future of Cloud Native API Gateways"
KubeCon EU 2022: From Kubernetes to PaaS to Err What's Next
Devoxx UK 22: Debugging Java Microservices "Remocally" in Kubernetes with Tel...
DevXDay KubeCon NA 2021: "From Kubernetes to PaaS to Developer Control Planes"
JAX London 2021: Jumpstart Your Cloud Native Development: An Overview of Prac...
Container Days: Easy Debugging of Microservices Running on Kubernetes with Te...
Canadian CNCF: "Emissary-ingress 101: An introduction to the CNCF incubation-...
MJC 2021: "Debugging Java Microservices Running on Kubernetes with Telepresence"
LJC 4/21"Easy Debugging of Java Microservices Running on Kubernetes with Tele...
GOTOpia 2/2021 "Cloud Native Development Without the Toil: An Overview of Pra...
HashiCorp Webinar: "Getting started with Ambassador and Consul on Kubernetes ...

Recently uploaded (20)

PDF
Encapsulation theory and applications.pdf
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Big Data Technologies - Introduction.pptx
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
A Presentation on Artificial Intelligence
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Empathic Computing: Creating Shared Understanding
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
KodekX | Application Modernization Development
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
Encapsulation theory and applications.pdf
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Reach Out and Touch Someone: Haptics and Empathic Computing
Dropbox Q2 2025 Financial Results & Investor Presentation
Big Data Technologies - Introduction.pptx
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Digital-Transformation-Roadmap-for-Companies.pptx
A Presentation on Artificial Intelligence
MYSQL Presentation for SQL database connectivity
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Empathic Computing: Creating Shared Understanding
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Chapter 3 Spatial Domain Image Processing.pdf
KodekX | Application Modernization Development
NewMind AI Weekly Chronicles - August'25 Week I
Understanding_Digital_Forensics_Presentation.pptx
The Rise and Fall of 3GPP – Time for a Sabbatical?

Devoxx 2017 "Continuous Delivery with Containers: The Good, the Bad, and the Ugly"