Skip to content

Instantly share code, notes, and snippets.

@jeremymv2
Last active July 19, 2018 17:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeremymv2/0acb98ab747fef3c04f4fe0522b3ce8a to your computer and use it in GitHub Desktop.
Save jeremymv2/0acb98ab747fef3c04f4fe0522b3ce8a to your computer and use it in GitHub Desktop.
Running chef-zero on a chef-repo for canary testing

chef-zero

sudo -E /opt/chef/bin/chef-client --local-mode --config /tmp/client.rb --log_level auto --force-formatter --no-color --json-attributes /tmp/dna.json --chef-zero-port 8889

/tmp/client.rb

node_name "default-ubuntu-1604"
checksum_path "/tmp/checksums"
file_cache_path "/tmp/cache"
file_backup_path "/tmp/backup"
cookbook_path ["/tmp/cookbooks", "/tmp/site-cookbooks"]
data_bag_path "/tmp/data_bags"
environment_path "/tmp/environments"
node_path "/tmp/nodes"
role_path "/tmp/roles"
client_path "/tmp/clients"
user_path "/tmp/users"
validation_key "/tmp/validation.pem"
client_key "/tmp/client.pem"
chef_server_url "http://127.0.0.1:8889"
encrypted_data_bag_secret "/tmp/encrypted_data_bag_secret"
treat_deprecation_warnings_as_errors false
named_run_list {}

/tmp/dna.json

{"run_list":["recipe[yourrunbook::default]"]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment