BROWN BAG:
Chef in
PRODUCTION

Hart Hoover
@hhoover

CLOUD SAVVY
CLOUD SAVVY

!2
ENTERPRISE

CLOUD SAVVY

!3
CHEF SOLO

CLOUD SAVVY

!4
OPEN SOURCE CHEF
CLOUD SAVVY

!5
TOOLS!

•
•
•
•
•
•
CLOUD SAVVY

Git/GitHub
Berkshelf
Vagrant
Vagrant Plugins
Test Kitchen
Foodcritic
!6
CHEF SeRVER
ANATOMY

CLOUD SAVVY
NGINX

WebUI

API

Erchef

Bookshelf

PostgreSQL

Cookbooks

MQ

SOLR

CLOUD SAVVY

!8
YOUR OWN CHEF SERVER

INSTALL THE PACKAGE

CLOUD SAVVY

!9
YOUR OWN CHEF SERVER

USE RACKSPACE DEPLOYMENTS
(HEAT/CHECKMATE)

CLOUD SAVVY

!10
YOUR OWN CHEF SERVER

USE CHEF-SOLO TO
DEPLOY CHEF-SERVER

CLOUD SAVVY

!11
PACKAGES

CLOUD SAVVY
REQUIREMENTS

OPERATING SYSTEM:
!

UBUNTU 12.04
OR
CENTOS 6.3

CLOUD SAVVY

!13
REQUIREMENTS

FQDN

CLOUD SAVVY

!14
UBUNTU 12.04

OMNIBUS
curl	
  -­‐L	
  https://www.opscode.com/chef/install.sh	
  |	
  sudo	
  bash

CLOUD SAVVY

!15
UBUNTU 12.04

IS THE CHEF SERVER RUNNING?

CLOUD SAVVY

!16
CLOUD SAVVY

!17
MANAGING SERVICES

$ chef-server-ctl

CLOUD SAVVY

!18
Chef-Server-CTL

$ chef-server-ctl [OPTION]
help
reconfigure
stop [service]
start [service]
restart [service]

status [service]
tail [service]
test --all

CLOUD SAVVY

!19
Chef-Server-CTL

$ chef-server-ctl [OPTION]
help
reconfigure
stop [service]
start [service]
restart [service]

status [service]
tail [service]
test --all

CLOUD SAVVY

!20
Chef-Server-CTL

$ chef-server-ctl [OPTION]
help
reconfigure
stop [service]
start [service]
restart [service]

status [service]
tail [service]
test --all

CLOUD SAVVY

!21
Chef-Server-CTL

$ chef-server-ctl [OPTION]
help
reconfigure
stop [service]
start [service]
restart [service]

status [service]
tail [service]
test --all

CLOUD SAVVY

!22
Chef-Server-CTL

$ chef-server-ctl [OPTION]
help
reconfigure
stop [service]
start [service]
restart [service]

status [service]
tail [service]
test --all

CLOUD SAVVY

!23
Chef-Server-CTL

$ chef-server-ctl [OPTION]
help
reconfigure
stop [service]
start [service]
restart [service]

status [service]
tail [service]
test --all

CLOUD SAVVY

!24
Chef-Server-CTL

$ chef-server-ctl [OPTION]
help
reconfigure
stop [service]
start [service]
restart [service]

status [service]
tail [service]
test --all

CLOUD SAVVY

!25
Chef-Server-CTL

$ chef-server-ctl [OPTION]
help
reconfigure
stop [service]
start [service]
restart [service]

status [service]
tail [service]
test --all

CLOUD SAVVY

!26
START ALL THE THINGS

$ chef-server-ctl reconfigure

CLOUD SAVVY

!27
CLOUD SAVVY

!28
DEPLOYMENTS

CLOUD SAVVY
CLOUD SAVVY

!30
CLOUD SAVVY

!31
CLOUD SAVVY

!32
CLOUD SAVVY

!33
CHEF ON CHEF

CLOUD SAVVY
CHEF-SOLO METHOD

https://github.com/opscode-cookbooks/chef-server

CLOUD SAVVY

!35
ATTRIBUTES

api_fqdn

CLOUD SAVVY

!36
ATTRIBUTES

version

CLOUD SAVVY

!37
BOOTSTRAP YOUR
SERVER

INSTALL CHEF SOLO
(OMNIBUS… AGAIN)
curl	
  -­‐L	
  https://www.opscode.com/chef/install.sh	
  |	
  sudo	
  bash

CLOUD SAVVY

!38
BOOTSTRAP YOUR
SERVER

CREATE DIRECTORIES
$ mkdir -p /var/chef/cache	
$ mkdir -p /var/chef/cookbooks/chef-server

CLOUD SAVVY

!39
BOOTSTRAP YOUR
SERVER

GET THE COOKBOOK
$ wget -qO- https://github.com/opscode-cookbooks/
chef-server/archive/master.tar.gz | tar xvzC /var/
chef/cookbooks/chef-server --strip-components=1

CLOUD SAVVY

!40
BOOTSTRAP YOUR
SERVER

RUN CHEF-SOLO
$ chef-solo -o 'recipe[chef-server::default]'

CLOUD SAVVY

!41
CLOUD SAVVY

!42
CLOUD SAVVY

!43
https://github.com/opscode-cookbooks/chef-server

CLOUD SAVVY

!44
Monitoring
WITH
NEW RELIC

CLOUD SAVVY
INFRASTRUCTURE
MONITORING

CLOUD SAVVY

!46
APPLICATION
MONITORING

CLOUD SAVVY

!47
PERFORMANCE
MONITORING

CLOUD SAVVY

!48
USE BERKSHELF!

site :opscode	
!

cookbook ‘newrelic’

CLOUD SAVVY

!49
ATTRIBUTES
attributes/default.rb

default['newrelic']['server_monitoring']['license']	
  =	
  "CHANGE_ME"	
  
default['newrelic']['application_monitoring']['license']	
  =	
  "CHANGE_ME"

CLOUD SAVVY

!50
YOUR MONITORING RUN LIST:

recipe[newrelic]

SET YOUR ATTRIBUTES!
CLOUD SAVVY

!51
THANK
YOU!

CLOUD SAVVY

Deploying a Chef Server