SlideShare a Scribd company logo
1 of 12
Download to read offline
Continuous Deployment for
          Ops
     (who use Chef and git)



                              @mikebabineau
                                      EA2D
Infrastructure as Code


“Enable the reconstruction of the business from nothing but a
source code repository, an application data backup, and bare
metal resources”
 - Jesse Robbins
Chef primer

Client-server config management tool

Cookbooks - modules with recipes for doing stuff
Roles - which recipes? what settings?
Data Bags - JSON object storage
Knife - CLI tool
Bad:
$ knife role edit myrole
Better:
$ knife role from file roles/myrole.json
How?

$ tree -a chef-repo
chef-repo
├── .chef
├── .git
├── cookbooks
│ └── myapp
├── databags
└── roles
   └── myrole.json
Best:
$ git push origin master
How?
for cookbook in $(git_diff("cookbooks")); do
   knife cookbook upload $cookbook
done

for role in $(git_diff("roles")); do
   knife role from file $role
done

for bag in $(git_diff("databags")); do
   for item in $(git_diff("items", $bag)); do
      knife data bag from file $bag $item
   done
done
How do you test?
$ git push origin dev
$ cat .chef/knife.rb
...
# (original by jtimberman@opscode.com)

require 'grit'
branch = Grit::Repo.new("#{current_dir}/..").head.name

case branch
when "master"
 orgname = "ea2d"
else
 orgname = "ea2d-dev"
end

validation_key "#{current_dir}/#{orgname}-validator.pem"
chef_server_url "https://api.opscode.com/organizations/#{orgname}"

validation_client_name "#{orgname}-validator"

...

https://gist.github.com/829733
Questions?
mikeb@ea2d.com




We're hiring:
AWS, Java, Chef, Python,
JS, GAE, NoSQL, DevOps, etc.

http://ea2d.com/jobs/

More Related Content

Viewers also liked

2009 08 18 Narzedzia
2009 08 18 Narzedzia2009 08 18 Narzedzia
2009 08 18 Narzedzia
Dige
 
PowerShellで.NETとCOMとWMI
PowerShellで.NETとCOMとWMIPowerShellで.NETとCOMとWMI
PowerShellで.NETとCOMとWMI
chiaki1220jp
 
Producten Diversity (Innovation)
Producten Diversity (Innovation)Producten Diversity (Innovation)
Producten Diversity (Innovation)
vincentvm
 
Diversity@Selor
Diversity@SelorDiversity@Selor
Diversity@Selor
vincentvm
 
Daimler Chrysler Aerospace Ag
Daimler Chrysler Aerospace AgDaimler Chrysler Aerospace Ag
Daimler Chrysler Aerospace Ag
Utkarsha Singh
 
Stalwart Global Consulting - Company Intro
Stalwart Global Consulting - Company IntroStalwart Global Consulting - Company Intro
Stalwart Global Consulting - Company Intro
Abhi Kulkarni
 

Viewers also liked (16)

A entrevista
A entrevistaA entrevista
A entrevista
 
A po co mi usability?
A po co mi usability?A po co mi usability?
A po co mi usability?
 
2009 08 18 Narzedzia
2009 08 18 Narzedzia2009 08 18 Narzedzia
2009 08 18 Narzedzia
 
Agilyze Them! Experiences promoting Agile Methodologies in Navarra
Agilyze Them! Experiences promoting Agile Methodologies in NavarraAgilyze Them! Experiences promoting Agile Methodologies in Navarra
Agilyze Them! Experiences promoting Agile Methodologies in Navarra
 
YaleDHI FtM Talk
YaleDHI FtM TalkYaleDHI FtM Talk
YaleDHI FtM Talk
 
Fsu the entreprenurial university
Fsu the entreprenurial universityFsu the entreprenurial university
Fsu the entreprenurial university
 
Show Us the Stimulus: An Evaluation of Minnesota's Recovery Act Websites
Show Us the Stimulus: An Evaluation of Minnesota's Recovery Act WebsitesShow Us the Stimulus: An Evaluation of Minnesota's Recovery Act Websites
Show Us the Stimulus: An Evaluation of Minnesota's Recovery Act Websites
 
Difference .Net Frameworks
Difference .Net FrameworksDifference .Net Frameworks
Difference .Net Frameworks
 
PowerShellで.NETとCOMとWMI
PowerShellで.NETとCOMとWMIPowerShellで.NETとCOMとWMI
PowerShellで.NETとCOMとWMI
 
Producten Diversity (Innovation)
Producten Diversity (Innovation)Producten Diversity (Innovation)
Producten Diversity (Innovation)
 
The Restaurant saves lost customers & revenue
The Restaurant saves lost customers & revenueThe Restaurant saves lost customers & revenue
The Restaurant saves lost customers & revenue
 
Diversity@Selor
Diversity@SelorDiversity@Selor
Diversity@Selor
 
Daimler Chrysler Aerospace Ag
Daimler Chrysler Aerospace AgDaimler Chrysler Aerospace Ag
Daimler Chrysler Aerospace Ag
 
Stalwart Global Consulting - Company Intro
Stalwart Global Consulting - Company IntroStalwart Global Consulting - Company Intro
Stalwart Global Consulting - Company Intro
 
Fsu the entreprenurial university final
Fsu the entreprenurial university finalFsu the entreprenurial university final
Fsu the entreprenurial university final
 
Max New York Phase Ii
Max New York Phase IiMax New York Phase Ii
Max New York Phase Ii
 

Recently uploaded

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Recently uploaded (20)

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, ...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
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
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
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
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
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
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
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
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 

Continuous Deployment of Operational Configs

  • 1. Continuous Deployment for Ops (who use Chef and git) @mikebabineau EA2D
  • 2.
  • 3. Infrastructure as Code “Enable the reconstruction of the business from nothing but a source code repository, an application data backup, and bare metal resources” - Jesse Robbins
  • 4. Chef primer Client-server config management tool Cookbooks - modules with recipes for doing stuff Roles - which recipes? what settings? Data Bags - JSON object storage Knife - CLI tool
  • 5. Bad: $ knife role edit myrole
  • 6. Better: $ knife role from file roles/myrole.json
  • 7. How? $ tree -a chef-repo chef-repo ├── .chef ├── .git ├── cookbooks │ └── myapp ├── databags └── roles └── myrole.json
  • 8. Best: $ git push origin master
  • 9. How? for cookbook in $(git_diff("cookbooks")); do knife cookbook upload $cookbook done for role in $(git_diff("roles")); do knife role from file $role done for bag in $(git_diff("databags")); do for item in $(git_diff("items", $bag)); do knife data bag from file $bag $item done done
  • 10. How do you test? $ git push origin dev
  • 11. $ cat .chef/knife.rb ... # (original by jtimberman@opscode.com) require 'grit' branch = Grit::Repo.new("#{current_dir}/..").head.name case branch when "master" orgname = "ea2d" else orgname = "ea2d-dev" end validation_key "#{current_dir}/#{orgname}-validator.pem" chef_server_url "https://api.opscode.com/organizations/#{orgname}" validation_client_name "#{orgname}-validator" ... https://gist.github.com/829733
  • 12. Questions? mikeb@ea2d.com We're hiring: AWS, Java, Chef, Python, JS, GAE, NoSQL, DevOps, etc. http://ea2d.com/jobs/