How to integrate vRealize Automation with the Puppet Plugin 2.0

The Puppet Plugin 2.0 for vRealize Automation is here so let’s put it to good use by integrating it with vRealize Automation Blueprints!

Pre-Reqs:

 

  • Puppet Plugin Installed and Configured. See my guide here
  • A Puppet master server running Puppet Enterprise 2016.4 or newer, or open source Puppet 4.6.2 or newer
  • vRealize Orchestrator 7 or newer
  • vRealize Automation 7 or newer
  • The Puppet Starter Content Blueprints downloaded and installed in vRA from here
  • A quiet place where you will not be interrupted see my guide here

 

First we need to install some content on the Puppet Master

SSH to the Puppet Master and type the following to install git

yum -y install git

Now git clone the starter content

git clone https://github.com/puppetlabs/puppet-vro-starter_content.git

Change to the new directory

cd puppet-vro-starter_content

 Run the script to install content with the following

bash scripts/vra_nc_setup.sh

Run the puppet agent

puppet agent -t

Open the vRealize Orchestrator Client and update the Event Broker Workflows

  1. Change view to run
  2. Select the EventBroker Install PE agent workflow
  3. Click the pencil to edit

Click Not Set to select the Puppet Master we added earlier

Select the puppet master server

  1. Click Puppet Dropdown
  2. Select the puppet master
  3. Click Select
  4. Click Save and Close

Do the same as above for the EventBroker Purge PE agent node workflow

At this point you should already have uploaded the sample blueprints to vRealize Automation, if not download the Linux and/or Windows Blueprints and my guide for instructions to import using Cloud Client.

Go to the design tab and edit the sample blueprint

Select a RHEL/CENTOS 7 Template

  1. Click the Linux_vSphere machine
  2. Click the Build Information Tab
  3. Select the template

Enter the root password in the Custom Properties

  1. Click Properties
  2. Enter the password to login to the provisioned machine
  3. Click Ok
  4. Click Finish

Publish the blueprint

Create the event broker subscriptions

Click machine provisioning and click next

Enter the following

  1. Run based on conditions
  2. All of the following
  3. Data > Lifecycle state > Lifecycle stage name => Equals => (Constant) VMPSMasterWorkflow32.MachineProvisioned
  4. Data > Lifecycle state > State phase => Equals => (Constant) PRE
  5. Data > Blueprint name > Equals > PE Linux Webserver example
  6. Click next

Browse to the Event Broker Install PE agent workflow and click next

Enter the following and click finish

Publish the new subscription

Entitle the blueprint and fire off a new request

Check the vRO Client to verify the workflow ran

Notice I have a couple that failed, see my guide here to fix this issue.

Get the ip address of the newly provisioned server and open a web browser to it

Also notice it’s registered on the Puppet Master

Enjoy!
Remember sharing is caring!

5 Replies to “How to integrate vRealize Automation with the Puppet Plugin 2.0”

  1. Hi
    I follow step your
    (com.vmware.library.vc.vm.tools/vim3WaitForPrincipalIP) Error in (Dynamic Script Module name : vim3WaitForPrincipalIP#0) ReferenceError: vm is not defined for waiting for the DNS name

    • Check that the vCenter Plugin is working and configured properly, browse the plugin in vRO client or try to run a simple vCenter workflow.

      • Do you have step remove agent puppet ?

        I input subscriptions > workflow ‘EventBroker Purge PE Agent Node’

        Input Conditions
        Data > Lifecycle state > Lifecycle stage name => Equals => (Constant) VMPSMasterWorkflow32.Disposing
        Data > Lifecycle state > State phase => Equals => (Constant) PRE

        when delete vm. In workflow vRO error ‘Error in (Workflow:EventBroker Purge PE Agent Node / Get Properties (item1)#42) TypeError: Cannot call method “get” of null’

        Thank you.

  2. Can I add the Puppet Master from a RedHat Satellite installation? I’ve installed Puppet Plugin 3.1 and tried to run the Add a PE master workflow but it fails with “Host provided is not a puppet enterprise master”. Is there a workaround?

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.