Last active
June 13, 2019 19:31
-
-
Save drrk/aa762f3b12deec72d2ac8dd757382b04 to your computer and use it in GitHub Desktop.
Chef Jumpstart Quick Reference
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
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