17. What makes your server a Chef Node?
• Chef-Client installed
• Bootstrapped(Registered) with Chef Server
• Runlist Attached
18. Node Attributes
• Node specific properties are called as Node Attributes
• It can be provided in a form of Array, Hash, or as a single variable.
• Attributes can be passed from attribute file, roles, environment,
runlist
• Attributes works on priority basis.
26. Chef Development Kit (DK)
• Chef Development Kit
• Why DK with Knife?
• We need few more tools to build a better Cookbook
• CRUDDS… Am I missing anything?
• Cookbook Dependency Management
• A warning tool, if recipe is not healthy – Foodcritic
• Gem bar
• Push Jobs
28. Attributes
• I am used to supply what is required by a cookbook
• Yes I have priorities
• You can stamp me from cookbook, roles, environments, Runlist
29. Template(Configuration as a Code)
• Program your Configuration files
• I can fetch your attributes from anywhere
• I understand your if else for…
31. Files
• Use me to dump your as is files
• I am used to provide your pre baked resources
32. Data Bags
• I am a special attribute
• Node Independent
• Priority Independent
• Available for All
• I am available as a global/environment variables in your cookbook
• I am also capable to hold your secrets(Encrypted Data Bags)
• I like to reside at Chef Server so that I could serve every node
33. Chef Vault
• I am specially developed for managing your secret data.
• I am keyless
• Only trusted nodes can read me
• gem install chef-vault
34.
35. Roles
• I am a runlist template which can be consumed by all nodes
• You can assign me to multiple nodes in same time
• Same as runlist, I have recipies and atrributes in me
• My attributes get high precedence than node and environment
attributes(same type)
• Roles can be assigned in Roles too
• I am JSON
• I miss versioning
38. Environments
• Every node is a part of environment
• By default every node is registered under _default environment
• _default is a environment which cannot be changed
• We can create our own environments
• A node can be a part of one environment at a time
• Environments allow you to assign roles, attributes, restricting
cookbook version
• I am JSON
• I miss versioning
41. Test Kitchen
• Kitchen supports multiple platforms (i.e.: RHEL, Ubuntu, Windows,
etc.)
• It supports multiple frameworks (i.e.: Rspec, Serverspec, etc.)
• It encourages Test-Driven Development
42.
43.
44. Chef Supermarket
• 100% free
• Chef Supermarket hosts cookbooks which are built by community and
available for everyone.
• https://supermarket.chef.io/
• Private Supermarket
45.
46.
47. Let’s Cook
• Build a Cookbook
• Test On Kitchen
• Roll out in Environment