Top Banner
Chef Fundamentals [email protected] Copyright (C) 2014 Chef Software, Inc.
82

Overview of Chef - Fundamentals Webinar Series Part 1

May 21, 2015

Download

Technology

Chef

This is an Overview of Chef. After viewing this webinar you will be able to:

- Describe how Chef thinks about Infrastructure Automation
- Define the following terms:
- Resource
- Recipe
- Node
- Run List
- Search
- Login to Hosted Chef
- Run `knife` commands from your workstation

Video of this webinar can be found at the following URL

https://www.youtube.com/watch?v=S5lHUpzoCYo&list=PL11cZfNdwNyPnZA9D1MbVqldGuOWqbumZ
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Overview of Chef - Fundamentals Webinar Series Part 1

Chef [email protected] (C) 2014 Chef Software, Inc.

Page 2: Overview of Chef - Fundamentals Webinar Series Part 1

Nathen Harvey• Community Director• Co-host of the Food Fight Show Podcast

• @nathenharvey

Page 3: Overview of Chef - Fundamentals Webinar Series Part 1

Webinar Objectives and Style

3

Page 4: Overview of Chef - Fundamentals Webinar Series Part 1

Multi-week Webinar Series• After completing of this webinar series you will be

able to• Automate common infrastructure tasks with Chef• Describe Chef’s architecture• Describe Chef’s various tools• Apply Chef’s primitives to solve your problems

Page 5: Overview of Chef - Fundamentals Webinar Series Part 1

How to learn Chef• You bring the domain expertise about your business

and infrastructure• Chef provides a framework for automating your

infrastructure• Our job is to work together to teach you how to

model and automate your infrastructure with Chef

Page 6: Overview of Chef - Fundamentals Webinar Series Part 1

Chef is a Language• Learning Chef is like learning the basics of a

language• 80% fluency will be reached very quickly• The remaining 20% just takes practice• The best way to learn Chef is to use Chef

Page 7: Overview of Chef - Fundamentals Webinar Series Part 1

Agenda

7

Page 8: Overview of Chef - Fundamentals Webinar Series Part 1

Topics• Overview of Chef• Workstation Setup• Node Setup• Chef Resources and Recipes• Introducing the Node object• Setting Node attributes• Roles• Community Cookbooks

Page 9: Overview of Chef - Fundamentals Webinar Series Part 1

Overview of Chef

9

Page 10: Overview of Chef - Fundamentals Webinar Series Part 1

Lesson Objectives• After completing the lesson, you will be able to

• Describe how Chef thinks about Infrastructure Automation

• Define the following terms:• Resource • Recipe• Node• Run List• Search

Page 11: Overview of Chef - Fundamentals Webinar Series Part 1

http://www.flickr.com/photos/michaelheiss/3090102907/

Complexity

11

Page 12: Overview of Chef - Fundamentals Webinar Series Part 1

Items of Manipulation (Resources)

• Networking• Files• Directories• Symlinks• Mounts• Registry Keys

• Powershell Scripts• Users• Groups• Packages• Services• Filesystems

12

Page 13: Overview of Chef - Fundamentals Webinar Series Part 1

Application

A tale of growth...

13

Page 14: Overview of Chef - Fundamentals Webinar Series Part 1

Application

Application Database

Add a database

14

Page 15: Overview of Chef - Fundamentals Webinar Series Part 1

Application

App Databases

Make database redundant

15

Page 16: Overview of Chef - Fundamentals Webinar Series Part 1

App Servers

App Databases

Application server redundancy

16

Page 17: Overview of Chef - Fundamentals Webinar Series Part 1

App LB

App Servers

App Databases

Add a load balancer

17

Page 18: Overview of Chef - Fundamentals Webinar Series Part 1

App LBs

App Servers

App Databases

Webscale!

18

Page 19: Overview of Chef - Fundamentals Webinar Series Part 1

App LBs

App Servers

App DB Cache

