SlideShare une entreprise Scribd logo
1  sur  26
Télécharger pour lire hors ligne
Tuesday, July 15, 14
Packing It In: Images, Containers,
and Config Management
Michael Goetz
Sr. Consulting Engineer @ Chef
mpgoetz@getchef.com
Tuesday, July 15, 14
Who am I?
• Sr. Consulting Engineer @ Chef
• 8+ years of experience planning, managing
and operating web scale and enterprise
applications
• Avid woodworker
Tuesday, July 15, 14
This talk isn’t about joining a cult...
• Lots of opinions exist that claim to be the “only right
way” to manage your systems
• The true path is the best combination that makes
you go faster, in a safe and secure manner
• Use a toolbox, not one tool
http://leavingthecult.com/
Tuesday, July 15, 14
So what are my options?
• Artisanal machines made of metal and sweat
• Pristine virtual machines
• Isolated containers
• Just-in-time automatic configuration management
• All (or some) of the above?
Tuesday, July 15, 14
Artisanal machines made of metal and sweat
• Do we really need to talk about why this sucks?
• If you want to work on artisan crafts, take up woodworking
http://www.juggernautwoodworking.com/images/carve.jpg
Tuesday, July 15, 14
Containers vs. Virtual Machines
• Containers consist of an application
and its dependencies, running in
isolation in userland outside the
kernel.
• Virtual Machines create an entire
machine, including a fully functional
operating system.
https://www.docker.io/static/img/about/docker_vm.jpg
Tuesday, July 15, 14
Hurray! We can go back to golden images, right?
• The “golden image” problem still exists with containers, but on a much smaller
scale
• A dozen “server” images become dozens of “container” images
• AUFS layering mitigates some sprawl, but has a limit
• Modularity of applications without convergence of the entire system just kicks the
can down the road
http://images.smh.com.au/2011/10/28/2737998/ipad-art-wide-shipping-420x0.jpg
Tuesday, July 15, 14
What about configuration management?
• Convergence - coming to a desired end state
• Congruence - building a result from a blank state
• Always building from scratch can be time
consuming
• Specification of application versions becomes
extremely important
• Changes can happen unexpectedly if you don’t
plan ahead
Convergence is like fixing the
outcome and compute the
route (like a GPS finder), and
congruence is about repeating
a recipe in a sequence of
known steps to massage a
system into shape”
– Mark Burgess
Tuesday, July 15, 14
Tuesday, July 15, 14
Let’s talk real world here...
• My application system has:
• An OS layer that rarely changes
• A few supporting applications that change semi-
frequently
• My application code that changes rapidly
• This can translate to:
• VM image to act as a base OS + some deltas
• Container images for supporting applications
• Configuration management to maintain overall state
Tuesday, July 15, 14
So wait... that still seems like a lot of work
• With 3 layers of your application stack to maintain, it feels like the maintenance
demand will only go up
• We’ll use three tools to manage each layer:
• Packer - building and maintaining images (virtual machine host)
• Chef - building Docker images, provisioning the VM and managing the
configuration of running containers
• Docker - running the containers
Tuesday, July 15, 14
What is Packer?
• Half the battle is keeping VM images up-
to-date
• The more time spent refreshing VM
images, the more table flipping that will
ensue
• Packer is tool for creating identical
machine images for multiple platforms
from a single source configuration
• Makes programmatically building VM
images super easy!
{
	
  	
  "builders":	
  [{
	
  	
  	
  	
  "type":	
  "amazon-­‐ebs",
	
  	
  	
  	
  "region":	
  "us-­‐east-­‐1",
	
  	
  	
  	
  "source_ami":	
  "ami-­‐8ade42ba",
	
  	
  	
  	
  "instance_type":	
  "m3.medium",
	
  	
  	
  	
  "ssh_username":	
  "ubuntu",
	
  	
  	
  	
  "ami_name":	
  "my	
  ami	
  {{timestamp}}"
	
  	
  }],
	
  	
  "provisioners":	
  [{
	
  	
  	
  	
  "type":	
  "chef-­‐solo",
	
  	
  	
  	
  "cookbook_paths":	
  ["cookbooks"],
	
  	
  	
  	
  "json":	
  {
	
  	
  	
  	
  	
  	
  "name":	
  "my_node",
	
  	
  	
  	
  	
  	
  "run_list":	
  [
	
  	
  	
  	
  	
  	
  	
  	
  "recipe[docker]",
	
  	
  	
  	
  	
  	
  	
  	
  "recipe[my_application]"
	
  	
  	
  	
  	
  	
  ]
	
  	
  	
  	
  }
	
  	
  }]
}
Tuesday, July 15, 14
What is Docker?
• Docker combines Linux containers (LXC) with AUFS to
create portable, lightweight application containers
• Docker containers are running instances of Docker images
• Docker images can be shared via a public or private registry
• Containers can be single application processes or
lightweight virtual machines if a supervisor is provided.
Tuesday, July 15, 14
What is Chef?
• Chef is an automation platform that manages
infrastructure as code
• Configuration of systems is performed by reusable
recipes that are shared across your entire
infrastructure
• Information about the various infrastructure
components is cataloged and made available to to
inform the rest of the topology configuration
• Chef can run on demand or as a managed service to
keep infrastructure convergent
Tuesday, July 15, 14
Chef-Container
• A version of chef-client that includes
components to support running the chef-
client from within a Linux container
• Packaged with chef-client, runit and
chef-init
• Allows you to bootstrap the container
without an SSH connection
• Use chef-client resources the same way
in a container as on any UNIX- or Linux-
based platform
• Can manage multiple services within a
single container using chef-init & runit
Tuesday, July 15, 14
The knife-container plugin
• Used to initialize and build containers
•knife container docker init
•knife container docker build
• Docker support today, other containers
planned
• Berkshelf integration
• Supports Chef-Zero or Chef-Client modes
Tuesday, July 15, 14
Let’s get to building!
• Starting with a solid foundation is key to success
• Identify the core components that are unlikely to
change, but are different from default settings
• Security policies/applications
• Image hardening
• Core component packages
• Docker tooling
• The goal is to create a minimal base VM, combined
with the components that are consistently configured
across your entire application infrastructure
Tuesday, July 15, 14
Demo: Building the VM
Tuesday, July 15, 14
Building the Docker factory
• We need a repeatable factory for building Docker
images for the supporting applications
• Chef-container lets us use our existing Chef
cookbooks to create reusable Docker images
• The key to success is isolation - create the smallest
Docker images that will work
• Hook up your continuous integration system to crank
out new images as cookbooks are updated
Tuesday, July 15, 14
Demo: Building the Docker Factory
Tuesday, July 15, 14
Bringing it all together
• Now that we have our base VM and Docker factory
running, let’s manage an active application stack
• Chef will provision servers with the base VM, build
and run the Docker containers
• Ongoing convergence of the overall desired state of
the system will be managed by chef-clients running
inside each container.
Tuesday, July 15, 14
Demo: Using Chef to manage the entire system
Tuesday, July 15, 14
Wrapping Up
• Don’t join a cult
• Use what works to make things faster, more secure and more stable
• Keep the base VM small, but not too small
• Use containers to manage isolated, reusable applications
• Maintain a convergent infrastructure with automated configuration management
Tuesday, July 15, 14
Want to know more?
• Release: Chef Container 0.2.0 (beta) - http://www.getchef.com/blog/2014/07/15/
release-chef-container-0-2-0-beta/
• Chef Containers Documentation - http://docs.opscode.com/containers.html
• Video demo - https://www.youtube.com/watch?
v=nSB9rHG1_FQ&feature=youtu.be
• Packer - http://www.packer.io/
• Docker - http://www.docker.com/
Tuesday, July 15, 14
Thank You!
Michael Goetz
mpgoetz@getchef.com
@michaelpgoetz
Tuesday, July 15, 14

Contenu connexe

Tendances

Engage 2019: The good, the bad and the ugly: a not so objective view on front...
Engage 2019: The good, the bad and the ugly: a not so objective view on front...Engage 2019: The good, the bad and the ugly: a not so objective view on front...
Engage 2019: The good, the bad and the ugly: a not so objective view on front...Frank van der Linden
 
Implementation of the Continuous Integration based on Atlassian Bamboo
 Implementation of the Continuous Integration based on Atlassian Bamboo Implementation of the Continuous Integration based on Atlassian Bamboo
Implementation of the Continuous Integration based on Atlassian BambooАнете Аннемария
 
WordPress Development Environments
WordPress Development EnvironmentsWordPress Development Environments
WordPress Development EnvironmentsJosh Cummings
 
From zero to hero with running your asp.net core 1 application in a docker co...
From zero to hero with running your asp.net core 1 application in a docker co...From zero to hero with running your asp.net core 1 application in a docker co...
From zero to hero with running your asp.net core 1 application in a docker co...Maurice De Beijer [MVP]
 
Automation: PowerShell & DSC
Automation: PowerShell & DSCAutomation: PowerShell & DSC
Automation: PowerShell & DSCJosh Gillespie
 
Docker With Asp.net Core
Docker With Asp.net CoreDocker With Asp.net Core
Docker With Asp.net CoreFatih Şimşek
 
Monoliths vs microservices
Monoliths vs microservicesMonoliths vs microservices
Monoliths vs microservicesahmadezzeir
 
Windows server containers
Windows server containersWindows server containers
Windows server containersSri Kanth
 
bol.com Dutch Container Day presentation
bol.com Dutch Container Day presentationbol.com Dutch Container Day presentation
bol.com Dutch Container Day presentationMaarten Dirkse
 
Railsconf 2014 - Deploying Rails is Easier Thank It Looks
Railsconf 2014 - Deploying Rails is Easier Thank It LooksRailsconf 2014 - Deploying Rails is Easier Thank It Looks
Railsconf 2014 - Deploying Rails is Easier Thank It Lookstalkingquickly
 
Microservices without servers
Microservices without serversMicroservices without servers
Microservices without servers99X Technology
 
Beyond Apache: Faster Web Servers
Beyond Apache: Faster Web ServersBeyond Apache: Faster Web Servers
Beyond Apache: Faster Web Serverswebhostingguy
 
The Pivotal Engineering Dojo: Earning Your Black Belt in Cloud Foundry Engine...
The Pivotal Engineering Dojo: Earning Your Black Belt in Cloud Foundry Engine...The Pivotal Engineering Dojo: Earning Your Black Belt in Cloud Foundry Engine...
The Pivotal Engineering Dojo: Earning Your Black Belt in Cloud Foundry Engine...VMware Tanzu
 
Training Slides: Tungsten Replicator AMI - The Getting Started Guide
Training Slides: Tungsten Replicator AMI - The Getting Started GuideTraining Slides: Tungsten Replicator AMI - The Getting Started Guide
Training Slides: Tungsten Replicator AMI - The Getting Started GuideContinuent
 
Azure Templates for Consistent Deployment
Azure Templates for Consistent DeploymentAzure Templates for Consistent Deployment
Azure Templates for Consistent DeploymentJosé Maia
 

Tendances (20)

Engage 2019: The good, the bad and the ugly: a not so objective view on front...
Engage 2019: The good, the bad and the ugly: a not so objective view on front...Engage 2019: The good, the bad and the ugly: a not so objective view on front...
Engage 2019: The good, the bad and the ugly: a not so objective view on front...
 
Implementation of the Continuous Integration based on Atlassian Bamboo
 Implementation of the Continuous Integration based on Atlassian Bamboo Implementation of the Continuous Integration based on Atlassian Bamboo
Implementation of the Continuous Integration based on Atlassian Bamboo
 
WordPress Development Environments
WordPress Development EnvironmentsWordPress Development Environments
WordPress Development Environments
 
Hacking the way you work
Hacking the way you workHacking the way you work
Hacking the way you work
 
