SlideShare uma empresa Scribd logo
1 de 16
Cooking Environments with Chef
Everything begins with a plan What Why How @colin_gemmell                                               pythonandchips@gmail.com
What’s it for Born out of “cloud computing” and dev-ops Cross platform Configuration and deployment tool written in ruby Execute OS commands Focuses on reusable recipes @colin_gemmell                                               pythonandchips@gmail.com
Termanology Resource – Executable bit of code Recipe – Collection of resources Cookbook – recipes and all other files need for to complete a task @colin_gemmell                                               pythonandchips@gmail.com
Why Allows configuration of every environment the same  Version Control your configurations Not just for servers @colin_gemmell                                               pythonandchips@gmail.com
How 2 different flavours of chef Chef Server & Chef Client Chef Solo Bootstrap the environment Configuration file Main recipe Resources @colin_gemmell                                               pythonandchips@gmail.com
Package Install application from package manager package "couchdb" do package_name "couchdb" end @colin_gemmell                                               pythonandchips@gmail.com
Template Generate file based on an erb template template "/home/cgemmell/.gitconfig" do   source "gitconfig.erb"   owner node[:user]   group node[:user]   mode "0644"   variables(     :name => node["name"],     :email => node["email"]   ) end @colin_gemmell                                               pythonandchips@gmail.com
Template File: gitconfig.erb [user]   name = <%= @name %>   email = <%= @email %> [diff]   external = kdiff3 [pager]   diff = [merge] 	tool = kdiff3 @colin_gemmell                                               pythonandchips@gmail.com
Creating files and directories directory “/home/cgemmell/projects" do   owner node[:user]   group node[:user]   mode "0755"   action :create end file "/home/#{node[:user]}/.bashrc" do   group node[:user]   owner node[:user]   mode "0644"   content "source .bashrvm"   action :create not_if do File.exists?("/home/cgemmell/.bashrc")   end end @colin_gemmell                                               pythonandchips@gmail.com
Execute script bash "install coffeescript" do   interpreter "bash"   user "root" cwd “/home/cgemmell”   code “npm install -g coffee-script” end @colin_gemmell                                               pythonandchips@gmail.com
Download remote file remote_file “/tmp/RubyMine-3.1.1.tar.gz" do   source "http://download.jetbrains.com/ruby/RubyMine-3.1.1.tar.gz" end @colin_gemmell                                               pythonandchips@gmail.com
Checkout from Source control git “/home/cgemmell/projects/chef" do         user node[:user]         group node[:user]         repository “git@github.com:opscode/chef”         reference "master"         action :sync  end @colin_gemmell                                               pythonandchips@gmail.com
Chef on windows Not fully supported Manual installation a bit complicated Installer available at https://github.com/downloads/pmorton/chef-windows-installer/ChefInstaller.exe More info avaiable at http://wiki.opscode.com/display/chef/Installation+on+Windows @colin_gemmell                                               pythonandchips@gmail.com
Powershell Powershell “cwd-then-write” do cwd “temp” code <<-EOH 		$stream = [System.IO.StreamWriter] “./temp-write-from-chef.txt”                $stream.WriteLine(“Chef on windows is awesome”) 	$stream.close() EOH end N.B. Dependant on the powershell @colin_gemmell                                               pythonandchips@gmail.com
The end Resources Documentation http://wiki.opscode.com/display/chef/Home Source code https://github.com/opscode/chef Pre-written recipes https://github.com/opscode/cookbooks VM Setup https://github.com/pythonandchips/chef-vm-setup Twitter: @colin_gemmell E-mail: pythonandchips@gmail.com @colin_gemmell                                               pythonandchips@gmail.com

Mais conteúdo relacionado

Mais procurados

Build a bot workshop async primer - php[tek]
Build a bot workshop  async primer - php[tek]Build a bot workshop  async primer - php[tek]
Build a bot workshop async primer - php[tek]Adam Englander
 
Cookbook refactoring & abstracting logic to Ruby(gems)
Cookbook refactoring & abstracting logic to Ruby(gems)Cookbook refactoring & abstracting logic to Ruby(gems)
Cookbook refactoring & abstracting logic to Ruby(gems)Chef Software, Inc.
 
You're Doing It Wrong
You're Doing It WrongYou're Doing It Wrong
You're Doing It Wrongbostonrb
 
