How to integrate Puppet Enterprise with VMware Cloud Assembly

At VMworld 2018 US, VMware upped their game in the IT Automation and DevOps space by announcing three new Cloud Automation Services, Cloud Assembly, Service Broker and Code Stream. Cloud Assembly provides an abstraction layer across multiple clouds using a Cloud API which makes it possible to create declarative templating constructs, which VMware calls Blueprints. Blueprints can deploy cloud agnostic resources (compute, storage, network etc.) across clouds. At this moment Cloud Assembly supports Amazon AWS, Microsoft Azure, VMware Cloud on AWS and vSphere (with or without NSX-V/T). But others will soon be added.

In this post I will walk you through how to integrate Puppet Enterprise with VMware Cloud Assembly and use it in your blueprint so that you can manage deployments for configuration and drift. In this example I'll be using a vSphere blueprint which I created in a previous post and saved by creating a version.

Set up your integration

To integrate Puppet based configuration management, you must have a valid instance of Puppet Enterprise installed on public cloud or private cloud with a vSphere workload. In public cloud, Cloud Assembly supports both Puppet Enterprise instances on Azure/AWS and OpsWorks (Managed PE) on AWS. Read here to learn more about setting up Puppet Enterprise with a basic configuration and some Starter Content.

You must establish a connection between this external system and your Cloud Assembly instance. Then you can make Puppet configuration management available to Cloud Assembly by adding it to appropriate blueprints.

  1. Login to Cloud Assembly, select Integrations under the Infrastructure tab. Click Add Integration.
  2. Select Puppet.
  1. Enter your Puppet Enterprise server FQDN and Autosign secret.
  2. Select your Puppet Enterprise server location. In my case, Private Cloud.
  3. Select your Data Collector and enter your Puppet server credentials. Enable Sudo depending on the user you entered. Click Validate.
  1. Enter a Name for the integration. Optionally, enter a Description. Click Add.

Add Puppet to your blueprint

The blueprint Puppet provider component installs, configures, and runs the Puppet agent on a deployed compute resource. The Puppet provider supports both ssh and WinRM connections. When machines are deployed, users can add or delete a Puppet Master as an external system or update projects assigned to the Puppet Master. Finally, appropriate users can de-register deployed machines from the Puppet Master when the machines are decommissioned. 1. Click on the Blueprints tab and select your previous vSphere blueprint.

  1. In the left menu, scroll down or search for the Puppet component. Select it and drag it to the canvas.
  1. In the YAML editor, click on + to view all available code properties for the Puppet component.
  1. Click on the host property to view what it means and what's expected.
  1. Enter ${Cloud_vSphere_Machine_1.*} as value for the host property. A dependency (arrow) will automatically be drawn to the vSphere machine in the canvas.
  1. Next, enter the Puppet role and environment under properties. But to know which roles are available in which environment, login to your Puppet Enterprise console, select Classification and expand Roles. In my case I'll be using the Wordpress role available in the Dev environment.
  1. Enter the provider, the Puppet integration name you entered in the previous steps. In my case, ddeswart-PE-master.
  2. And finally, enter the osType (linux or windows) and user credentials for installing the Puppet agent. Optionally, change useSudo to true if you’re not using root.

Version and deploy your blueprint

  1. In the blueprint canvas, click Version.
  2. Enter the Version number and optionally a Description and Change Log. Click Create.
  1. In the blueprint canvas, click Deploy.
  2. Select Create a new deployment and enter a Deployment name. Select the Blueprint version you just created and click Deploy.
  1. Click on the Deployments tab to see the progress of your deployment.
  1. If successful, the deployed resources will be shown.
  1. Login to vCenter Server to verify the VM is available and running.
  1. Then, login to the Puppet Enterprise console, to verify the VM has a Puppet agent, is added as node and has software deployed to it. In the console, select Overview or Nodes.
  1. Click on the new node to view its Facts. Notice that Cloud Assembly properties of the VM are passed to Puppet as Facts.
  1. Select the Reports tab to see what Puppet has done to bring the VM in the desired state. For example, install packages.
  1. Open a web browser, enter http:// to verify Wordpress is installed.

Et voila, Configuration Management integration made easy with VMware Cloud Assembly and Puppet Enterprise.

Happy coding!

*Dimitri de Swart is a cloud management specialist at VMware & blogger at*

### Learn more
Use the links below to learn more about VMWare and Puppet.

* [Learn more about setting up vRA and Puppet](
* [Read about VMWare and Puppet](
Puppet sites use proprietary and third-party cookies. By using our sites, you agree to our cookie policy.