chef notes 1

­

 

cookbook
A cookbook is the fundamental unit of configuration and policy distribution.Each cookbook defines a scenario, such as everything needed to install and configure MySQL.

role
A role is a way to define certain patterns and processes that exist across nodes in an organization as belonging to a single job function.Each role consists of zero (or more) attributes and a run-list.

data bag
A data bag is a global variable that is stored as JSON data and is accessible from a Chef server.A data bag is indexed for searching and can be loaded by a recipe or accessed during a search

Upload cookbook
knife cookbook upload <cookbook-name>
eg:knife cookbook upload cookbook-httpd

Add/Upload role
knife role from file <FILE>
eg: knife role from file http-env.rbknife role from file ./roles/*.rb

View or Show role
knife role show <role name>
eg:knife role show http-env

Update role
knife role edit <role name>
eg:knife role edit http-env

Add data bag
knife data bag from file <FILE>
eg:knife data bag from file http-password.json

Update data bag
knife data bag edit <databag name>
eg:knife data bag edit http-password

View/Show data bag
knife data bag show <databag name>
eg:knife data bag show http-password

assyrian technical blog