• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Cooking with Chef
 

Cooking with Chef

on

  • 732 views

Discusses Chef basics with a focus on managing workflow and changes to your infrastructure

Discusses Chef basics with a focus on managing workflow and changes to your infrastructure

Statistics

Views

Total Views
732
Views on SlideShare
732
Embed Views
0

Actions

Likes
1
Downloads
13
Comments
0

0 Embeds 0

No embeds

Accessibility

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Cooking with Chef Cooking with Chef Presentation Transcript

    • Cooking with ChefMichael Richardson @Mr_SPB
    • Topics• What is Chef• chef-client software• What does “Infrastructure as code” look like• What’s in a Cookbook• Testing your infrastructure code• Workflow
    • Chef Architecture
    • Chef Client SoftwareCommands• ohai (nodes)• chef-client (nodes)• chef-solo (nodes)• shef (node / workstation)• knife (workstations / build hosts?)
    • Infrastructure as Code
    • What is a cookbook• Fundamental units in Chef• Encapsulate resources• Contains recipes
    • Resources
    • Want more resources?
    • Enter LWRP
    • The Common CookbookCooking 101Step 1 - Install some softwareStep 2 - Create a config file for the softwareStep 3 - Start the software and set it to alwaysstart on system boot
    • The Common Cookbook• NTP example• chef-repo/cookbooks/ntp/recipes/default.rb
    • Demo Time• NTP cookbook
    • Config FilesWhat normally goes in a config file?• Credentials (eg for a DB)• Application config switches• Application settings• Information about the local node• Information about other nodes in your system
    • Config FilesWhat normally goes in a config file?• Credentials (eg for a DB)• Application config switches• Application settings• Information about the local node• Information about other nodes in your systemWhere can we gather information from to• Chef Data Bags• Cookbook attributes• Node attributes• Peer node information via Chef search
    • Config Files - examplescookbook/postgresql/recipes/server.rbcookbook/postgresql/templates/default/postgres_pg_hba.conf.erb
    • Testing Tools• Vagrant• [http://vagrantup.com]• foodcritic• [http://acrmp.github.com/foodcritic/]• minitest-handler• [https://github.com/calavera/minitest-chef-handler]• chefspec• [https://github.com/acrmp/chefspec]• [https://github.com/customink/fauxhai]• test-kitchen• [https://github.com/opscode/test-kitchen]
    • Cookbook WorkflowYou need to consider• Run chef-client as a daemon or on-demand• Version cookbooks• Push cookbook updates from your workstation or a build server• Use no-op or why-run options
    • Questions
    • QuestionsIs Chef Awesome?
    • QuestionsIs Chef Awesome?
    • Anymore Questions?