SlideShare a Scribd company logo
1 of 21
Download to read offline
System Orchestration
with Capistrano and Puppet
Christian Patsch
Berlin, April 9th, 2014
©2014GONICUSGmbH
2
Agenda
● About me
● Why Puppet ? Why Capistrano ?
● Introduction
● Problem Statement
● Capistrano
● Extension supply_drop
● Alternatives
● Summary
©2014GONICUSGmbH
5
Motivation
● Cloud Computing is a paradigm change
● Trend towards more agile system administration
patterns, driven by business requirements
● Years after Consolidation movement into
virtualized environments, the number of hosts is
growing heavily → Configuration Drift
● Requirements for the more complex IT
infrastructure stay the same: stability,
Control/Governance reqs, Security
● Changes and Deployments in higher frequency
©2014GONICUSGmbH
6
Introduction
● A short history of „System Configuration Tools“
● scripts / system-specific
● remote-ssh, cluster-ssh
● cfengine, FAI,....
● new ideas around 2005 ff. – declarative vs.
imperative etc.
● Puppet, Chef, Ansible, Saltstack,.....YADT
● Advantages/Disadvantages
©2014GONICUSGmbH
7
Criteria
● pull/push - mechanisms
● Master as central point of truth at all time ?
● Learning curve
● Developer as Operator, or Operator as
Developer ?
● Ad-hoc/do now vs. planned/regularly
● Order of executed tasks
● Level of abstraction needed
● Supported Operating systems
©2014GONICUSGmbH
10
Problem Statement
● Master/Agent and therefore centralized
architecture not always desired or best
approach depending on environment
● Problems and risks using complete and
autonomous deployment from a central instance
● One more service that has to be operated,
thinking of all aspects this has in an enterprise
data center
©2014GONICUSGmbH
11
Problem Statement -2-
● How to overcome network hurdles ?
● Completely manual usage of puppet recipes
needs maintenance and „human power“, explicit
access for every puppetized hosts not the most
elegant solution
● There are environments where changes are not
that frequent, and maybe even standardized
● Example: LDAP-HA with pen LoadBalancer
©2014GONICUSGmbH
12
Capistrano v2
● Coming from Ruby Ecosystem, project focus is
remote deployment for applications – especially
RoR
● inspired by rake (Ruby make), own DSL
● Explicitly designed for usage of an admin host
that executes deployment tasks over SSH
connections
● Config-source (central truth) only necessary
here
● „Capfile“ as Command Tool
©2014GONICUSGmbH
13
Capfile - Example
set user:, 'sysadmin'
role :puppet , „ubumastervm“
desc "Install puppet from puppetlabs"
task :setup_puppet, :roles => :puppet do
  run "#{sudo} wget ­O /tmp/puppetlabs­release­precise.deb 
       
http://apt.puppetlabs.com/puppetlabs­release­precise.deb"
  run "#{sudo} dpkg ­i /tmp/puppetlabs­release­precise.deb"
  run "#{sudo} rm ­f /tmp/puppetlabs­release­precise.deb"
  run "#{sudo} apt­get ­y update"
  run "#{sudo} apt­get ­y install puppet"
end
©2014GONICUSGmbH
14
Capistrano and Puppet
● Combination of both is an nearby idea
● Easy setup
● enables „puppet solo“
● Capistrano opens SSH connection and applies
the tasks and also recipes on the configured
hosts
● Advanced Configuration possible, e.g. roles etc.
● A cap run can be activated directly, via using the
desired task or namespaces
©2014GONICUSGmbH
15
Detailed run
● # cap <taskname>
● Connection to given server(s) over SSH
● Key-authentication not mandatory but
recommended ;-)
● Single task descriptions from Capfile are
executed , for example:
● upload <recipe>.pp
● run <command line task>
● stream <logfile>
● Example for 'puppet apply'
● run puppet apply <recipe>.pp
©2014GONICUSGmbH
16
Capfile – Example 2
desc "Setup check­mk agent"
task :setup_check_mk, :roles => :puppet do
        upload("check_mk.pp", "/tmp/check_mk.pp")
        run "#{sudo} puppet apply /tmp/check_mk.pp"
        run "#{sudo} rm ­f /tmp/check_mk.pp"
end
=======
Configuration logic stays in the puppet manifest itself, assures that::
- packages for check_mk are installed
- check_mk init script is activated and executed, start using xinetd
=> recipes/manifests have to be created once, can be deployed on selected
hosts multiple times.
©2014GONICUSGmbH
17
Advantages
● Easy installation
● Better control of deployments
● Description of configuration on the task-layer
allows more granular deployments without
much effort
● No additional services have to be activated or
installed
● Secure Connections using SSH with well-known
and established permissions and access control
● Tracking/reporting of invocations possible with
default tools (sudo,...)
©2014GONICUSGmbH
18
supply_drop extension
● Ruby gem for extended integration of capistrano
and Puppet
● Specific capistrano tasks for puppet :
● cap puppet:apply
● cap puppet:noop
● …
● No need for manually copying manifests and
other files, rsync task included
● Recommended for staging
environments/configurations
©2014GONICUSGmbH
20
Other Tools
● Approach of central admin workstation as
“control station” is used by other solutions, too
● No final case made for master/agent concept
vs. decentral administration
● Key in all cases is the versioning control and the
functionality that is created by using a VCS,
especially in case of DVCS
● No general recommendation possible –
research and PoC needed to define solution
that fits best
©2014GONICUSGmbH
21
Fabric
● “capistrano for pythonists”
● Similar approach, but writing small python
scripts is needed
● Integration efforts with puppet have already
been made (see on github)
● Example:
from fabric.api import run
def host_type():
    run('uname ­s')
©2014GONICUSGmbH
22
iron_chef & chef-solo
● Capistrano gem for chef (
https://Github.com/scottvrosenthal/iron_chef)
● Automatically sets up directory structure for
project
● List of default tasks for capistrano and chef
working together
● #cap <node> chef:bootstrap
.......
©2014GONICUSGmbH
23
Ansible
● Configuration management tool built with the
aforementioned ideas in mind
● Written in Python
● YAML playbooks – jinja2-based templating
● Push default – pull possible
● SSH as default transport, nodes do not need
any additional software
● http://www.ansible.com,
http://galaxy.ansible.com
©2014GONICUSGmbH
24
Summary
● Testing and learning of tools also worthwile in
smaller environments
● Disadvantages of current implementations can
be aligned
● Learning curve and initial effort are significantly
lower than implementation of complete
environments for system configuration mgmt.
● Advantages still exist: Reusability,
documentation source, prevention of “silo”
thinking....
● Best-Practice approach
©2014GONICUSGmbH
Thank you...
........for your attention =) Questions ?
Christian Patsch
Christian.Patsch@GONICUS.de
GONICUS GmbH
Möhnestr. 55
59755 Arnsberg
http://www.gonicus.de
©2014GONICUSGmbH
26
Resources
● https://github.com/capistrano/capistrano/wiki
Capistrano v2 Documentation
● https://github.com/pitluga/supply_drop
Github-Repository for supply_drop Gem
● https://www.braintreepayments.com/braintrust/d
ecentralize-your-devops-with-masterless-puppet
-and-supply-drop
blog entry from author of supply_drop Gem

More Related Content

What's hot

Vagrant are you still develop in a non-virtual environment-
Vagrant  are you still develop in a non-virtual environment-Vagrant  are you still develop in a non-virtual environment-
Vagrant are you still develop in a non-virtual environment-
Anatoly Bubenkov
 

What's hot (20)

Gulp: Your Build Process Will Thank You
Gulp: Your Build Process Will Thank YouGulp: Your Build Process Will Thank You
Gulp: Your Build Process Will Thank You
 
Beyond Puppet
Beyond PuppetBeyond Puppet
Beyond Puppet
 
Automated Development Workflow with Gulp
Automated Development Workflow with GulpAutomated Development Workflow with Gulp
Automated Development Workflow with Gulp
 
Monitoring at a SAAS Startup: Tradeoffs and Tools
Monitoring at a SAAS Startup: Tradeoffs and ToolsMonitoring at a SAAS Startup: Tradeoffs and Tools
Monitoring at a SAAS Startup: Tradeoffs and Tools
 