App DBs

Now we need a caching layer

19

Page 20: Overview of Chef - Fundamentals Webinar Series Part 1

App LBs

App Servers

App DB Cache

App DBs

Infrastructure has a Topology

20

Page 21: Overview of Chef - Fundamentals Webinar Series Part 1

Round Robin DNS

App Servers

App DB Cache

App DBs

Floating IP?

Your Infrastructure is a Snowflake

21

Page 22: Overview of Chef - Fundamentals Webinar Series Part 1

App LBs

App Servers

< Shiny!

DB slaves

Cache

DB Cache

DBs

Complexity Increases Quickly

Are we monitoring??

22

Page 23: Overview of Chef - Fundamentals Webinar Series Part 1

App LBs

App Servers

DB slaves

Cache

DB Cache

DBs

...and change happens!

23

Page 24: Overview of Chef - Fundamentals Webinar Series Part 1

App LBs

App Servers

DB slaves

Cache

DB Cache

DBs

...and change happens!

Add a Central Log Host

Central Log Host

24

Page 25: Overview of Chef - Fundamentals Webinar Series Part 1

App LBs

App Servers

DB slaves

Cache

DB Cache

DBs

...and change happens!

Add a Central Log Host

Update syslog.conf on

all Nodes

Central Log Host

25

Page 26: Overview of Chef - Fundamentals Webinar Series Part 1

Chef Solves This Problem• But you already

guessed that, didn’t you?

26

Page 27: Overview of Chef - Fundamentals Webinar Series Part 1

Chef is Infrastructure as Code• Programmatically

provision and configure components

http://www.flickr.com/photos/louisb/4555295187/

27

Page 28: Overview of Chef - Fundamentals Webinar Series Part 1

Chef is Infrastructure as Code• Treat like any other

code base

http://www.flickr.com/photos/louisb/4555295187/

28

Page 29: Overview of Chef - Fundamentals Webinar Series Part 1

Chef is Infrastructure as Code• Reconstruct business

from code repository, data backup, and compute resources

http://www.flickr.com/photos/louisb/4555295187/

29

Page 30: Overview of Chef - Fundamentals Webinar Series Part 1

Chef is Infrastructure as Code• Programmatically

provision and configure components

• Treat like any other code base

• Reconstruct business from code repository, data backup, and compute resourceshttp://www.flickr.com/photos/louisb/4555295187/

30

Page 31: Overview of Chef - Fundamentals Webinar Series Part 1

Configuration Code• Chef ensures each Node complies with the policy• Policy is determined by the configurations in each

Node’s run list• Reduce management complexity through abstraction• Store the configuration of your infrastructure in

version control

31

Page 32: Overview of Chef - Fundamentals Webinar Series Part 1

Declarative Interface to Resources• You define the policy in your Chef configuration• Your policy states what state each resource should

be in, but not how to get there• Chef-client will pull the policy from the Chef Server

and enforce the policy on the Node

32

Page 33: Overview of Chef - Fundamentals Webinar Series Part 1

Managing Complexity• Resources• Recipes• Nodes• Search

33

Page 34: Overview of Chef - Fundamentals Webinar Series Part 1

Resources• A Resource represents a piece of the system and its

desired state• A package that should be installed• A service that should be running• A file that should be generated• A cron job that should be configured• A user that should be managed• and more

34

Page 35: Overview of Chef - Fundamentals Webinar Series Part 1

Resources in Recipes• Resources are the fundamental building blocks of

Chef configuration• Resources are gathered into Recipes• Recipes ensure the system is in the desired state

35

Page 36: Overview of Chef - Fundamentals Webinar Series Part 1

Recipes• Configuration files that describe resources and their

desired state• Recipes can:

• Install and configure software components• Manage files• Deploy applications• Execute other recipes• and more

36

Page 37: Overview of Chef - Fundamentals Webinar Series Part 1

Example Recipepackage "httpd" do action :startend

