Integrating with Chef#
Chef can automate infrastructure tasks, such as installing databases and application servers. By integrating the blueprint designer with Chef, you can apply Chef roles to images in blueprints. When you provision environments, the environments run the Chef automation scripts that are based on those roles.
Note: These instructions are for using Chef when you provision environments on cloud systems via OpenStack Heat. To use Chef in component processes, see the Chef automation plugin.
- Chef roles are supported on only OpenStack, VMware, and SoftLayer® clouds.
- To use Chef, you must have a Chef server that contains roles and cookbooks. For information about setting up Chef, see https://www.chef.io. The Chef server must have at least one Chef environment, which is not to be confused with cloud environments. By default, Chef servers have an environment that is named
To use Chef roles in blueprints, you must connect to a Chef server. Then, you configure the target images to use Chef roles. Then, you can add Chef roles to images in blueprints.
Log in to the blueprint designer as an administrator.
Click Settings > System Settings.
In the Chef Server section, specify the following information.
If you don't see this section, open the config.properties file on the computer that hosts the blueprint design server, set the com.ucd-patterns.feature.chef-server property to
true, and restart the blueprint design server.
*Chef Server URL*
The URL of the Chef server, such as
*Chef Validator Name*
The name of the validator that clients use to connect to the Chef server.
*Chef Validator Key*
The name of the key for the validator. Paste the content from the validator key file that is in the chef-starter.zip file (starter kit).
*Chef Client Name*
The name of a Chef user that has access to the Chef server.
*Chef Client Key*
The key for the client. Paste the content from the client key file that is in the chef-starter.zip file (starter kit).
Note: If you used Chef in versions of the blueprint designer before 6.2.1 and upgraded to version 6.2.1 or later, the value that you provided for the Chef Validator Key URL cannot be modified. To use a different validator key, before you provision an environment that contains Chef roles, you must modify the blueprint. See Modifying blueprints to access the Chef validator key in version 6.2.1 and later.
To connect to the Chef server via SSL, see Configuring SSL/TLS security for Chef.
If you use a Kilo, Liberty, or Mitaka level Heat engine that you extended, modify the engine to be compatible with Chef.
On the system that hosts the Heat engine, run the following command:
sed -i '125,127 s/^/#/' /usr/lib/python2.7/site-packages/heat/engine/resources/openstack/heat/software_deployment.py sed -n '125,127p' /usr/lib/python2.7/site-packages/heat/engine/resources/openstack/heat/software_deployment.py
The following text is displayed in the command line:
Configure the virtual images for Chef. See Creating Chef-compatible images.