Chef developer training - Part 6 (draft)

The prerequisites for Part 6 are to complete part 5




Part 6

The purpose or part 6 is to configure knife.rb to use your /C/Users/tomhodder/.bashrc ENV vars rather than the hard coded values;

1) open your ~/Development/chef-repo/.chef/knife.rb file in a text editor

find the 3 values

node_name
client_key
chef_server_url

and change them to the following;

node_name           "#{ENV['node_name']}"
client_key          "#{ENV['client_key']}"
chef_server_url     "#{ENV['chef_server_url']}"


here is my example;

current_dir = File.dirname(__FILE__)
log_level            :info
log_location         STDOUT
node_name            "#{ENV['node_name']}"
client_key           "#{ENV['client_key']}"
chef_server_url      "#{ENV['chef_server_url']}"
validation_client_name   "class01-validator"
validation_key       "#{current_dir}/class01-validator.pem"
cache_type           'BasicFile'
cache_options( :path => "#{ENV['HOME']}/.chef/checksums" )
cookbook_path        ["#{current_dir}/../cookbooks"]
#https_proxy   "http://outproxy.chefclipse.org:8080"
#http_proxy   http://outproxy.chefclipse.org:8080



No comments:

Post a Comment

Don't be nasty. Being rude is fine.