Essential parts to implement own Ozone backend
Essential parts to implement own Ozone backendEssential parts to implement own Ozone backend
Essential parts to implement own Ozone backend
 
Ondřej Procházka - Deployment podle Devel.cz
Ondřej Procházka - Deployment podle Devel.czOndřej Procházka - Deployment podle Devel.cz
Ondřej Procházka - Deployment podle Devel.cz
 
An Overview of the Open Source Vulkan Driver for Raspberry Pi 4
An Overview of the Open Source Vulkan Driver for Raspberry Pi 4An Overview of the Open Source Vulkan Driver for Raspberry Pi 4
An Overview of the Open Source Vulkan Driver for Raspberry Pi 4
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and Development
 
Moving from Jenkins 1 to 2 declarative pipeline adventures
Moving from Jenkins 1 to 2 declarative pipeline adventuresMoving from Jenkins 1 to 2 declarative pipeline adventures
Moving from Jenkins 1 to 2 declarative pipeline adventures
 
OSDC.no 2015 introduction to node.js workshop
OSDC.no 2015 introduction to node.js workshopOSDC.no 2015 introduction to node.js workshop
OSDC.no 2015 introduction to node.js workshop
 
Modern Development Tools
Modern Development ToolsModern Development Tools
Modern Development Tools
 
Vagrant are you still develop in a non-virtual environment-
Vagrant  are you still develop in a non-virtual environment-Vagrant  are you still develop in a non-virtual environment-
Vagrant are you still develop in a non-virtual environment-
 
TDC2016SP - Esqueça Grunt ou Gulp. Webpack and NPM rule them all!
TDC2016SP -  Esqueça Grunt ou Gulp. Webpack and NPM rule them all!TDC2016SP -  Esqueça Grunt ou Gulp. Webpack and NPM rule them all!
TDC2016SP - Esqueça Grunt ou Gulp. Webpack and NPM rule them all!
 
Grunt to automate JS build
Grunt to automate JS buildGrunt to automate JS build
Grunt to automate JS build
 
Embedding Chromium into AGL demo platform with WAM
Embedding Chromium into AGL demo platform with WAMEmbedding Chromium into AGL demo platform with WAM
Embedding Chromium into AGL demo platform with WAM
 
Avoid the Vendor Lock-in Trap (with App Deployment)
Avoid the Vendor Lock-in Trap (with App Deployment)Avoid the Vendor Lock-in Trap (with App Deployment)
Avoid the Vendor Lock-in Trap (with App Deployment)
 
Grunt training deck
Grunt training deckGrunt training deck
Grunt training deck
 
OpenNebulaConf 2016 - LAB ONE - Vagrant running on OpenNebula? by Florian Heigl
OpenNebulaConf 2016 - LAB ONE - Vagrant running on OpenNebula? by Florian HeiglOpenNebulaConf 2016 - LAB ONE - Vagrant running on OpenNebula? by Florian Heigl
OpenNebulaConf 2016 - LAB ONE - Vagrant running on OpenNebula? by Florian Heigl
 
Intro to vagrant
Intro to vagrantIntro to vagrant
Intro to vagrant
 
Front-end development automation with Grunt
Front-end development automation with GruntFront-end development automation with Grunt
Front-end development automation with Grunt
 

Similar to OSDC 2014: Christian Patsch - System Orchestration with Capistrano and Puppet

Creating a mature puppet system
Creating a mature puppet systemCreating a mature puppet system
Creating a mature puppet system
rkhatibi
 

Similar to OSDC 2014: Christian Patsch - System Orchestration with Capistrano and Puppet (20)

SCM Puppet: from an intro to the scaling
SCM Puppet: from an intro to the scalingSCM Puppet: from an intro to the scaling
SCM Puppet: from an intro to the scaling
 
Puppet Camp Seattle 2014: Docker and Puppet: 1+1=3
Puppet Camp Seattle 2014: Docker and Puppet: 1+1=3 Puppet Camp Seattle 2014: Docker and Puppet: 1+1=3
Puppet Camp Seattle 2014: Docker and Puppet: 1+1=3
 
