Skip to content

Instantly share code, notes, and snippets.

@thehar
Created March 24, 2017 01:15
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thehar/0470c9e66a2f845fd9fe94e9b9f7b435 to your computer and use it in GitHub Desktop.
Save thehar/0470c9e66a2f845fd9fe94e9b9f7b435 to your computer and use it in GitHub Desktop.
#!/bin/bash -xe
which ruby
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update
brew cask install virtualbox
brew cask install chefdk
mkdir -p ~/.chef/
tee ~/.chef/knife.rb <<EOF
log_level :info
log_location STDOUT
node_name '$SUDO_USER'
client_key '/Users/$SUDO_USER/.chef/$SUDO_USER.pem'
validation_client_name 'chef-validator'
validation_key '/Users/$SUDO_USER/.chef/chef-validator.pem'
chef_server_url 'https://ec2-54-215-2-169.us-west-1.compute.amazonaws.com/organizations/elance-odesk'
syntax_check_cache_path '/Users/$SUDO_USER/.chef/syntax_check_cache'
cookbook_path [ '/Users/$SUDO_USER/dev/chef-recipes/cookbooks' ]
verify_api_cert "false"
ssl_verify_mode :verify_none
# only load ChefGen::Flavors if we're being called from the ChefDK CLI
if defined?(ChefDK::CLI)
require 'chef_gen/flavors'
chefdk.generator_cookbook = ChefGen::Flavors.path
end
>>
EOF
mkdir ~/dev
cd ~/dev
git clone git@github.com:upwork/chef-skeleton.git
cd ~/dev/chef-skeleton
chef exec bundle
# This is to test out that we have things working
chef -v
chef exec rake -T
git checkout -b wip/test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment