This was originally posted here. Visit VMGuru for more content from Dimitri de Swart and Erik Scholten.

In my previous post I configured a vSphere blueprint which can be deployed to my on premises environment using Cloud Assembly. In this post I will walk you through how to integrate Puppet Enterprise with Cloud Assembly and use it in your blueprint so that you can manage deployments for configuration and drift. I’ll be using my previous vSphere blueprint which I 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 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.Integrate Puppet
  3. Enter your Puppet Enterprise server FQDN and Autosign secret.
  4. Select your Puppet Enterprise server location. In my case, Private Cloud.
  5. Select your Data Collector and enter your Puppet server credentials. Enable Sudo depending on the user you entered. Click Validate.Integrate Puppet
  6. Enter a Name for the integration. Optionally, enter a Description. Click Add.integrate Puppet

Add Puppet to your blueprint

The blueprint service Puppet provider 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.Integrate Puppet
  2. In the left menu, scroll down or search for the Puppet component. Select it and drag it to the canvas.Integrate Puppet
  3. In the YAML editor, click on + to view all available code properties for the Puppet component.Integrate Puppet
  4. Click on the host property to view what it means and what’s expected.Integrate Puppet
  5. Enter ${Cloud_vSphere_Machine_1.*} as value for the host property. An dependency (arrow) will automatically be drawn to the vSphere machine in the canvas.Integrate Puppet
  6. 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.
    Integrate Puppet
  7. Enter the provider, the Puppet integration name you entered in the previous steps. In my case, ddeswart-PE-master.
  8. And finally, enter the osType (linux or windows) and user credentials for installing the Puppet agent. Optionally, change useSudo to true.Integrate Puppet

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.Integrate Puppet
  3. In the blueprint canvas, click Deploy.
  4. Select Create a new deployment and enter a Deployment name. Select the Blueprint version you just created and click Deploy.
    Integrate Puppet
  5. Click on the Deployments tab to see the progress of your deployment.Integrate Puppet
  6. If successful, the deployed resources will be shown.Integrate Puppet
  7. Login to vCenter Server to verify the VM is available and running.Integrate Puppet
  8. Then, login to the Puppet Enterprise console, to verify the VM has an Puppet agent, is added as node and has software deployed to it.
    1. In the console, select Overview or Nodes.
      Integrate Puppet
    2. Click on the new node to view it’s Facts . Notice that Cloud Assembly properties of the VM are passed to Puppet as Facts.
      Integrate Puppet
    3. Select the Reports tab to see what Puppet has done to bring the VM in the desired state. For example, install packages.Integrate Puppet
  9. Open a web browser, enter http://<your IP address> to verify WordPress is installed.Integrate Puppet

In my next post I will show you how to use inputs in your blueprint and make your request more dynamic. Also we will release the blueprint to Service Broker to be consumed in the catalog by other users.

Getting started

Cloud Assembly is available as a service within the cloud automation services bundle.

Request a free trial and get a hands on experience of our new offerings.

Start a Cloud Automation Services Trial

Learn more