From zero to hero with running your asp.net core 1 application in a docker co...
From zero to hero with running your asp.net core 1 application in a docker co...From zero to hero with running your asp.net core 1 application in a docker co...
From zero to hero with running your asp.net core 1 application in a docker co...
 
Automation: PowerShell & DSC
Automation: PowerShell & DSCAutomation: PowerShell & DSC
Automation: PowerShell & DSC
 
Docker With Asp.net Core
Docker With Asp.net CoreDocker With Asp.net Core
Docker With Asp.net Core
 
Monoliths vs microservices
Monoliths vs microservicesMonoliths vs microservices
Monoliths vs microservices
 
Windows server containers
Windows server containersWindows server containers
Windows server containers
 
Working in harmony
Working in harmonyWorking in harmony
Working in harmony
 
bol.com Dutch Container Day presentation
bol.com Dutch Container Day presentationbol.com Dutch Container Day presentation
bol.com Dutch Container Day presentation
 
Railsconf 2014 - Deploying Rails is Easier Thank It Looks
Railsconf 2014 - Deploying Rails is Easier Thank It LooksRailsconf 2014 - Deploying Rails is Easier Thank It Looks
Railsconf 2014 - Deploying Rails is Easier Thank It Looks
 
Don't worry with bower
Don't worry with bowerDon't worry with bower
Don't worry with bower
 
Microservices without servers
Microservices without serversMicroservices without servers
Microservices without servers
 
CI/CD at bol.com
CI/CD at bol.comCI/CD at bol.com
CI/CD at bol.com
 
Infrastructure as Code (IaC)
Infrastructure as Code (IaC)Infrastructure as Code (IaC)
Infrastructure as Code (IaC)
 
Beyond Apache: Faster Web Servers
Beyond Apache: Faster Web ServersBeyond Apache: Faster Web Servers
Beyond Apache: Faster Web Servers
 
The Pivotal Engineering Dojo: Earning Your Black Belt in Cloud Foundry Engine...
The Pivotal Engineering Dojo: Earning Your Black Belt in Cloud Foundry Engine...The Pivotal Engineering Dojo: Earning Your Black Belt in Cloud Foundry Engine...
The Pivotal Engineering Dojo: Earning Your Black Belt in Cloud Foundry Engine...
 
Training Slides: Tungsten Replicator AMI - The Getting Started Guide
Training Slides: Tungsten Replicator AMI - The Getting Started GuideTraining Slides: Tungsten Replicator AMI - The Getting Started Guide
Training Slides: Tungsten Replicator AMI - The Getting Started Guide
 
Azure Templates for Consistent Deployment
Azure Templates for Consistent DeploymentAzure Templates for Consistent Deployment
Azure Templates for Consistent Deployment
 

Similaire à Packing It In: Images, Containers, and Config Management

eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...Gaetano Giunta
 
The container revolution, and what it means to operators bay lisa - july 2016
The container revolution, and what it means to operators   bay lisa - july 2016The container revolution, and what it means to operators   bay lisa - july 2016
The container revolution, and what it means to operators bay lisa - july 2016Robert Starmer
 
Vagrant for Effective DevOps Culture
Vagrant for Effective DevOps CultureVagrant for Effective DevOps Culture
Vagrant for Effective DevOps CultureVaidik Kapoor
 
The Rocky Cloud Road
The Rocky Cloud RoadThe Rocky Cloud Road
The Rocky Cloud RoadGert Drapers
 
Immutable infrastructure isn’t the answer
Immutable infrastructure isn’t the answerImmutable infrastructure isn’t the answer
Immutable infrastructure isn’t the answerSam Bashton
 
Midwest PHP - Scaling Magento
Midwest PHP - Scaling MagentoMidwest PHP - Scaling Magento
Midwest PHP - Scaling MagentoMathew Beane
 
Warsaw MuleSoft Meetup - Runtime Fabric
Warsaw MuleSoft Meetup - Runtime FabricWarsaw MuleSoft Meetup - Runtime Fabric
Warsaw MuleSoft Meetup - Runtime FabricPatryk Bandurski
 
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchHoward Greenberg
 