node-webkit : Make a magic from your a desktop app to desktop app!
node-webkit : Make a magic from your a desktop app to desktop app!node-webkit : Make a magic from your a desktop app to desktop app!
node-webkit : Make a magic from your a desktop app to desktop app!욱진 양
 
Distributing UI Libraries: in a post Web-Component world
Distributing UI Libraries: in a post Web-Component worldDistributing UI Libraries: in a post Web-Component world
Distributing UI Libraries: in a post Web-Component worldRachael L Moore
 
Google app engine development with java and php
Google app engine development with java and phpGoogle app engine development with java and php
Google app engine development with java and phpSamuel Okoroafor
 
Selenium Sandwich Part 1: Data driven Selenium
Selenium Sandwich Part 1: Data driven Selenium Selenium Sandwich Part 1: Data driven Selenium
Selenium Sandwich Part 1: Data driven Selenium Workhorse Computing
 
Learn REST API with Python
Learn REST API with PythonLearn REST API with Python
Learn REST API with PythonLarry Cai
 
Ch ch-changes cake php2
Ch ch-changes cake php2Ch ch-changes cake php2
Ch ch-changes cake php2markstory
 
ZendCon 2017 - Build a Bot Workshop - Async Primer
ZendCon 2017 - Build a Bot Workshop - Async PrimerZendCon 2017 - Build a Bot Workshop - Async Primer
ZendCon 2017 - Build a Bot Workshop - Async PrimerAdam Englander
 
Introduction tomongodb
Introduction tomongodbIntroduction tomongodb
Introduction tomongodbLee Theobald
 
Cross-platform Desktop application with AngularJS and build with Node-webkit
Cross-platform Desktop application with AngularJS and build with Node-webkitCross-platform Desktop application with AngularJS and build with Node-webkit
Cross-platform Desktop application with AngularJS and build with Node-webkitWittawas Wisarnkanchana
 

Mais procurados (20)

Build a bot workshop async primer - php[tek]
Build a bot workshop  async primer - php[tek]Build a bot workshop  async primer - php[tek]
Build a bot workshop async primer - php[tek]
 
Cookbook refactoring & abstracting logic to Ruby(gems)
Cookbook refactoring & abstracting logic to Ruby(gems)Cookbook refactoring & abstracting logic to Ruby(gems)
Cookbook refactoring & abstracting logic to Ruby(gems)
 
Lies, Damn Lies, and Benchmarks
Lies, Damn Lies, and BenchmarksLies, Damn Lies, and Benchmarks
Lies, Damn Lies, and Benchmarks
 
You're Doing It Wrong
You're Doing It WrongYou're Doing It Wrong
You're Doing It Wrong
 
CouchDB Day NYC 2017: Mango
CouchDB Day NYC 2017: MangoCouchDB Day NYC 2017: Mango
CouchDB Day NYC 2017: Mango
 
Performance
PerformancePerformance
Performance
 
CouchDB Day NYC 2017: JSON Documents
CouchDB Day NYC 2017: JSON DocumentsCouchDB Day NYC 2017: JSON Documents
CouchDB Day NYC 2017: JSON Documents
 
node-webkit : Make a magic from your a desktop app to desktop app!
node-webkit : Make a magic from your a desktop app to desktop app!node-webkit : Make a magic from your a desktop app to desktop app!
node-webkit : Make a magic from your a desktop app to desktop app!
 
Front-End Tooling
Front-End ToolingFront-End Tooling
Front-End Tooling
 
Selenium sandwich-2
Selenium sandwich-2Selenium sandwich-2
Selenium sandwich-2
 
CouchDB Day NYC 2017: MapReduce Views
CouchDB Day NYC 2017: MapReduce ViewsCouchDB Day NYC 2017: MapReduce Views
CouchDB Day NYC 2017: MapReduce Views
 
Distributing UI Libraries: in a post Web-Component world
Distributing UI Libraries: in a post Web-Component worldDistributing UI Libraries: in a post Web-Component world
Distributing UI Libraries: in a post Web-Component world
 
Google app engine development with java and php
Google app engine development with java and phpGoogle app engine development with java and php
Google app engine development with java and php
 
Selenium Sandwich Part 1: Data driven Selenium
Selenium Sandwich Part 1: Data driven Selenium Selenium Sandwich Part 1: Data driven Selenium
Selenium Sandwich Part 1: Data driven Selenium
 
Learn REST API with Python
Learn REST API with PythonLearn REST API with Python
Learn REST API with Python
 
Hello git
Hello git Hello git
Hello git
 
Ch ch-changes cake php2
Ch ch-changes cake php2Ch ch-changes cake php2
Ch ch-changes cake php2
 
ZendCon 2017 - Build a Bot Workshop - Async Primer
ZendCon 2017 - Build a Bot Workshop - Async PrimerZendCon 2017 - Build a Bot Workshop - Async Primer
ZendCon 2017 - Build a Bot Workshop - Async Primer
 
Introduction tomongodb
Introduction tomongodbIntroduction tomongodb
Introduction tomongodb
 
Cross-platform Desktop application with AngularJS and build with Node-webkit
Cross-platform Desktop application with AngularJS and build with Node-webkitCross-platform Desktop application with AngularJS and build with Node-webkit
Cross-platform Desktop application with AngularJS and build with Node-webkit
 

Destaque

From .Net to Rails, A developers story
From .Net to Rails, A developers storyFrom .Net to Rails, A developers story
From .Net to Rails, A developers storypythonandchips
 
Linux Daemon Writting
Linux Daemon WrittingLinux Daemon Writting
Linux Daemon Writtingwinsopc
 
PCD - Process control daemon
PCD - Process control daemonPCD - Process control daemon
PCD - Process control daemonhaish
 
Zombie PowerPoint by @ericpesik
Zombie PowerPoint by @ericpesikZombie PowerPoint by @ericpesik
Zombie PowerPoint by @ericpesikEric Pesik
 

Destaque (8)

From dot net_to_rails
From dot net_to_railsFrom dot net_to_rails
From dot net_to_rails
 
From .Net to Rails, A developers story
From .Net to Rails, A developers storyFrom .Net to Rails, A developers story
From .Net to Rails, A developers story
 
From dot net_to_rails
From dot net_to_railsFrom dot net_to_rails
From dot net_to_rails
 
Linux Daemon Writting
Linux Daemon WrittingLinux Daemon Writting
Linux Daemon Writting
 
PCD - Process control daemon
PCD - Process control daemonPCD - Process control daemon
PCD - Process control daemon
 
Linux Network Management
Linux Network ManagementLinux Network Management
Linux Network Management
 
Processes
ProcessesProcesses
Processes
 
Zombie PowerPoint by @ericpesik
Zombie PowerPoint by @ericpesikZombie PowerPoint by @ericpesik
Zombie PowerPoint by @ericpesik
 

Semelhante a Cooking environments with chef

Deploying Symfony | symfony.cat
Deploying Symfony | symfony.catDeploying Symfony | symfony.cat
Deploying Symfony | symfony.catPablo Godel
 
Cooking Perl with Chef: Real World Tutorial with Jitterbug
Cooking Perl with Chef: Real World Tutorial with JitterbugCooking Perl with Chef: Real World Tutorial with Jitterbug
Cooking Perl with Chef: Real World Tutorial with JitterbugDavid Golden
 
Easy Web Project Development & Management with Django & Mercurial
Easy Web Project Development & Management with Django & MercurialEasy Web Project Development & Management with Django & Mercurial
Easy Web Project Development & Management with Django & MercurialWidoyo PH
 
Life of a Chromium Developer
Life of a Chromium DeveloperLife of a Chromium Developer
Life of a Chromium Developermpaproductions
 
Introduction to Chef - April 22 2015
Introduction to Chef - April 22 2015Introduction to Chef - April 22 2015
Introduction to Chef - April 22 2015Jennifer Davis
 
How to host an app for $20 in 20min using buildout and hostout
How to host an app  for $20 in 20min using buildout and hostoutHow to host an app  for $20 in 20min using buildout and hostout
How to host an app for $20 in 20min using buildout and hostoutDylan Jay
 
Azure handsonlab
Azure handsonlabAzure handsonlab
Azure handsonlabChef
 
Chef infrastructure as code - paris.rb
Chef infrastructure as code - paris.rbChef infrastructure as code - paris.rb
Chef infrastructure as code - paris.rbNicolas Ledez
 
Where's the source, Luke? : How to find and debug the code behind Plone
Where's the source, Luke? : How to find and debug the code behind PloneWhere's the source, Luke? : How to find and debug the code behind Plone
Where's the source, Luke? : How to find and debug the code behind PloneVincenzo Barone
 
