Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
VMware vRealize Orchestrator Cookbook. - Second Edition

You're reading from  VMware vRealize Orchestrator Cookbook. - Second Edition

Product type Book
Published in Nov 2016
Publisher Packt
ISBN-13 9781786462787
Pages 556 pages
Edition 2nd Edition
Languages
Author (1):
Daniel Langenhan Daniel Langenhan
Profile icon Daniel Langenhan

Table of Contents (19) Chapters

VMware vRealize Orchestrator Cookbook Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Installing and Configuring Orchestrator 2. Optimizing Orchestrator Configuration 3. Distributed Design 4. Programming Skills 5. Visual Programming 6. Advanced Programming 7. Interacting with Orchestrator 8. Better Workflows and Optimized Working 9. Essential Plugins 10. Built-in Plugins 11. Additional Plugins 12. Working with vSphere 13. Working with vRealize Automation

Chapter 13. Working with vRealize Automation

This chapter is dedicated to the interaction between Orchestrator and vRealize Automation (vRA). In this chapter, we will cover the following topics:

  • Working with the vRA-integrated Orchestrator

  • Automating a vRA instance in Orchestrator

  • Configuring an external Orchestrator in vRA

  • Adding Orchestrator as an Infrastructure endpoint

  • Adding an Orchestrator endpoint

  • Integrating Orchestrator workflows as XaaS Blueprints

  • Managing AD users with vRA

  • Using the Event Manager to start workflows

Introduction


Automation has changed since the arrival of Orchestrator. Before tools such as vCloud Director or vRA, Orchestrator was the main tool for automating vCenter resources. In fact you may remember VMware Life Cycle Manager (LCM) which was the first such product based on Orchestrator.

Tip

With version 6.2 of vCloud Automation Center (vCAC), the product has been renamed to vRealize Automation. However, you will find the name vCAC all across the API.

Now, vRA is the central cornerstone in the VMware automation effort. vRealize Orchestrator (vRO) is used by vRA to interact with and automate VMware and non-VMware products and infrastructure elements.

Throughout the various vRA interactions, the role of Orchestrator has changed substantially. Orchestrator started off as an extension to vCAC and became a central part of vRA. The following list only focuses on the changes that influence Orchestrator:

  • In vCAC 5.x, Orchestrator was only an extension of the IaaS life cycle. Orchestrator was tied...

Working with the vRA-integrated Orchestrator


In this recipe, we explore the vRA-integrated Orchestrator. We will have a closer look at what is integrated and how it is working.

Getting ready

You need Java installed to start the Orchestrator Client and access the vRA shell (root access).

How to do it...

I have split this recipe into several small independent sections.

Accessing the vRA-integrated Orchestrator Client

To start the Orchestrator Client, follow these steps:

  1. Open a web browser and enter the IP or FQDN of the vRA appliance.

  2. Click on the vRealize Orchestrator Client link.

  3. Enter [IP or FQDN of the vRA appliance]:8281 as Host name and administrator@vsphere.local as User name with the corresponding password and click on Login.

Starting the vRA-integrated Orchestrator Control Center

The Orchestrator Control Center is by default switched off to conserve resources since it is only needed during configuration and to install plugins. To switch it on, you need to login to the vRA and execute the following...

Automating a vRA instance in Orchestrator


Not only can vRA use Orchestrator to access vCenter or other plugins, but you can also automate your vRA instance using Orchestrator. In this recipe, we will show you how to do the initial steps.

Getting ready

Please make sure that you read the introduction to vRA at the beginning of this chapter. We need a functional and configured vRA. We also need the vRA plugin for Orchestrator installed.

The vRA plugin is integrated into Orchestrator from version 7.1 onward.

However, you should be aware that even the plugin (7.1 at the time of writing) still shows vCAC and vCACCafe in Control Center, and it shows up in the Library as vRealize Automation.

How to do it...

This recipe is split into Preparation and Example.

Preparation

To configure the vRA plugin, perform the following steps:

  1. Log in to the Orchestrator Client.

  2. Run the workflow Library | vRealize Automation | Configuration | Add a vRA host.

  3. Add a name for the vRA host.

  4. Enter the HTTPS URL of the vRA installation...

Configuring an external Orchestrator in vRA


vRA comes with an installed and configured Orchestrator. While VMware now recommends using the embedded vRO in production systems, this primarily applies to small-/medium-sized infrastructure deployments. In much larger enterprise deployments, it may be beneficial to use an external vRO cluster.

Another example is if you require a different vRO for a given tenant.

Getting ready

Please make sure you read the introduction to vRA at the beginning of this chapter. We need a functional and configured vRA.

How to do it...

This recipe has three parts. First, we will configure the Orchestrator, bind it to vRA, and then we will clean up the vRA appliance.

Tip

Changing between Orchestrators will result in losing all your endpoints that you have configured with Orchestrator.

Building and configuring an external Orchestrator

