Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save larryebaum/6a674680665f22b3417c3e30028520fa to your computer and use it in GitHub Desktop.
Save larryebaum/6a674680665f22b3417c3e30028520fa to your computer and use it in GitHub Desktop.
Chef Jumpstart Quick Reference
chef-run chef@node1 file '/etc/motd'
content='Welcome to Chef’ --password Cod3Can!
chef-run chef@node1 motd.rb --password Cod3Can!
chef-run winrm://Administrator@winnode1
file_experiment.rb --password Cod3Can!
chef generate cookbook -P setup
chef generate template motd
kitchen converge
kitchen verify
kitchen destroy
chef generate cookbook -P mycorp_resources
chef generate resource user
kitchen test
chef generate policyfile base
chef install base.rb
chef show-policy
chef push acceptance base.rb
chef push production base.rb
chef diff base.rb production...acceptance
knife bootstrap chef@node1 -P Cod3Can! --policy-name base --policy-group acceptance -N node1 --sudo
knife search node "policy_name:base"
knife node show node1
knife ssh "policy_name:base"
"sudo chef-client" -x chef -P Cod3Can!
describe file('/etc/motd') do
it { should exist }
its('content') { should match %r{\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}} }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment