The Chef agent is installed on a VM after the VM has been deployed and completed the ‘Machine Building’ stage of deployment. This is achieved by creating an event subscription through vRAs Event Broker Service (EBS).
When an event triggers an EBS subscription, vRA communicates with vRO causing a workflow to run. This means the first step of configuring Chef integration with vRA is to configure the Chef vRO plugin.
This post assumes some familiarity with vRO, vRA and Chef. To perform these tasks, your Chef server should be configured and running.
Steps detailed have been performed on vRA 7.3 with the embedded vRO appliance.
Integration with vRO
The Chef vRO plugin provides a number of prebuilt workflows for interacting with a Chef server and the object types for Chef components. Installation and configuration of the plugin in quite straight forward and required to use Chef with vRA.
Download the plugin from the VMware Solution Exchange or this link.
To install the plugin to vRO, you need to navigate to the vRO control center. If you’re using the embedded vRO appliance, the control center is disabled by default. Follow the steps detailed in this link to activate.
Import Certs
The first step is to import the certificate for your Chef server. Follow the steps below from the vRO Control Center.
Click on Certificates
Enter the URL of your Chef server and click Import
Installing the Plugin
From the main page of the Control Center scroll down the page and click on Manage Plugins
Upload the Plugin
Accept the EULA and click Install
If you’re running a vRO cluster, you need to restart the vRO services to synchronize the change.
Connecting the Chef Server as an Endpoint
For vRO to communicate with the Chef server, you will need to configure an endpoint.
Launch the vRO client and go to Workflows > Library > Chef > Configuration
Select Add Chef Host
Enter the required data and click Submit
After the workflow completed, your Chef server has been added as an endpoint. If the work fails, validate your input and correct where required.
You can verify the connection to the Chef server using the workflow “Chef Server
The output of the workflow should be similar to the image below
Summary
This completes the vRO stage of integrating Chef with vRA. In the upcoming posts, we will look at the EBS and property groups to make everything work.