Git pusshuten
Git pusshutenGit pusshuten
Git pusshuten
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 
ContainerCon - Test Driven Infrastructure
ContainerCon - Test Driven InfrastructureContainerCon - Test Driven Infrastructure
ContainerCon - Test Driven Infrastructure
 
Intro - End to end ML with Kubeflow @ SignalConf 2018
Intro - End to end ML with Kubeflow @ SignalConf 2018Intro - End to end ML with Kubeflow @ SignalConf 2018
Intro - End to end ML with Kubeflow @ SignalConf 2018
 
Tranquilizer
TranquilizerTranquilizer
Tranquilizer
 
Rejekts 24 EU No GitOps Pain, No Platform Gain
Rejekts 24 EU No GitOps Pain, No Platform GainRejekts 24 EU No GitOps Pain, No Platform Gain
Rejekts 24 EU No GitOps Pain, No Platform Gain
 
John Spray - Ceph in Kubernetes
John Spray - Ceph in KubernetesJohn Spray - Ceph in Kubernetes
John Spray - Ceph in Kubernetes
 
PySpark on Kubernetes @ Python Barcelona March Meetup
PySpark on Kubernetes @ Python Barcelona March MeetupPySpark on Kubernetes @ Python Barcelona March Meetup
PySpark on Kubernetes @ Python Barcelona March Meetup
 
Creating a Mature Puppet System
Creating a Mature Puppet SystemCreating a Mature Puppet System
Creating a Mature Puppet System
 
Creating a mature puppet system
Creating a mature puppet systemCreating a mature puppet system
Creating a mature puppet system
 
PuppetConf 2017: Zero to Kubernetes -Scott Coulton, Puppet
PuppetConf 2017: Zero to Kubernetes -Scott Coulton, PuppetPuppetConf 2017: Zero to Kubernetes -Scott Coulton, Puppet
PuppetConf 2017: Zero to Kubernetes -Scott Coulton, Puppet
 
My "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails ProjectsMy "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails Projects
 
Introduction to Docker at SF Peninsula Software Development Meetup @Guidewire
Introduction to Docker at SF Peninsula Software Development Meetup @GuidewireIntroduction to Docker at SF Peninsula Software Development Meetup @Guidewire
Introduction to Docker at SF Peninsula Software Development Meetup @Guidewire
 
[HKOSCON][20180616][Containerized High Availability Virtual Hosting Deploymen...
[HKOSCON][20180616][Containerized High Availability Virtual Hosting Deploymen...[HKOSCON][20180616][Containerized High Availability Virtual Hosting Deploymen...
[HKOSCON][20180616][Containerized High Availability Virtual Hosting Deploymen...
 
Integrating Puppet and Gitolite for sysadmins cooperations
Integrating Puppet and Gitolite for sysadmins cooperationsIntegrating Puppet and Gitolite for sysadmins cooperations
Integrating Puppet and Gitolite for sysadmins cooperations
 
[BarCamp2018][20180915][Tips for Virtual Hosting on Kubernetes]
[BarCamp2018][20180915][Tips for Virtual Hosting on Kubernetes][BarCamp2018][20180915][Tips for Virtual Hosting on Kubernetes]
[BarCamp2018][20180915][Tips for Virtual Hosting on Kubernetes]
 
PL-4047, Big Data Workload Analysis Using SWAT and Ipython Notebooks, by Moni...
PL-4047, Big Data Workload Analysis Using SWAT and Ipython Notebooks, by Moni...PL-4047, Big Data Workload Analysis Using SWAT and Ipython Notebooks, by Moni...
PL-4047, Big Data Workload Analysis Using SWAT and Ipython Notebooks, by Moni...
 
De-centralise and conquer: Masterless Puppet in a dynamic environment
De-centralise and conquer: Masterless Puppet in a dynamic environmentDe-centralise and conquer: Masterless Puppet in a dynamic environment
De-centralise and conquer: Masterless Puppet in a dynamic environment
 

Recently uploaded

%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 

Recently uploaded (20)

%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT  - Elevating Productivity in Today's Agile EnvironmentHarnessing ChatGPT  - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 

OSDC 2014: Christian Patsch - System Orchestration with Capistrano and Puppet