SlideShare a Scribd company logo
Docker and Puppet for
Continuous Integration
Giacomo Vacca, Founder at RTCSoft, gv@rtcsoft.net
About me
• 15 years “in the trenches cubicles”
• Developer of RTC (VoIP, IM, WebRTC) solutions
• Founder of RTCSoft in 2015
@giavac
https://github.com/giavac
gv@rtcsoft.net
Docker usage scenarios
• Run services
• Packaging/Deployment
mechanism
• Fast prototyping
• Continuous Integration/
Delivery
Continuous Integration 1/2
• A team of developers work on the same project
• Each developer commits several times per day
• Each commit is potentially verified (Build, Deploy, Test)
• The project is always kept in a stable/releasable state
Continuous Integration 2/2
• Developers work on personal/bug/feature (short-lived) branches
• These branches are merged into the “release” branch for the release
Image source: www.atlassian.com
CI components
Image source: myself (This is why it sucks)
Server-side apps for Linux
• Apps are built, packaged, deployed and tested
• Unit testing during the builds
• Component/Integration/Load testing after test deployments
• Artefacts are uploaded into file servers or deb/yum repos
Old school: “Build and run”
Build the app on the runtime machine
• PROBLEMS:
• Repeat the build on each host
• Unnecessary pollution of the runtime host
• Maintenance nightmare: the easiest upgrade is problematic
• Potential exposure of source code to external attacks
Using a “Build machine”
Dedicate a machine to the various builds
• PROs:
• Keep the runtime environment reasonably clean
• Source code is protected inside the private network
• CONs:
• You’re reducing a multi-dimensional problem into a bi-dimensional one
• You’ll pay the price one day!
• Widely adopted, Open Source CI tool
• Core + many plugins
• Integrates well with git and Docker
• Can manage multiple “slaves”
https://jenkins-ci.org/
Jenkins and Master worker
• “Cron jobs manager with a GUI”
• What’s a Jenkins job?
• The simplest case: Jenkins runs the jobs inside its own host
• “Master” worker, no slaves involved
• Still you need to manage Jenkins’ configuration…
Building machineS
Assign a VM per building scenario (app/OS)
• A step in the right direction
• CONs:
• Hard to maintain (see Configuration Management later)
• VM resources allocated even when the builds are not running
• Explosion of number of VM types to use (OS/versions matrix)
• VMs are “heavy”
Jenkins and Slaves
• Configure a number of “slave workers”
• Assign a slave to a job
• But you need to maintain all those slaves…
Configuration Management
You need something better than that.
Configuration Management intro
• Define programmatically the configuration of a machine
• Many tools available: Puppet, Ansible, Chef, Salt, etc.
• Make configuration predictable AND fix divergence automatically
• Track changes during time (it’s all text)
• Define a formal language across developers, sysadmin, Ops
• Puppet defines the final state of a host (What, not How)
• Has its own declarative syntax
• Written in Ruby
• Designed for Master-Slave interaction, can be used Standalone
• Idempotent
https://puppetlabs.com/
Configuration Management
You really, really need it. Even if you like 3-ways diffs and hate the term “idempotence”.
Example of Puppet codepackage { 'nginx':
ensure => present,
} ->
file { '/etc/nginx/nginx.conf':
ensure => file,
owner => 'root',
group => 'root',
mode => '0644',
content => template('mymodule/nginx.conf.erb'),
notify => Service['nginx'],
} ->
file { '/etc/nginx/conf.d/global.conf':
ensure => file,
owner => 'root',
group => 'root',
mode => '0644',
content => template('mymodule/nginx_global.conf.erb'),
notify => Service['nginx'],
}
service { 'nginx':
ensure => running,
enable => true,
}
Back to Jenkins and multiple Slaves
• We saw the approach with multiple slaves, with VMs as slave
• Functionally valid
• Cumbersome to maintain
• What if we could have “on demand”, lightweight workers? e.g.
Docker containers?
• A new form of virtualisation (w/ real HW performance)
• A delivery mechanism
• Many “images” freely available
• “Here’s the ingredients and recipe” VS “Here’s the cake”
https://www.docker.com/
Virtual Machines vs Docker
Source: https://www.docker.com/what-docker
Docker workflow
• Build an image (Dockerfile + base images)
• docker build -t gvacca/nginx .
• Store image in a registry (Public, e.g. Dockerhub or private)
• docker push gvacca/nginx
• Pull image on a target host
• docker pull gvacca/nginx
• Run container on a target host
• docker run -it gvacca/nginx
Dockerfile - example
FROM ubuntu:latest
MAINTAINER Giacomo Vacca <gv@rtcsoft.net>
RUN apt-get update
# Install nginx
RUN apt-get -y -q install nginx
# Prepare target dir for website (Must match global.conf)
RUN mkdir -p /var/www/html
# Configure nginx
COPY nginx/nginx.conf /etc/nginx/nginx.conf
COPY nginx/global.conf /etc/nginx/conf.d/global.conf
EXPOSE 8080
CMD [ "/usr/sbin/nginx" ]
https://github.com/giavac/docker-experiments/tree/master/simple_nginx
Build a Docker image
gvacca@dockerubuntu:~simple_nginx$ sudo docker build -t gvacca/simple-nginx .
Sending build context to Docker daemon 7.168 kB
Step 1 : FROM ubuntu:14.04
---> 1d073211c498
…
Step 2 : MAINTAINER Giacomo Vacca <gv@rtcsoft.net>
---> Running in 10a8334becfd
---> 559310abf4fb
Removing intermediate container 10a8334becfd
Step 3 : RUN apt-get update
---> Running in 873b09debab0
…
Step 8 : EXPOSE 8080
---> Running in a27f73413c02
---> f5ef8527f2a3
Removing intermediate container a27f73413c02
Step 9 : CMD /usr/sbin/nginx
---> Running in d99de19cc782
---> df76d20cd00f
Removing intermediate container d99de19cc782
Successfully built df76d20cd00f
Run the container!
gvacca@dockerubuntu:simple_nginx$ sudo docker run -d --name nginx -p 8080:8080 -v
$PWD/website:/var/www/html/website gvacca/simple-nginx
add8d371f82f615ebbd121cea804511dcdafac893b14325366744797424fa44c
gvacca@dockerubuntu:simple_nginx$ sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED
STATUS PORTS NAMES
add8d371f82f gvacca/simple-nginx "/usr/sbin/nginx" 11 seconds ago
Up 9 seconds 0.0.0.0:8080->8080/tcp nginx
gvacca@dockerubuntu:simple_nginx$ ps aux |grep docker
root 792 0.0 4.7 693136 23740 ? Ssl Nov04 11:20 /usr/bin/docker
daemon
root 1977 0.0 2.6 152692 13172 ? Sl 11:26 0:00 docker-proxy -
proto tcp -host-ip 0.0.0.0 -host-port 8080 -container-ip 172.17.0.2 -container-port
8080
Intermediate topics
• Volumes
• Network (was ‘link’ before 1.9)
• Debugging (‘inspect’)
• ARG (after 1.9)
• Docker on OSX/Windows (Docker Machine)
• Interacting with Kernel modules
Docker orchestration
• Docker Composer
• Docker Swarm
• Google’s Kubernetes
• Apache Mesos
• Puppet & others
Let’s start exploring interaction
opportunities between the tools
seen so far…
Puppet to manage Jenkins
• https://forge.puppetlabs.com/rtyler/jenkins
• Manage Jenkins as a service
• Install plugins automatically, etc
• Or build your own module!
• Install .war
• Configure Jenkins (config.xml)
• Configure jobs ($JENKINS_PATH/jobs/JOB/config.xml)
Docker as Slave for Jenkins
• Associate specific Docker images to specific Jenkins build jobs
• Keep builds clean & reproducible (“Non-event releases”)
• Run slave containers on demand - stop them when not needed.
• Jenkins Plugin: https://wiki.jenkins-ci.org/display/JENKINS/Docker
+Plugin
• Other Cloud methods, e.g. Mesos
Jenkins to build Docker images
• A Jenkins job:
• Checks out a Dockerfile
• Builds the image
• Upload the new image in a repo
• May re-use images for new builds (careful about integrity)
Puppet to manage Docker containers
• Module for docker: https://forge.puppetlabs.com/garethr/docker
• Installs Docker and required dependencies
• Launches the Docker daemon
• Sets DNS, users and other configuration items
• Pull images from selected repos
• Run containers (image + command)
Run Jenkins inside Docker
• Manage Jenkins with a dedicated image + volume with data
• From the official Docker registry: https://hub.docker.com/_/jenkins/
docker run -d -p 8080:8080 -p 50000:50000 -v ~:/var/jenkins_home jenkins
• TCP 8080: Web UI
• TCP 50000: interface to connect slaves
Docker inside Docker
But you need the privileged mode
Conclusion
• There are many opportunities to automate Continuous Integration
• CI for server-side apps poses specific challenges
• You can’t ignore Configuration Management
• Docker represents a huge opportunity
• You need to find your own use case and solution
APPENDIX - Puppet vs Docker
• Some stop using Puppet for Configuration Management once they
move their apps inside containers
• A Dockerfile defines “how” to build an image
• A Dockerfile must be distribution-specific (yum or apt?)
• Puppet is OS-agnostic: the differences are hidden inside modules
Questions and Answers
Thanks
Recommended Books
• “The Docker book”, J. Turnbull, http://www.amazon.co.uk/Docker-
Book-Containerization-new-virtualization-ebook/dp/B00LRROTI4
• “Continuous Delivery”, J. Humble, http://www.amazon.com/
Continuous-Delivery-Deployment-Automation-Addison-Wesley/dp/
0321601912
• “Pro Puppet”, J. Turnbull, http://www.amazon.co.uk/Pro-Puppet-
Second-Professional-Apress/dp/1430260408
See also…
http://www.slideshare.net/GiacomoVacca/when-voip-meets-web-the-
revolution-of-webrtc

