Skip to content

jack-kerouac/chef-solo-laptop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chef Solo Laptop

This repository contains chef cookbooks and recipes for the provision of my laptop.

Chef

Chef provides a means to provision a (cluster of) machine.

Because we do not want to depend on a chef-server we opt to use the chef-solo instance.

Procedure

In this section the procedure for getting the provision of a laptop up and running is described here. A summary is given below.

Summary

  • Ubuntu (12.10)
  • Git
  • Clone Repository
  • Install Chef Solo
  • Run Chef Solo

Ubuntu

Install the latest version of Ubuntu.

Git

Execute the command below to install git.

sudo apt-get install git

Git is used to retrieve this repository which contains all the utility scripts, cookbooks and recipies needed to get started.

Clone Repository

Choose an appropriate directory in which to clone this repository. In that directory execute the following command

git clone git://github.com/dvberkel/chef-solo-laptop.git

This will clone the repository into a directory called chef-solo-laptop.

Install Chef Solo

Chef Solo need to be installed to run the various cookbooks and recipies. Detailed information can be found on the installation page at Opscode. We will list the commands that need to be executed.

We are using the Opscode APT repository. This way it is easy to keep Chef up to date. Execute the following command to add the Opscode APT to the source list.

echo "deb http://apt.opscode.com/ `lsb_release -cs`-0.10 main" | sudo tee /etc/apt/sources.list.d/opscode.list

The next step is adding the OpsCode GPG key so the downloads can be verified.

sudo mkdir -p /etc/apt/trusted.gpg.d
gpg --keyserver keys.gnupg.net --recv-keys 83EF826A
gpg --export packages@opscode.com | sudo tee /etc/apt/trusted.gpg.d/opscode-keyring.gpg > /dev/null

Update the index with the following command

sudo apt-get update

And install opscode-keyring to keep the keyring up to date.

sudo apt-get install opscode-keyring # permanent upgradeable keyring

To ensure we use the latest libraries that Chef depends on we have to upgrade the installation.

sudo apt-get upgrade

Finally install chef via apt-get.

sudo apt-get install chef

Because we are only intend to run Chef Solo the Chef Server Url can be set to 'none'. (The install script has these values preseeded.)

Run Chef Solo

Now that Chef Solo is installed we should use it. Execute the following command to provision your laptap.

sudo chef-solo -c solo.rb -j node.json

This will execute the recipe in cookbooks/basic_setup/recipes/default.rb

Basic Setup

The basic setup for the computer is described in the basic-setup cookbook, in particular in the default recipe.

The documentation about resources is a good place to start understanding the syntax of various elements in the recipes.

About

Chef Solo project to provision my laptop

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published