Created
November 21, 2014 22:22
-
-
Save bobeckert/dd8a8a8439dd6e2146e4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File.dirname(__FILE__) | |
user = ENV['OPSCODE_USER'] || ENV['USER'] | |
node_name user | |
client_key "#{ENV['HOME']}/.chef/#{user}.pem" | |
validation_client_name "#{ENV['ORGNAME']}-validator" | |
validation_key "#{ENV['HOME']}/.chef/#{ENV['ORGNAME']}-validator.pem" | |
chef_server_url "https://api.opscode.com/organizations/#{ENV['ORGNAME']}" | |
syntax_check_cache_path "#{ENV['HOME']}/.chef/syntax_check_cache" | |
cookbook_path ["#{current_dir}/../cookbooks"] | |
cookbook_copyright “Shopkeep" | |
cookbook_license "apachev2" | |
cookbook_email ENV['EMAIL_ADDRESS'] | |
# Amazon AWS | |
knife[:aws_access_key_id] = ENV['AWS_ACCESS_KEY_ID'] | |
knife[:aws_secret_access_key] = ENV['AWS_SECRET_ACCESS_KEY'] | |
# Knife SSH settings | |
knife[:ssh_user] = ENV['SSH_USER'] | |
knife[:identity_file] = "#{ENV['HOME']}/.ssh/#{ENV['SSH_KEY']}" | |
knife[:ssh_attribute] = 'cloud.local_ipv4' | |
knife[:host_key_verify] = false # yeah... so 0.10.7+ uses one, 0.10.4 the other. | |
knife[:no_host_key_verify] = true | |
knife[:ssh_timeout] = 10 | |
knife[:bootstrap_install_command] = 'bash <(wget -O - "https://www.opscode.com/chef/install.sh") -v 11.14.6' | |
# Setup Chef env variables, add these to your ~/.bash_profile then open a new shell | |
#export ORGNAME=X | |
#export OPSCODE_USER=X | |
#export EMAIL_ADDRESS=<your email address>@shopkeep.com | |
#export AWS_ACCESS_KEY_ID=< your aws access key id> | |
#export AWS_SECRET_ACCESS_KEY=<your secret access key> | |
#export SSH_USER=<user for ssh> | |
#export SSH_KEY=<ssh key name in ~/.ssh/> | |
#export GITHUB_API_KEY=<github api key here with read access to repos> | |
put it in ~/.chef/ along with your validation key | |
validation_key "#{ENV['HOME']}/.chef/#{ENV['ORGNAME']}-validator.pem" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment