Chef Configuration Tool

1. Uploading cook book to chef-server
     knife cookbook upload -a -V --cookbook-path /xxx/resources/chef-repo/cookbooks
2. Bootstrap a single recipe/ role on a perticular node
    knife bootstrap -x <user> --sudo <ip> --run-list 'recipe[<cookbook>::<recipe>]' -E env -N <ip>
3. Gem building
     chef gem build <gemname>.gemspec
4. Compiled gem recipes will be under following in chef-server.
     ~/.chefdk/gem/ruby/<latest version>/gems/
5. Stand alone recipe running in chef-server
    -bash-4.1$ cat mytest.rb
     file "<absolutepath>/mytxt.txt" do
           content 'This file Chef-Apply test for mukesh'
      end
     ------------------
    -bash-4.1$ sudo chef-apply mytest.rb

No comments:

Post a Comment