Fast Paced Drupal 8: Accelerating Development with Composer, Drupal Console a...
Fast Paced Drupal 8: Accelerating Development with Composer, Drupal Console a...Fast Paced Drupal 8: Accelerating Development with Composer, Drupal Console a...
Fast Paced Drupal 8: Accelerating Development with Composer, Drupal Console a...Acquia
 
The Modern Developer Toolbox
The Modern Developer ToolboxThe Modern Developer Toolbox
The Modern Developer ToolboxPablo Godel
 
Configuration Management in the Cloud - Cloud Phoenix Meetup Feb 2014
Configuration Management in the Cloud - Cloud Phoenix Meetup Feb 2014Configuration Management in the Cloud - Cloud Phoenix Meetup Feb 2014
Configuration Management in the Cloud - Cloud Phoenix Meetup Feb 2014Miguel Zuniga
 
Leveraging Continuous Integration For Fun And Profit!
Leveraging Continuous Integration For Fun And Profit!Leveraging Continuous Integration For Fun And Profit!
Leveraging Continuous Integration For Fun And Profit!Jess Chadwick
 
SECCOM 2017 - Conan.io o gerente de pacote para C e C++
SECCOM 2017 - Conan.io o gerente de pacote para C e C++SECCOM 2017 - Conan.io o gerente de pacote para C e C++
SECCOM 2017 - Conan.io o gerente de pacote para C e C++Uilian Ries
 

Semelhante a Cooking environments with chef (20)

Deploying Symfony | symfony.cat
Deploying Symfony | symfony.catDeploying Symfony | symfony.cat
Deploying Symfony | symfony.cat
 
Capistrano
CapistranoCapistrano
Capistrano
 
Chef training - Day3
Chef training - Day3Chef training - Day3
Chef training - Day3
 
Cooking Perl with Chef: Real World Tutorial with Jitterbug
Cooking Perl with Chef: Real World Tutorial with JitterbugCooking Perl with Chef: Real World Tutorial with Jitterbug
Cooking Perl with Chef: Real World Tutorial with Jitterbug
 
Easy Web Project Development & Management with Django & Mercurial
Easy Web Project Development & Management with Django & MercurialEasy Web Project Development & Management with Django & Mercurial
Easy Web Project Development & Management with Django & Mercurial
 
Life of a Chromium Developer
Life of a Chromium DeveloperLife of a Chromium Developer
Life of a Chromium Developer
 
Revoke-Obfuscation
Revoke-ObfuscationRevoke-Obfuscation
Revoke-Obfuscation
 
Capistrano Overview
Capistrano OverviewCapistrano Overview
Capistrano Overview
 
Introduction to Chef - April 22 2015
Introduction to Chef - April 22 2015Introduction to Chef - April 22 2015
Introduction to Chef - April 22 2015
 
How to host an app for $20 in 20min using buildout and hostout
How to host an app  for $20 in 20min using buildout and hostoutHow to host an app  for $20 in 20min using buildout and hostout
How to host an app for $20 in 20min using buildout and hostout
 
Azure handsonlab
Azure handsonlabAzure handsonlab
Azure handsonlab
 
Chef training Day4
Chef training Day4Chef training Day4
Chef training Day4
 
Chef infrastructure as code - paris.rb
Chef infrastructure as code - paris.rbChef infrastructure as code - paris.rb
Chef infrastructure as code - paris.rb
 
IT Automation with Chef
IT Automation with ChefIT Automation with Chef
IT Automation with Chef
 
Where's the source, Luke? : How to find and debug the code behind Plone
Where's the source, Luke? : How to find and debug the code behind PloneWhere's the source, Luke? : How to find and debug the code behind Plone
Where's the source, Luke? : How to find and debug the code behind Plone
 
Fast Paced Drupal 8: Accelerating Development with Composer, Drupal Console a...
Fast Paced Drupal 8: Accelerating Development with Composer, Drupal Console a...Fast Paced Drupal 8: Accelerating Development with Composer, Drupal Console a...
Fast Paced Drupal 8: Accelerating Development with Composer, Drupal Console a...
 
The Modern Developer Toolbox
The Modern Developer ToolboxThe Modern Developer Toolbox
The Modern Developer Toolbox
 
Configuration Management in the Cloud - Cloud Phoenix Meetup Feb 2014
Configuration Management in the Cloud - Cloud Phoenix Meetup Feb 2014Configuration Management in the Cloud - Cloud Phoenix Meetup Feb 2014
Configuration Management in the Cloud - Cloud Phoenix Meetup Feb 2014
 