More Related Content

What's hot

Using Kubernetes for Continuous Integration and Continuous Delivery. Java2days
Using Kubernetes for Continuous Integration and Continuous Delivery. Java2daysUsing Kubernetes for Continuous Integration and Continuous Delivery. Java2days
Using Kubernetes for Continuous Integration and Continuous Delivery. Java2days
Carlos Sanchez
 
Continuous Integration and Kamailio
Continuous Integration and KamailioContinuous Integration and Kamailio
Continuous Integration and Kamailio
Giacomo Vacca
 
7 Habits of Highly Effective Jenkins Users
7 Habits of Highly Effective Jenkins Users7 Habits of Highly Effective Jenkins Users
7 Habits of Highly Effective Jenkins Users
Jules Pierre-Louis
 
Vagrant + Docker provider [+Puppet]
Vagrant + Docker provider [+Puppet]Vagrant + Docker provider [+Puppet]
Vagrant + Docker provider [+Puppet]
Nicolas Poggi
 
It Works On My Machine: Vagrant for Software Development
It Works On My Machine: Vagrant for Software DevelopmentIt Works On My Machine: Vagrant for Software Development
It Works On My Machine: Vagrant for Software Development
Carlos Perez
 
State of the Jenkins Automation
State of the Jenkins AutomationState of the Jenkins Automation
State of the Jenkins Automation
Julien Pivotto
 
Automated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWS
Automated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWSAutomated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWS
Automated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWSBamdad Dashtban
 
Baking docker using chef
Baking docker using chefBaking docker using chef
Baking docker using chef
Mukta Aphale
 
Using Docker for Testing
Using Docker for TestingUsing Docker for Testing
Using Docker for Testing
Carlos Sanchez
 
