ΑΝΕΞΑΡΤΗΤΟΙ ΠΑΝΑΘΗΝΑΙΚΟΙ
Το blog απευθύνεται αυστηρώςPublished on: 24.04.2012
Chef is an open source framework for configuration management that is rapidly gainng popularity in Cloud Computing. Chef consists of:
Chef Server - Contains all the Configurations called cookbooks.
Chef Client - Runs on your server and performs the configuration.
The architecture is that the chef client "pulls" its cookbooks from chef server and runs the cookbook to configure an application. This is good for production but for testing it is faster to bypass Chef Server and "push" out the cookbooks directly to your server, run it and see the result. Chef Solo is part of the Chef Client that supports this "push".
To save you installing and running a Chef Server opscode run a Hosted Chef Service. Signup and get 5 servers for free and it is cost effective for more.
CHEF COOKBOOK DEVELOPMENT
EC2Dream comes with a customized version of PocketKnife. This allows you with "one click" to push the chef cookbooks directly to the EC2 server and runs them in a separate window so you can quickly test cookbooks and you develop them. 
USING CHEF FOR PRODUCTION SERVERS
1. After testing the cookbook upload it to the Opscode Hosted Chef platform using the Chef Workstation (which can be easily installed in EC2Dream). It is a ruby application as is all of Chef.
 2. For production the server automatically "pulls" and run the cookbooks. To do this simply configure the parameters in the user data:
   chef_run_list=recipe[apache2]
and the server configures an apache web server at startup.
3. Even in production when you have a large number of servers it can be useful to push the changes to a couple of servers and make sure the change is working correctly before committing the change to Hosted Chef and getting all the production servers to update.
4. Finally if you don't what to use Hosted Chef or a Chef Server for production you can either:
a. Create an image of the new server after building it with EC2Dream and Chef Solo and run the servers with the new image.
b. Put the cookbooks in a Git Repository and continue to use Chef Solo in production and "pull" the configuration from a Git repository instead of "pushing it out" as in development.
SOURCE CONTROL
For serious development of cookbooks you need source control. Git is the standard way Opscode do their cookbook code management and is the standard way to load pre-built cookbook from the OpsCode GitHub Repository other cookbook repositories. There is a fast growing number of cookbooks available!
Windows - download the latest full installer for msysgit
Mac - Can be installed using Macports or the Git OSX Installer
Linux - Git can installed using the package management system
For an introduction to git read the first two chapters of Pro Git.
Git References
Installing Git
Setup and Initialization
Git For Windows Developers
Getting Started with Git and GitHub on Windows
An Illustrated Guide to Git on Windows
Chef References
Our First Chef Cookbook
Automated Deployments with LittleChef
Info on ssh
Chef installation and minimal configuration
Automated Configuration Management with opscode
Using Opscode Chef to start up a node on AWS EC2 - A Simple Example
The future is definitely hybrid clouds.
Just like when shopping, you want to be able to buy from the best store.
With rental cars, you want to use you own car sometimes and at other times use a rental car (like when you are interstate or your car is being repaired).
Similarly companies will want to use different public clouds for redundancy or to take advantage of different features or pricing. Also they may want to use one-site servers or own private clouds, as well as public clouds.
This has implication for cloud management. You need an approach that spans multiple public clouds and can work with your private cloud internal servers. So the tools that come with the cloud provider will over time give way to tools that span multiple clouds.
EC2Dream combined with Chef and Git allows you to build one cookbook for all clouds and your datacentre while have different base images support the differences in the clouds and datacentre.
You also see the commercial cloud management companies adopting the same approaches:
RightScale with the myCloud initiative.
enStratus provides on-premise or SaaS self-service management
You can also look at:
Cloudkick
Scalr
Kaavo
Tapin Systems
References
Cloud Management
Multi-Language, Multi-Framework, what about Multi-Cloud?

