Skip to content

Instantly share code, notes, and snippets.

@stephenlauck
Last active August 29, 2015 14:04
Show Gist options
  • Save stephenlauck/9fcabe82a3acb18aa8f6 to your computer and use it in GitHub Desktop.
Save stephenlauck/9fcabe82a3acb18aa8f6 to your computer and use it in GitHub Desktop.
chef_local_dev_setup_hp

Local Development Setup for Chef

Download and install

chef-dk

Neckbeard Way

Download and install

virtual box

vagrant

install Chef first to avoid tar errors on gem compiles

Chef

Git

Optional Downloads

Sublime Text

Make sure ruby is installed and the path is correct

if your ruby path is not set chef embedded ruby you need to set it

where ruby

ensure that cert path is correct if getting Berkshelf SSL error

SSL_CERT_FILE=C:\opscode\chef\embedded\ssl\certs\cacert.pem

Install gems

gem install berkshelf

gem install test-kitchen

gem install kitchen-vagrant

ensure that cert path is correct if getting Berkshelf SSL error

SSL_CERT_FILE=C:\opscode\chef\embedded\ssl\certs\cacert.pem

Local cookbook development workflow

create new cookbook using Berkshelf

berks cookbook test

list test-kitchen VM's

cd test

add java dependency to metadata.rb

depends 'java'

use Berkshelf to download dependency cookbooks

berks install

Show all kitchen instances

kitchen list

Run VM for CentOS 6.5 and converge with configuration

kitchen converge centos

Copy link

ghost commented Jul 17, 2014

duplicate line:

ensure that cert path is correct if getting Berkshelf SSL error

SSL_CERT_FILE=C:\opscode\chef\embedded\ssl\certs\cacert.pem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment