
Obility’s mission as an Internet Engineering Company is providing our clients with deliverables they can use to easily recreate and provision their network architectures and cloud computing infrastructures. One of our favorite tools that we’ve been using is Chef, a Ruby-based systems integration framework created by Opscode.
Some benefits of using Chef taken from the Chef Wiki, include the ability to:
- Manage servers by writing code, not by running commands
- Integrate tightly with your applications, databases, LDAP directories and more
- Easily configure applications that require knowledge about you entire infrastructure
Chef Resources
Chef uses an ever evolving Ruby DSL that allows a systems integrator to specify through Ruby code the necessary packages, services, and configuration needed to run their network applications. Chef’s Ruby DSL is made up of Resources which are essentially the lowest-level “atomic” actions that can be performed on a server. A few of the notable actions you can perform with Chef Resources include:
- Creating directories and specifying ownership
- Mounting filesystems and creating fstab entries
- Creating files via Erubis templates, typically used for specifying service configuration
- Creating users along with their various account properties
- Executing executables
- Scheduling execution with cron
Chef Resources are the “ingredients” that allow you to create Definitions, Recipes and Cookbooks that you then use to “cook” your various Nodes or server instances.
Idempotence
Chef recipes are idempotent, meaning multiple applications of the same recipe will not affect the end result. This one of the biggest advantages Chef has over bash or other scripting languages. Traditional scripting languages typically require a bunch of error checking or a well-defined server state pre-execution to accomplish a similar task.
Poolparty
Poolparty is a library that provides a wrapper around chef, and provides a more high-level ability to launch self-healing, auto-scaled and monitored infrastructure in the cloud. Poolparty currently supports EC2 and Vmware clouds. When I evaluated poolparty it seems it was in a state of transition, so I decided to use Chef directly. I continue to monitor the Poolparty development as it seems to have a lot of potential for quickly launching cloud infrastructure with support for a number of cloud computing platforms.
Decoupling Cloud Computing Infrastructure
Speaking of cloud computing platforms, one of the longstanding criticisms of cloud computing is the dependencies it creates in the form vendor lock-in and barriers to exit. By adopting a particular vendor’s cloud computing platform, you are making an long-term commitment to that vendor and will ultimately be required to play by their rules and accept whatever features and offerings they may or may not provide.
Chef is a solution to relieving this vendor lock-in and applies not only to cloud computing but to server provisioning in general. Being able to move your server configuration from one provider to another is priceless. I’ve experienced this problem myself, and through my work with TechStars I’ve seen several teams lose time while struggling to migrate their server infrastructure from one vendor to another.
New to Chef?
Are you new to Chef or looking for better ways to deploy and manage your cloud computing network architecture? We’d enjoy discussing how we can help you take things to the next level for your organization or web application. Contact us or give us a call at 303.552.0223.