Chef
• Chef is a configuration management tool written in Ruby and Erlang
• Was written to manage Linux but later versions also support Microsoft Windows
• In February 2013, Opscode released version 11 of Chef
• It uses a pure-Ruby to write system configuration "recipes"
• Integrates with cloud-based platforms such as Internap, Amazon EC2, Google Cloud Platform, OpenStack, SoftLayer, Microsoft Azure and Rackspace
• Support for includes AIX, RHEL/CentOS, FreeBSD, OS X, Solaris, Microsoft Windows and Ubuntu platforms
• Additional client platforms supported include Arch Linux, Debian and Fedora
• Chef Server can be on RHEL/CentOS, Oracle Linux, and Ubuntu
• Chef can run in client/server mode or standalone configuration named "chef-solo"
Chef Architecture
• Chef Development Kit has tools to develop and test your infrastructure automation code
• Infrastructure as code automation code is developed locally on workstation and then deployed in production
• Chef Server is a central repository for Chef cookbooks and have information about every node being managed
• Chef client runs on each node and securely communicates with the Chef server to get the latest configuration instructions for that node
• Chef cookbooks have code for desired state of infrastructure
• Chef node is a physical machine or virtual machine in network being managed by the Chef server
We will define the following in context of Chef:
• Server
• Node
• Resource
• Recipe
• Cookbook
• Run List
• Roles
• Search
Chef Organization
• An organization is the top-level entity for role-based access control in the Chef server
• Each organization contains the default groups (admins, clients, and users, plus billing_admins for the hosted Chef server), at least one user and at least one node (on which the chef-client is installed)
• The Chef server supports multiple organizations
• Organizations are completely independent tenants of Enterprise Chef
• Share nothing with other organizations
• May represent different
• Companies
• Business units
• Departments
Chef Node
• Nodes represent the servers in your infrastructure
• Could be physical servers or virtual servers
• May represent hardware that you own or compute instances in a public or private cloud
• Could also be network hardware – switches, routers etc.
Chef Resources
• A Resource represents a piece of the system and its desired state
• A package that should be installed
• A service that should be running
• A file that should be generated
• A cron job that should be configured
• A user that should be managed
• And more
Chef Recipe
• Configuration files that describe the resource and their desired state
• Recipes can :
Install and configure software components
Mange files
Deploy applications
Execute other recipes
And more
Chef Cookbooks
• Recipes are stored in Cookbooks
• Cookbooks contain recipes, templates, files, custom resources, etc
• Code re-use and modularity
Chef Run List
• A run-list defines all of the information necessary for Chef to configure a node into the desired state
• A run-list is:
• An ordered list of roles and/or recipes that are run in the exact order defined in the run-list; if a recipe appears more than once in the run-list, the chef-client will not run it twice
• Always specific to the node on which it runs; nodes may have a run-list that is identical to the run-list used by other nodes
• Stored as part of the node object on the Chef server
• Maintained using knife and then uploaded from the workstation to the Chef server, or maintained using Chef Automate
Chef Roles
• 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
• Each node can have zero (or more) roles assigned to it
• When a role is run against a node, the configuration details of that node are compared against the attributes of the role, and then the contents of that role’s run-list are applied to the node’s configuration details
• When a chef-client runs, it merges its own attributes and run-lists with those contained within each assigned role
Roles represent the types of server in your infrastructure
• Load Balancer
• Application Server
• Database Cache
• Database
• Monitoring
learn more about chef here :
Comments
Post a Comment