Loading presentation...

Present Remotely

Send the link below via email or IM


Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.


Make your likes visible on Facebook?

Connect your Facebook account to Prezi and let your likes appear on your timeline.
You can change this under Settings & Account at any time.

No, thanks


No description

Austin Page

on 17 October 2012

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of Chef

Chef Configuration Management What challenges does
configuration management try to solve? Maintain Configuration Document Configuration Configure Servers Allow for future updating
Allow for changes
Allow for security updates
Allow for new services, growth Allow for reuse of configuration: How does Chef solve these problems? A few abstractions: Node A physical server Environment A group of servers running independent services Cookbook Describes a service Role Describes a group of services
a specific configuration of a service eg. Roles:
Web-server (w/ apache, mysql-client all in one) Getting this: On To this: Can be a challenge... How did I configure that server 6 months ago?
How am I going to recover from this disaster?
How am I going to expand to the new location? (for your datacenter and services) A few key ideas: Search gives you access to attributes, databags, and roles
Infrastructure as Code
No matter how many times you apply configuration to a node, the node ends up in the same state. A Cookbook Contains: Recipies Templates Attributes Other Are a list of resources to be used on the node eg. add this config file; install that package Can search the environment, role, and node for their attributes a resource that describes a config file files
definitions Contains: Attributes Run List A list of roles, recipes, and resources, to be executed in order (contains attributes) What about the Attributes? Attributes are generated by roles, recipies, cookbooks, environments, and the node itself. This wealth of environment data allows each component to make smart decisions about what to do in a given situation. Databags "Globals" for your infrastructure

Can be encrypted Notes about a node:

Runs Chef-client
Has automatically discovered attributes via Ohai Resources Tools for your recipies Package manager
apt, yum, git
static, remote
Services on os
start, stop, restart, reset
"smart" config files What does Chef Infrastructure look like? A bunch of tools: Chef - Client Runs on the Node, or Server
Runs Ohai to discover attributes of node
Does what the chef server tells it to Chef - Server Holds your cookbooks, roles, databags, and attributes
Hands these out to chef-client
Provides API
Provides Web GUI Knife Admin's tool for interfacing with chef-server
Allows you to assign roles to nodes, upload databags, upload roles, upload cookbooks, etc
Works with your "infrastructure code repo" files Repository A location that maintains your "infrastructure code", tracks it, and does versioning of code A few more key ideas: You use your version control system to manage your infrastructure code
Generalized Infrastructure code is shared through github and opscode website
there are community cookbooks for openstack!
You don't have to "start from scratch"
You automate as many processes as you would like
Your "infrastructure code" becomes your automation and documentation Protip: Spiceweasel Can automate your knife commands
Allows for automated deployment of services to nodes, for an entire environment
Allows for repeatable deployment of services in an environment Knife-plugins Allow extending knife to do much more, for example:
Interfacing Knife directly to Openstack environments, so that vm's get deployed, then configured for Chef, then get roles assigned to them
Also works with Amazon, etc. Would you like an openstack on your openstack? Chef - Librarian Very useful when dealing with multiple repositories (community, local, etc).
Allows for updating of repos inside repos openstack-chef-repo http://github.com/opscode/openstack-chef-repo
http://github.com/mattray/openstack-chef-repo Matt Ray - Opscode technical evangelist
Community maintained chef cookbooks for deploying Openstack
contributions from many sources, including:
Provides a common upstream for Openstack Cookbooks
Draws from the Rackspace Chef cookbooks for openstack General Info: Technical Overview: A repo that contains repos
each "sub" repo are cookbooks for specific projects in openstack
Makes HEAVY use of roles, instead of individual recipies, for deployment
to keep the Cookbooks more modular
Has been written to allow for modular deployment
All roles on One server vs. Every role on its own server
"search" Components of openstack-chef-repo pxe-dust A cookbook
Provides a pxe server for pxe installation of ubuntu
Automatically registers install with chef after it completes Roles Provide cohesive unit for deploying parts of services
Provide a tree for giving you control over how specific you want your deployment to be Spiceweasel
Spiceweasel used to assist in pushing the cookbooks, roles, and environment to your chef server
Because openstack-chef-repo depends on the environment, roles, and cookbooks, use of Spiceweasel is highly recommended Search Environment Makes use of environment to push out "global" attributes
Defines Networking, glance globals, and other openstack specific globals for a particular environment
Useful if you want to have a test and a dev and a production openstack stack. Role Tree Heavy use of search to provide modularity of each role
Pro: doesn't matter what nodes an Openstack role is assigned to
Con: No chef-solo for openstack-chef-repo Future Possibilities Endless, restricted only by your imagination http://github.com/rcbops/chef-cookbooks
Full transcript