template "/etc/httpd/conf/httpd.conf" do source "httpd.conf.erb" owner "root" group "root" mode "0644" variables(:allow_override => "All") notifies :reload, "service[httpd]"end

service "httpd" do action [:enable,:start] supports :reload => trueend

37

Page 38: Overview of Chef - Fundamentals Webinar Series Part 1

Nodes

38

Page 39: Overview of Chef - Fundamentals Webinar Series Part 1

Nodes Adhere to Policy• The chef-client application runs on each node, which

• Gathers the current system configuration of the node

• Downloads the desired system configuration policies from the Chef server for that node

• Configures the node such that it adheres to those policies

39

Page 40: Overview of Chef - Fundamentals Webinar Series Part 1

Run List

Node

Enterprise Chef

chef-client

What policy should I follow?

40

Page 41: Overview of Chef - Fundamentals Webinar Series Part 1

Run List

Node

Enterprise Chef

chef-client

What policy should I follow?

"recipe[ntp::client]""recipe[users]"

"role[webserver]"41

Page 42: Overview of Chef - Fundamentals Webinar Series Part 1

Run List

Enterprise Chef

chef-client

What policy should I follow?

"recipe[ntp::client]""recipe[users]"

"role[webserver]"

42

Page 43: Overview of Chef - Fundamentals Webinar Series Part 1

Run List Specifies Policy• The Run List is an ordered collection of policies that

the Node should follow• Chef-client obtains the Run List from the Chef

Server• Chef-client ensures the Node complies with the

policy in the Run List

43

Page 44: Overview of Chef - Fundamentals Webinar Series Part 1

Search• Search for nodes with Roles• Find Topology Data

• IP addresses• Hostnames• FQDNs

http://www.flickr.com/photos/kathycsus/268677262544

Page 45: Overview of Chef - Fundamentals Webinar Series Part 1

Search for Nodespool_members = search("node","role:webserver")

template "/etc/haproxy/haproxy.cfg" do source "haproxy-app_lb.cfg.erb" owner "root" group "root" mode 0644 variables :pool_members => pool_members.uniq notifies :restart, "service[haproxy]"end

45

Page 46: Overview of Chef - Fundamentals Webinar Series Part 1

Webservers

HAProxy Configuration

46

HA Proxy

Page 47: Overview of Chef - Fundamentals Webinar Series Part 1

Webservers

HAProxy Load Balancer

47

HA ProxyEnterprise Chef

pool_members = search("node","role:webserver")

Page 48: Overview of Chef - Fundamentals Webinar Series Part 1

Webservers

HAProxy Load Balancer

48

HA ProxyEnterprise Chef

Webservers?

pool_members = search("node","role:webserver")

Page 49: Overview of Chef - Fundamentals Webinar Series Part 1

Webservers

HAProxy Load Balancer

49

HA ProxyEnterprise Chef

Webservers?

pool_members = search("node","role:webserver")

Page 50: Overview of Chef - Fundamentals Webinar Series Part 1

Webservers

HAProxy Load Balancer

50

HA ProxyEnterprise Chef

Webservers?

pool_members = search("node","role:webserver")

{ "web01" : { "hostname" : "web01", "ipaddress" : "10.1.1.1" }, "web02" : { "hostname" : "web02", "ipaddress" : "10.1.1.2" }, "web03" : { "hostname" : "web03", "ipaddress" : "10.1.1.3" }, "web04" : { "hostname" : "web04", "ipaddress" : "10.1.1.4" }, "web05" : { "hostname" : "web05", "ipaddress" : "10.1.1.5" }, "web06" : { "hostname" : "web06", "ipaddress" : "10.1.1.6" } }

Page 51: Overview of Chef - Fundamentals Webinar Series Part 1

Webservers

HAProxy Load Balancer

51

HA ProxyEnterprise Chef

Webservers?

pool_members = search("node","role:webserver")

