Upload
zsolt-molnar
View
20
Download
1
Embed Size (px)
Citation preview
Build & test once, deploy anywhere
Vday 2016Zsolt 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
IntegrationTest
Build OVF
IntegrationTest
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
IntegrationTest
Build App code
Config mgmt
Build AMI
Simple test
Simple test
...to the rescue!
Abstracting the application environment
Drupalmysql
PHP-FPMNGINX
OS
OS
Drupalmysql
PHP-FPMNGINX
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
IntegrationTest
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 & Ahttps://github.com/ysolt/vday2016-demo