Slide 40
Slide 40 text
$ knife configure
$ knife cookbook create hello -o cookbooks
$ $EDITOR cookbooks/hello/recipes/default.rb
$ $EDITOR localhost.json
$ $EDITOR solo.rb
$ chef-solo -c solo.rb -j localhost.json
ChefͷHello, World!
// localhost.json
{
"run_list" : [
"recipe[hello]"
]
}
# solo.rb
file_cache_path "/tmp/chef-solo"
cookbook_path ["/home/ec2-user/chef-
repo/cookbooks"]
# default.rb
log “Hello, World!”