{ "web01" : { "hostname" : "web01", "ipaddress" : "10.1.1.1" }, "web02" : { "hostname" : "web02", "ipaddress" : "10.1.1.2" }, "web03" : { "hostname" : "web03", "ipaddress" : "10.1.1.3" }, "web04" : { "hostname" : "web04", "ipaddress" : "10.1.1.4" }, "web05" : { "hostname" : "web05", "ipaddress" : "10.1.1.5" }, "web06" : { "hostname" : "web06", "ipaddress" : "10.1.1.6" } }

Page 52: Overview of Chef - Fundamentals Webinar Series Part 1

Webservers

HAProxy Load Balancer

52

HA ProxyEnterprise Chef

Webservers?

pool_members = search("node","role:webserver")

{ "web01" : { "hostname" : "web01", "ipaddress" : "10.1.1.1" }, "web02" : { "hostname" : "web02", "ipaddress" : "10.1.1.2" }, "web03" : { "hostname" : "web03", "ipaddress" : "10.1.1.3" }, "web04" : { "hostname" : "web04", "ipaddress" : "10.1.1.4" }, "web05" : { "hostname" : "web05", "ipaddress" : "10.1.1.5" }, "web06" : { "hostname" : "web06", "ipaddress" : "10.1.1.6" } }

pool_members{ "web01" : { "hostname" : "web01", "ipaddress" : "10.1.1.1" }, "web02" : { "hostname" : "web02", "ipaddress" : "10.1.1.2" }, "web03" : { "hostname" : "web03", "ipaddress" : "10.1.1.3" }, "web04" : { "hostname" : "web04", "ipaddress" : "10.1.1.4" }, "web05" : { "hostname" : "web05", "ipaddress" : "10.1.1.5" }, "web06" : { "hostname" : "web06", "ipaddress" : "10.1.1.6" } }

Page 53: Overview of Chef - Fundamentals Webinar Series Part 1

Search for Nodespool_members = search("node","role:webserver")

template "/etc/haproxy/haproxy.cfg" do source "haproxy-app_lb.cfg.erb" owner "root" group "root" mode 0644 variables :pool_members => pool_members.uniq notifies :restart, "service[haproxy]"end

53

Page 54: Overview of Chef - Fundamentals Webinar Series Part 1

Pass results into Templates# Set up application listeners here.

listen application 0.0.0.0:80 balance roundrobin <% @pool_members.each do |member| -%> server <%= member[:hostname] %> <%= member[:ipaddress] %>:> weight 1 maxconn 1 check <% end -%><% if node["haproxy"]["enable_admin"] -%>listen admin 0.0.0.0:22002 mode http stats uri /<% end -%>

54

Page 55: Overview of Chef - Fundamentals Webinar Series Part 1

Webservers

HAProxy Configuration

55

HA Proxypool_members{ "web01" : { "hostname" : "web01", "ipaddress" : "10.1.1.1" }, "web02" : { "hostname" : "web02", "ipaddress" : "10.1.1.2" }, "web03" : { "hostname" : "web03", "ipaddress" : "10.1.1.3" }, "web04" : { "hostname" : "web04", "ipaddress" : "10.1.1.4" }, "web05" : { "hostname" : "web05", "ipaddress" : "10.1.1.5" }, "web06" : { "hostname" : "web06", "ipaddress" : "10.1.1.6" } }

<% @pool_members.each do |member| -%> server <%= member[:hostname] %> <%= member[:ipaddress] %>:> weight 1 maxconn 1 check <% end -%>

Page 56: Overview of Chef - Fundamentals Webinar Series Part 1

Webservers

HAProxy Configuration

56

HA Proxypool_members{ "web01" : { "hostname" : "web01", "ipaddress" : "10.1.1.1" }, "web02" : { "hostname" : "web02", "ipaddress" : "10.1.1.2" }, "web03" : { "hostname" : "web03", "ipaddress" : "10.1.1.3" }, "web04" : { "hostname" : "web04", "ipaddress" : "10.1.1.4" }, "web05" : { "hostname" : "web05", "ipaddress" : "10.1.1.5" }, "web06" : { "hostname" : "web06", "ipaddress" : "10.1.1.6" } }