To attach an external Orchestrator, we first need an Orchestrator that we can connect to:

  1. Install the Orchestrator appliance (refer to the Deploying...

Adding Orchestrator as an infrastructure endpoint


This will add Orchestrator as an additional endpoint into the vRA infrastructure. This will allow you access to plugins that are not part of the endpoints we can configure in the Adding an Orchestrator endpoint recipe in this chapter.

Getting ready

You need an external or internal Orchestrator as well as a user account that has Administrator rights in Orchestrator.

How to do it...

We are now adding Orchestrator as a vRA Infrastructure endpoint:

  1. Log in to vRA with an Infrastructure Admin account.

  2. Go to Infrastructure | Endpoints | Endpoints.

  3. Click on New and select Orchestration | vRealize Orchestrator.

  4. Give the Orchestrator a name.

  5. The Address for the internal Orchestrator is https://[vra FQDN]/vco, and for an external Orchestrator it is https://[vROFQDN]/vco. As vRA uses a proxy, you don't have to specify the port number anymore.

  6. Create Credentials with a user who is a member of the vRO Administrator group.

  7. Add a new property by clicking on New. Enter...

Adding an Orchestrator endpoint


Before you can use any Orchestrator plugins in vRA, you need to define them as endpoints. In this recipe, we will show you how to do this. This is not how to add an Orchestrator as an Infrastructure endpoint (for this see the Adding Orchestrator as an Infrastructure Endpoint recipe in this chapter).

Getting ready

For this recipe, you will need a working and configured vRealize Automation installation. Please refer to the introduction to this chapter.

You can either use the vRA-integrated Orchestrator or an external Orchestrator.

In this example, we will add an Active Directory endpoint. Please note that, if you want to add users or change passwords, you will need to enable SSL for AD (refer to the recipe Working with Active Directory in Chapter 10, Built-in Plugins).

How to do it...

There are some plugins that can be added directly in vRA. See How it works... for more details:

  1. Log in to vRA as an Infrastructure admin.

  2. Navigate to Administration | Advanced Services...

Integrating Orchestrator workflows as XaaS Blueprints


We will now showcase how to integrate Orchestrator workflows in vRealize Automation. We will learn how to create a vRA Catalog item that will run a workflow when requested.

Getting ready

In order to use an Orchestrator workflow as a vRA Catalog item, you should have the following vRA items configured:

  • Entitlements

  • Services

  • Business groups

To configure these items, please refer to the link shown in the introduction to this chapter or take a look at the official VMware documentation for vRA.

We will use the example workflow 00.00 BasicWorkflow to add to the vRA catalog.

How to do it...

This recipe is divided into three parts.

Activating the XaaS tab

By default, the Xaas tab is not visible, so the first step is to make it appear:

  1. Log in to vRA as an Infrastructure admin.

  2. Navigate to Administration | Users & Groups | Custom Groups.

  3. Click on Finish.

  4. Give the group a name and then assign it the role of XaaS Architect.

  5. Click on Next and select a group or...

Managing AD users with vRA


In this recipe, we will explore the full spectrum of the Orchestrator/vRA integration. You will learn how to create custom resources and actions and how to integrate and use them.

Getting ready

In order to add an Orchestrator workflow as a vRA Catalog item, you should have the following vRA items configured:

  • Entitlements

  • Services

  • Business groups

To configure these items, please refer to the link shown in the introduction of this chapter or take a look at the official VMware documentation for vRA.

The Design tab must be activated as shown in the Integrating Orchestrator workflows as XaaS Blueprints recipe in this chapter.

You also have to add the AD endpoint as shown in the Adding an Orchestrator endpoint recipe in this chapter, and the AD endpoint needs to be configured with SSL for this recipe to work.

How to do it...

We have split this recipe into multiple sections. Work though them one after another.

Creating a custom resource

We will first need to create a custom resource...

Using the Event Manager to start workflows


With vRA7.1, Stubs are deprecated and will be soon gone. The Event Broker is the new way of interacting with the vRA life cycle.

Getting ready

We need a connection to vRA as an Infrastructure Admin.

We also need an Orchestrator client open and ready.

To fully try this recipe out, you will need a working Blueprint that deploys a VM.

How to do it...

This recipe is split into several sections. In this recipe, we will only activate the event subscription for the event when a VM is provisioned.

Create a workflow

We now need a workflow we can trigger when the VM is deployed. (You can also use the example workflow 13.03 EventBrokerTest):

  1. Go to the Orchestrator Client and create a new workflow.

  2. Add an input called payload of type Properties.

  3. Add a scriptable task with the following code:

          for each (key in payload.keys) { 
            System.log(key + " : " + payload.get(key)); 
          } 
          var lifecycleState = payload.get("lifecycleState"); 
...
lock icon The rest of the chapter is locked
arrow left Previous Chapter
You have been reading a chapter from
VMware vRealize Orchestrator Cookbook. - Second Edition
Published in: Nov 2016 Publisher: Packt ISBN-13: 9781786462787
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}