How to Integrate Puppet Enterprise With VMware Cloud Assembly
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?
- Set Up Your Puppet Enterprise + VMware Cloud Assembly Integration
- Add Puppet to Your Blueprint
- Version and Deploy Your Blueprint
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.
- Login to Cloud Assembly, and select Integrations under the Infrastructure tab. Click Add Integration.
- Select Puppet.
- Enter your Puppet Enterprise server FQDN and Autosign secret.
- Select your Puppet Enterprise server location. In my case, Private Cloud.
- Select your Data Collector and enter your Puppet server credentials. Enable Sudo depending on the user you entered. Click Validate.
- 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.
- Click on the Blueprints tab and select your previous vSphere blueprint.
- In the left menu, scroll down or search for the Puppet component. Select it and drag it to the canvas.
- In the YAML editor, click on + to view all available code properties for the Puppet component.
- Click on the host property to view what it means and what's expected.
- 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.
- 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.
- Enter the provider, the Puppet integration name you entered in the previous steps.
- 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
- In the blueprint canvas, click Version.
- Enter the Version number and optionally a Description and Change Log. Click Create.
- In the blueprint canvas, click Deploy.
- Select Create a new deployment and enter a Deployment name. Select the Blueprint version you just created and click Deploy.
- Click on the Deployments tab to see the progress of your deployment.
- If successful, the deployed resources will be shown.
- Login to vCenter Server to verify the VM is available and running.
- 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.
- Click on the new node to view its Facts. Notice that Cloud Assembly properties of the VM are passed to Puppet as Facts.
- Select the Reports tab to see what Puppet has done to bring the VM in the desired state. For example, install packages.
- 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?
Learn More
- Read more about VMware automation with Puppet.
- Get a demo and download the vRealize Automation plugin for Puppet Enterprise.
- How to use Dropsonde to get rid of your unused modules.
- Get the ebook: How to Simplify Amazon Web Services Automation with Puppet.
- Learn about Puppet content usage telemetry and how it helps with infrastructure management.
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.