<% @pool_members.each do |member| -%> server <%= member[:hostname] %> <%= member[:ipaddress] %>:> weight 1 maxconn 1 check <% end -%>

haproxy.cfgserver web01 10.1.1.1 weight 1 maxconn 1 check

Page 57: Overview of Chef - Fundamentals Webinar Series Part 1

Webservers

HAProxy Configuration

57

HA Proxypool_members{ "web01" : { "hostname" : "web01", "ipaddress" : "10.1.1.1" }, "web02" : { "hostname" : "web02", "ipaddress" : "10.1.1.2" }, "web03" : { "hostname" : "web03", "ipaddress" : "10.1.1.3" }, "web04" : { "hostname" : "web04", "ipaddress" : "10.1.1.4" }, "web05" : { "hostname" : "web05", "ipaddress" : "10.1.1.5" }, "web06" : { "hostname" : "web06", "ipaddress" : "10.1.1.6" } }

<% @pool_members.each do |member| -%> server <%= member[:hostname] %> <%= member[:ipaddress] %>:> weight 1 maxconn 1 check <% end -%>

haproxy.cfgserver web01 10.1.1.1 weight 1 maxconn 1 checkserver web02 10.1.1.2 weight 1 maxconn 1 check

Page 58: Overview of Chef - Fundamentals Webinar Series Part 1

Webservers

HAProxy Configuration

58

HA Proxypool_members{ "web01" : { "hostname" : "web01", "ipaddress" : "10.1.1.1" }, "web02" : { "hostname" : "web02", "ipaddress" : "10.1.1.2" }, "web03" : { "hostname" : "web03", "ipaddress" : "10.1.1.3" }, "web04" : { "hostname" : "web04", "ipaddress" : "10.1.1.4" }, "web05" : { "hostname" : "web05", "ipaddress" : "10.1.1.5" }, "web06" : { "hostname" : "web06", "ipaddress" : "10.1.1.6" } }

<% @pool_members.each do |member| -%> server <%= member[:hostname] %> <%= member[:ipaddress] %>:> weight 1 maxconn 1 check <% end -%>

haproxy.cfgserver web01 10.1.1.1 weight 1 maxconn 1 checkserver web02 10.1.1.2 weight 1 maxconn 1 checkserver web03 10.1.1.3 weight 1 maxconn 1 check

Page 59: Overview of Chef - Fundamentals Webinar Series Part 1

Webservers

HAProxy Configuration

59

HA Proxypool_members{ "web01" : { "hostname" : "web01", "ipaddress" : "10.1.1.1" }, "web02" : { "hostname" : "web02", "ipaddress" : "10.1.1.2" }, "web03" : { "hostname" : "web03", "ipaddress" : "10.1.1.3" }, "web04" : { "hostname" : "web04", "ipaddress" : "10.1.1.4" }, "web05" : { "hostname" : "web05", "ipaddress" : "10.1.1.5" }, "web06" : { "hostname" : "web06", "ipaddress" : "10.1.1.6" } }

<% @pool_members.each do |member| -%> server <%= member[:hostname] %> <%= member[:ipaddress] %>:> weight 1 maxconn 1 check <% end -%>

haproxy.cfgserver web01 10.1.1.1 weight 1 maxconn 1 checkserver web02 10.1.1.2 weight 1 maxconn 1 checkserver web03 10.1.1.3 weight 1 maxconn 1 checkserver web04 10.1.1.4 weight 1 maxconn 1 check

Page 60: Overview of Chef - Fundamentals Webinar Series Part 1

Webservers

HAProxy Configuration

60

