SlideShare une entreprise Scribd logo
1  sur  41
Capistrano, Puppet,
        and Chef
Automating App Deployment & Config Management
These tools have to do with

• Application Deployment
• Configuration Management
These are different.

Discuss.
In the beginning there was


 scp : application deployment


 ssh : configuration management

before things got complicated
Let's talk about


 Application Deployment
simplest application deployment


 1. scp app to production box.


 2. Restart server. (optional)


 3. Profit!
But there are always complications, like

“unpack app into a particular directory”

“scrub lock files or workspace directories”

“run database upgrade/tweak scripts”
These additional bits were usually done


 a) by hand (ssh)


 b) with deploy scripts living on the servers


 c) or not done at all (oops!)
Capistrano
www.capify.org

Introduced around 2006
by Jamis Buck of 37Signals

written in Ruby, initally for Rails projects.
Mainly because ruby on rails, particularly in
production settings, had to use a ruby server
called "mongrel" which was fast, but an
absolute pain to restart. PAIN.
Simplest Explanation

• Lets you to write scripts that say "ssh
  onto this machine and do this thing."
• You don't have to have magic scripts living
  on your servers, they can be source.
• You can start being clever, and
  programming your deployment actions.
Simple "capfile" example
Simple "capfile" with "roles", you get the idea
Nice things Capistrano introduced:


 Automate deploys with ONE set of files


 The files DON’T have to live on the
production server


 The language (Ruby) allows some abstraction
and finesse not available in blunt force shell
scripting
Now the application deployment step can be
coded and tested like the rest of the project.
And the deployment scripts can be
strengthened, we all happy. Example:
Unfortunately, Capistrano's future looks a little
uncertain (in 2011). The project page redirects to
a github page, which points to stale
documentation. It seems widely used, but not well
supported.

May be a bit like CruiseControl (the early
awesome build server) the tool may have hit its
"use by" date.

Not sure what the successor is. Vlad The
Deployer? (http://rubyhitsquad.com/
Vlad_the_Deployer.html)
OK
Let's talk about


 Configuration Management
This is where, on a new machine, you make sure


   your apache's got mods


   your ruby's got gems


   your php's got pears


   your java's got...version

All those things you remember, or forget, and then...
This happens a lot:


 One person knows how all the servers get configured. One
awesome person.


   or


 Each server gets set up differently depending on who set them
up. Awesomeness not a requirement. Medication helps.


   and


 Server setups are build by hand (ssh, ssh, ssh) from memory (or
checklists written on forearms).
This (sort of ) worked a little OK when
servers were physical, so setting them up
was a special magic ceremony.
But when servers became virtual, the magic
wore off, and the underlying dumbness shone
through.
Even for small projects, why can't we have:

• 
 Configurations defined in source.
• 
 Repeatable, consistent configs through
  test, stage, & production.

• 
 Smart configurations that, say, enforce
  version levels and don't forget libraries.

  Why?
Puppet

http://www.puppetlabs.com

written in Ruby, evolved from cfengine
"Puppet is typically (but not always) used in a
client/server formation, with all of your
clients talking to one or more central
servers. Each client contacts the server
periodically (every half hour, by default),
downloads the latest configuration, and
makes sure it is in sync with that
configuration. Once done, the client can send
a report back to the server indicating if
anything needed to change."
The server is called the "Puppet Master".
Creepy, but cool.
idempotent                             |ˈīdemˌpōtənt| Mathematics

adjective

denoting an element of a set that is unchanged in value when multiplied or otherwise
operated on by itself.

noun

an element of this type.

ORIGIN late 19th cent.: from Latin idem ‘same’ + potent 1 .

The term can also be used to describe an initialisation subroutine that is arranged to
perform some critical action exactly once, even if the routine is called several times.

[ Jargon File]
Simple example of a Puppet class

class ntp {
    package { "ntp":
        ensure => installed
    }
    service { "ntp":
        ensure => running,
    }
}
Simple example of a node description

node myserver {
    include ntp
}

This instructs puppet to make sure ntp is installed
and running on "myserver"

(I left out the definition of "ntp" as a "resource". A
big part of the Puppet DSL is a rich ability to define
resources, their files, locations, permissions, just
about everything about them.)
Puppet manifests are declarative, as opposed
to imperative.

The DSL is not Ruby, as you're not writing
scripts, you're writing definitions.

Install order is determined through
dependencies.
And being idempotent, the puppet master
will make sure the systems match the
definitions.

This is kind of cool, in that you can
implement changes across machines
automatically just by updating the manifext in
the puppet master.

Kind of scary, kind of cool.
Chef

http://www.opscode.com/chef/

written in ruby, evolved from Puppet
Chef is built around a chef server, which
  contains

• 
 deployment scripts (called cookbooks and
  recipes)

• 
 config instructions for machines (called
  nodes)

• 
 security details for all (pem pem pem)
You start with an empty machine

install enough stuff to run chef-client (ruby,
chef)

and then run...chef-client
As with Puppet, it is idempotent, so you can
re-run it again and again to confirm or update
config.

Chef recipes are imperitive, as opposed to
declarative.

The DSL is extended Ruby, so you can write
scripts, as well as definitions.

Install order is determined through script
order, no dependency checking.
Chef vs Puppet
(This appears to be a big debate, like we
need that)
“Chef vs. Puppet”

"Declarative" vs "Imperative"... oh, shoot me now.

(IMHO) Devs like Chef, because they can script it

(IMHO) Ops like Puppet, because its a set of
rules

Both sides claim the other is "too complicated".

Go figure.
What next?

There are a number of other tools in the space:

App Deploy: Capistrano, ControlTier, Fabric, Func, mCollective

SysConfig: Bcfg2, Chef, Puppet, cfengine, Smart Frog

Cloud/VM: Xen, Ixc, openVZ, Eucalyptus, KVM

OS Install: Kickstart, Jumpstart, Cobbler, OpenQRM, xCAT

Hard for them to get momentum & critical mass?

We may get further definition, hopefully simplification.
Summing up

Application Deployment.

Configuration Management

Its nice to know these can be described in
code, checked into source code control,
tested, and then deployed.

I mean it is really nice!
Questions?
Thanks!

Contenu connexe

Tendances

Jenkins and Docker for native Linux packages
Jenkins and Docker for native Linux packagesJenkins and Docker for native Linux packages
Jenkins and Docker for native Linux packagesDaniel Paulus
 
A quick intro to Ansible
A quick intro to AnsibleA quick intro to Ansible
A quick intro to AnsibleDan Vaida
 
Python Deployment with Fabric
Python Deployment with FabricPython Deployment with Fabric
Python Deployment with Fabricandymccurdy
 
Deploy your Python code on Azure Functions
Deploy your Python code on Azure FunctionsDeploy your Python code on Azure Functions
Deploy your Python code on Azure FunctionsDhilipsiva DS
 
Deployment with capistrano
Deployment with capistranoDeployment with capistrano
Deployment with capistranosagar junnarkar
 
Capifony. Minsk PHP MeetUp #11
Capifony. Minsk PHP MeetUp #11Capifony. Minsk PHP MeetUp #11
Capifony. Minsk PHP MeetUp #11Yury Pliashkou
 
Basics of Ansible - Sahil Davawala
Basics of Ansible - Sahil DavawalaBasics of Ansible - Sahil Davawala
Basics of Ansible - Sahil DavawalaSahil Davawala
 
Continuous Deployment at Spreaker
Continuous Deployment at SpreakerContinuous Deployment at Spreaker
Continuous Deployment at SpreakerMarco Pracucci
 
Testing Ansible with Jenkins and Docker
Testing Ansible with Jenkins and DockerTesting Ansible with Jenkins and Docker
Testing Ansible with Jenkins and DockerDennis Rowe
 
Deploying PHP Applications with Ansible
Deploying PHP Applications with AnsibleDeploying PHP Applications with Ansible
Deploying PHP Applications with AnsibleOrestes Carracedo
 
Managing Your Cisco Datacenter Network with Ansible
Managing Your Cisco Datacenter Network with AnsibleManaging Your Cisco Datacenter Network with Ansible
Managing Your Cisco Datacenter Network with Ansiblefmaccioni
 
Painless Deployment with Capistrano
Painless Deployment with CapistranoPainless Deployment with Capistrano
Painless Deployment with CapistranoNick Kugaevsky
 
Ansible with AWS
Ansible with AWSAnsible with AWS
Ansible with AWSAllan Denot
 
Composer Tutorial (PHP Hampshire Sept 2013)
Composer Tutorial (PHP Hampshire Sept 2013)Composer Tutorial (PHP Hampshire Sept 2013)
Composer Tutorial (PHP Hampshire Sept 2013)James Titcumb
 
Big data and hadoop training - Session 5
Big data and hadoop training - Session 5Big data and hadoop training - Session 5
Big data and hadoop training - Session 5hkbhadraa
 
Using filesystem capabilities with rsync
Using filesystem capabilities with rsyncUsing filesystem capabilities with rsync
Using filesystem capabilities with rsyncHazel Smith
 

Tendances (20)

Capistrano
CapistranoCapistrano
Capistrano
 
Capistrano - Deployment Tool
Capistrano - Deployment ToolCapistrano - Deployment Tool
Capistrano - Deployment Tool
 
Jenkins and Docker for native Linux packages
Jenkins and Docker for native Linux packagesJenkins and Docker for native Linux packages
Jenkins and Docker for native Linux packages
 
A quick intro to Ansible
A quick intro to AnsibleA quick intro to Ansible
A quick intro to Ansible
 
Python Deployment with Fabric
Python Deployment with FabricPython Deployment with Fabric
Python Deployment with Fabric
 
Deploy your Python code on Azure Functions
Deploy your Python code on Azure FunctionsDeploy your Python code on Azure Functions
Deploy your Python code on Azure Functions
 
Deployment with capistrano
Deployment with capistranoDeployment with capistrano
Deployment with capistrano
 
Capifony. Minsk PHP MeetUp #11
Capifony. Minsk PHP MeetUp #11Capifony. Minsk PHP MeetUp #11
Capifony. Minsk PHP MeetUp #11
 
Basics of Ansible - Sahil Davawala
Basics of Ansible - Sahil DavawalaBasics of Ansible - Sahil Davawala
Basics of Ansible - Sahil Davawala
 
Continuous Deployment at Spreaker
Continuous Deployment at SpreakerContinuous Deployment at Spreaker
Continuous Deployment at Spreaker
 
Testing Ansible with Jenkins and Docker
Testing Ansible with Jenkins and DockerTesting Ansible with Jenkins and Docker
Testing Ansible with Jenkins and Docker
 
Deploying PHP Applications with Ansible
Deploying PHP Applications with AnsibleDeploying PHP Applications with Ansible
Deploying PHP Applications with Ansible
 
Managing Your Cisco Datacenter Network with Ansible
Managing Your Cisco Datacenter Network with AnsibleManaging Your Cisco Datacenter Network with Ansible
Managing Your Cisco Datacenter Network with Ansible
 
Painless Deployment with Capistrano
Painless Deployment with CapistranoPainless Deployment with Capistrano
Painless Deployment with Capistrano
 
Ansible with AWS
Ansible with AWSAnsible with AWS
Ansible with AWS
 
Ansible 2.2
Ansible 2.2Ansible 2.2
Ansible 2.2
 
Composer Tutorial (PHP Hampshire Sept 2013)
Composer Tutorial (PHP Hampshire Sept 2013)Composer Tutorial (PHP Hampshire Sept 2013)
Composer Tutorial (PHP Hampshire Sept 2013)
 
Ansible on AWS
Ansible on AWSAnsible on AWS
Ansible on AWS
 
Big data and hadoop training - Session 5
Big data and hadoop training - Session 5Big data and hadoop training - Session 5
Big data and hadoop training - Session 5
 
Using filesystem capabilities with rsync
Using filesystem capabilities with rsyncUsing filesystem capabilities with rsync
Using filesystem capabilities with rsync
 

Similaire à Capistrano, Puppet, and Chef

Cloudops fundamentals management, tdd, test driven design, continuous integra...
Cloudops fundamentals management, tdd, test driven design, continuous integra...Cloudops fundamentals management, tdd, test driven design, continuous integra...
Cloudops fundamentals management, tdd, test driven design, continuous integra...Bret Piatt
 
A DevOps guide to Kubernetes
A DevOps guide to KubernetesA DevOps guide to Kubernetes
A DevOps guide to KubernetesPaul Czarkowski
 
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 scalingStanislav Osipov
 
Using Puppet in Small Infrastructures
Using Puppet in Small InfrastructuresUsing Puppet in Small Infrastructures
Using Puppet in Small InfrastructuresRachel Andrew
 
Automated Deployment using Open Source
Automated Deployment using Open SourceAutomated Deployment using Open Source
Automated Deployment using Open Sourceduskglow
 
Kubernetes for the PHP developer
Kubernetes for the PHP developerKubernetes for the PHP developer
Kubernetes for the PHP developerPaul Czarkowski
 
Introduction to LAVA Workload Scheduler
Introduction to LAVA Workload SchedulerIntroduction to LAVA Workload Scheduler
Introduction to LAVA Workload SchedulerNopparat Nopkuat
 
Getting started with puppet and vagrant (1)
Getting started with puppet and vagrant (1)Getting started with puppet and vagrant (1)
Getting started with puppet and vagrant (1)Puppet
 
Automating the Cloud with Terraform, and Ansible
Automating the Cloud with Terraform, and AnsibleAutomating the Cloud with Terraform, and Ansible
Automating the Cloud with Terraform, and AnsibleBrian Hogan
 
Migraine Drupal - syncing your staging and live sites
Migraine Drupal - syncing your staging and live sitesMigraine Drupal - syncing your staging and live sites
Migraine Drupal - syncing your staging and live sitesdrupalindia
 
Automated shutdown
Automated shutdownAutomated shutdown
Automated shutdownMario Berend
 
Fabric8 - Being devOps doesn't suck anymore
Fabric8 - Being devOps doesn't suck anymoreFabric8 - Being devOps doesn't suck anymore
Fabric8 - Being devOps doesn't suck anymoreHenryk Konsek
 
Austin Web Architecture
Austin Web ArchitectureAustin Web Architecture
Austin Web Architecturejoaquincasares
 
Aucklug slides - desktop tips and tricks
Aucklug slides - desktop tips and tricksAucklug slides - desktop tips and tricks
Aucklug slides - desktop tips and tricksGlen Ogilvie
 
Configuring Your First Hadoop Cluster On EC2
Configuring Your First Hadoop Cluster On EC2Configuring Your First Hadoop Cluster On EC2
Configuring Your First Hadoop Cluster On EC2benjaminwootton
 
A Tale of a Server Architecture (Frozen Rails 2012)
A Tale of a Server Architecture (Frozen Rails 2012)A Tale of a Server Architecture (Frozen Rails 2012)
A Tale of a Server Architecture (Frozen Rails 2012)Flowdock
 
Advanced technic for OS upgrading in 3 minutes
Advanced technic for OS upgrading in 3 minutesAdvanced technic for OS upgrading in 3 minutes
Advanced technic for OS upgrading in 3 minutesHiroshi SHIBATA
 
Ansible & Salt - Vincent Boon
Ansible & Salt - Vincent BoonAnsible & Salt - Vincent Boon
Ansible & Salt - Vincent BoonMyNOG
 

Similaire à Capistrano, Puppet, and Chef (20)

Security Testing Using Infrastructure-As-Code
Security Testing Using Infrastructure-As-CodeSecurity Testing Using Infrastructure-As-Code
Security Testing Using Infrastructure-As-Code
 
Cloudops fundamentals management, tdd, test driven design, continuous integra...
Cloudops fundamentals management, tdd, test driven design, continuous integra...Cloudops fundamentals management, tdd, test driven design, continuous integra...
Cloudops fundamentals management, tdd, test driven design, continuous integra...
 
A DevOps guide to Kubernetes
A DevOps guide to KubernetesA DevOps guide to Kubernetes
A DevOps guide to Kubernetes
 
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
 
Using Puppet in Small Infrastructures
Using Puppet in Small InfrastructuresUsing Puppet in Small Infrastructures
Using Puppet in Small Infrastructures
 
Automated Deployment using Open Source
Automated Deployment using Open SourceAutomated Deployment using Open Source
Automated Deployment using Open Source
 