Continuous Integration/Deployment with Docker and Jenkins
Continuous Integration/Deployment with Docker and JenkinsContinuous Integration/Deployment with Docker and Jenkins
Continuous Integration/Deployment with Docker and Jenkins
Francesco Bruni
 
OSDC 2017 - Julien Pivotto - Automating Jenkins
OSDC 2017 - Julien Pivotto - Automating JenkinsOSDC 2017 - Julien Pivotto - Automating Jenkins
OSDC 2017 - Julien Pivotto - Automating Jenkins
NETWAYS
 
Testing with Docker
Testing with DockerTesting with Docker
Testing with Docker
toffermann
 
Package Management on Windows with Chocolatey
Package Management on Windows with ChocolateyPackage Management on Windows with Chocolatey
Package Management on Windows with Chocolatey
Puppet
 
Building Jenkins Pipelines at Scale
Building Jenkins Pipelines at ScaleBuilding Jenkins Pipelines at Scale
Building Jenkins Pipelines at Scale
Julien Pivotto
 
GlassFish Embedded API
GlassFish Embedded APIGlassFish Embedded API
GlassFish Embedded API
Eduardo Pelegri-Llopart
 
Using Kubernetes for Continuous Integration and Continuous Delivery
Using Kubernetes for Continuous Integration and Continuous DeliveryUsing Kubernetes for Continuous Integration and Continuous Delivery
Using Kubernetes for Continuous Integration and Continuous Delivery
Carlos Sanchez
 
Javaone 2014 - Git & Docker with Jenkins
Javaone 2014 - Git & Docker with JenkinsJavaone 2014 - Git & Docker with Jenkins
Javaone 2014 - Git & Docker with Jenkins
Andy Pemberton
 
devops@cineca
devops@cinecadevops@cineca
devops@cineca
Linuxaria.com
 
Deployment Automation with Docker
Deployment Automation with DockerDeployment Automation with Docker
Deployment Automation with Docker
Egor Pushkin
 
How to Improve Your Image Builds Using Advance Docker Build
How to Improve Your Image Builds Using Advance Docker BuildHow to Improve Your Image Builds Using Advance Docker Build
How to Improve Your Image Builds Using Advance Docker Build
Docker, Inc.
 

What's hot (20)

Using Kubernetes for Continuous Integration and Continuous Delivery. Java2days
Using Kubernetes for Continuous Integration and Continuous Delivery. Java2daysUsing Kubernetes for Continuous Integration and Continuous Delivery. Java2days
Using Kubernetes for Continuous Integration and Continuous Delivery. Java2days
 
Continuous Integration and Kamailio
Continuous Integration and KamailioContinuous Integration and Kamailio
Continuous Integration and Kamailio
 
7 Habits of Highly Effective Jenkins Users
7 Habits of Highly Effective Jenkins Users7 Habits of Highly Effective Jenkins Users
7 Habits of Highly Effective Jenkins Users
 
Vagrant + Docker provider [+Puppet]
Vagrant + Docker provider [+Puppet]Vagrant + Docker provider [+Puppet]
Vagrant + Docker provider [+Puppet]
 
It Works On My Machine: Vagrant for Software Development
It Works On My Machine: Vagrant for Software DevelopmentIt Works On My Machine: Vagrant for Software Development
It Works On My Machine: Vagrant for Software Development
 
State of the Jenkins Automation
State of the Jenkins AutomationState of the Jenkins Automation
State of the Jenkins Automation
 
Automated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWS
Automated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWSAutomated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWS
Automated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWS
 
Baking docker using chef
Baking docker using chefBaking docker using chef
Baking docker using chef
 
Using Docker for Testing
Using Docker for TestingUsing Docker for Testing
Using Docker for Testing
 
Continuous Integration/Deployment with Docker and Jenkins
Continuous Integration/Deployment with Docker and JenkinsContinuous Integration/Deployment with Docker and Jenkins
Continuous Integration/Deployment with Docker and Jenkins
 
OSDC 2017 - Julien Pivotto - Automating Jenkins
OSDC 2017 - Julien Pivotto - Automating JenkinsOSDC 2017 - Julien Pivotto - Automating Jenkins
OSDC 2017 - Julien Pivotto - Automating Jenkins
 
Testing with Docker
Testing with DockerTesting with Docker
Testing with Docker
 
Package Management on Windows with Chocolatey
Package Management on Windows with ChocolateyPackage Management on Windows with Chocolatey
Package Management on Windows with Chocolatey
 
Building Jenkins Pipelines at Scale
Building Jenkins Pipelines at ScaleBuilding Jenkins Pipelines at Scale
Building Jenkins Pipelines at Scale
 
GlassFish Embedded API
GlassFish Embedded APIGlassFish Embedded API
GlassFish Embedded API
 
Using Kubernetes for Continuous Integration and Continuous Delivery
Using Kubernetes for Continuous Integration and Continuous DeliveryUsing Kubernetes for Continuous Integration and Continuous Delivery
Using Kubernetes for Continuous Integration and Continuous Delivery
 
Javaone 2014 - Git & Docker with Jenkins
Javaone 2014 - Git & Docker with JenkinsJavaone 2014 - Git & Docker with Jenkins
Javaone 2014 - Git & Docker with Jenkins
 
devops@cineca
devops@cinecadevops@cineca
devops@cineca
 
Deployment Automation with Docker
Deployment Automation with DockerDeployment Automation with Docker
Deployment Automation with Docker
 
How to Improve Your Image Builds Using Advance Docker Build
How to Improve Your Image Builds Using Advance Docker BuildHow to Improve Your Image Builds Using Advance Docker Build
How to Improve Your Image Builds Using Advance Docker Build
 

Viewers also liked

Using Docker with Puppet - PuppetConf 2014
Using Docker with Puppet - PuppetConf 2014Using Docker with Puppet - PuppetConf 2014
Using Docker with Puppet - PuppetConf 2014
Puppet
 
Chasing AMI - Building Amazon machine images with Puppet, Packer and Jenkins
Chasing AMI - Building Amazon machine images with Puppet, Packer and JenkinsChasing AMI - Building Amazon machine images with Puppet, Packer and Jenkins
Chasing AMI - Building Amazon machine images with Puppet, Packer and Jenkins
Tomas Doran
 
PuppetDB, Puppet Explorer and puppetdbquery
PuppetDB, Puppet Explorer and puppetdbqueryPuppetDB, Puppet Explorer and puppetdbquery
PuppetDB, Puppet Explorer and puppetdbquery
Puppet
 
Windows Configuration Management: Managing Packages, Services, & Power Shell-...
Windows Configuration Management: Managing Packages, Services, & Power Shell-...Windows Configuration Management: Managing Packages, Services, & Power Shell-...
Windows Configuration Management: Managing Packages, Services, & Power Shell-...
Puppet
 
Installaling Puppet Master and Agent
Installaling Puppet Master and AgentInstallaling Puppet Master and Agent
Installaling Puppet Master and AgentRanjit Avasarala
 
Provisioning environments. A simplistic approach
Provisioning  environments. A simplistic approachProvisioning  environments. A simplistic approach
Provisioning environments. A simplistic approach
Eder Roger Souza
 
Puppet for dummies - ZendCon 2011 Edition
Puppet for dummies - ZendCon 2011 EditionPuppet for dummies - ZendCon 2011 Edition
Puppet for dummies - ZendCon 2011 Edition
Joshua Thijssen
 
Icinga 2 and Puppet automate monitoring
Icinga 2 and Puppet  automate monitoringIcinga 2 and Puppet  automate monitoring
Icinga 2 and Puppet automate monitoring
Icinga
 
Intro to Puppet Enterprise
Intro to Puppet EnterpriseIntro to Puppet Enterprise
Intro to Puppet Enterprise
Puppet
 
Managing Windows Systems with Puppet - PuppetConf 2013
Managing Windows Systems with Puppet - PuppetConf 2013Managing Windows Systems with Puppet - PuppetConf 2013
Managing Windows Systems with Puppet - PuppetConf 2013
Puppet
 
Managing Puppet using MCollective
Managing Puppet using MCollectiveManaging Puppet using MCollective
Managing Puppet using MCollective
Puppet
 
Red Hat Satellite 6 - Automation with Puppet
Red Hat Satellite 6 - Automation with PuppetRed Hat Satellite 6 - Automation with Puppet
Red Hat Satellite 6 - Automation with Puppet
Michael Lessard
 
Designing Puppet: Roles/Profiles Pattern
Designing Puppet: Roles/Profiles PatternDesigning Puppet: Roles/Profiles Pattern
Designing Puppet: Roles/Profiles Pattern
Puppet
 
Puppetconf 2015 - Puppet Reporting with Elasticsearch Logstash and Kibana
Puppetconf 2015 - Puppet Reporting with Elasticsearch Logstash and KibanaPuppetconf 2015 - Puppet Reporting with Elasticsearch Logstash and Kibana
Puppetconf 2015 - Puppet Reporting with Elasticsearch Logstash and Kibana
pkill
 
Deploying OpenStack Using Docker in Production
Deploying OpenStack Using Docker in ProductionDeploying OpenStack Using Docker in Production
Deploying OpenStack Using Docker in Production
clayton_oneill
 
Scaling Continuous Integration for Puppet
Scaling Continuous Integration for PuppetScaling Continuous Integration for Puppet
Scaling Continuous Integration for Puppet
Salesforce Engineering
 
Top 5 Challenges To Add Web Calls to Truphone VoIP Platform
Top 5 Challenges To Add Web Calls to Truphone VoIP PlatformTop 5 Challenges To Add Web Calls to Truphone VoIP Platform
Top 5 Challenges To Add Web Calls to Truphone VoIP Platform
Giacomo Vacca
 
Containers #101 Meetup: Containers & OpenStack
Containers #101 Meetup: Containers & OpenStack Containers #101 Meetup: Containers & OpenStack
Containers #101 Meetup: Containers & OpenStack
Brittany Ingram
 
Kolla - containerizing the cloud itself
Kolla - containerizing the cloud itselfKolla - containerizing the cloud itself
Kolla - containerizing the cloud itself
Michal Rostecki
 
Immutable infrastructure 介紹與實做:以 kolla 為例
Immutable infrastructure 介紹與實做:以 kolla 為例Immutable infrastructure 介紹與實做:以 kolla 為例
Immutable infrastructure 介紹與實做:以 kolla 為例
kao kuo-tung
 

Viewers also liked (20)

Using Docker with Puppet - PuppetConf 2014
Using Docker with Puppet - PuppetConf 2014Using Docker with Puppet - PuppetConf 2014
Using Docker with Puppet - PuppetConf 2014
 
Chasing AMI - Building Amazon machine images with Puppet, Packer and Jenkins
Chasing AMI - Building Amazon machine images with Puppet, Packer and JenkinsChasing AMI - Building Amazon machine images with Puppet, Packer and Jenkins
Chasing AMI - Building Amazon machine images with Puppet, Packer and Jenkins
 
PuppetDB, Puppet Explorer and puppetdbquery
PuppetDB, Puppet Explorer and puppetdbqueryPuppetDB, Puppet Explorer and puppetdbquery
PuppetDB, Puppet Explorer and puppetdbquery
 
Windows Configuration Management: Managing Packages, Services, & Power Shell-...
Windows Configuration Management: Managing Packages, Services, & Power Shell-...Windows Configuration Management: Managing Packages, Services, & Power Shell-...
Windows Configuration Management: Managing Packages, Services, & Power Shell-...
 
Installaling Puppet Master and Agent
Installaling Puppet Master and AgentInstallaling Puppet Master and Agent
Installaling Puppet Master and Agent
 
Provisioning environments. A simplistic approach
Provisioning  environments. A simplistic approachProvisioning  environments. A simplistic approach
Provisioning environments. A simplistic approach
 
Puppet for dummies - ZendCon 2011 Edition
Puppet for dummies - ZendCon 2011 EditionPuppet for dummies - ZendCon 2011 Edition
Puppet for dummies - ZendCon 2011 Edition
 
Icinga 2 and Puppet automate monitoring
Icinga 2 and Puppet  automate monitoringIcinga 2 and Puppet  automate monitoring
Icinga 2 and Puppet automate monitoring
 
Intro to Puppet Enterprise
Intro to Puppet EnterpriseIntro to Puppet Enterprise
Intro to Puppet Enterprise
 
Managing Windows Systems with Puppet - PuppetConf 2013
Managing Windows Systems with Puppet - PuppetConf 2013Managing Windows Systems with Puppet - PuppetConf 2013
Managing Windows Systems with Puppet - PuppetConf 2013
 
Managing Puppet using MCollective
Managing Puppet using MCollectiveManaging Puppet using MCollective
Managing Puppet using MCollective
 
Red Hat Satellite 6 - Automation with Puppet
Red Hat Satellite 6 - Automation with PuppetRed Hat Satellite 6 - Automation with Puppet
Red Hat Satellite 6 - Automation with Puppet
 
Designing Puppet: Roles/Profiles Pattern
Designing Puppet: Roles/Profiles PatternDesigning Puppet: Roles/Profiles Pattern
Designing Puppet: Roles/Profiles Pattern
 
Puppetconf 2015 - Puppet Reporting with Elasticsearch Logstash and Kibana
Puppetconf 2015 - Puppet Reporting with Elasticsearch Logstash and KibanaPuppetconf 2015 - Puppet Reporting with Elasticsearch Logstash and Kibana
Puppetconf 2015 - Puppet Reporting with Elasticsearch Logstash and Kibana
 
Deploying OpenStack Using Docker in Production
Deploying OpenStack Using Docker in ProductionDeploying OpenStack Using Docker in Production
Deploying OpenStack Using Docker in Production
 
Scaling Continuous Integration for Puppet
Scaling Continuous Integration for PuppetScaling Continuous Integration for Puppet
Scaling Continuous Integration for Puppet
 
Top 5 Challenges To Add Web Calls to Truphone VoIP Platform
Top 5 Challenges To Add Web Calls to Truphone VoIP PlatformTop 5 Challenges To Add Web Calls to Truphone VoIP Platform
Top 5 Challenges To Add Web Calls to Truphone VoIP Platform
 
Containers #101 Meetup: Containers & OpenStack
Containers #101 Meetup: Containers & OpenStack Containers #101 Meetup: Containers & OpenStack
Containers #101 Meetup: Containers & OpenStack
 
Kolla - containerizing the cloud itself
Kolla - containerizing the cloud itselfKolla - containerizing the cloud itself
Kolla - containerizing the cloud itself
 
Immutable infrastructure 介紹與實做:以 kolla 為例
Immutable infrastructure 介紹與實做:以 kolla 為例Immutable infrastructure 介紹與實做:以 kolla 為例
Immutable infrastructure 介紹與實做:以 kolla 為例
 

Similar to Docker and Puppet for Continuous Integration

Detailed Introduction To Docker
Detailed Introduction To DockerDetailed Introduction To Docker
Detailed Introduction To Docker
nklmish
 
Docker From Scratch
Docker From ScratchDocker From Scratch
Docker From Scratch
Giacomo Vacca
 
DCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development PipelineDCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development Pipeline
Docker, Inc.
 
Novices guide to docker
Novices guide to dockerNovices guide to docker
Novices guide to docker
Alec Clews
 
ContainerDayVietnam2016: Dockerize a small business
ContainerDayVietnam2016: Dockerize a small businessContainerDayVietnam2016: Dockerize a small business
ContainerDayVietnam2016: Dockerize a small business
Docker-Hanoi
 
[@NaukriEngineering] Docker 101
[@NaukriEngineering] Docker 101[@NaukriEngineering] Docker 101
[@NaukriEngineering] Docker 101
Naukri.com
 
SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe
SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe
SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe
Sencha
 
Using Docker to build and test in your laptop and Jenkins
Using Docker to build and test in your laptop and JenkinsUsing Docker to build and test in your laptop and Jenkins
Using Docker to build and test in your laptop and Jenkins
Micael Gallego
 
DCSF 19 Building Your Development Pipeline
DCSF 19 Building Your Development Pipeline  DCSF 19 Building Your Development Pipeline
DCSF 19 Building Your Development Pipeline
Docker, Inc.
 
Getting Started with Docker
Getting Started with DockerGetting Started with Docker
Getting Started with Docker
Geeta Vinnakota
 
PDXPortland - Dockerize Django
PDXPortland - Dockerize DjangoPDXPortland - Dockerize Django
PDXPortland - Dockerize DjangoHannes Hapke
 
Dockerizing Ruby Applications - The Best Practices
Dockerizing Ruby Applications - The Best PracticesDockerizing Ruby Applications - The Best Practices
Dockerizing Ruby Applications - The Best Practices
Kontena, Inc.
 
ExpoQA 2017 Using docker to build and test in your laptop and Jenkins
ExpoQA 2017 Using docker to build and test in your laptop and JenkinsExpoQA 2017 Using docker to build and test in your laptop and Jenkins
ExpoQA 2017 Using docker to build and test in your laptop and Jenkins
ElasTest Project
 
Docker
DockerDocker
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
Jeffrey Ellin
 
Docker presentation
Docker presentationDocker presentation
Docker presentation
Shankar Chaudhary
 
moscmy2016: Extending Docker
moscmy2016: Extending Dockermoscmy2016: Extending Docker
moscmy2016: Extending Docker
Mohammad Fairus Khalid
 