HA Proxypool_members{ "web01" : { "hostname" : "web01", "ipaddress" : "10.1.1.1" }, "web02" : { "hostname" : "web02", "ipaddress" : "10.1.1.2" }, "web03" : { "hostname" : "web03", "ipaddress" : "10.1.1.3" }, "web04" : { "hostname" : "web04", "ipaddress" : "10.1.1.4" }, "web05" : { "hostname" : "web05", "ipaddress" : "10.1.1.5" }, "web06" : { "hostname" : "web06", "ipaddress" : "10.1.1.6" } }

<% @pool_members.each do |member| -%> server <%= member[:hostname] %> <%= member[:ipaddress] %>:> weight 1 maxconn 1 check <% end -%>

haproxy.cfgserver web01 10.1.1.1 weight 1 maxconn 1 checkserver web02 10.1.1.2 weight 1 maxconn 1 checkserver web03 10.1.1.3 weight 1 maxconn 1 checkserver web04 10.1.1.4 weight 1 maxconn 1 checkserver web05 10.1.1.5 weight 1 maxconn 1 check

Page 61: Overview of Chef - Fundamentals Webinar Series Part 1

Webservers

HAProxy Configuration

61

HA Proxypool_members{ "web01" : { "hostname" : "web01", "ipaddress" : "10.1.1.1" }, "web02" : { "hostname" : "web02", "ipaddress" : "10.1.1.2" }, "web03" : { "hostname" : "web03", "ipaddress" : "10.1.1.3" }, "web04" : { "hostname" : "web04", "ipaddress" : "10.1.1.4" }, "web05" : { "hostname" : "web05", "ipaddress" : "10.1.1.5" }, "web06" : { "hostname" : "web06", "ipaddress" : "10.1.1.6" } }

<% @pool_members.each do |member| -%> server <%= member[:hostname] %> <%= member[:ipaddress] %>:> weight 1 maxconn 1 check <% end -%>

haproxy.cfgserver web01 10.1.1.1 weight 1 maxconn 1 checkserver web02 10.1.1.2 weight 1 maxconn 1 checkserver web03 10.1.1.3 weight 1 maxconn 1 checkserver web04 10.1.1.4 weight 1 maxconn 1 checkserver web05 10.1.1.5 weight 1 maxconn 1 checkserver web06 10.1.1.1 weight 1 maxconn 1 check

Page 62: Overview of Chef - Fundamentals Webinar Series Part 1

Jboss App

Memcache

Postgres Slaves

Postgres Master

NagiosGraphite

So when this...

62

Page 63: Overview of Chef - Fundamentals Webinar Series Part 1

Jboss App

Memcache

Postgres Slaves

Postgres Master

NagiosGraphite

...becomes this

63

Page 64: Overview of Chef - Fundamentals Webinar Series Part 1

Memcache

Postgres Slaves

Postgres Master

NagiosGraphite

Jboss App

Memcache

Postgres Slaves

Postgres Master

NagiosGraphite

...this can happen automatically

64

Page 65: Overview of Chef - Fundamentals Webinar Series Part 1

NagiosGraphite

NagiosGraphite

Memcache

Postgres Slaves

• Load balancer config

• Nagios host ping

• Nagios host ssh

• Nagios host HTTP

• Nagios host app health

• Graphite CPU

• Graphite Memory

• Graphite Disk

• Graphite SNMP

• Memcache firewall

• Postgres firewall

• Postgres authZ config

• 12+ resource changes for 1 node addition

Count the Resources

Jboss App

65

Page 66: Overview of Chef - Fundamentals Webinar Series Part 1

Manage Complexity• Determine the desired state of your infrastructure• Identify the Resources required to meet that state• Gather the Resources into Recipes• Compose a Run List from Recipes• Apply a Run List to each Node in your environment• Your infrastructure adheres to the policy modeled in

Chef

66

Page 67: Overview of Chef - Fundamentals Webinar Series Part 1

Configuration Drift• Configuration Drift happens when:

• Your infrastructure requirements change• The configuration of a server falls out of policy

• Chef makes it easy to manage• Model the new requirements in your Chef

configuration files• Run the chef-client to enforce your policies

67

Page 68: Overview of Chef - Fundamentals Webinar Series Part 1

Recap• In this section, we have

• Described how Chef thinks about Infrastructure Automation

• Defined the following terms:• Resource • Recipe• Node• Run List• Search

Page 69: Overview of Chef - Fundamentals Webinar Series Part 1

What Questions Do You Have?Nathen HarveyCommunity [email protected]@nathenharvey

69

Page 70: Overview of Chef - Fundamentals Webinar Series Part 1

Chef Infrastructure

Page 71: Overview of Chef - Fundamentals Webinar Series Part 1

Sign-up for Hosted Chef• http://getchef.com• Click “Get Chef”• Select “Hosted Chef”• Complete the registration form• Create an Organization

Page 72: Overview of Chef - Fundamentals Webinar Series Part 1

Their Infrastructure

OrganizationsMy Infrastructure Your Infrastructure

72

Page 73: Overview of Chef - Fundamentals Webinar Series Part 1

Organizations• Provide multi-tenancy in Enterprise Chef• Nothing is shared between Organizations - they're

completely independent• May represent different

• Companies• Business Units• Departments

73

Page 74: Overview of Chef - Fundamentals Webinar Series Part 1

Configure Workstation• Download and extract Chef starter kit• Install chef-client

• http://getchef.com/chef/install

74

Page 75: Overview of Chef - Fundamentals Webinar Series Part 1

• Your version may be different, that’s ok!

Verify Knife

$ knife --versionChef: 11.12.4

$ knife client listORGNAME-validator

75

Page 76: Overview of Chef - Fundamentals Webinar Series Part 1

OPEN IN EDITOR: chef-repo/.chef/knife.rb

current_dir = File.dirname(__FILE__)log_level :infolog_location STDOUTnode_name "USERNAME"client_key "#{current_dir}/USERNAME.pem"validation_client_name "ORGNAME-validator"validation_key "#{current_dir}/ORGNAME-validator.pem"chef_server_url "https://api.opscode.com/organizations/ORGNAME"cache_type 'BasicFile'cache_options( :path => "#{ENV['HOME']}/.chef/checksums" )cookbook_path ["#{current_dir}/../cookbooks"]

knife.rb

76

Page 77: Overview of Chef - Fundamentals Webinar Series Part 1

1.Reads the chef_server_url from knife.rb

2.Invokes HTTP GET to #{chef_server_url}/clients

3.Displays the result

77

knife client list

Page 78: Overview of Chef - Fundamentals Webinar Series Part 1

Chef Fundamentals Webinar Series

Page 79: Overview of Chef - Fundamentals Webinar Series Part 1

Six Week Series• May 20 - Overview of Chef• May 27 - Node Setup, Chef Resources & Recipes• June 3 - Working with the Node object• June 10 - Common configuration data with Databags• June 17 - Using Roles and Environments• June 24 - Community Cookbooks and Further Resources

• * Topics subject to change, schedule unlikely to change

Page 80: Overview of Chef - Fundamentals Webinar Series Part 1

Sign-up for Webinar• http://pages.getchef.com/

cheffundamentalsseries.html

Page 81: Overview of Chef - Fundamentals Webinar Series Part 1

Additional Resources• Chef Fundamentals Webinar Series• https://www.youtube.com/watch?

v=S5lHUpzoCYo&list=PL11cZfNdwNyPnZA9D1MbVqldGuOWqbumZ

• Discussion group for webinar participants• https://groups.google.com/d/forum/learnchef-fundamentals-webinar

81

Page 82: Overview of Chef - Fundamentals Webinar Series Part 1

Additional Resources• Learn Chef• http://learnchef.com

• Documentation• http://docs.opscode.com

82