Kubernetes for the PHP developer
Kubernetes for the PHP developerKubernetes for the PHP developer
Kubernetes for the PHP developer
 
Introduction to LAVA Workload Scheduler
Introduction to LAVA Workload SchedulerIntroduction to LAVA Workload Scheduler
Introduction to LAVA Workload Scheduler
 
Getting started with puppet and vagrant (1)
Getting started with puppet and vagrant (1)Getting started with puppet and vagrant (1)
Getting started with puppet and vagrant (1)
 
Automating the Cloud with Terraform, and Ansible
Automating the Cloud with Terraform, and AnsibleAutomating the Cloud with Terraform, and Ansible
Automating the Cloud with Terraform, and Ansible
 
Migraine Drupal - syncing your staging and live sites
Migraine Drupal - syncing your staging and live sitesMigraine Drupal - syncing your staging and live sites
Migraine Drupal - syncing your staging and live sites
 
Automated shutdown
Automated shutdownAutomated shutdown
Automated shutdown
 
Fabric8 - Being devOps doesn't suck anymore
Fabric8 - Being devOps doesn't suck anymoreFabric8 - Being devOps doesn't suck anymore
Fabric8 - Being devOps doesn't suck anymore
 
Austin Web Architecture
Austin Web ArchitectureAustin Web Architecture
Austin Web Architecture
 
Aucklug slides - desktop tips and tricks
Aucklug slides - desktop tips and tricksAucklug slides - desktop tips and tricks
Aucklug slides - desktop tips and tricks
 
Configuring Your First Hadoop Cluster On EC2
Configuring Your First Hadoop Cluster On EC2Configuring Your First Hadoop Cluster On EC2
Configuring Your First Hadoop Cluster On EC2
 
A Tale of a Server Architecture (Frozen Rails 2012)
A Tale of a Server Architecture (Frozen Rails 2012)A Tale of a Server Architecture (Frozen Rails 2012)
A Tale of a Server Architecture (Frozen Rails 2012)
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
 
Advanced technic for OS upgrading in 3 minutes
Advanced technic for OS upgrading in 3 minutesAdvanced technic for OS upgrading in 3 minutes
Advanced technic for OS upgrading in 3 minutes
 
Ansible & Salt - Vincent Boon
Ansible & Salt - Vincent BoonAnsible & Salt - Vincent Boon
Ansible & Salt - Vincent Boon
 

Dernier

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 

Dernier (20)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

