Beyond Golden Containers
Complementing Docker with Puppet
David Lutterkort
lutter@puppetlabs.com
http://northshorekid.com/event/campfire-stories-marini-farm
http://www.partialhospitalization.com/2010/08/363/
lang en_US.UTF-8
keyboard us
…
rootpw --iscrypted $1$uw6MV$m6VtUWPed4SqgoW6fKfTZ/
part / --size 1024 --fstype ext4 --ondisk sda
repo --name=fedora —mirrorlist=…
repo --name=updates —mirrorlist=…
%packages
@core
%end
%post
curl http://example.com/the-script.pl | /usr/bin/perl
What’s that machine doing ?
6
7http://www.gcksa.com/en/
8http://grillingwithrich.com/wrapping-meats-the-positives-and-negatives-and-everything-in-between/foil-ball
Overview
• Puppet from 10,000 feet
• Managing the host
• Building images
– without a master (puppet apply)
– with a master (puppet agent)
• Runtime configuration
9
Infrastructure as Code
10
1)DEFINE 2)SIMULATE
4)REPORT 3)ENFORCE
Re-usable infrastructure-as-code
Insight into changes
Before deploying changes
Automatically and reliably
Dataflow in Puppet
11
class webserver {
package { 'httpd':
ensure => latest
} ->
file { '/etc/httpd/conf.d/local.conf':
ensure => file,
mode => 644,
source => 'puppet:///modules/httpd/local.conf',
} ->
service { 'httpd':
ensure => running,
enable => true,
subscribe => File['/etc/httpd/conf.d/local.conf'],
}
}
A basic manifest
12
class webserver2 inherits webserver {
File['/etc/httpd/conf.d/local.conf'] {
source => 'puppet:///modules/httpd/other-local.conf',
}
}
Override via inheritance
13
The site-wide manifest
14
node host1.example.com {
class { 'webserver': }
}
node host2.example.com {
class { 'webserver2': }
}
node host3.example.com {
class {'mongodb::server':
port => 27018
}
}
15
Overview
• Puppet from 10,000 feet
• Managing the host
• Building images
– without a master (puppet apply)
– with a master (puppet agent)
• Runtime configuration
16
Managing the host
Gareth Rushgrove’s module:
https://forge.puppetlabs.com/garethr/docker
• Install docker (Ubuntu and CentOS)
• Manage images
• Run containers
17
class { 'docker':
tcp_bind => 'tcp://127.0.0.1:4243',
socket_bind => 'unix:///var/run/docker.sock',
}
Setting up Docker
18
docker::image { 'ubuntu':
image_tag => 'precise'
}
Pulling down images
19
docker::run { 'appserver2':
image => 'fedora:20',
command => '/usr/sbin/init',
ports => ['80', '443'],
links => ['mysql:db'],
use_name => true,
volumes => ['/var/lib/couchdb', '/var/log'],
volumes_from => 'appserver1',
memory_limit => 10485760, # bytes
username => 'appy',
hostname => 'app2.example.com',
env => ['FOO=BAR', 'FOO2=BAR2'],
dns => ['8.8.8.8', ‘8.8.4.4']
}
Running containers
20
Overview
• Puppet from 10,000 feet
• Managing the host
• Building images
– without a master (puppet apply)
– with a master (puppet agent)
• Runtime configuration
21
Dockerfile for puppet apply
22
FROM jamtur01/puppetbase
MAINTAINER James Turnbull <james@lovedthanlost.net>
ADD modules /tmp/modules
RUN yum -y install puppet; 
puppet apply --modulepath=/tmp/modules 
-e "class { 'nginx': service_ensure => disable }”
EXPOSE 80
CMD ["nginx"]
Overview
• Puppet from 10,000 feet
• Managing the host
• Building images
– without a master (puppet apply)
– with a master (puppet agent)
• Runtime configuration
23
FROM fedora:20
MAINTAINER David Lutterkort <lutter@watzmann.net>
ADD puppet /tmp/puppet-docker
RUN yum -y install puppet; 
yum clean all; 
/tmp/puppet-docker/bin/puppet-docker
Dockerfile for puppet agent
24
> tree puppet
puppet/
├── bin
│ └── puppet-docker
├── config.yaml
└── ssl
├── agent-cert.pem
├── agent-private.pem
├── agent-public.pem
└── ca.pem
Support files
25
> cat puppet/config.yaml
---
certname: docker
# server: puppet-master.example.com
facts:
container: docker
build: true
Configure agent run
26
Overview
• Puppet from 10,000 feet
• Managing the host
• Building images
– without a master (puppet apply)
– with a master (puppet agent)
• Runtime configuration
27
Runtime configuration
• Install an init system (systemd)
– run cron or puppetd
– run target service(s)
• Possibly move to one agent per host
28
Summary
• Explain what you are doing clearly
(or scare those trying to understand you to death)
• Manage container hosts with
https://forge.puppetlabs.com/garethr/docker
• Sample materials for puppet agent etc. at
https://github.com/lutter/puppet-docker
29
Questions ?

More Related Content

PDF
Complementing Docker with Puppet
PDF
仮想化環境におけるバイナリー・ポータビリティの考察 (WebAssemblyの場合)
PPTX
Database Schema as Code
PDF
2 docker engine_hands_on
 
PDF
Beyond Golden Containers: Complementing Docker with Puppet
KEY
puppet @techlifecookpad
PDF
PDF
Mac OS X Lion で作る WordPress local 環境
Complementing Docker with Puppet
仮想化環境におけるバイナリー・ポータビリティの考察 (WebAssemblyの場合)
Database Schema as Code
2 docker engine_hands_on
 
Beyond Golden Containers: Complementing Docker with Puppet
puppet @techlifecookpad
Mac OS X Lion で作る WordPress local 環境

What's hot (20)

KEY
Clojure + MongoDB on Heroku
PDF
Message Decrypt
PDF
Deep Visibility for Production Microservices
ODP
Redmine on amazon ec2
PPTX
Jk rubyslava 25
PDF
Django district pip, virtualenv, virtualenv wrapper & more
PDF
Solaris 11 base box for Vagrant using Packer
PPTX
Nagios
PDF
How to Install Ghost (CMS) MEMO
PDF
OSS AWS 핸즈온 강의
DOCX
Proxy server ubuntu 12.04
PDF
How about Gradle?
PDF
Scaling IO-bound microservices
PPTX
Rubyslava + PyVo #48
PDF
JavaScript, Meet Cloud : Node.js on Windows Azure
PDF
CouchDB Getting Start
PDF
RabbitMQ Server - cheat sheet -
PDF
Py conkr 20150829_docker-python
ODP
Sfd hanoi2012 nguyen nang thang sfd-2012_chroot_apache
PPTX
Rails with MongoDB - RORLab 47th
Clojure + MongoDB on Heroku
Message Decrypt
Deep Visibility for Production Microservices
Redmine on amazon ec2
Jk rubyslava 25
Django district pip, virtualenv, virtualenv wrapper & more
Solaris 11 base box for Vagrant using Packer
Nagios
How to Install Ghost (CMS) MEMO
OSS AWS 핸즈온 강의
Proxy server ubuntu 12.04
How about Gradle?
Scaling IO-bound microservices
Rubyslava + PyVo #48
JavaScript, Meet Cloud : Node.js on Windows Azure
CouchDB Getting Start
RabbitMQ Server - cheat sheet -
Py conkr 20150829_docker-python
Sfd hanoi2012 nguyen nang thang sfd-2012_chroot_apache
Rails with MongoDB - RORLab 47th
Ad

Viewers also liked (8)

ODP
Puppetconf 2013: Razor - provision like a boss
PDF
Orchestration and the New York Subway
ODP
Apache Deltacloud: Speaking EC2 and CIMI to Openstack (and others)
PDF
Appmgmt cfgmgmtcamp-2015
ODP
Apache Deltacloud (Linuxcon 2010)
PPT
Razor: provision like a boss (Build-a-cloud edition)
PDF
Challenges of container configuration
ODP
Aeolus - Clouds Flying in Assembly
Puppetconf 2013: Razor - provision like a boss
Orchestration and the New York Subway
Apache Deltacloud: Speaking EC2 and CIMI to Openstack (and others)
Appmgmt cfgmgmtcamp-2015
Apache Deltacloud (Linuxcon 2010)
Razor: provision like a boss (Build-a-cloud edition)
Challenges of container configuration
Aeolus - Clouds Flying in Assembly
Ad

Similar to Beyond Golden Containers: Complementing Docker with Puppet (20)

PDF
Automating Docker Containers with Puppet 2014 10-13
PDF
Puppet Camp Seattle 2014: Docker and Puppet: 1+1=3
PDF
Puppet Camp Chicago 2014: Docker and Puppet: 1+1=3 (Intermediate)
PDF
Docker and Puppet for Continuous Integration
PDF
PuppetConf 2016: Running Puppet Software in Docker Containers – Gareth Rushgr...
PDF
PuppetConf 2017: What’s in the Box?!- Leveraging Puppet Enterprise & Docker- ...
PDF
PuppetConf 2016: Docker, Mesos, Kubernetes and...Puppet? Don't Panic! – Deep...
PPTX
One click deployment
PDF
Provisioning with Puppet
PDF
ContainerCon - Test Driven Infrastructure
PPT
Scalable Systems Management with Puppet
PPT
Scalable systems management with puppet
PDF
Unix Automation using centralized configuration management tool
PDF
Unix Automation using centralized configuration management tool
PDF
Building Docker images with Puppet
PPTX
Puppet in k8s, Miroslav Hadzhiev
PDF
Creating a mature puppet system
PDF
Creating a Mature Puppet System
PDF
DCSF 19 Building Your Development Pipeline
Automating Docker Containers with Puppet 2014 10-13
Puppet Camp Seattle 2014: Docker and Puppet: 1+1=3
Puppet Camp Chicago 2014: Docker and Puppet: 1+1=3 (Intermediate)
Docker and Puppet for Continuous Integration
PuppetConf 2016: Running Puppet Software in Docker Containers – Gareth Rushgr...
PuppetConf 2017: What’s in the Box?!- Leveraging Puppet Enterprise & Docker- ...
PuppetConf 2016: Docker, Mesos, Kubernetes and...Puppet? Don't Panic! – Deep...
One click deployment
Provisioning with Puppet
ContainerCon - Test Driven Infrastructure
Scalable Systems Management with Puppet
Scalable systems management with puppet
Unix Automation using centralized configuration management tool
Unix Automation using centralized configuration management tool
Building Docker images with Puppet
Puppet in k8s, Miroslav Hadzhiev
Creating a mature puppet system
Creating a Mature Puppet System
DCSF 19 Building Your Development Pipeline

Recently uploaded (20)

PDF
Wondershare Recoverit Full Crack New Version (Latest 2025)
PDF
Visual explanation of Dijkstra's Algorithm using Python
PPTX
WiFi Honeypot Detecscfddssdffsedfseztor.pptx
PPTX
Introduction to Windows Operating System
PDF
AI/ML Infra Meetup | Beyond S3's Basics: Architecting for AI-Native Data Access
PPTX
Patient Appointment Booking in Odoo with online payment
PDF
Topaz Photo AI Crack New Download (Latest 2025)
PDF
EaseUS PDF Editor Pro 6.2.0.2 Crack with License Key 2025
DOCX
How to Use SharePoint as an ISO-Compliant Document Management System
PDF
AI-Powered Threat Modeling: The Future of Cybersecurity by Arun Kumar Elengov...
PDF
DNT Brochure 2025 – ISV Solutions @ D365
PDF
Website Design Services for Small Businesses.pdf
PPTX
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
PDF
CCleaner 6.39.11548 Crack 2025 License Key
PPTX
Computer Software and OS of computer science of grade 11.pptx
PPTX
GSA Content Generator Crack (2025 Latest)
PDF
Time Tracking Features That Teams and Organizations Actually Need
PDF
Types of Token_ From Utility to Security.pdf
PDF
Multiverse AI Review 2025: Access All TOP AI Model-Versions!
PPTX
Oracle Fusion HCM Cloud Demo for Beginners
Wondershare Recoverit Full Crack New Version (Latest 2025)
Visual explanation of Dijkstra's Algorithm using Python
WiFi Honeypot Detecscfddssdffsedfseztor.pptx
Introduction to Windows Operating System
AI/ML Infra Meetup | Beyond S3's Basics: Architecting for AI-Native Data Access
Patient Appointment Booking in Odoo with online payment
Topaz Photo AI Crack New Download (Latest 2025)
EaseUS PDF Editor Pro 6.2.0.2 Crack with License Key 2025
How to Use SharePoint as an ISO-Compliant Document Management System
AI-Powered Threat Modeling: The Future of Cybersecurity by Arun Kumar Elengov...
DNT Brochure 2025 – ISV Solutions @ D365
Website Design Services for Small Businesses.pdf
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
CCleaner 6.39.11548 Crack 2025 License Key
Computer Software and OS of computer science of grade 11.pptx
GSA Content Generator Crack (2025 Latest)
Time Tracking Features That Teams and Organizations Actually Need
Types of Token_ From Utility to Security.pdf
Multiverse AI Review 2025: Access All TOP AI Model-Versions!
Oracle Fusion HCM Cloud Demo for Beginners

Beyond Golden Containers: Complementing Docker with Puppet

Editor's Notes

  • #11: “What makes it special? What is secret sauce? Why is this a superior approach?”
  • #14: Other customization mechanisms: Class inheritance Data injection (Hiera) Modules