Published on 26 November 2018 by

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. Choose Puppet Enterprise integration for VMWare

  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. Enter integration credentials

  6. Enter a Name for the integration. Optionally, enter a Description. Click Add.

Add a description if you chooseSee your newly added Puppet integration

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. Access your Blueprints here

  1. In the left menu, scroll down or search for the Puppet component. Select it and drag it to the canvas. Click and drag the Puppet component into your canvas

  2. In the YAML editor, click on + to view all available code properties for the Puppet component. View your code properties

  3. Click on the host property to view what it means and what's expected. You can check on schema values to double check what things mean and what's expected

  4. 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. Double check your dependencies

  5. 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. View roles and environments

  6. Enter the provider, the Puppet integration name you entered in the previous steps. In my case, ddeswart-PE-master.

  7. 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. Verify that your credentials are correct in the data file

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 version of a blueprint starting here

  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.

Create a new deployment 5. Click on the Deployments tab to see the progress of your deployment. See the progress of your deploy

  1. If successful, the deployed resources will be shown. Successful deployment example

  2. Login to vCenter Server to verify the VM is available and running. Verifying that the VM is up and running

  3. 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. Double check that the node exists in Puppet Enterprise

  4. Click on the new node to view its Facts. Notice that Cloud Assembly properties of the VM are passed to Puppet as Facts. View the Facts of the VM including Cloud Assembly properties within Puppet Enterprise

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

  6. Open a web browser, enter http:// to verify Wordpress is installed. Double checking that our VM and endpoint exists

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 VMguru.com.

Learn more

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

Share via:
Tagged:
The content of this field is kept private and will not be shown publicly.

Restricted HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.