Skip to content

Instantly share code, notes, and snippets.

@freerobby freerobby/knife.rb
Created Jul 25, 2012

Embed
What would you like to do?
current_dir = File.dirname(__FILE__)
ENV["ORGNAME"] = ENV["OPSCODE_ORGNAME"]
sys_user = ENV["USER"]
opscode_user = ENV["OPSCODE_USER"]
log_level :info
log_location STDOUT
node_name opscode_user
client_key "#{ENV["HOME"]}/.chef/#{ENV["OPSCODE_USER"]}.pem"
validation_client_name "#{ENV["OPSCODE_ORGNAME"]}-validator"
validation_key "#{ENV["HOME"]}/.chef/#{ENV["OPSCODE_ORGNAME"]}-validator.pem"
chef_server_url "https://api.opscode.com/organizations/#{ENV["OPSCODE_ORGNAME"]}"
cache_type 'BasicFile'
cache_options( :path => "#{ENV['HOME']}/.chef/checksums" )
cookbook_path ["#{current_dir}/../cookbooks"]
knife[:aws_access_key_id] = ENV["AWS_ACCESS_KEY_ID"]
knife[:aws_secret_access_key] = ENV["AWS_SECRET_ACCESS_KEY"]
knife[:aws_ssh_key_id] = ENV["AWS_SSH_KEY_ID"]
knife[:identity_file] = "#{ENV["HOME"]}/.chef/(YOUR PRIVATE KEY HERE).pem"
knife[:region] = "us-east-1"
knife[:aws_image_id] = "ami-1515f67c"
@leifmadsen

This comment has been minimized.

Copy link

commented Jul 25, 2012

from_file(File.expand_path("../environments/test/#{ENV["KNIFE_ENV"]}.rb", __FILE__))
@leifmadsen

This comment has been minimized.

Copy link

commented Aug 22, 2012

current_dir = File.dirname(FILE)

sys_user = ENV["USER"]

log_level :info
log_location STDOUT
node_name sys_user
client_key "#{ENV["HOME"]}/.chef/#{ENV["KNIFE_ENV"]}/#{ENV["USER"]}.pem"
validation_client_name "chef-validator"
validation_key "#{ENV["HOME"]}/.chef/#{ENV["KNIFE_ENV"]}/validator.pem"
chef_server_url "http://chef-#{ENV["KNIFE_ENV"]}.coredial.com:4000"
cache_type 'BasicFile'
cache_options( :path => "#{ENV['HOME']}/.chef/checksums" )
cookbook_path [ "#{current_dir}/../cookbooks", "#{current_dir}/../site-cookbooks" ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.