DevOps adoption rate has substantially increased in the last couple of years across all organization sizes due to the real business value that DevOps provides in terms of agility. Automation of application installation in the cloud is an important aspect in DevOps. Traditionally, automation has been achieved via writing shell scripts. These were sufficient to manage smaller applications, but more complex runtimes required the scripts to be written in higher-level programming languages like Perl, Python and Ruby. To manage these complexities better, several automation frameworks have been developed. Chef and Puppet are examples of two such automation and configuration management frameworks.
This three-part series will show you how to use the Chef IT automation framework to automate the installation and configuration of Drupal on the SoftLayer infrastructure.
We will use three CCIs (cloud computing instances) hosted on SoftLayer: one for the Chef server, one for the Chef workstation and one for the Drupal client node. At the end of this series, you should be able to complete your own installation of Drupal in a matter of minutes.
SoftLayer Python CLI: A command line to manage and interact with the SoftLayer APIs
Ruby: Open source programming language
Chef: A configuration management framework written in Ruby
Ridley: A Ruby Chef API client gem to manage your Chef server
Drupal: An open source content management system
Chef is a systems and cloud infrastructure automation framework that makes it easy to deploy servers and applications to any physical, virtual, or cloud location, irrespective of the size of the infrastructure that is being built. It is written in Ruby programming languages. As of this writing, Chef Version 11 is the current release. Opscode, a privately held company based in Seattle, Washington, maintains and enhances the Chef tooling today. Chef uses cooking metaphors in its naming.
Chef is an open source tool supported by an active community. It is released under the Apache license which allows you to safely integrate Chef into your organization and to extend it to match your organization’s unique complexity, requirements, and scale. Chef is used by a large number of companies across the world, ranging from small startups to large enterprises.
Once automated, Chef allows you to build or rebuild the infrastructure automatically in minutes and hours instead of weeks and months. Once the service is live, Chef gives you endless flexibility to quickly adapt on the fly.
There are three main components in Chef:
1. The workstation: a computer with a local Chef repository that is configured with Knife. Knife is a utility to manage the Chef server configuration and to communicate with nodes over SSH. As a developer, you can develop or download cookbooks (a collection of configuration recipes and resource definitions) on the workstation and upload them to the Chef server when ready.
2. The Chef server: a server that acts as a hub for all the infrastructure configuration information, such as the list of clients, nodes, and corresponding configurations.
3. The Chef node: a node is a host that runs the Chef client – a Chef agent that communicates to the Chef server using the APIs, in order to retrieve the configuration information needed for that particular node. A node is identified with its runlist (a list of recipes executed in the right order) and attributes (default settings that can be overridden).
Drupal is an open source content management system (CMS) written in PHP that is used in many websites worldwide. The standard release of Drupal, known as Drupal core, contains many basic common features like user account registration, maintenance, and menu management. It is also flexible and extensible with many community add-ons, known as modules. Drupal runs on any platform that supports a web server and a database. In this series, we will use Apache2 and MySQL as defined in the default Chef cookbook.
In the next installment, I will show you how to set up and configure the Chef server and Chef workstation, then perform a manual installation of Drupal on SoftLayer using the Knife command.