One important part of the DevOps movement is infrastructure automation, especially if you are running your application on top of services like Amazon EC2.
Everybody's dream is to be able to bootstrap and deploy hundreds or even thousands of machines with a few simple commands. This talk will tell you how you can do this using Open Source tools like Chef and mcollective. Chef manages your servers configuration using a nice Ruby DSL while mcollective orchestrates and commands all your nodes.
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Build your own clouds with Chef and MCollective
1. Build your own clouds
with Chef & MCollective
Jonathan Weiss
2. Who am I?
Working for Peritor in Berlin, Germany
Written, maintain, or involved in
Webistrano
Capistrano
SimplyStored
Happening
The great fire of London
http://github.com/jweiss
@jweiss
2
13. Components
Communication
Host
configuration
Command &
Control
14. Command & Control
Responsibilities:
Communication with IaaS API
User Interface (Web, CLI, API):
Query, deploy, start, stop
Repository of projects &configuration
Controls which hosts do what&when
14
15. Command & Control
Responsibilities: Implementation:
Communication with IaaS API Fog & other API implemenations
User Interface (Web, CLI, API): Rails
Query, deploy, start, stop
Repository of projects &configuration CouchDB
Controls which hosts do what&when Async wokers & agents
15
25. Chef-Solo vs. Chef-Server
Chef-Server
Complex
No concept of different environments, e.g. staging vs. production
Didn‘t want to run one Chef server per project (and env)
No lifecycle events, e.g. deployment vs. bootstrap
Pull vs. push
Chef-Solo
MCollective agents to push cookbooks and Chef runs
25
26. Cookbooks
Cookbooks
apache2
memcached
mysql
rails
26
45. Filters Facts
Limit responding agents by filters of facts/classes:
Classes
Arbitary used defined settings role
Can be set by userdata
Facts
Information about local machine
Plugins for Chef/Ohai, Puppet/Facter
Examples: Linux version, installed packages, ....
45
56. Experiences
Chef
Flexible and powerful
Easy to learn first steps - easy to write spaghetti recipes
Some annoyances: pseudo idempotent and 2 phases
“Write once, test everywhere”
MCollective
Simple and robust
Missing presences and events
(Nanite has them but has different problems)
Integrated with Puppet in the future?
56
60. Two Phases of Chef
1) Compile
Load all attributesrecipes and build list of actions/dependencies
Compute attribute tree
2) Run Random Ruby Code runs here
Actually execute the resources
60
61. Two Phases of Chef
Use only_if and not_if
Tell Chef to execute your ressource during compile phase
61