Leveraging Continuous Integration For Fun And Profit!
Leveraging Continuous Integration For Fun And Profit!Leveraging Continuous Integration For Fun And Profit!
Leveraging Continuous Integration For Fun And Profit!
 
SECCOM 2017 - Conan.io o gerente de pacote para C e C++
SECCOM 2017 - Conan.io o gerente de pacote para C e C++SECCOM 2017 - Conan.io o gerente de pacote para C e C++
SECCOM 2017 - Conan.io o gerente de pacote para C e C++
 

Último

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
 
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
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
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
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
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
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
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
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
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
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
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
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
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
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 

Último (20)

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...
 
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
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
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
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
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...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
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
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
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...
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
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
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 

Cooking environments with chef

  • 2. Everything begins with a plan What Why How @colin_gemmell pythonandchips@gmail.com
  • 3. What’s it for Born out of “cloud computing” and dev-ops Cross platform Configuration and deployment tool written in ruby Execute OS commands Focuses on reusable recipes @colin_gemmell pythonandchips@gmail.com
  • 4. Termanology Resource – Executable bit of code Recipe – Collection of resources Cookbook – recipes and all other files need for to complete a task @colin_gemmell pythonandchips@gmail.com
  • 5. Why Allows configuration of every environment the same Version Control your configurations Not just for servers @colin_gemmell pythonandchips@gmail.com
  • 6. How 2 different flavours of chef Chef Server & Chef Client Chef Solo Bootstrap the environment Configuration file Main recipe Resources @colin_gemmell pythonandchips@gmail.com
  • 7. Package Install application from package manager package "couchdb" do package_name "couchdb" end @colin_gemmell pythonandchips@gmail.com
  • 8. Template Generate file based on an erb template template "/home/cgemmell/.gitconfig" do source "gitconfig.erb" owner node[:user] group node[:user] mode "0644" variables( :name => node["name"], :email => node["email"] ) end @colin_gemmell pythonandchips@gmail.com
  • 9. Template File: gitconfig.erb [user] name = <%= @name %> email = <%= @email %> [diff] external = kdiff3 [pager] diff = [merge] tool = kdiff3 @colin_gemmell pythonandchips@gmail.com
  • 10. Creating files and directories directory “/home/cgemmell/projects" do owner node[:user] group node[:user] mode "0755" action :create end file "/home/#{node[:user]}/.bashrc" do group node[:user] owner node[:user] mode "0644" content "source .bashrvm" action :create not_if do File.exists?("/home/cgemmell/.bashrc") end end @colin_gemmell pythonandchips@gmail.com
  • 11. Execute script bash "install coffeescript" do interpreter "bash" user "root" cwd “/home/cgemmell” code “npm install -g coffee-script” end @colin_gemmell pythonandchips@gmail.com
  • 12. Download remote file remote_file “/tmp/RubyMine-3.1.1.tar.gz" do source "http://download.jetbrains.com/ruby/RubyMine-3.1.1.tar.gz" end @colin_gemmell pythonandchips@gmail.com
  • 13. Checkout from Source control git “/home/cgemmell/projects/chef" do user node[:user] group node[:user] repository “git@github.com:opscode/chef” reference "master" action :sync end @colin_gemmell pythonandchips@gmail.com
  • 14. Chef on windows Not fully supported Manual installation a bit complicated Installer available at https://github.com/downloads/pmorton/chef-windows-installer/ChefInstaller.exe More info avaiable at http://wiki.opscode.com/display/chef/Installation+on+Windows @colin_gemmell pythonandchips@gmail.com
  • 15. Powershell Powershell “cwd-then-write” do cwd “temp” code <<-EOH $stream = [System.IO.StreamWriter] “./temp-write-from-chef.txt” $stream.WriteLine(“Chef on windows is awesome”) $stream.close() EOH end N.B. Dependant on the powershell @colin_gemmell pythonandchips@gmail.com
  • 16. The end Resources Documentation http://wiki.opscode.com/display/chef/Home Source code https://github.com/opscode/chef Pre-written recipes https://github.com/opscode/cookbooks VM Setup https://github.com/pythonandchips/chef-vm-setup Twitter: @colin_gemmell E-mail: pythonandchips@gmail.com @colin_gemmell pythonandchips@gmail.com