November 21, 2021

How to Integrate Puppet Enterprise With VMware Cloud Assembly

How to & Use Cases
Ecosystems & Integrations

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.

Table of Contents:

What is VMware Cloud Assembly?

VMware 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. As of this writing, Cloud Assembly supports Amazon AWS, Microsoft Azure, VMware Cloud on AWS and vSphere (with or without NSX-V/T), and others will soon be added.

Set Up Your Puppet Enterprise + VMware Cloud Assembly 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 the public cloud, Cloud Assembly supports Puppet Enterprise instances on Azure/AWS. You can find more information in Puppet docs on 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, and select Integrations under the Infrastructure tab. Click Add Integration.
  2. Select Puppet.
Puppet is selected as the type of integration to add.

  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.
  4. 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 server as an external system or update projects assigned to the Puppet server. Finally, appropriate users can de-register deployed machines from the Puppet server when the machines are decommissioned.

  1. Click on the Blueprints tab and select your previous vSphere blueprint.
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.

Search for the Puppet component, select it and drag it to canvas.
  1. In the YAML editor, click on + to view all available code properties for the Puppet component.

YAML editor
  1. Click on the host property to view what it means and what's expected.

Click on the host property
  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.

A dependency in host property is automatically 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.

Select Classification in the Puppet Enterprise console
  1. Enter the provider, the Puppet integration name you entered in the previous steps. 
  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.

Create a Version in the blueprint canvas
  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.

Select the Blueprint version you just created and click Deploy.
  1. Click on the Deployments tab to see the progress of your deployment.

Click on the Deployments tab to see the progress of your deployment.
  1. If successful, the deployed resources will be shown.

If successful, the deployed resources will be shown.
  1. Login to vCenter Server to verify the VM is available and running.

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.

Log into the PE console to verify the VM has a Puppet agent. 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.
Click on the new node to view its Facts.

  1. Select the Reports tab to see what Puppet has done to bring the VM in the desired state. For example, install packages.
Select the Reports tab to see what Puppet has done to bring the VM in the desired state.

  1. Open a web browser, enter http:// to verify Wordpress is installed.

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!

Ready to get started with Puppet Enterprise and make configuration management easier than ever?

START MY TRIAL 

Learn More

Dimitri de Swart is a cloud management specialist at VMware & blogger at VMguru.com.

This blog was originally published on November 21, 2018 and has since been updated for accuracy and relevance.