SlideShare a Scribd company logo
← First steps with Chef (first-steps-with-chef.html)
More than one website → (more-than-one-website.html)
Getting started with Chef
By Andy Gale (http://andy-gale.com)
2. Introducing Chef Server
This chapter will extend on the building blocks of the previous chapter and introduce better ways of working
than just SSH and using Chef in a client and server model.
Chef client and server
As well as using Chef on a single box with chef-solo it is also possible to use Chef in a client/server model.
The Chef server stores and distributes our cookbooks and other Chef configuration when contacted by a
client running the chef-client command. The chef-client command is the client/server version of chef-solo.
Storing the configuration inside a Chef Server instead of inside a file like web.json as we did in the previous
chapter allows us to easily manage the configuration of our servers from our workstation instead. This has an
obvious advantage when dealing with a large number of servers and allows us to easily provision new servers
with knife.
Node
At this point it's prudent to introduce you to some Chef terminology. A computer, virtual machine or cloud
instance you are running chef-solo or chef-client on is called a node. This differs slightly from what Chef
calls a client. A client can also be your workstation that you don't run chef-client on but do use knife to
manage your Chef server with.
Workstation setup
Windows users! Sorry, Windows workstation instructions will be added to this chapter shortly.
We will now setup your workstation so you can edit you Chef recipes in your favourite text editor.
Install curl if it is not already installed. Then install Chef.
Install Chef
Sponsored by Brightbox
(http://brightbox.com/)
Chapters
Introducing Chef Server - Getting started with Chef 1 of 16
1 03/17/2015 10:40 PM
$ curl -L https://www.opscode.com/chef/install.sh | sudo bash
Thank you for installing Chef!
Save some typing by adding the various Chef commands to your $PATH.
$ echo 'export PATH="/opt/chef/embedded/bin:$PATH"' >> ~/.bash_profile && source ~/.bash_profile
Hosted Chef
Opscode, the makers of Chef, provide a service called Hosted Chef (http://www.opscode.com/hosted-chef/)
which is a Chef Server as a service. They offer a free tier which is good for 5 nodes so is ideal to help us get
started.
Follow the instructions to sign up on the website and log in.
Now we've signed up we will download some files that will allow us to use our Hosted Chef account with knife.
Visit https://manage.opscode.com/organizations (https://manage.opscode.com/organizations).
Click the Generate knife config link. Download the knife.rb file that is generated.
Then click the Regenerate validation key link. Press OK to the alert and download the .pem file.
Now visit https://www.opscode.com/account/password (https://www.opscode.com/account/password).
Introducing Chef Server - Getting started with Chef 2 of 16
2 03/17/2015 10:40 PM
Press the Get a new key button and download the .pem file.
Using Hosted Chef
We'll now use Hosted Chef along with the chef repository we made in the previous chapter. Firstly, let's
download our chef repository.
$ wget http://gettingstartedwithchef.com/downloads/cp1.tgz
--2013-06-09 13:36:15-- http://gettingstartedwithchef.com/downloads/cp1.tgz
Resolving gettingstartedwithchef.com (gettingstartedwithchef.com)... 80.68.93.116
Connecting to gettingstartedwithchef.com (gettingstartedwithchef.com)|80.68.93.116|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 300046 (293K) [text/plain]
Saving to: ‘cp1.tgz’
100%[===============================================================================>] 300,046 1.7
8MB/s in 0.2s
2013-06-09 13:36:15 (1.78 MB/s) - ‘cp1.tgz’ saved [300046/300046]
$ tar zxf cp1.tgz
$ cd chef-repo
We now have everything we need, so let's start using Hosted Chef. Firstly, we need to tell knife to use Hosted
Chef. To do this we need to copy the files we just downloaded from Hosted Chef to our repository.
$ mv ~/Downloads/*.pem .chef/
$ mv ~/Downloads/knife.rb .chef/
Let's check that knife can talk to Hosted Chef.
$ knife client list
org_name-validator
Introducing Chef Server - Getting started with Chef 3 of 16
3 03/17/2015 10:40 PM
"org_name" will be whatever you entered as your organisation name when signing up for Hosted Chef.
Uploading Cookbooks
Before we can configure our node with chef-client, we need to upload our cookbooks to the Chef server. We
do that with knife.
$ knife cookbook upload --all
Uploading apache2 [1.6.0]
Uploading apt [1.9.0]
Uploading aws [0.100.6]
Uploading build-essential [1.3.4]
Uploading chef_handler [1.1.4]
Uploading database [1.3.12]
Uploading iis [1.6.6]
Uploading mysql [2.1.2]
Uploading openssl [1.0.2]
Uploading php [1.1.8]
Uploading phpapp [0.1.0]
Uploading postgresql [2.2.2]
Uploading powershell [1.1.2]
Uploading windows [1.12.4]
Uploading xfs [1.1.0]
Uploading xml [1.2.0]
Uploading yum [3.0.4]
Uploading yum-epel [0.2.0]
Uploaded all cookbooks.
Roles
We used a single JSON file to configure our node with chef-solo but what if we have multiple nodes? We
should probably find a better solution to this. A Chef role allows us to group configuration for types of nodes
together. We'll expand on this in a later chapter but for now we'll create a role for our WordPress setup.
$ knife role create phpapp
You may receive the following error if you do not have an EDITOR environment variable set.
ERROR: RuntimeError: Please set EDITOR environment variable
You can resolve this quickly with the --editor option. e.g. --editor vi or --editor nano etc.
We are then presented with the basic structure of the role as a JSON file.
Introducing Chef Server - Getting started with Chef 4 of 16
4 03/17/2015 10:40 PM
{
"name": "phpapp",
"description": "",
"json_class": "Chef::Role",
"default_attributes": {
},
"override_attributes": {
},
"chef_type": "role",
"run_list": [
],
"env_run_lists": {
}
}
We'll go through what the fields actually mean. The name you can probably guess - the name of the role. It's
a good idea to put something descriptive in the description field. You may remember that we discussed
attributes in the last chapter, default_attributes allows us to set attributes and override_attributes lets us
specify attributes that override attributes defined as defaults elsewhere. We've already created a run_list in
our JSON file in the last chapter so let's add that first. It's safe to ignore the fields that have not been
mentioned for now.
{
"name": "phpapp",
"description": "",
"json_class": "Chef::Role",
"default_attributes": {
},
"override_attributes": {
},
"chef_type": "role",
"run_list": [
"recipe[apt]", "recipe[phpapp]"
],
"env_run_lists": {
}
}
Enter our run list, highlighted in green. We should now specify some attributes. We don't need to specify the
attributes for the mysql cookbook as it creates secure random passwords automatically in chef-client mode.
Our phpapp cookbook requires us to specify a password attribute so let's add that to default_attributes.
Introducing Chef Server - Getting started with Chef 5 of 16
5 03/17/2015 10:40 PM
{
"name": "phpapp",
"description": "",
"json_class": "Chef::Role",
"default_attributes": {
"phpapp": {"db_password": "212b09752d173876a84d374333ae1ffe"}
},
"override_attributes": {
},
"chef_type": "role",
"run_list": [
"recipe[apt]", "recipe[phpapp]"
],
"env_run_lists": {
}
}
Add the code in green above. Save the file. The role will be uploaded to Hosted Chef and knife will display the
following message.
Created role[phpapp]
Let's confirm the role is on the server.
$ knife role list
phpapp
Finally, we should download the role from the server and place it into our roles directory for safe keeping.
$ knife role show phpapp -d -Fjson > roles/phpapp.json
Having the file in our chef repository allows us to edit the role at our leisure and check it into version control
systems such as Git, something we'll get to in a later chapter. We can upload the file to Hosted Chef again
using the following command.
$ knife role from file roles/phpapp.json
Updated Role phpapp!
We're now ready to bootstrap our new node with knife.
Bootstrapping a node with Knife
Now use your cloud control panel or your virtual machine software to create a new Ubuntu box.
If you are using a new Rackspace Cloud instance replace "password" with the root password and
"hostname" with it's hostname or IP address and run the following command.
Introducing Chef Server - Getting started with Chef 6 of 16
6 03/17/2015 10:40 PM
$ knife bootstrap --run-list "role[phpapp]" --json-attributes "{"phpapp": {"server_name": "intro.
hellofutu.re"}}" --ssh-user root --ssh-password password hostname
Otherwise the knife bootstrap command you need will be specific to your setup. To use a ssh key and sudo
before executing the bootstrap you might use the following command, replacing hostname with the hostname
or IP address of the machine you intend to bootstrap. You can find more details of the options knife bootstrap
(http://docs.opscode.com/knife_bootstrap.html) accepts in the documentation.
$ knife bootstrap --run-list "role[phpapp]" --json-attributes "{"phpapp": {"server_name": "intro.
hellofutu.re"}}" --sudo hostname
You'll see some output along these lines.
Bootstrapping Chef on intro.hellofutu.re
..
intro.hellofutu.re
intro.hellofutu.re Chef Client finished, 61 resources updated
intro.hellofutu.re
And if you visit your new node in your web browser you'll see the following.
Introducing Chef Server - Getting started with Chef 7 of 16
7 03/17/2015 10:40 PM
That's fairly impressive I'm sure you'll agree! But it gets better. We can use knife to create the cloud instances
for us as well!
Creating cloud instances with Knife
Knife plugins extend its functionality and make knife even more useful! Amongst other things, knife plugins
allow us to automatically create cloud instances before we bootstrap them. You can view the full list of official
knife plugins over at docs.opscode.com (http://docs.opscode.com/plugin_knife.html).
Brightbox
Brightbox are a UK based cloud provider. You can sign up with them here (https://manage.brightbox.com
/signup).
$ sudo /opt/chef/embedded/bin/gem install knife-brightbox
...
Successfully installed knife-brightbox-0.3.0
Now we need to set some details in .chef/knife.rb (which is inside your Chef Repository). Open it up in your
favourite text editor.
Introducing Chef Server - Getting started with Chef 8 of 16
8 03/17/2015 10:40 PM
knife[:brightbox_client_id] = "xxx-xxxxx"
knife[:brightbox_secret] = "xxxxxxxxxxxxxxx"
Add the code in green but enter your API client id and secret which you can obtain from your Brightbox
account settings page.
Save the file.
We can test to see if that's worked using the following command.
$ knife brightbox flavor list
ID Name Handle Architecture RAM Disk Cores
typ-4nssg High IO Nano nano.high-io 0-bit 512 MB 20 GB 2
typ-c8awf Standard Nano nano 0-bit 512 MB 20 GB 1
typ-b1gmb Standard Mini mini 0-bit 1024 MB 40 GB 2
typ-iqisj High IO Mini mini.high-io 0-bit 1024 MB 40 GB 4
typ-urtky High IO Small small.high-io 0-bit 2048 MB 80 GB 4
typ-8fych Standard Small small 0-bit 2048 MB 80 GB 2
typ-qdiwq High IO Medium medium.high-io 0-bit 4096 MB 160 GB 8
typ-1j0zf Standard Medium medium 0-bit 4096 MB 160 GB 4
typ-mlbt7 High IO Large large.high-io 0-bit 8192 MB 320 GB 8
typ-1e0xr Standard Large large 0-bit 8192 MB 320 GB 4
typ-wdicw High IO XL xl.high-io 0-bit 16384 MB 640 GB 8
typ-a4aqc Standard XL xl 0-bit 16384 MB 640 GB 4
typ-lr76m High IO XXL xxl.high-io 0-bit 32768 MB 1280 GB 8
typ-vs01b Standard XXL xxl 0-bit 32768 MB 1280 GB 4
We can get a list of images (operating systems) with the following command.
$ knife brightbox image list
ID Name Status
img-t3xyp Blank Disk Image public
img-r726y FreeBSD 9.0 minimal public
img-hnigl Windows 2008 Server R2 public
img-g8ia6 ubuntu-raring-13.04-amd64-server public
img-u3ttt ubuntu-raring-13.04-i386-server public
img-6isnq ubuntu-raring-daily-amd64-server public
img-rttkx ubuntu-raring-daily-i386-server public
img-nhjvo ubuntu-saucy-daily-amd64-server public
img-q1ts8 ubuntu-saucy-daily-i386-server public
So let's provision and bootstrap a cloud instance with Brightbox.
Heads up! Before you can bootstrap with Brightbox you need to enter your SSH public key in the
dashboard.
We'll use the flavor "typ-c8awf" and the Ubuntu 13.04 image "img-g8ia6".
Introducing Chef Server - Getting started with Chef 9 of 16
9 03/17/2015 10:40 PM
$ knife brightbox server create --flavor typ-c8awf --image img-g8ia6 --run-list "role[phpapp]" --distr
o chef-full
After a while we'll see the following result.
xxx.xxx.xx.xx Chef Client finished, 73 resources updated
xxx.xxx.xx.xx
Instance ID: srv-5ple0
Name:
Flavor: typ-c8awf
Image: ubuntu-raring-13.04-amd64-server
Public IP Address: 109.107.35.66
Private IP Address: 10.242.34.174
Environment: _default
Run List: role[phpapp]
Visit the Public IP Address in your browser and you'll see the WordPress install page.
Rackspace Cloud
We'll start by creating a Rackspace Cloud instance. First we need to install the knife-rackspace plugin.
$ sudo /opt/chef/embedded/bin/gem install knife-rackspace
...
Successfully installed knife-rackspace-0.7.0
Now we need to set some details in .chef/knife.rb (which is inside your Chef Repository). Open it up in your
favourite text editor.
knife[:rackspace_api_username] = "testorg"
knife[:rackspace_api_key] = "APIKEY"
Add the green lines above. Remember to replace testorg and APIKEY with your Rackspace username and
API key.
If you don't live in America you will need to specify an alternative authentication URL. Below is an example for
the UK. Valid regions are: "dfw" "ord" "lon" and "syd".
knife[:rackspace_api_username] = "testorg"
knife[:rackspace_api_key] = "APIKEY"
knife[:rackspace_auth_url] = "https://lon.identity.api.rackspacecloud.com/v2.0"
Save knife.rb. We can test to see if that's worked using the following command.
Introducing Chef Server - Getting started with Chef 10 of 16
10 03/17/2015 10:40 PM
$ knife rackspace flavor list
ID Name VCPUs RAM Disk
2 512MB Standard Instance 1 512 20 GB
3 1GB Standard Instance 1 1024 40 GB
4 2GB Standard Instance 2 2048 80 GB
5 4GB Standard Instance 2 4096 160 GB
6 8GB Standard Instance 4 8192 320 GB
7 15GB Standard Instance 6 15360 620 GB
8 30GB Standard Instance 8 30720 1200 GB
We can get a list of available images (operating systems) with the following command.
$ knife rackspace image list
ID Name
32b7d027-8a40-458b-9e73-bd719d660df6 Arch 2013.6
e0ed4adb-3a00-433e-a0ac-a51f1bc1ea3d CentOS 6.4
81877a6e-9e87-4b1f-93f3-b176e25f3c4a Debian 7 (Wheezy)
f3a23d0a-de1b-4eb7-994f-5f0de9d8d7a0 Fedora 19 (Schrodinger's Cat)
ccaf99bc-472a-46ea-a125-d3ecfca66695 FreeBSD 9.1
bb8c27f9-f3cf-4606-9a88-8a2123e02290 Gentoo 13.2
8958846f-679b-454e-9232-20d3792fc5d7 OpenSUSE 12.3
16e6c0ae-f881-4180-95b0-3450fe3f8e96 Red Hat Enterprise Linux 6.4
23cebbc9-3219-4a27-9210-d63e1af7181b Ubuntu 13.04 (Raring Ringtail)
48df4181-040e-4821-8723-d9e4ba908d2f Windows Server 2008 R2 SP1
We can now provision and bootstrap a server with the following command. From the commands above we
know we want a flavor of "2" and the Ubuntu 13.04 image which is catchily entitled
"23cebbc9-3219-4a27-9210-d63e1af7181b".
$ knife rackspace server create --flavor 2 --image 23cebbc9-3219-4a27-9210-d63e1af7181b --run-list "ro
le[phpapp]"
...
After a while your instance will be created, bootstrapped and Chef will be run and something similar to below
will be displayed.
Introducing Chef Server - Getting started with Chef 11 of 16
11 03/17/2015 10:40 PM
192.168.9.199 Chef Client finished, 61 resources updated
192.168.9.199
Instance ID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Host ID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Name: rs-xxxxxxxxxxxxxxxxx
Flavor: 512MB Standard Instance
Image: Ubuntu 13.04 (Raring Ringtail)
Metadata: []
Public DNS Name: 192-168-9-199.static.cloud-ips.com
Public IP Address: 192.168.9.199
Private IP Address: 10.9.3.199
Password: xxxxxxxxxxxx
Environment: _default
Run List: role[phpapp]
Visit the Public IP Address in your browser and you will once again see the WordPress install page.
We can even use knife to clean up our servers. Get a list of servers with the following command.
$ knife rackspace server list
Instance ID Name Public IP Private IP Flavor Image State
xxxxxxxx rs-x 192.168.9.199 10.9.1.199 2 23cebbc9-3219-4a27-9210-d63e1af7181b active
We can delete the server we just created with the following command. We also need to remove references to
the server from our Hosted Chef account. We do this with the --purge option. Replace INSTANCE_ID with the
value under Instance ID from the server list command above.
$ knife rackspace server delete --purge INSTANCE_ID
Instance ID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Host ID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Name: rs-xxxxxxxxxxxxxxxxx
Flavor: 512MB Standard Instance
Image: Ubuntu 13.04 (Raring Ringtail)
Public IP Address: 192.168.9.199
Private IP Address: 10.9.1.199
Do you really want to delete this server? (Y/N) y
WARNING: Deleted server xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
WARNING: Deleted node rs-xxxxxxxxxxxxxxxxx
WARNING: Deleted client rs-xxxxxxxxxxxxxxxxx
Amazon Cloud
We can also use knife to bootstrap Amazon EC2 instances. First install the plugin.
Introducing Chef Server - Getting started with Chef 12 of 16
12 03/17/2015 10:40 PM
$ sudo /opt/chef/embedded/bin/gem install knife-ec2
...
Successfully installed knife-ec2-0.6.4
You need to obtain the following information for your Amazon AWS account. It can all be found or set-up
inside the Amazon AWS console.
access key id
secret access key
name of the ssh key you want to use
an Ubuntu 12.04 or 13.04 AMI
the AWS region you want to use
the name of a security group that allows SSH and web access
We should now configure knife with those details. Open .chef/knife.rb.
knife[:aws_access_key_id] = "XXXXXXXXXXXXXXXXXXXX"
knife[:aws_secret_access_key] = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
knife[:aws_ssh_key_id] = "sshkey"
Add the lines in green, entering your access key id, secret access key and ssh key name without .pem. Save
the file.
We can now access a list of cloud instances with the following command. Cloud servers will be listed whether
they have been created with knife or not.
$ knife ec2 server list
Instance ID Name Public IP Private IP Flavor Image SSH Key Security Groups State
I have no servers listed. This is because my servers reside in the region eu-west-1. We can specify a region
by using the option --region.
$ knife ec2 server list --region eu-west1
Instance ID Name Public IP Private IP Flavor Image SSH Key Security Groups State
i-xxxxxxxx serr01 x.x.x.x x.x.x.x m1.small ami-3d160149 sshkey www, default running
I can use knife to provision and bootstrap a cloud instance with the following command.
$ knife ec2 server create --run-list "role[phpapp]" -I ami-3d160149 --region eu-west-1 -G www,default
-x ubuntu --node-name server01 --identity-file ~/.ssh/sshkey.pem
...
After a while we'll see the following result.
Introducing Chef Server - Getting started with Chef 13 of 16
13 03/17/2015 10:40 PM
ec2-x-x-x-x.eu-west-1.compute.amazonaws.com Chef Client finished, 57 resources updated
ec2-x-x-x-x.eu-west-1.compute.amazonaws.com
Instance ID: i-xxxxxxxx
Flavor: m1.small
Image: ami-3d160149
Region: eu-west-1
Availability Zone: eu-west-1a
Security Groups: www, default
Security Group Ids: default
Tags: {"Name"=>"server01"}
SSH Key: sshkey
Root Device Type: ebs
Root Volume ID: vol-xxxxxxxx
Root Device Name: /dev/sda1
Root Device Delete on Terminate: true
Public DNS Name: ec2-x-x-x-x.eu-west-1.compute.amazonaws.com
Public IP Address: x.x.x.x
Private DNS Name: ip-x-x-x-x.eu-west-1.compute.internal
Private IP Address: x.x.x.x
Environment: _default
Run List: role[phpapp]
Visit the Public DNS Name in your browser and you'll see the WordPress install page.
You can also delete instances you no longer need with knife. Using the instance ID from the output of the
server create command above, we can delete the instance we just made using the following command.
$ knife ec2 server delete --purge --region eu-west-1 i-xxxxxxxx --node-name server01
Instance ID: i-xxxxxxxx
Flavor: m1.small
Image: ami-xxxxxxxx
Region: eu-west-1
Availability Zone: eu-west-1a
SSH Key: sshkey
Root Device Type: ebs
Do you really want to delete this server? (Y/N) y
WARNING: Deleted server i-xxxxxxxx
WARNING: Deleted node server01
WARNING: Deleted client server01
The command used some extra options, here's why:
--purge
ensures the server is also deleted from our Hosted Chef account
--node-name
required when using --purge if the server name is different from the instance ID
--region
Introducing Chef Server - Getting started with Chef 14 of 16
14 03/17/2015 10:40 PM
← First steps with Chef (first-steps-with-chef.html)
More than one website → (more-than-one-website.html)
specifies a region other than the default.
Other cloud providers
If you're a cloud provider that would like to have instructions for your platform included with Getting started
with Chef, please email support@gettingstartedwithchef.com (mailto:support@gettingstartedwithchef.com)
and we'll make that happen.
Next chapter
Hopefully you used either a Brightbox, Amazon or Rackspace cloud account and automatically bootstrapped
a cloud instance using knife. In the next chapter we'll introduce some tools that will make manging and
developing our cookbooks a lot easier and modify our Chef environment to work with multiple websites.
© Hello Future Ltd (http://hellofutu.re). Registered in England and Wales. Company No:
Sponsored by Brightbox
(http://brightbox.com/)
Introducing Chef Server - Getting started with Chef 15 of 16
15 03/17/2015 10:40 PM
08378526
Created with Twitter Bootstrap (http://twitter.github.com/bootstrap/) and Bootswatch Cerulean.
(http://bootswatch.com/cerulean/)
Introducing Chef Server - Getting started with Chef 16 of 16
16 03/17/2015 10:40 PM

More Related Content

What's hot

Ansible roles done right
Ansible roles done rightAnsible roles done right
Ansible roles done right
Dan Vaida
 
Making Symofny shine with Varnish - SymfonyCon Madrid 2014
Making Symofny shine with Varnish - SymfonyCon Madrid 2014Making Symofny shine with Varnish - SymfonyCon Madrid 2014
Making Symofny shine with Varnish - SymfonyCon Madrid 2014
Barel Barelon
 
What mom never told you about bundle configurations - Symfony Live Paris 2012
What mom never told you about bundle configurations - Symfony Live Paris 2012What mom never told you about bundle configurations - Symfony Live Paris 2012
What mom never told you about bundle configurations - Symfony Live Paris 2012D
 
Chef training - Day2
Chef training - Day2Chef training - Day2
Chef training - Day2
Andriy Samilyak
 
Application Layer in PHP
Application Layer in PHPApplication Layer in PHP
Application Layer in PHP
Per Bernhardt
 
Hacking ansible
Hacking ansibleHacking ansible
Hacking ansible
bcoca
 
PowerShell: Automation for everyone
PowerShell: Automation for everyonePowerShell: Automation for everyone
PowerShell: Automation for everyone
Gavin Barron
 
NLIT 2011: Chef & Capistrano
NLIT 2011: Chef & CapistranoNLIT 2011: Chef & Capistrano
NLIT 2011: Chef & Capistranonickblah
 
A tour of Ansible
A tour of AnsibleA tour of Ansible
A tour of Ansible
DevOps Ltd.
 
Going crazy with Varnish and Symfony
Going crazy with Varnish and SymfonyGoing crazy with Varnish and Symfony
Going crazy with Varnish and Symfony
David de Boer
 
PyCon Russia 2014 - Auto Scale in the Cloud
PyCon Russia 2014 - Auto Scale in the CloudPyCon Russia 2014 - Auto Scale in the Cloud
PyCon Russia 2014 - Auto Scale in the Cloud
Simone Soldateschi
 
Creating and Deploying Static Sites with Hugo
Creating and Deploying Static Sites with HugoCreating and Deploying Static Sites with Hugo
Creating and Deploying Static Sites with Hugo
Brian Hogan
 
Deployment with Fabric
Deployment with FabricDeployment with Fabric
Deployment with Fabricandymccurdy
 
An Introduction to Celery
An Introduction to CeleryAn Introduction to Celery
An Introduction to Celery
Idan Gazit
 
SDPHP - Percona Toolkit (It's Basically Magic)
SDPHP - Percona Toolkit (It's Basically Magic)SDPHP - Percona Toolkit (It's Basically Magic)
SDPHP - Percona Toolkit (It's Basically Magic)
Robert Swisher
 
Cloud Automation with Opscode Chef
Cloud Automation with Opscode ChefCloud Automation with Opscode Chef
Cloud Automation with Opscode Chef
Sri Ram
 
Chef training Day4
Chef training Day4Chef training Day4
Chef training Day4
Andriy Samilyak
 
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)
Wesley Beary
 
Ansible leveraging 2.0
Ansible leveraging 2.0Ansible leveraging 2.0
Ansible leveraging 2.0
bcoca
 
Getting started with Ansible
Getting started with AnsibleGetting started with Ansible
Getting started with Ansible
Ivan Serdyuk
 

What's hot (20)

Ansible roles done right
Ansible roles done rightAnsible roles done right
Ansible roles done right
 
Making Symofny shine with Varnish - SymfonyCon Madrid 2014
Making Symofny shine with Varnish - SymfonyCon Madrid 2014Making Symofny shine with Varnish - SymfonyCon Madrid 2014
Making Symofny shine with Varnish - SymfonyCon Madrid 2014
 
What mom never told you about bundle configurations - Symfony Live Paris 2012
What mom never told you about bundle configurations - Symfony Live Paris 2012What mom never told you about bundle configurations - Symfony Live Paris 2012
What mom never told you about bundle configurations - Symfony Live Paris 2012
 
Chef training - Day2
Chef training - Day2Chef training - Day2
Chef training - Day2
 
Application Layer in PHP
Application Layer in PHPApplication Layer in PHP
Application Layer in PHP
 
Hacking ansible
Hacking ansibleHacking ansible
Hacking ansible
 
PowerShell: Automation for everyone
PowerShell: Automation for everyonePowerShell: Automation for everyone
PowerShell: Automation for everyone
 
NLIT 2011: Chef & Capistrano
NLIT 2011: Chef & CapistranoNLIT 2011: Chef & Capistrano
NLIT 2011: Chef & Capistrano
 
A tour of Ansible
A tour of AnsibleA tour of Ansible
A tour of Ansible
 
Going crazy with Varnish and Symfony
Going crazy with Varnish and SymfonyGoing crazy with Varnish and Symfony
Going crazy with Varnish and Symfony
 
PyCon Russia 2014 - Auto Scale in the Cloud
PyCon Russia 2014 - Auto Scale in the CloudPyCon Russia 2014 - Auto Scale in the Cloud
PyCon Russia 2014 - Auto Scale in the Cloud
 
Creating and Deploying Static Sites with Hugo
Creating and Deploying Static Sites with HugoCreating and Deploying Static Sites with Hugo
Creating and Deploying Static Sites with Hugo
 
Deployment with Fabric
Deployment with FabricDeployment with Fabric
Deployment with Fabric
 
An Introduction to Celery
An Introduction to CeleryAn Introduction to Celery
An Introduction to Celery
 
SDPHP - Percona Toolkit (It's Basically Magic)
SDPHP - Percona Toolkit (It's Basically Magic)SDPHP - Percona Toolkit (It's Basically Magic)
SDPHP - Percona Toolkit (It's Basically Magic)
 
Cloud Automation with Opscode Chef
Cloud Automation with Opscode ChefCloud Automation with Opscode Chef
Cloud Automation with Opscode Chef
 
Chef training Day4
Chef training Day4Chef training Day4
Chef training Day4
 
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)
 
Ansible leveraging 2.0
Ansible leveraging 2.0Ansible leveraging 2.0
Ansible leveraging 2.0
 
Getting started with Ansible
Getting started with AnsibleGetting started with Ansible
Getting started with Ansible
 

Viewers also liked

Impact 2013, whoami
Impact 2013, whoamiImpact 2013, whoami
Impact 2013, whoami
Andrea Fontana
 
H I S T O R Y O F T A M I L S
H I S T O R Y  O F  T A M I L SH I S T O R Y  O F  T A M I L S
H I S T O R Y O F T A M I L S
Sunil Kumar
 
H I S T O R Y O F T A M I L S
H I S T O R Y  O F  T A M I L SH I S T O R Y  O F  T A M I L S
H I S T O R Y O F T A M I L S
Sunil Kumar
 
คุณครูที่เกษียณ
คุณครูที่เกษียณคุณครูที่เกษียณ
คุณครูที่เกษียณAnnly Ann
 
Tommy Sandy 50th Anniversary 2nd
Tommy Sandy 50th Anniversary 2ndTommy Sandy 50th Anniversary 2nd
Tommy Sandy 50th Anniversary 2ndShari Locke
 
Cloud Automation with Opscode Chef
Cloud Automation with Opscode ChefCloud Automation with Opscode Chef
Cloud Automation with Opscode Chef
Sri Ram
 
ประเทศญี่ปุ่น11
ประเทศญี่ปุ่น11ประเทศญี่ปุ่น11
ประเทศญี่ปุ่น11
Annly Ann
 
How to install IBM Connections in a Coffe Break
How to install IBM Connections in a Coffe BreakHow to install IBM Connections in a Coffe Break
How to install IBM Connections in a Coffe Break
Andrea Fontana
 
ท่องเที่ยวทั่วไทย ไปได้ทุกเวลา
ท่องเที่ยวทั่วไทย  ไปได้ทุกเวลาท่องเที่ยวทั่วไทย  ไปได้ทุกเวลา
ท่องเที่ยวทั่วไทย ไปได้ทุกเวลาAnnly Ann
 
Plm intro
Plm introPlm intro
Plm intro
Hyongsik Cho
 
SOCIALIZE YOUR SAP ERP THROUGH INTEGRATE D DIGITAL EXPERIENCE PLATFORMS
SOCIALIZE YOUR SAP ERP THROUGH INTEGRATE D DIGITAL EXPERIENCE PLATFORMSSOCIALIZE YOUR SAP ERP THROUGH INTEGRATE D DIGITAL EXPERIENCE PLATFORMS
SOCIALIZE YOUR SAP ERP THROUGH INTEGRATE D DIGITAL EXPERIENCE PLATFORMS
Andrea Fontana
 
First Aid for the Step 1 Presentation with Dr. Tao Le
First Aid for the Step 1 Presentation with Dr. Tao LeFirst Aid for the Step 1 Presentation with Dr. Tao Le
First Aid for the Step 1 Presentation with Dr. Tao Lefirstaidusmlerx
 
PLM and ESE
PLM and ESEPLM and ESE
PLM and ESE
Hyongsik Cho
 
발표자료 Bim학회
발표자료 Bim학회발표자료 Bim학회
발표자료 Bim학회
Hyongsik Cho
 
Introduction to blender
Introduction to blenderIntroduction to blender
Introduction to blender
Carlos Cámara
 

Viewers also liked (18)

Impact 2013, whoami
Impact 2013, whoamiImpact 2013, whoami
Impact 2013, whoami
 
H I S T O R Y O F T A M I L S
H I S T O R Y  O F  T A M I L SH I S T O R Y  O F  T A M I L S
H I S T O R Y O F T A M I L S
 
Servir el servicio civil peruano - cap2
Servir   el servicio civil peruano - cap2Servir   el servicio civil peruano - cap2
Servir el servicio civil peruano - cap2
 
H I S T O R Y O F T A M I L S
H I S T O R Y  O F  T A M I L SH I S T O R Y  O F  T A M I L S
H I S T O R Y O F T A M I L S
 
คุณครูที่เกษียณ
คุณครูที่เกษียณคุณครูที่เกษียณ
คุณครูที่เกษียณ
 
Tommy Sandy 50th Anniversary 2nd
Tommy Sandy 50th Anniversary 2ndTommy Sandy 50th Anniversary 2nd
Tommy Sandy 50th Anniversary 2nd
 
Cloud Automation with Opscode Chef
Cloud Automation with Opscode ChefCloud Automation with Opscode Chef
Cloud Automation with Opscode Chef
 
Visual Resume
Visual ResumeVisual Resume
Visual Resume
 
ประเทศญี่ปุ่น11
ประเทศญี่ปุ่น11ประเทศญี่ปุ่น11
ประเทศญี่ปุ่น11
 
How to install IBM Connections in a Coffe Break
How to install IBM Connections in a Coffe BreakHow to install IBM Connections in a Coffe Break
How to install IBM Connections in a Coffe Break
 
ท่องเที่ยวทั่วไทย ไปได้ทุกเวลา
ท่องเที่ยวทั่วไทย  ไปได้ทุกเวลาท่องเที่ยวทั่วไทย  ไปได้ทุกเวลา
ท่องเที่ยวทั่วไทย ไปได้ทุกเวลา
 
Aphcadv2011
Aphcadv2011Aphcadv2011
Aphcadv2011
 
Plm intro
Plm introPlm intro
Plm intro
 
SOCIALIZE YOUR SAP ERP THROUGH INTEGRATE D DIGITAL EXPERIENCE PLATFORMS
SOCIALIZE YOUR SAP ERP THROUGH INTEGRATE D DIGITAL EXPERIENCE PLATFORMSSOCIALIZE YOUR SAP ERP THROUGH INTEGRATE D DIGITAL EXPERIENCE PLATFORMS
SOCIALIZE YOUR SAP ERP THROUGH INTEGRATE D DIGITAL EXPERIENCE PLATFORMS
 
First Aid for the Step 1 Presentation with Dr. Tao Le
First Aid for the Step 1 Presentation with Dr. Tao LeFirst Aid for the Step 1 Presentation with Dr. Tao Le
First Aid for the Step 1 Presentation with Dr. Tao Le
 
PLM and ESE
PLM and ESEPLM and ESE
PLM and ESE
 
발표자료 Bim학회
발표자료 Bim학회발표자료 Bim학회
발표자료 Bim학회
 
Introduction to blender
Introduction to blenderIntroduction to blender
Introduction to blender
 

Similar to Cloud Automation with Opscode Chef

Cloud Automation with Opscode Chef
Cloud Automation with Opscode ChefCloud Automation with Opscode Chef
Cloud Automation with Opscode Chef
Sri Ram
 
Chef Provisioning a Chef Server Cluster - ChefConf 2015
Chef Provisioning a Chef Server Cluster - ChefConf 2015Chef Provisioning a Chef Server Cluster - ChefConf 2015
Chef Provisioning a Chef Server Cluster - ChefConf 2015
Chef
 
How to Write Chef Cookbook
How to Write Chef CookbookHow to Write Chef Cookbook
How to Write Chef Cookbook
devopsjourney
 
Node setup, resource, and recipes - Fundamentals Webinar Series Part 2
Node setup, resource, and recipes - Fundamentals Webinar Series Part 2Node setup, resource, and recipes - Fundamentals Webinar Series Part 2
Node setup, resource, and recipes - Fundamentals Webinar Series Part 2
Chef
 
Chef introduction
Chef introductionChef introduction
Chef introduction
FENG Zhichao
 
Lumen
LumenLumen
[Bristol WordPress] Supercharging WordPress Development
[Bristol WordPress] Supercharging WordPress Development[Bristol WordPress] Supercharging WordPress Development
[Bristol WordPress] Supercharging WordPress Development
Adam Tomat
 
Ch ch-changes cake php2
Ch ch-changes cake php2Ch ch-changes cake php2
Ch ch-changes cake php2
markstory
 
NGINX Can Do That? Test Drive Your Config File!
NGINX Can Do That? Test Drive Your Config File!NGINX Can Do That? Test Drive Your Config File!
NGINX Can Do That? Test Drive Your Config File!
Jeff Anderson
 
AWS OpsWorks Under the Hood (DMG304) | AWS re:Invent 2013
AWS OpsWorks Under the Hood (DMG304) | AWS re:Invent 2013AWS OpsWorks Under the Hood (DMG304) | AWS re:Invent 2013
AWS OpsWorks Under the Hood (DMG304) | AWS re:Invent 2013
Amazon Web Services
 
How I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine Yard
How I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine YardHow I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine Yard
How I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine Yard
SV Ruby on Rails Meetup
 
Chef solo the beginning
Chef solo the beginning Chef solo the beginning
Chef solo the beginning
A.K.M. Ahsrafuzzaman
 
Introduction to chef framework
Introduction to chef frameworkIntroduction to chef framework
Introduction to chef framework
morgoth
 
Chef 0.8, Knife and Amazon EC2
Chef 0.8, Knife and Amazon EC2Chef 0.8, Knife and Amazon EC2
Chef 0.8, Knife and Amazon EC2
Robert Berger
 
Introduction to Chef
Introduction to ChefIntroduction to Chef
Introduction to Chef
Knoldus Inc.
 
Cook Infrastructure with chef -- Justeat.IN
Cook Infrastructure with chef  -- Justeat.INCook Infrastructure with chef  -- Justeat.IN
Cook Infrastructure with chef -- Justeat.IN
Rajesh Hegde
 
Practical Chef and Capistrano for Your Rails App
Practical Chef and Capistrano for Your Rails AppPractical Chef and Capistrano for Your Rails App
Practical Chef and Capistrano for Your Rails App
SmartLogic
 
DevOps hackathon Session 2: Basics of Chef
DevOps hackathon Session 2: Basics of ChefDevOps hackathon Session 2: Basics of Chef
DevOps hackathon Session 2: Basics of Chef
Antons Kranga
 
Making Spinnaker Go @ Stitch Fix
Making Spinnaker Go @ Stitch FixMaking Spinnaker Go @ Stitch Fix
Making Spinnaker Go @ Stitch Fix
Diana Tkachenko
 

Similar to Cloud Automation with Opscode Chef (20)

Cloud Automation with Opscode Chef
Cloud Automation with Opscode ChefCloud Automation with Opscode Chef
Cloud Automation with Opscode Chef
 
Chef Provisioning a Chef Server Cluster - ChefConf 2015
Chef Provisioning a Chef Server Cluster - ChefConf 2015Chef Provisioning a Chef Server Cluster - ChefConf 2015
Chef Provisioning a Chef Server Cluster - ChefConf 2015
 
How to Write Chef Cookbook
How to Write Chef CookbookHow to Write Chef Cookbook
How to Write Chef Cookbook
 
Node setup, resource, and recipes - Fundamentals Webinar Series Part 2
Node setup, resource, and recipes - Fundamentals Webinar Series Part 2Node setup, resource, and recipes - Fundamentals Webinar Series Part 2
Node setup, resource, and recipes - Fundamentals Webinar Series Part 2
 
Chef introduction
Chef introductionChef introduction
Chef introduction
 
Cooking with Chef
Cooking with ChefCooking with Chef
Cooking with Chef
 
Lumen
LumenLumen
Lumen
 
[Bristol WordPress] Supercharging WordPress Development
[Bristol WordPress] Supercharging WordPress Development[Bristol WordPress] Supercharging WordPress Development
[Bristol WordPress] Supercharging WordPress Development
 
Ch ch-changes cake php2
Ch ch-changes cake php2Ch ch-changes cake php2
Ch ch-changes cake php2
 
NGINX Can Do That? Test Drive Your Config File!
NGINX Can Do That? Test Drive Your Config File!NGINX Can Do That? Test Drive Your Config File!
NGINX Can Do That? Test Drive Your Config File!
 
AWS OpsWorks Under the Hood (DMG304) | AWS re:Invent 2013
AWS OpsWorks Under the Hood (DMG304) | AWS re:Invent 2013AWS OpsWorks Under the Hood (DMG304) | AWS re:Invent 2013
AWS OpsWorks Under the Hood (DMG304) | AWS re:Invent 2013
 
How I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine Yard
How I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine YardHow I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine Yard
How I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine Yard
 
Chef solo the beginning
Chef solo the beginning Chef solo the beginning
Chef solo the beginning
 
Introduction to chef framework
Introduction to chef frameworkIntroduction to chef framework
Introduction to chef framework
 
Chef 0.8, Knife and Amazon EC2
Chef 0.8, Knife and Amazon EC2Chef 0.8, Knife and Amazon EC2
Chef 0.8, Knife and Amazon EC2
 
Introduction to Chef
Introduction to ChefIntroduction to Chef
Introduction to Chef
 
Cook Infrastructure with chef -- Justeat.IN
Cook Infrastructure with chef  -- Justeat.INCook Infrastructure with chef  -- Justeat.IN
Cook Infrastructure with chef -- Justeat.IN
 
Practical Chef and Capistrano for Your Rails App
Practical Chef and Capistrano for Your Rails AppPractical Chef and Capistrano for Your Rails App
Practical Chef and Capistrano for Your Rails App
 
DevOps hackathon Session 2: Basics of Chef
DevOps hackathon Session 2: Basics of ChefDevOps hackathon Session 2: Basics of Chef
DevOps hackathon Session 2: Basics of Chef
 
Making Spinnaker Go @ Stitch Fix
Making Spinnaker Go @ Stitch FixMaking Spinnaker Go @ Stitch Fix
Making Spinnaker Go @ Stitch Fix
 

Recently uploaded

From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
CatarinaPereira64715
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 

Recently uploaded (20)

From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 

Cloud Automation with Opscode Chef

  • 1. ← First steps with Chef (first-steps-with-chef.html) More than one website → (more-than-one-website.html) Getting started with Chef By Andy Gale (http://andy-gale.com) 2. Introducing Chef Server This chapter will extend on the building blocks of the previous chapter and introduce better ways of working than just SSH and using Chef in a client and server model. Chef client and server As well as using Chef on a single box with chef-solo it is also possible to use Chef in a client/server model. The Chef server stores and distributes our cookbooks and other Chef configuration when contacted by a client running the chef-client command. The chef-client command is the client/server version of chef-solo. Storing the configuration inside a Chef Server instead of inside a file like web.json as we did in the previous chapter allows us to easily manage the configuration of our servers from our workstation instead. This has an obvious advantage when dealing with a large number of servers and allows us to easily provision new servers with knife. Node At this point it's prudent to introduce you to some Chef terminology. A computer, virtual machine or cloud instance you are running chef-solo or chef-client on is called a node. This differs slightly from what Chef calls a client. A client can also be your workstation that you don't run chef-client on but do use knife to manage your Chef server with. Workstation setup Windows users! Sorry, Windows workstation instructions will be added to this chapter shortly. We will now setup your workstation so you can edit you Chef recipes in your favourite text editor. Install curl if it is not already installed. Then install Chef. Install Chef Sponsored by Brightbox (http://brightbox.com/) Chapters Introducing Chef Server - Getting started with Chef 1 of 16 1 03/17/2015 10:40 PM
  • 2. $ curl -L https://www.opscode.com/chef/install.sh | sudo bash Thank you for installing Chef! Save some typing by adding the various Chef commands to your $PATH. $ echo 'export PATH="/opt/chef/embedded/bin:$PATH"' >> ~/.bash_profile && source ~/.bash_profile Hosted Chef Opscode, the makers of Chef, provide a service called Hosted Chef (http://www.opscode.com/hosted-chef/) which is a Chef Server as a service. They offer a free tier which is good for 5 nodes so is ideal to help us get started. Follow the instructions to sign up on the website and log in. Now we've signed up we will download some files that will allow us to use our Hosted Chef account with knife. Visit https://manage.opscode.com/organizations (https://manage.opscode.com/organizations). Click the Generate knife config link. Download the knife.rb file that is generated. Then click the Regenerate validation key link. Press OK to the alert and download the .pem file. Now visit https://www.opscode.com/account/password (https://www.opscode.com/account/password). Introducing Chef Server - Getting started with Chef 2 of 16 2 03/17/2015 10:40 PM
  • 3. Press the Get a new key button and download the .pem file. Using Hosted Chef We'll now use Hosted Chef along with the chef repository we made in the previous chapter. Firstly, let's download our chef repository. $ wget http://gettingstartedwithchef.com/downloads/cp1.tgz --2013-06-09 13:36:15-- http://gettingstartedwithchef.com/downloads/cp1.tgz Resolving gettingstartedwithchef.com (gettingstartedwithchef.com)... 80.68.93.116 Connecting to gettingstartedwithchef.com (gettingstartedwithchef.com)|80.68.93.116|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 300046 (293K) [text/plain] Saving to: ‘cp1.tgz’ 100%[===============================================================================>] 300,046 1.7 8MB/s in 0.2s 2013-06-09 13:36:15 (1.78 MB/s) - ‘cp1.tgz’ saved [300046/300046] $ tar zxf cp1.tgz $ cd chef-repo We now have everything we need, so let's start using Hosted Chef. Firstly, we need to tell knife to use Hosted Chef. To do this we need to copy the files we just downloaded from Hosted Chef to our repository. $ mv ~/Downloads/*.pem .chef/ $ mv ~/Downloads/knife.rb .chef/ Let's check that knife can talk to Hosted Chef. $ knife client list org_name-validator Introducing Chef Server - Getting started with Chef 3 of 16 3 03/17/2015 10:40 PM
  • 4. "org_name" will be whatever you entered as your organisation name when signing up for Hosted Chef. Uploading Cookbooks Before we can configure our node with chef-client, we need to upload our cookbooks to the Chef server. We do that with knife. $ knife cookbook upload --all Uploading apache2 [1.6.0] Uploading apt [1.9.0] Uploading aws [0.100.6] Uploading build-essential [1.3.4] Uploading chef_handler [1.1.4] Uploading database [1.3.12] Uploading iis [1.6.6] Uploading mysql [2.1.2] Uploading openssl [1.0.2] Uploading php [1.1.8] Uploading phpapp [0.1.0] Uploading postgresql [2.2.2] Uploading powershell [1.1.2] Uploading windows [1.12.4] Uploading xfs [1.1.0] Uploading xml [1.2.0] Uploading yum [3.0.4] Uploading yum-epel [0.2.0] Uploaded all cookbooks. Roles We used a single JSON file to configure our node with chef-solo but what if we have multiple nodes? We should probably find a better solution to this. A Chef role allows us to group configuration for types of nodes together. We'll expand on this in a later chapter but for now we'll create a role for our WordPress setup. $ knife role create phpapp You may receive the following error if you do not have an EDITOR environment variable set. ERROR: RuntimeError: Please set EDITOR environment variable You can resolve this quickly with the --editor option. e.g. --editor vi or --editor nano etc. We are then presented with the basic structure of the role as a JSON file. Introducing Chef Server - Getting started with Chef 4 of 16 4 03/17/2015 10:40 PM
  • 5. { "name": "phpapp", "description": "", "json_class": "Chef::Role", "default_attributes": { }, "override_attributes": { }, "chef_type": "role", "run_list": [ ], "env_run_lists": { } } We'll go through what the fields actually mean. The name you can probably guess - the name of the role. It's a good idea to put something descriptive in the description field. You may remember that we discussed attributes in the last chapter, default_attributes allows us to set attributes and override_attributes lets us specify attributes that override attributes defined as defaults elsewhere. We've already created a run_list in our JSON file in the last chapter so let's add that first. It's safe to ignore the fields that have not been mentioned for now. { "name": "phpapp", "description": "", "json_class": "Chef::Role", "default_attributes": { }, "override_attributes": { }, "chef_type": "role", "run_list": [ "recipe[apt]", "recipe[phpapp]" ], "env_run_lists": { } } Enter our run list, highlighted in green. We should now specify some attributes. We don't need to specify the attributes for the mysql cookbook as it creates secure random passwords automatically in chef-client mode. Our phpapp cookbook requires us to specify a password attribute so let's add that to default_attributes. Introducing Chef Server - Getting started with Chef 5 of 16 5 03/17/2015 10:40 PM
  • 6. { "name": "phpapp", "description": "", "json_class": "Chef::Role", "default_attributes": { "phpapp": {"db_password": "212b09752d173876a84d374333ae1ffe"} }, "override_attributes": { }, "chef_type": "role", "run_list": [ "recipe[apt]", "recipe[phpapp]" ], "env_run_lists": { } } Add the code in green above. Save the file. The role will be uploaded to Hosted Chef and knife will display the following message. Created role[phpapp] Let's confirm the role is on the server. $ knife role list phpapp Finally, we should download the role from the server and place it into our roles directory for safe keeping. $ knife role show phpapp -d -Fjson > roles/phpapp.json Having the file in our chef repository allows us to edit the role at our leisure and check it into version control systems such as Git, something we'll get to in a later chapter. We can upload the file to Hosted Chef again using the following command. $ knife role from file roles/phpapp.json Updated Role phpapp! We're now ready to bootstrap our new node with knife. Bootstrapping a node with Knife Now use your cloud control panel or your virtual machine software to create a new Ubuntu box. If you are using a new Rackspace Cloud instance replace "password" with the root password and "hostname" with it's hostname or IP address and run the following command. Introducing Chef Server - Getting started with Chef 6 of 16 6 03/17/2015 10:40 PM
  • 7. $ knife bootstrap --run-list "role[phpapp]" --json-attributes "{"phpapp": {"server_name": "intro. hellofutu.re"}}" --ssh-user root --ssh-password password hostname Otherwise the knife bootstrap command you need will be specific to your setup. To use a ssh key and sudo before executing the bootstrap you might use the following command, replacing hostname with the hostname or IP address of the machine you intend to bootstrap. You can find more details of the options knife bootstrap (http://docs.opscode.com/knife_bootstrap.html) accepts in the documentation. $ knife bootstrap --run-list "role[phpapp]" --json-attributes "{"phpapp": {"server_name": "intro. hellofutu.re"}}" --sudo hostname You'll see some output along these lines. Bootstrapping Chef on intro.hellofutu.re .. intro.hellofutu.re intro.hellofutu.re Chef Client finished, 61 resources updated intro.hellofutu.re And if you visit your new node in your web browser you'll see the following. Introducing Chef Server - Getting started with Chef 7 of 16 7 03/17/2015 10:40 PM
  • 8. That's fairly impressive I'm sure you'll agree! But it gets better. We can use knife to create the cloud instances for us as well! Creating cloud instances with Knife Knife plugins extend its functionality and make knife even more useful! Amongst other things, knife plugins allow us to automatically create cloud instances before we bootstrap them. You can view the full list of official knife plugins over at docs.opscode.com (http://docs.opscode.com/plugin_knife.html). Brightbox Brightbox are a UK based cloud provider. You can sign up with them here (https://manage.brightbox.com /signup). $ sudo /opt/chef/embedded/bin/gem install knife-brightbox ... Successfully installed knife-brightbox-0.3.0 Now we need to set some details in .chef/knife.rb (which is inside your Chef Repository). Open it up in your favourite text editor. Introducing Chef Server - Getting started with Chef 8 of 16 8 03/17/2015 10:40 PM
  • 9. knife[:brightbox_client_id] = "xxx-xxxxx" knife[:brightbox_secret] = "xxxxxxxxxxxxxxx" Add the code in green but enter your API client id and secret which you can obtain from your Brightbox account settings page. Save the file. We can test to see if that's worked using the following command. $ knife brightbox flavor list ID Name Handle Architecture RAM Disk Cores typ-4nssg High IO Nano nano.high-io 0-bit 512 MB 20 GB 2 typ-c8awf Standard Nano nano 0-bit 512 MB 20 GB 1 typ-b1gmb Standard Mini mini 0-bit 1024 MB 40 GB 2 typ-iqisj High IO Mini mini.high-io 0-bit 1024 MB 40 GB 4 typ-urtky High IO Small small.high-io 0-bit 2048 MB 80 GB 4 typ-8fych Standard Small small 0-bit 2048 MB 80 GB 2 typ-qdiwq High IO Medium medium.high-io 0-bit 4096 MB 160 GB 8 typ-1j0zf Standard Medium medium 0-bit 4096 MB 160 GB 4 typ-mlbt7 High IO Large large.high-io 0-bit 8192 MB 320 GB 8 typ-1e0xr Standard Large large 0-bit 8192 MB 320 GB 4 typ-wdicw High IO XL xl.high-io 0-bit 16384 MB 640 GB 8 typ-a4aqc Standard XL xl 0-bit 16384 MB 640 GB 4 typ-lr76m High IO XXL xxl.high-io 0-bit 32768 MB 1280 GB 8 typ-vs01b Standard XXL xxl 0-bit 32768 MB 1280 GB 4 We can get a list of images (operating systems) with the following command. $ knife brightbox image list ID Name Status img-t3xyp Blank Disk Image public img-r726y FreeBSD 9.0 minimal public img-hnigl Windows 2008 Server R2 public img-g8ia6 ubuntu-raring-13.04-amd64-server public img-u3ttt ubuntu-raring-13.04-i386-server public img-6isnq ubuntu-raring-daily-amd64-server public img-rttkx ubuntu-raring-daily-i386-server public img-nhjvo ubuntu-saucy-daily-amd64-server public img-q1ts8 ubuntu-saucy-daily-i386-server public So let's provision and bootstrap a cloud instance with Brightbox. Heads up! Before you can bootstrap with Brightbox you need to enter your SSH public key in the dashboard. We'll use the flavor "typ-c8awf" and the Ubuntu 13.04 image "img-g8ia6". Introducing Chef Server - Getting started with Chef 9 of 16 9 03/17/2015 10:40 PM
  • 10. $ knife brightbox server create --flavor typ-c8awf --image img-g8ia6 --run-list "role[phpapp]" --distr o chef-full After a while we'll see the following result. xxx.xxx.xx.xx Chef Client finished, 73 resources updated xxx.xxx.xx.xx Instance ID: srv-5ple0 Name: Flavor: typ-c8awf Image: ubuntu-raring-13.04-amd64-server Public IP Address: 109.107.35.66 Private IP Address: 10.242.34.174 Environment: _default Run List: role[phpapp] Visit the Public IP Address in your browser and you'll see the WordPress install page. Rackspace Cloud We'll start by creating a Rackspace Cloud instance. First we need to install the knife-rackspace plugin. $ sudo /opt/chef/embedded/bin/gem install knife-rackspace ... Successfully installed knife-rackspace-0.7.0 Now we need to set some details in .chef/knife.rb (which is inside your Chef Repository). Open it up in your favourite text editor. knife[:rackspace_api_username] = "testorg" knife[:rackspace_api_key] = "APIKEY" Add the green lines above. Remember to replace testorg and APIKEY with your Rackspace username and API key. If you don't live in America you will need to specify an alternative authentication URL. Below is an example for the UK. Valid regions are: "dfw" "ord" "lon" and "syd". knife[:rackspace_api_username] = "testorg" knife[:rackspace_api_key] = "APIKEY" knife[:rackspace_auth_url] = "https://lon.identity.api.rackspacecloud.com/v2.0" Save knife.rb. We can test to see if that's worked using the following command. Introducing Chef Server - Getting started with Chef 10 of 16 10 03/17/2015 10:40 PM
  • 11. $ knife rackspace flavor list ID Name VCPUs RAM Disk 2 512MB Standard Instance 1 512 20 GB 3 1GB Standard Instance 1 1024 40 GB 4 2GB Standard Instance 2 2048 80 GB 5 4GB Standard Instance 2 4096 160 GB 6 8GB Standard Instance 4 8192 320 GB 7 15GB Standard Instance 6 15360 620 GB 8 30GB Standard Instance 8 30720 1200 GB We can get a list of available images (operating systems) with the following command. $ knife rackspace image list ID Name 32b7d027-8a40-458b-9e73-bd719d660df6 Arch 2013.6 e0ed4adb-3a00-433e-a0ac-a51f1bc1ea3d CentOS 6.4 81877a6e-9e87-4b1f-93f3-b176e25f3c4a Debian 7 (Wheezy) f3a23d0a-de1b-4eb7-994f-5f0de9d8d7a0 Fedora 19 (Schrodinger's Cat) ccaf99bc-472a-46ea-a125-d3ecfca66695 FreeBSD 9.1 bb8c27f9-f3cf-4606-9a88-8a2123e02290 Gentoo 13.2 8958846f-679b-454e-9232-20d3792fc5d7 OpenSUSE 12.3 16e6c0ae-f881-4180-95b0-3450fe3f8e96 Red Hat Enterprise Linux 6.4 23cebbc9-3219-4a27-9210-d63e1af7181b Ubuntu 13.04 (Raring Ringtail) 48df4181-040e-4821-8723-d9e4ba908d2f Windows Server 2008 R2 SP1 We can now provision and bootstrap a server with the following command. From the commands above we know we want a flavor of "2" and the Ubuntu 13.04 image which is catchily entitled "23cebbc9-3219-4a27-9210-d63e1af7181b". $ knife rackspace server create --flavor 2 --image 23cebbc9-3219-4a27-9210-d63e1af7181b --run-list "ro le[phpapp]" ... After a while your instance will be created, bootstrapped and Chef will be run and something similar to below will be displayed. Introducing Chef Server - Getting started with Chef 11 of 16 11 03/17/2015 10:40 PM
  • 12. 192.168.9.199 Chef Client finished, 61 resources updated 192.168.9.199 Instance ID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx Host ID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Name: rs-xxxxxxxxxxxxxxxxx Flavor: 512MB Standard Instance Image: Ubuntu 13.04 (Raring Ringtail) Metadata: [] Public DNS Name: 192-168-9-199.static.cloud-ips.com Public IP Address: 192.168.9.199 Private IP Address: 10.9.3.199 Password: xxxxxxxxxxxx Environment: _default Run List: role[phpapp] Visit the Public IP Address in your browser and you will once again see the WordPress install page. We can even use knife to clean up our servers. Get a list of servers with the following command. $ knife rackspace server list Instance ID Name Public IP Private IP Flavor Image State xxxxxxxx rs-x 192.168.9.199 10.9.1.199 2 23cebbc9-3219-4a27-9210-d63e1af7181b active We can delete the server we just created with the following command. We also need to remove references to the server from our Hosted Chef account. We do this with the --purge option. Replace INSTANCE_ID with the value under Instance ID from the server list command above. $ knife rackspace server delete --purge INSTANCE_ID Instance ID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx Host ID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Name: rs-xxxxxxxxxxxxxxxxx Flavor: 512MB Standard Instance Image: Ubuntu 13.04 (Raring Ringtail) Public IP Address: 192.168.9.199 Private IP Address: 10.9.1.199 Do you really want to delete this server? (Y/N) y WARNING: Deleted server xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx WARNING: Deleted node rs-xxxxxxxxxxxxxxxxx WARNING: Deleted client rs-xxxxxxxxxxxxxxxxx Amazon Cloud We can also use knife to bootstrap Amazon EC2 instances. First install the plugin. Introducing Chef Server - Getting started with Chef 12 of 16 12 03/17/2015 10:40 PM
  • 13. $ sudo /opt/chef/embedded/bin/gem install knife-ec2 ... Successfully installed knife-ec2-0.6.4 You need to obtain the following information for your Amazon AWS account. It can all be found or set-up inside the Amazon AWS console. access key id secret access key name of the ssh key you want to use an Ubuntu 12.04 or 13.04 AMI the AWS region you want to use the name of a security group that allows SSH and web access We should now configure knife with those details. Open .chef/knife.rb. knife[:aws_access_key_id] = "XXXXXXXXXXXXXXXXXXXX" knife[:aws_secret_access_key] = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" knife[:aws_ssh_key_id] = "sshkey" Add the lines in green, entering your access key id, secret access key and ssh key name without .pem. Save the file. We can now access a list of cloud instances with the following command. Cloud servers will be listed whether they have been created with knife or not. $ knife ec2 server list Instance ID Name Public IP Private IP Flavor Image SSH Key Security Groups State I have no servers listed. This is because my servers reside in the region eu-west-1. We can specify a region by using the option --region. $ knife ec2 server list --region eu-west1 Instance ID Name Public IP Private IP Flavor Image SSH Key Security Groups State i-xxxxxxxx serr01 x.x.x.x x.x.x.x m1.small ami-3d160149 sshkey www, default running I can use knife to provision and bootstrap a cloud instance with the following command. $ knife ec2 server create --run-list "role[phpapp]" -I ami-3d160149 --region eu-west-1 -G www,default -x ubuntu --node-name server01 --identity-file ~/.ssh/sshkey.pem ... After a while we'll see the following result. Introducing Chef Server - Getting started with Chef 13 of 16 13 03/17/2015 10:40 PM
  • 14. ec2-x-x-x-x.eu-west-1.compute.amazonaws.com Chef Client finished, 57 resources updated ec2-x-x-x-x.eu-west-1.compute.amazonaws.com Instance ID: i-xxxxxxxx Flavor: m1.small Image: ami-3d160149 Region: eu-west-1 Availability Zone: eu-west-1a Security Groups: www, default Security Group Ids: default Tags: {"Name"=>"server01"} SSH Key: sshkey Root Device Type: ebs Root Volume ID: vol-xxxxxxxx Root Device Name: /dev/sda1 Root Device Delete on Terminate: true Public DNS Name: ec2-x-x-x-x.eu-west-1.compute.amazonaws.com Public IP Address: x.x.x.x Private DNS Name: ip-x-x-x-x.eu-west-1.compute.internal Private IP Address: x.x.x.x Environment: _default Run List: role[phpapp] Visit the Public DNS Name in your browser and you'll see the WordPress install page. You can also delete instances you no longer need with knife. Using the instance ID from the output of the server create command above, we can delete the instance we just made using the following command. $ knife ec2 server delete --purge --region eu-west-1 i-xxxxxxxx --node-name server01 Instance ID: i-xxxxxxxx Flavor: m1.small Image: ami-xxxxxxxx Region: eu-west-1 Availability Zone: eu-west-1a SSH Key: sshkey Root Device Type: ebs Do you really want to delete this server? (Y/N) y WARNING: Deleted server i-xxxxxxxx WARNING: Deleted node server01 WARNING: Deleted client server01 The command used some extra options, here's why: --purge ensures the server is also deleted from our Hosted Chef account --node-name required when using --purge if the server name is different from the instance ID --region Introducing Chef Server - Getting started with Chef 14 of 16 14 03/17/2015 10:40 PM
  • 15. ← First steps with Chef (first-steps-with-chef.html) More than one website → (more-than-one-website.html) specifies a region other than the default. Other cloud providers If you're a cloud provider that would like to have instructions for your platform included with Getting started with Chef, please email support@gettingstartedwithchef.com (mailto:support@gettingstartedwithchef.com) and we'll make that happen. Next chapter Hopefully you used either a Brightbox, Amazon or Rackspace cloud account and automatically bootstrapped a cloud instance using knife. In the next chapter we'll introduce some tools that will make manging and developing our cookbooks a lot easier and modify our Chef environment to work with multiple websites. © Hello Future Ltd (http://hellofutu.re). Registered in England and Wales. Company No: Sponsored by Brightbox (http://brightbox.com/) Introducing Chef Server - Getting started with Chef 15 of 16 15 03/17/2015 10:40 PM
  • 16. 08378526 Created with Twitter Bootstrap (http://twitter.github.com/bootstrap/) and Bootswatch Cerulean. (http://bootswatch.com/cerulean/) Introducing Chef Server - Getting started with Chef 16 of 16 16 03/17/2015 10:40 PM