An introduction to configuring Domino for Docker
An introduction to configuring Domino for DockerAn introduction to configuring Domino for Docker
An introduction to configuring Domino for DockerGabriella Davis
 
Highly available nodejs
Highly available nodejsHighly available nodejs
Highly available nodejspfremm
 
ThatConference 2016 - Highly Available Node.js
ThatConference 2016 - Highly Available Node.jsThatConference 2016 - Highly Available Node.js
ThatConference 2016 - Highly Available Node.jsBrad Williams
 
Introduction to Containers - SQL Server and Docker
Introduction to Containers - SQL Server and DockerIntroduction to Containers - SQL Server and Docker
Introduction to Containers - SQL Server and DockerChris Taylor
 
Couchbase Connect 2016
Couchbase Connect 2016Couchbase Connect 2016
Couchbase Connect 2016Michael Kehoe
 
Warsaw MuleSoft Meetup #6 - CI/CD
Warsaw MuleSoft Meetup  #6 - CI/CDWarsaw MuleSoft Meetup  #6 - CI/CD
Warsaw MuleSoft Meetup #6 - CI/CDPatryk Bandurski
 
Containerizing GPU Applications with Docker for Scaling to the Cloud
Containerizing GPU Applications with Docker for Scaling to the CloudContainerizing GPU Applications with Docker for Scaling to the Cloud
Containerizing GPU Applications with Docker for Scaling to the CloudSubbu Rama
 
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit EuropeAutomation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit EuropeAppDynamics
 
DevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
DevOpsGuys - DevOps Automation - The Good, The Bad and The UglyDevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
DevOpsGuys - DevOps Automation - The Good, The Bad and The UglyDevOpsGroup
 
Database as a Service (DBaaS) on Kubernetes
Database as a Service (DBaaS) on KubernetesDatabase as a Service (DBaaS) on Kubernetes
Database as a Service (DBaaS) on KubernetesObjectRocket
 

Similaire à Packing It In: Images, Containers, and Config Management (20)

eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
 
The container revolution, and what it means to operators bay lisa - july 2016
The container revolution, and what it means to operators   bay lisa - july 2016The container revolution, and what it means to operators   bay lisa - july 2016
The container revolution, and what it means to operators bay lisa - july 2016
 
Vagrant for Effective DevOps Culture
Vagrant for Effective DevOps CultureVagrant for Effective DevOps Culture
Vagrant for Effective DevOps Culture
 
The Rocky Cloud Road
The Rocky Cloud RoadThe Rocky Cloud Road
The Rocky Cloud Road
 
Immutable infrastructure isn’t the answer
Immutable infrastructure isn’t the answerImmutable infrastructure isn’t the answer
Immutable infrastructure isn’t the answer
 
Chef vs puppet
Chef vs puppetChef vs puppet
Chef vs puppet
 
Midwest PHP - Scaling Magento
Midwest PHP - Scaling MagentoMidwest PHP - Scaling Magento
Midwest PHP - Scaling Magento
 
Warsaw MuleSoft Meetup - Runtime Fabric
Warsaw MuleSoft Meetup - Runtime FabricWarsaw MuleSoft Meetup - Runtime Fabric
Warsaw MuleSoft Meetup - Runtime Fabric
 
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
 
An introduction to configuring Domino for Docker
An introduction to configuring Domino for DockerAn introduction to configuring Domino for Docker
An introduction to configuring Domino for Docker
 
Highly available nodejs
Highly available nodejsHighly available nodejs
Highly available nodejs
 
ThatConference 2016 - Highly Available Node.js
ThatConference 2016 - Highly Available Node.jsThatConference 2016 - Highly Available Node.js
ThatConference 2016 - Highly Available Node.js
 
Introduction to Containers - SQL Server and Docker
Introduction to Containers - SQL Server and DockerIntroduction to Containers - SQL Server and Docker
Introduction to Containers - SQL Server and Docker
 