Enabling Hybrid Workflows with Docker/Mesos @Orbitz
Enabling Hybrid Workflows with Docker/Mesos @OrbitzEnabling Hybrid Workflows with Docker/Mesos @Orbitz
Enabling Hybrid Workflows with Docker/Mesos @Orbitz
Steve Hoffman
 
Continuous Delivery with Docker and Amazon ECS
Continuous Delivery with Docker and Amazon ECSContinuous Delivery with Docker and Amazon ECS
Continuous Delivery with Docker and Amazon ECS
Amazon Web Services
 
Docker presentasjon java bin
Docker presentasjon java binDocker presentasjon java bin
Docker presentasjon java bin
Olve Hansen
 

Similar to Docker and Puppet for Continuous Integration (20)

Detailed Introduction To Docker
Detailed Introduction To DockerDetailed Introduction To Docker
Detailed Introduction To Docker
 
Docker From Scratch
Docker From ScratchDocker From Scratch
Docker From Scratch
 
DCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development PipelineDCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development Pipeline
 
Novices guide to docker
Novices guide to dockerNovices guide to docker
Novices guide to docker
 
ContainerDayVietnam2016: Dockerize a small business
ContainerDayVietnam2016: Dockerize a small businessContainerDayVietnam2016: Dockerize a small business
ContainerDayVietnam2016: Dockerize a small business
 
[@NaukriEngineering] Docker 101
[@NaukriEngineering] Docker 101[@NaukriEngineering] Docker 101
[@NaukriEngineering] Docker 101
 
SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe
SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe
SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe
 
Using Docker to build and test in your laptop and Jenkins
Using Docker to build and test in your laptop and JenkinsUsing Docker to build and test in your laptop and Jenkins
Using Docker to build and test in your laptop and Jenkins
 
DCSF 19 Building Your Development Pipeline
DCSF 19 Building Your Development Pipeline  DCSF 19 Building Your Development Pipeline
DCSF 19 Building Your Development Pipeline
 
Getting Started with Docker
Getting Started with DockerGetting Started with Docker
Getting Started with Docker
 
PDXPortland - Dockerize Django
PDXPortland - Dockerize DjangoPDXPortland - Dockerize Django
PDXPortland - Dockerize Django
 
Dockerizing Ruby Applications - The Best Practices
Dockerizing Ruby Applications - The Best PracticesDockerizing Ruby Applications - The Best Practices
Dockerizing Ruby Applications - The Best Practices
 
ExpoQA 2017 Using docker to build and test in your laptop and Jenkins
ExpoQA 2017 Using docker to build and test in your laptop and JenkinsExpoQA 2017 Using docker to build and test in your laptop and Jenkins
ExpoQA 2017 Using docker to build and test in your laptop and Jenkins
 
Docker
DockerDocker
Docker
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
Docker presentation
Docker presentationDocker presentation
Docker presentation
 
moscmy2016: Extending Docker
moscmy2016: Extending Dockermoscmy2016: Extending Docker
moscmy2016: Extending Docker
 
Enabling Hybrid Workflows with Docker/Mesos @Orbitz
Enabling Hybrid Workflows with Docker/Mesos @OrbitzEnabling Hybrid Workflows with Docker/Mesos @Orbitz
Enabling Hybrid Workflows with Docker/Mesos @Orbitz
 
Continuous Delivery with Docker and Amazon ECS
Continuous Delivery with Docker and Amazon ECSContinuous Delivery with Docker and Amazon ECS
Continuous Delivery with Docker and Amazon ECS
 
Docker presentasjon java bin
Docker presentasjon java binDocker presentasjon java bin
Docker presentasjon java bin
 

More from Giacomo Vacca

STUN protocol
STUN protocolSTUN protocol
STUN protocol
Giacomo Vacca
 
Modern VoIP in modern infrastructures
Modern VoIP in modern infrastructuresModern VoIP in modern infrastructures
Modern VoIP in modern infrastructures
Giacomo Vacca
 
RIPP Notes
RIPP NotesRIPP Notes
RIPP Notes
Giacomo Vacca
 
Modern VoIP in Modern Infrastructures
Modern VoIP in Modern InfrastructuresModern VoIP in Modern Infrastructures
Modern VoIP in Modern Infrastructures
Giacomo Vacca
 
An SFU/MCU integration for heterogeneous environments
An SFU/MCU integration for heterogeneous environmentsAn SFU/MCU integration for heterogeneous environments
An SFU/MCU integration for heterogeneous environments
Giacomo Vacca
 
Kamailio World 2018 - Workshop: kamailio-tests
Kamailio World 2018 - Workshop: kamailio-testsKamailio World 2018 - Workshop: kamailio-tests
Kamailio World 2018 - Workshop: kamailio-tests
Giacomo Vacca
 
Homer - Workshop at Kamailio World 2017
Homer - Workshop at Kamailio World 2017Homer - Workshop at Kamailio World 2017
Homer - Workshop at Kamailio World 2017
Giacomo Vacca
 
[workshop] The Revolutionary WebRTC
[workshop] The Revolutionary WebRTC[workshop] The Revolutionary WebRTC
[workshop] The Revolutionary WebRTC
Giacomo Vacca
 
Automatic Kamailio Deployments With Puppet
Automatic Kamailio Deployments With PuppetAutomatic Kamailio Deployments With Puppet
Automatic Kamailio Deployments With Puppet
Giacomo Vacca
 

More from Giacomo Vacca (9)

STUN protocol
STUN protocolSTUN protocol
STUN protocol
 
Modern VoIP in modern infrastructures
Modern VoIP in modern infrastructuresModern VoIP in modern infrastructures
Modern VoIP in modern infrastructures
 
RIPP Notes
RIPP NotesRIPP Notes
RIPP Notes
 
Modern VoIP in Modern Infrastructures
Modern VoIP in Modern InfrastructuresModern VoIP in Modern Infrastructures
Modern VoIP in Modern Infrastructures
 
An SFU/MCU integration for heterogeneous environments
An SFU/MCU integration for heterogeneous environmentsAn SFU/MCU integration for heterogeneous environments
An SFU/MCU integration for heterogeneous environments
 
Kamailio World 2018 - Workshop: kamailio-tests
Kamailio World 2018 - Workshop: kamailio-testsKamailio World 2018 - Workshop: kamailio-tests
Kamailio World 2018 - Workshop: kamailio-tests
 
Homer - Workshop at Kamailio World 2017
Homer - Workshop at Kamailio World 2017Homer - Workshop at Kamailio World 2017
Homer - Workshop at Kamailio World 2017
 
[workshop] The Revolutionary WebRTC
[workshop] The Revolutionary WebRTC[workshop] The Revolutionary WebRTC
[workshop] The Revolutionary WebRTC
 
Automatic Kamailio Deployments With Puppet
Automatic Kamailio Deployments With PuppetAutomatic Kamailio Deployments With Puppet
Automatic Kamailio Deployments With Puppet
 

Recently uploaded

Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
Tendenci - The Open Source AMS (Association Management Software)
 
De mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FMEDe mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FME
Jelle | Nordend
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
Tier1 app
 
Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024
Sharepoint Designs
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
Cyanic lab
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
AMB-Review
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
kalichargn70th171
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web Services
KrzysztofKkol1
 
Strategies for Successful Data Migration Tools.pptx
Strategies for Successful Data Migration Tools.pptxStrategies for Successful Data Migration Tools.pptx
Strategies for Successful Data Migration Tools.pptx
varshanayak241
 
Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should Know
Peter Caitens
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 

Recently uploaded (20)

Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
De mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FMEDe mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FME
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web Services
 
Strategies for Successful Data Migration Tools.pptx
Strategies for Successful Data Migration Tools.pptxStrategies for Successful Data Migration Tools.pptx
Strategies for Successful Data Migration Tools.pptx
 
Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should Know
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 

