Build & test once, deploy
anywhere
Vday 2016
Zsolt Molnar
Introduction / Use-case
• Myself: 12 sysadmin + 3 years DevOps XP
• Software development company needs to ship
code to customers
• Requirements:
– Provide OVA/OVF images for Vmware ESXi/KVM
– Provide AMI images for AWS
– Build a CI/CD pipeline for both
– Enable easy updates without full image re-import
Quick intro
Basic build & test pipeline
Build Test Release
Inefficient pipeline
Integration
Test
Build
OVF
Integration
Test
Build
AMI
App code
Config mgmt
Release
Release
DISCLAMER – Adults only
1. The aim of the presentation is mainly to
show how can you stitch together different
tools to get an automated build and test
pipeline
2. The presentation at some places may not
follow general Docker
recommendation/guidelines for
simplification
Improved pipeline
Build
OVF
Integration
Test
Build
App code
Config mgmt
Build
AMI
Simple
test
Simple
test
...to the rescue!
Abstracting the application
environment
Drupal
mysql
PHP-FPM
NGINX
OS
OS
Drupal
mysql
PHP-FPM
NGINX
Full stack bundled to the Host OS
Separated application environment
(App bundled to a docker container)
Thin Host OS (For VM / AWS)
VM /
EC2
VM /
EC2
Improved pipeline
Build
VM
Integration
Test
Build
Docker
img
App code
Config mgmt
Build
AMI
Publish
to local
repo
Simple
test
Simple
test
Publish
to ECR
Publish
to S3
https://github.com/ysolt/vday2016-demo
Example application container
Systemd
MySQL
NGINX
PHP-FPM Drupal
Drupal
Container
https://github.com/ysolt/vday2016-demo
Etc… Cron?
Tools
• Jenkins – CI “orchestration”
• VirtualBox – VM on local machine
• Vagrant – build OVA/OVF
• Docker-mac
• Docker distribution (v2 registry) – local builds
• Packer – build AMI
• ECR – container registry for AMI build
• S3 – store container bundles for rolling updates
https://github.com/ysolt/vday2016-demo
Thanks for your attention
Q & A
https://github.com/ysolt/vday2016-demo

Build & test once, deploy anywhere - Vday.hu 2016