Cisco CloudCenter is a powerful tool that allows you to quickly profile applications that can be deployed in multiple cloud infrastructure. For example, if you want a web application running on the Apache web server and a MySQL database, you can model them as a two-tier application using CloudCenter’s powerful Topology Modeler.
Chef is a tool that automates the configuration of a virtual machine (VM). Arguably, the most powerful feature of Chef is the ability to specify the configuration of a VM (i.e. the Chef Client) in a form of cookbooks, which consist of a set of configuration files that can be version controlled and updated as necessary. Chef presents itself as an alternative to post-install scripts and provides a more defined structure of configuration files. Chef configuration files can be associated with a role and the role assigned to a VM (or a list of VMs) of choice. This allows organizations to achieve better scalability and agility through configuration automation.
A high-level illustration of the relationship between CloudCenter, Chef and a deployed VM is given below:
Figure 1: Diagram showing how CloudCenter integrates with Chef
Out of the box, CloudCenter supports deploying Chef Client as a service. By doing so, this results in the best of both worlds: a VM that is configurable by a set of Chef cookbooks – which you can either write yourself or download from the Chef community – with CloudCenter providing the visibility, management and a governance layer.
Using the Topology Modeler, you can create an application profile with a single VM containing Chef Client, as shown below:
Figure 2: Chef Client setting inside the Topology Modeler
Figure 2 shows a sample topology of a Chef Client, with the Chef application modeler in the middle canvas, and Chef parameters configuration on the right hand side. The breakdown for each of these parameters is given below.
This parameter allows you to specify which Chef Server you want to derive configuration files from. A list of Chef Servers may be configured internally in CloudCenter as External Repositories. In this example, the name of the particular Chef Server that CloudCenter will connect to is ChefServer12.
Note: CloudCenter only supports Chef Server v12 and above.
The Chef organization name is internal to Chef and is configured in the Chef Server. In this example, the name of the organization is engage_esm.
Chef cookbooks may be applied to a given list of environments and versioned accordingly. In this example, the production environment has been specified, so the VM will deploy with cookbook versions associated with the production environment.
Chef Run List
The Chef run list describes a serial execution plan of configuration for the VM. In this example, a single apache2 cookbook recipe has been provided, which will install the Apache web server on the VM.
CloudCenter supports a single recipe or a single role in the run list (i.e. “role”). In cases where multiple recipes are required to be executed in order, a role may be created in the Chef Server and the recipe list associated with the role.