Docker and Puppet for Continuous Integration

  • 1. Docker and Puppet for Continuous Integration Giacomo Vacca, Founder at RTCSoft, gv@rtcsoft.net
  • 2. About me • 15 years “in the trenches cubicles” • Developer of RTC (VoIP, IM, WebRTC) solutions • Founder of RTCSoft in 2015 @giavac https://github.com/giavac gv@rtcsoft.net
  • 3. Docker usage scenarios • Run services • Packaging/Deployment mechanism • Fast prototyping • Continuous Integration/ Delivery
  • 4. Continuous Integration 1/2 • A team of developers work on the same project • Each developer commits several times per day • Each commit is potentially verified (Build, Deploy, Test) • The project is always kept in a stable/releasable state
  • 5. Continuous Integration 2/2 • Developers work on personal/bug/feature (short-lived) branches • These branches are merged into the “release” branch for the release Image source: www.atlassian.com
  • 6. CI components Image source: myself (This is why it sucks)
  • 7. Server-side apps for Linux • Apps are built, packaged, deployed and tested • Unit testing during the builds • Component/Integration/Load testing after test deployments • Artefacts are uploaded into file servers or deb/yum repos
  • 8. Old school: “Build and run” Build the app on the runtime machine • PROBLEMS: • Repeat the build on each host • Unnecessary pollution of the runtime host • Maintenance nightmare: the easiest upgrade is problematic • Potential exposure of source code to external attacks
  • 9. Using a “Build machine” Dedicate a machine to the various builds • PROs: • Keep the runtime environment reasonably clean • Source code is protected inside the private network • CONs: • You’re reducing a multi-dimensional problem into a bi-dimensional one • You’ll pay the price one day!
  • 10. • Widely adopted, Open Source CI tool • Core + many plugins • Integrates well with git and Docker • Can manage multiple “slaves” https://jenkins-ci.org/
  • 11. Jenkins and Master worker • “Cron jobs manager with a GUI” • What’s a Jenkins job? • The simplest case: Jenkins runs the jobs inside its own host • “Master” worker, no slaves involved • Still you need to manage Jenkins’ configuration…
  • 12. Building machineS Assign a VM per building scenario (app/OS) • A step in the right direction • CONs: • Hard to maintain (see Configuration Management later) • VM resources allocated even when the builds are not running • Explosion of number of VM types to use (OS/versions matrix) • VMs are “heavy”
  • 13. Jenkins and Slaves • Configure a number of “slave workers” • Assign a slave to a job • But you need to maintain all those slaves…
  • 14. Configuration Management You need something better than that.
  • 15. Configuration Management intro • Define programmatically the configuration of a machine • Many tools available: Puppet, Ansible, Chef, Salt, etc. • Make configuration predictable AND fix divergence automatically • Track changes during time (it’s all text) • Define a formal language across developers, sysadmin, Ops
  • 16. • Puppet defines the final state of a host (What, not How) • Has its own declarative syntax • Written in Ruby • Designed for Master-Slave interaction, can be used Standalone • Idempotent https://puppetlabs.com/
  • 17. Configuration Management You really, really need it. Even if you like 3-ways diffs and hate the term “idempotence”.
  • 18. Example of Puppet codepackage { 'nginx': ensure => present, } -> file { '/etc/nginx/nginx.conf': ensure => file, owner => 'root', group => 'root', mode => '0644', content => template('mymodule/nginx.conf.erb'), notify => Service['nginx'], } -> file { '/etc/nginx/conf.d/global.conf': ensure => file, owner => 'root', group => 'root', mode => '0644', content => template('mymodule/nginx_global.conf.erb'), notify => Service['nginx'], } service { 'nginx': ensure => running, enable => true, }
  • 19. Back to Jenkins and multiple Slaves • We saw the approach with multiple slaves, with VMs as slave • Functionally valid • Cumbersome to maintain • What if we could have “on demand”, lightweight workers? e.g. Docker containers?
  • 20. • A new form of virtualisation (w/ real HW performance) • A delivery mechanism • Many “images” freely available • “Here’s the ingredients and recipe” VS “Here’s the cake” https://www.docker.com/
  • 21. Virtual Machines vs Docker Source: https://www.docker.com/what-docker
  • 22. Docker workflow • Build an image (Dockerfile + base images) • docker build -t gvacca/nginx . • Store image in a registry (Public, e.g. Dockerhub or private) • docker push gvacca/nginx • Pull image on a target host • docker pull gvacca/nginx • Run container on a target host • docker run -it gvacca/nginx
  • 23. Dockerfile - example FROM ubuntu:latest MAINTAINER Giacomo Vacca <gv@rtcsoft.net> RUN apt-get update # Install nginx RUN apt-get -y -q install nginx # Prepare target dir for website (Must match global.conf) RUN mkdir -p /var/www/html # Configure nginx COPY nginx/nginx.conf /etc/nginx/nginx.conf COPY nginx/global.conf /etc/nginx/conf.d/global.conf EXPOSE 8080 CMD [ "/usr/sbin/nginx" ] https://github.com/giavac/docker-experiments/tree/master/simple_nginx
  • 24. Build a Docker image gvacca@dockerubuntu:~simple_nginx$ sudo docker build -t gvacca/simple-nginx . Sending build context to Docker daemon 7.168 kB Step 1 : FROM ubuntu:14.04 ---> 1d073211c498 … Step 2 : MAINTAINER Giacomo Vacca <gv@rtcsoft.net> ---> Running in 10a8334becfd ---> 559310abf4fb Removing intermediate container 10a8334becfd Step 3 : RUN apt-get update ---> Running in 873b09debab0 … Step 8 : EXPOSE 8080 ---> Running in a27f73413c02 ---> f5ef8527f2a3 Removing intermediate container a27f73413c02 Step 9 : CMD /usr/sbin/nginx ---> Running in d99de19cc782 ---> df76d20cd00f Removing intermediate container d99de19cc782 Successfully built df76d20cd00f
  • 25. Run the container! gvacca@dockerubuntu:simple_nginx$ sudo docker run -d --name nginx -p 8080:8080 -v $PWD/website:/var/www/html/website gvacca/simple-nginx add8d371f82f615ebbd121cea804511dcdafac893b14325366744797424fa44c gvacca@dockerubuntu:simple_nginx$ sudo docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES add8d371f82f gvacca/simple-nginx "/usr/sbin/nginx" 11 seconds ago Up 9 seconds 0.0.0.0:8080->8080/tcp nginx gvacca@dockerubuntu:simple_nginx$ ps aux |grep docker root 792 0.0 4.7 693136 23740 ? Ssl Nov04 11:20 /usr/bin/docker daemon root 1977 0.0 2.6 152692 13172 ? Sl 11:26 0:00 docker-proxy - proto tcp -host-ip 0.0.0.0 -host-port 8080 -container-ip 172.17.0.2 -container-port 8080
  • 26. Intermediate topics • Volumes • Network (was ‘link’ before 1.9) • Debugging (‘inspect’) • ARG (after 1.9) • Docker on OSX/Windows (Docker Machine) • Interacting with Kernel modules
  • 27. Docker orchestration • Docker Composer • Docker Swarm • Google’s Kubernetes • Apache Mesos • Puppet & others
  • 28. Let’s start exploring interaction opportunities between the tools seen so far…
  • 29. Puppet to manage Jenkins • https://forge.puppetlabs.com/rtyler/jenkins • Manage Jenkins as a service • Install plugins automatically, etc • Or build your own module! • Install .war • Configure Jenkins (config.xml) • Configure jobs ($JENKINS_PATH/jobs/JOB/config.xml)
  • 30. Docker as Slave for Jenkins • Associate specific Docker images to specific Jenkins build jobs • Keep builds clean & reproducible (“Non-event releases”) • Run slave containers on demand - stop them when not needed. • Jenkins Plugin: https://wiki.jenkins-ci.org/display/JENKINS/Docker +Plugin • Other Cloud methods, e.g. Mesos
  • 31. Jenkins to build Docker images • A Jenkins job: • Checks out a Dockerfile • Builds the image • Upload the new image in a repo • May re-use images for new builds (careful about integrity)
  • 32. Puppet to manage Docker containers • Module for docker: https://forge.puppetlabs.com/garethr/docker • Installs Docker and required dependencies • Launches the Docker daemon • Sets DNS, users and other configuration items • Pull images from selected repos • Run containers (image + command)
  • 33. Run Jenkins inside Docker • Manage Jenkins with a dedicated image + volume with data • From the official Docker registry: https://hub.docker.com/_/jenkins/ docker run -d -p 8080:8080 -p 50000:50000 -v ~:/var/jenkins_home jenkins • TCP 8080: Web UI • TCP 50000: interface to connect slaves
  • 34. Docker inside Docker But you need the privileged mode
  • 35. Conclusion • There are many opportunities to automate Continuous Integration • CI for server-side apps poses specific challenges • You can’t ignore Configuration Management • Docker represents a huge opportunity • You need to find your own use case and solution
  • 36. APPENDIX - Puppet vs Docker • Some stop using Puppet for Configuration Management once they move their apps inside containers • A Dockerfile defines “how” to build an image • A Dockerfile must be distribution-specific (yum or apt?) • Puppet is OS-agnostic: the differences are hidden inside modules
  • 38. Recommended Books • “The Docker book”, J. Turnbull, http://www.amazon.co.uk/Docker- Book-Containerization-new-virtualization-ebook/dp/B00LRROTI4 • “Continuous Delivery”, J. Humble, http://www.amazon.com/ Continuous-Delivery-Deployment-Automation-Addison-Wesley/dp/ 0321601912 • “Pro Puppet”, J. Turnbull, http://www.amazon.co.uk/Pro-Puppet- Second-Professional-Apress/dp/1430260408