Upload
pubudu-suharshan-perera
View
329
Download
0
Embed Size (px)
Citation preview
SysAdmin
We don’t support that version
The architecture doesn’t match our network, deployment or security model
We weren’t consulted about security/monitoring/backup/provisioning
Chef● Open source configuration management tool● Works best when developers and operations work
together● “DevOps” is not a must for Chef to be successful● But it helps
Organizations● A single instance of chef server can support multiple
organizations● Each organization has a unique set of groups and users● Share nothing with other organizations● May represent different
○ Companies○ Business units○ Departments
Environments● Model the life-stages of your applications● Every organization starts with a single environment● Environments to reflect your patterns and workflow
○ Development○ Test○ Staging○ Production
Roles● Represent the type of servers in your
infrastructure○ Load balancer○ Application server○ Database○ Monitoring
Nodes● Nodes represent the servers in your
infrastructure● Can be either physical or virtual servers● Can be hardware that you own or can be
compute instances in a public or private cloud
Nodes...● Chef client runs on each node● Chef client will
○ Gather current system configurations○ Download the desired system configuration from
chef server○ Configure the node such that it adheres to the policy
Resources● A resource represents a piece of the system
and its desired state○ A package that should be installed○ A service which should be running○ A file which should be generated○ A cron job that should be configured○ A user that should be managed○ And more
Resources in recipes● Resources are the fundamental building
blocks of chef configuration● Resources are gathered into recipes● Recipes ensure the system is in the desired
state
Recipes● Configuration files that describe resources
and their desired state● Recipes can:
○ Install and configure software components○ Manage files○ Deploy applications○ Execute other recipes○ and more
Cookbooks● Recipes are stored in cookbooks● Cookbooks contain recipes, templates, files,
custom resources, etc● Code re-use and modularity
Run Lists● The Run list is a collection of policies that
the node should follow.● Chef-client obtains the run list from chef-
server● Chef-client ensures the node complies with
the policy in the run list
KnifeA CLI that provides an interface between a Workstation and the Chef Server. It manages,
● Nodes● Cookbooks and recipes● Roles● Environments● Cloud resources
Ohai● Detects attributes on a node● Provide attributes to chef-client● Type of attributes Ohai collects
○ Platform details○ Network usage○ Memory usage○ CPU data○ Kernal data○ and many more
Flavors of Chef● Hosted Enterprise Chef
○ SaaS, Hosted at Opscode○ Manage up to 50,000 servers○ 24x7 support○ Pay/Grow as you need○ Free upto 5 nodes
Flavors of Chef ● Enterprise Chef
○ All the power of Hosted Chef, behind the firewall○ Delivered as enterprise software○ Free of charge up to 5 nodes○ Customer needs to take care of provisioning the
infrastructure
Flavors of Chef ● Open Source Chef Server
○ Core components of Chef Server are released as open source
○ No enterprise features (yet people use them)○ No enterprise support
Flavors of Chef ● Chef-solo
○ Allows using cookbooks on nodes without requiring a chef-server
○ Runs locally and requires cookbooks to be on the same machine
○ A limited version of the chef-client
Let’s Learn Chef
● https://learn.chef.io● https://docs.chef.io● https://www.chef.io/resources/solutions● https://www.youtube.com/user/Opscode