Capistrano, Puppet, and Chef

  • 1. Capistrano, Puppet, and Chef Automating App Deployment & Config Management
  • 2. These tools have to do with • Application Deployment • Configuration Management These are different. Discuss.
  • 3. In the beginning there was scp : application deployment ssh : configuration management before things got complicated
  • 4. Let's talk about Application Deployment
  • 5. simplest application deployment 1. scp app to production box. 2. Restart server. (optional) 3. Profit!
  • 6. But there are always complications, like “unpack app into a particular directory” “scrub lock files or workspace directories” “run database upgrade/tweak scripts”
  • 7. These additional bits were usually done a) by hand (ssh) b) with deploy scripts living on the servers c) or not done at all (oops!)
  • 8. Capistrano www.capify.org Introduced around 2006 by Jamis Buck of 37Signals written in Ruby, initally for Rails projects.
  • 9. Mainly because ruby on rails, particularly in production settings, had to use a ruby server called "mongrel" which was fast, but an absolute pain to restart. PAIN.
  • 10. Simplest Explanation • Lets you to write scripts that say "ssh onto this machine and do this thing." • You don't have to have magic scripts living on your servers, they can be source. • You can start being clever, and programming your deployment actions.
  • 12. Simple "capfile" with "roles", you get the idea
  • 13. Nice things Capistrano introduced: Automate deploys with ONE set of files The files DON’T have to live on the production server The language (Ruby) allows some abstraction and finesse not available in blunt force shell scripting
  • 14. Now the application deployment step can be coded and tested like the rest of the project.
  • 15. And the deployment scripts can be strengthened, we all happy. Example:
  • 16. Unfortunately, Capistrano's future looks a little uncertain (in 2011). The project page redirects to a github page, which points to stale documentation. It seems widely used, but not well supported. May be a bit like CruiseControl (the early awesome build server) the tool may have hit its "use by" date. Not sure what the successor is. Vlad The Deployer? (http://rubyhitsquad.com/ Vlad_the_Deployer.html)
  • 17. OK
  • 18. Let's talk about Configuration Management
  • 19. This is where, on a new machine, you make sure your apache's got mods your ruby's got gems your php's got pears your java's got...version All those things you remember, or forget, and then...
  • 20. This happens a lot: One person knows how all the servers get configured. One awesome person. or Each server gets set up differently depending on who set them up. Awesomeness not a requirement. Medication helps. and Server setups are build by hand (ssh, ssh, ssh) from memory (or checklists written on forearms).
  • 21. This (sort of ) worked a little OK when servers were physical, so setting them up was a special magic ceremony.
  • 22. But when servers became virtual, the magic wore off, and the underlying dumbness shone through.
  • 23. Even for small projects, why can't we have: • Configurations defined in source. • Repeatable, consistent configs through test, stage, & production. • Smart configurations that, say, enforce version levels and don't forget libraries. Why?
  • 25. "Puppet is typically (but not always) used in a client/server formation, with all of your clients talking to one or more central servers. Each client contacts the server periodically (every half hour, by default), downloads the latest configuration, and makes sure it is in sync with that configuration. Once done, the client can send a report back to the server indicating if anything needed to change."
  • 26. The server is called the "Puppet Master". Creepy, but cool.
  • 27. idempotent |ˈīdemˌpōtənt| Mathematics adjective denoting an element of a set that is unchanged in value when multiplied or otherwise operated on by itself. noun an element of this type. ORIGIN late 19th cent.: from Latin idem ‘same’ + potent 1 . The term can also be used to describe an initialisation subroutine that is arranged to perform some critical action exactly once, even if the routine is called several times. [ Jargon File]
  • 28. Simple example of a Puppet class class ntp { package { "ntp": ensure => installed } service { "ntp": ensure => running, } }
  • 29. Simple example of a node description node myserver { include ntp } This instructs puppet to make sure ntp is installed and running on "myserver" (I left out the definition of "ntp" as a "resource". A big part of the Puppet DSL is a rich ability to define resources, their files, locations, permissions, just about everything about them.)
  • 30. Puppet manifests are declarative, as opposed to imperative. The DSL is not Ruby, as you're not writing scripts, you're writing definitions. Install order is determined through dependencies.
  • 31. And being idempotent, the puppet master will make sure the systems match the definitions. This is kind of cool, in that you can implement changes across machines automatically just by updating the manifext in the puppet master. Kind of scary, kind of cool.
  • 33. Chef is built around a chef server, which contains • deployment scripts (called cookbooks and recipes) • config instructions for machines (called nodes) • security details for all (pem pem pem)
  • 34. You start with an empty machine install enough stuff to run chef-client (ruby, chef) and then run...chef-client
  • 35. As with Puppet, it is idempotent, so you can re-run it again and again to confirm or update config. Chef recipes are imperitive, as opposed to declarative. The DSL is extended Ruby, so you can write scripts, as well as definitions. Install order is determined through script order, no dependency checking.
  • 36. Chef vs Puppet (This appears to be a big debate, like we need that)
  • 37. “Chef vs. Puppet” "Declarative" vs "Imperative"... oh, shoot me now. (IMHO) Devs like Chef, because they can script it (IMHO) Ops like Puppet, because its a set of rules Both sides claim the other is "too complicated". Go figure.
  • 38. What next? There are a number of other tools in the space: App Deploy: Capistrano, ControlTier, Fabric, Func, mCollective SysConfig: Bcfg2, Chef, Puppet, cfengine, Smart Frog Cloud/VM: Xen, Ixc, openVZ, Eucalyptus, KVM OS Install: Kickstart, Jumpstart, Cobbler, OpenQRM, xCAT Hard for them to get momentum & critical mass? We may get further definition, hopefully simplification.
  • 39. Summing up Application Deployment. Configuration Management Its nice to know these can be described in code, checked into source code control, tested, and then deployed. I mean it is really nice!