Dockerize All The Things
Dockerize All The ThingsDockerize All The Things
Dockerize All The Things
 
Couchbase Connect 2016
Couchbase Connect 2016Couchbase Connect 2016
Couchbase Connect 2016
 
Warsaw MuleSoft Meetup #6 - CI/CD
Warsaw MuleSoft Meetup  #6 - CI/CDWarsaw MuleSoft Meetup  #6 - CI/CD
Warsaw MuleSoft Meetup #6 - CI/CD
 
Containerizing GPU Applications with Docker for Scaling to the Cloud
Containerizing GPU Applications with Docker for Scaling to the CloudContainerizing GPU Applications with Docker for Scaling to the Cloud
Containerizing GPU Applications with Docker for Scaling to the Cloud
 
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit EuropeAutomation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
 
DevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
DevOpsGuys - DevOps Automation - The Good, The Bad and The UglyDevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
DevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
 
Database as a Service (DBaaS) on Kubernetes
Database as a Service (DBaaS) on KubernetesDatabase as a Service (DBaaS) on Kubernetes
Database as a Service (DBaaS) on Kubernetes
 

Dernier

Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 

Dernier (20)

Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

Packing It In: Images, Containers, and Config Management

  • 2. Packing It In: Images, Containers, and Config Management Michael Goetz Sr. Consulting Engineer @ Chef mpgoetz@getchef.com Tuesday, July 15, 14
  • 3. Who am I? • Sr. Consulting Engineer @ Chef • 8+ years of experience planning, managing and operating web scale and enterprise applications • Avid woodworker Tuesday, July 15, 14
  • 4. This talk isn’t about joining a cult... • Lots of opinions exist that claim to be the “only right way” to manage your systems • The true path is the best combination that makes you go faster, in a safe and secure manner • Use a toolbox, not one tool http://leavingthecult.com/ Tuesday, July 15, 14
  • 5. So what are my options? • Artisanal machines made of metal and sweat • Pristine virtual machines • Isolated containers • Just-in-time automatic configuration management • All (or some) of the above? Tuesday, July 15, 14
  • 6. Artisanal machines made of metal and sweat • Do we really need to talk about why this sucks? • If you want to work on artisan crafts, take up woodworking http://www.juggernautwoodworking.com/images/carve.jpg Tuesday, July 15, 14
  • 7. Containers vs. Virtual Machines • Containers consist of an application and its dependencies, running in isolation in userland outside the kernel. • Virtual Machines create an entire machine, including a fully functional operating system. https://www.docker.io/static/img/about/docker_vm.jpg Tuesday, July 15, 14
  • 8. Hurray! We can go back to golden images, right? • The “golden image” problem still exists with containers, but on a much smaller scale • A dozen “server” images become dozens of “container” images • AUFS layering mitigates some sprawl, but has a limit • Modularity of applications without convergence of the entire system just kicks the can down the road http://images.smh.com.au/2011/10/28/2737998/ipad-art-wide-shipping-420x0.jpg Tuesday, July 15, 14
  • 9. What about configuration management? • Convergence - coming to a desired end state • Congruence - building a result from a blank state • Always building from scratch can be time consuming • Specification of application versions becomes extremely important • Changes can happen unexpectedly if you don’t plan ahead Convergence is like fixing the outcome and compute the route (like a GPS finder), and congruence is about repeating a recipe in a sequence of known steps to massage a system into shape” – Mark Burgess Tuesday, July 15, 14
  • 11. Let’s talk real world here... • My application system has: • An OS layer that rarely changes • A few supporting applications that change semi- frequently • My application code that changes rapidly • This can translate to: • VM image to act as a base OS + some deltas • Container images for supporting applications • Configuration management to maintain overall state Tuesday, July 15, 14
  • 12. So wait... that still seems like a lot of work • With 3 layers of your application stack to maintain, it feels like the maintenance demand will only go up • We’ll use three tools to manage each layer: • Packer - building and maintaining images (virtual machine host) • Chef - building Docker images, provisioning the VM and managing the configuration of running containers • Docker - running the containers Tuesday, July 15, 14
  • 13. What is Packer? • Half the battle is keeping VM images up- to-date • The more time spent refreshing VM images, the more table flipping that will ensue • Packer is tool for creating identical machine images for multiple platforms from a single source configuration • Makes programmatically building VM images super easy! {    "builders":  [{        "type":  "amazon-­‐ebs",        "region":  "us-­‐east-­‐1",        "source_ami":  "ami-­‐8ade42ba",        "instance_type":  "m3.medium",        "ssh_username":  "ubuntu",        "ami_name":  "my  ami  {{timestamp}}"    }],    "provisioners":  [{        "type":  "chef-­‐solo",        "cookbook_paths":  ["cookbooks"],        "json":  {            "name":  "my_node",            "run_list":  [                "recipe[docker]",                "recipe[my_application]"            ]        }    }] } Tuesday, July 15, 14
  • 14. What is Docker? • Docker combines Linux containers (LXC) with AUFS to create portable, lightweight application containers • Docker containers are running instances of Docker images • Docker images can be shared via a public or private registry • Containers can be single application processes or lightweight virtual machines if a supervisor is provided. Tuesday, July 15, 14
  • 15. What is Chef? • Chef is an automation platform that manages infrastructure as code • Configuration of systems is performed by reusable recipes that are shared across your entire infrastructure • Information about the various infrastructure components is cataloged and made available to to inform the rest of the topology configuration • Chef can run on demand or as a managed service to keep infrastructure convergent Tuesday, July 15, 14
  • 16. Chef-Container • A version of chef-client that includes components to support running the chef- client from within a Linux container • Packaged with chef-client, runit and chef-init • Allows you to bootstrap the container without an SSH connection • Use chef-client resources the same way in a container as on any UNIX- or Linux- based platform • Can manage multiple services within a single container using chef-init & runit Tuesday, July 15, 14
  • 17. The knife-container plugin • Used to initialize and build containers •knife container docker init •knife container docker build • Docker support today, other containers planned • Berkshelf integration • Supports Chef-Zero or Chef-Client modes Tuesday, July 15, 14
  • 18. Let’s get to building! • Starting with a solid foundation is key to success • Identify the core components that are unlikely to change, but are different from default settings • Security policies/applications • Image hardening • Core component packages • Docker tooling • The goal is to create a minimal base VM, combined with the components that are consistently configured across your entire application infrastructure Tuesday, July 15, 14
  • 19. Demo: Building the VM Tuesday, July 15, 14
  • 20. Building the Docker factory • We need a repeatable factory for building Docker images for the supporting applications • Chef-container lets us use our existing Chef cookbooks to create reusable Docker images • The key to success is isolation - create the smallest Docker images that will work • Hook up your continuous integration system to crank out new images as cookbooks are updated Tuesday, July 15, 14
  • 21. Demo: Building the Docker Factory Tuesday, July 15, 14
  • 22. Bringing it all together • Now that we have our base VM and Docker factory running, let’s manage an active application stack • Chef will provision servers with the base VM, build and run the Docker containers • Ongoing convergence of the overall desired state of the system will be managed by chef-clients running inside each container. Tuesday, July 15, 14
  • 23. Demo: Using Chef to manage the entire system Tuesday, July 15, 14
  • 24. Wrapping Up • Don’t join a cult • Use what works to make things faster, more secure and more stable • Keep the base VM small, but not too small • Use containers to manage isolated, reusable applications • Maintain a convergent infrastructure with automated configuration management Tuesday, July 15, 14
  • 25. Want to know more? • Release: Chef Container 0.2.0 (beta) - http://www.getchef.com/blog/2014/07/15/ release-chef-container-0-2-0-beta/ • Chef Containers Documentation - http://docs.opscode.com/containers.html • Video demo - https://www.youtube.com/watch? v=nSB9rHG1_FQ&feature=youtu.be • Packer - http://www.packer.io/ • Docker - http://www.docker.com/ Tuesday, July 15, 14