introduction to-chef

40
Introduction to Chef By Lex Kridler

Upload: l-krids

Post on 16-Jul-2015

125 views

Category:

Technology


0 download

TRANSCRIPT

Introduction to ChefBy Lex Kridler

Lex KridlerSenior Developer at CP+B

@lkrids

Introducing…

“Chef is a systems and cloud

infrastructure automation

framework that makes it easy to

deploy servers and applications

to any physical, virtual, or cloud

location, no matter the size of the

infrastructure.”

http://docs.chef.io/

1. Problem

2. Solution

3. Demo

TCP

RWND and CWND

Machine State?

SOLUTION

Idempotent

https://www.chef.io/solutions/cloud-management/

https://downloads.chef.io/chef-dk/

https://www.chef.io/solutions/cloud-management/

knife bootstrap <ip> -x <username> -P <password> -N <node_name>

knife bootstrap <ip> -i <ident_file>

Node Setup

(manual)

https://www.chef.io/solutions/cloud-management/

Starts with a Server

Organizations

• Contain members

• Separate keys

• Separate starter kit

Cookbook

- recipes

- metadata.rb

- files

- templates

Basic Apache Recipe

Ohai

https://www.chef.io/solutions/cloud-management/

https://www.chef.io/solutions/cloud-management/

Lessons Learned

Variable Precedence

Suggested variable naming convention:

<precedence>[“<cookbook>”][“<attribute>”]

https://supermarket.chef.io/cookbooks

Dependency Management

• Berkshelf

– Similar to npm, cocoapods, or composer

– Created and opensourced by Riot Games

• League of Legends

Bugs (Foodcritic)

• They are hard to track down

• Foodcritic – static analysis of cookbooks

– Doesn’t find everything, similar to jshint

– Give examples of errors it finds

Years

Thanks

Resources

Mobile phone graphic - Created by James Fenton from the Noun ProjectChef graphic - Created by Juan Pablo Bravo from the Noun ProjectTerminal graphic - Created by useiconic.com from the Noun Project

Next Steps

• Notifications of cookbook updates

Other Ideas

• Combining Chef with Docker or Vagrant to

setup reproducible local dev environments

• Chef can be used to automate setting up

your next workstation