Horizon integration

In this recipe, we will look into integrating VMware Horizon View into Orchestrator.

Getting ready

You need the Horizon 7 plugin and you need to load it into Orchestrator. The plugin can be found at https://my.vmware.com/group/vmware/details?productId=577&downloadGroup=HVRO-130-GA .

There is a known issue (plugin version 1.3 at the time of writing). Follow kb.vmware.com/kb/2144316 in order to switch on TLSv1.1 and 1.2 for Orchestrator.

Tip

Always fully read the release notes of any plugin or update. There are five known issues that you need to be aware of: https://pubs.vmware.com/Release_Notes/en/hvro-plugin/horizon-vro-plugin-13-release-notes.html.

You also need the Horizon infrastructure. The minimum would be a Connection Server with one pool and one VM.

How to do it...

The following shows the basic setup, an example, and access point automation.

Basic setup

We will now connect Orchestrator to Horizon. This basic setup will allow a chosen user to do everything:

  1. Start the workflow Library | Horizon | Configuration | View Pod Configuration | Add View Pod In Configuration.
  2. Give the POD an alias.
  3. Enter the FQDN of the connection server. The IP doesn't work most of the times.
  4. Enter a Horizon user with administrator rights.
  5. Click on Submit and wait until the workflow has finished.

    Basic setup

  6. Start the workflow Library | Horizon | Configuration | Delegated Admin Configuration | Add delegated Administrator Configuration.
  7. If the Horizon View Pod isn't a drop-down menu, the last workflow hasn't worked, even if it has showed no error. Check kb.vmware.com/kb/2144316 to fix this issue.
  8. Choose Yes on all questions in order to make the user you choose in step 9 an admin who is able to perform all the actions on all pools.
  9. Choose a user or group that is allowed to administer Horizon through Orchestrator:

    Basic setup

  10. Click on Submit and wait until the workflow has finished.
  11. Run the workflow Library | Horizon | Configuration | Manage Self Service Pool Configuration.
  12. Set all to Yes to make sure that the user from step 9 is allowed everything.

    Basic setup

  13. Click on Submit and wait until the workflow has finished.

Examples

Let's run an example by adding a user to a pool.

  1. Run the workflow Library | Horizon | Configuration | Workflow delegation | Add User(s) to Desktop Pool.
  2. Select the delegated administrator you defined earlier.
  3. Select the pool you would like to add a user to.
  4. Enter a user (or users) to be added.

    Examples

  5. Click on Submit and wait until the workflow has finished.
  6. Check your pool in Horizon.

    Examples

Access point configuration

Access points can be configured during deployment but also via REST. So let's do that. Please have a look at the following recipes: Working with REST in Chapter 9, Essential Plugins and Working with JSON in Chapter 6Advanced Programming and Accessing the Control Center via REST plugin in Chapter 7, Interacting with Orchestrator, before starting.

The swagger UI URL for the access point configuration is as follows:

https://[FQDN accesspoint]:9443/swagger-ui/index.html

  1. Add the Access point as a REST host. The URL is https://access1.mylab.local:9443/rest/ with basic authentication using the admin user you defined during deployment.
  2. Add the following REST operation with Content-Type=application/json and create workflows for it: PUT /v1/config/certs/ssl.
  3. Update the workflows with the header:
          request.setHeader("Content-Type", "application/json"); 
    
  4. Edit the PUT /v1/config/certs/ssl workflow.
  5. Move content to attributes and add privateKey and chain as the string input-parameter.
  6. Add a scriptable task with the following code:
          var propList=new Properties(); 
          propList.put("privateKeyPem",privateKey); 
          propList.put("certChainPem",chain); 
          var jsonObj = new Object(); 
          for each (key in propList.keys){ 
             jsonObj[key]=propList.get(key); 
          } 
          content= JSON.stringify(jsonObj); 
    
  7. This will now enable you to directly put a new SSL certificated onto the access point.

You could now create a workflow that updates the configuration just by using these operations:

  • GET /v1/config/edgeservice
  • PUT /v1/config/edgeservice/view

How it works...

The Horizon plugin is written to be used with the vSphere Web Client or with vRealize Orchestrator. If you explore the workflows that come with the plugin, you will see that there are vCAC (for vRA) and vSphere Web Client specific versions of all the basic workflows shown in workflow delegation.

From here it's just a small step to build the plugin into vRealize Automation or the vSphere Web Client.

Once you run the configuration workflows, the configuration is stored as an Orchestrator configuration (also see the recipe Working with configurations in Chapter 8, Better Workflows and Optimized Working) in a folder called View.

The Horizon plugin also comes with a lot of Orchestrator resource elements (see Working with resources in Chapter 8, Better Workflows and Optimized Working), which contain Icons as well as configured localizations (see recipe Language packs (localization) in Chapter 8, Better Workflows and Optimized Working) for the vSphere Web Client and vCAC (vRA) workflows.

There's more...

Let's look at the integration of the Horizon Client into vSphere and vRealize Automation.

Integration into vSphere Web Client

The Horizon plugin comes with preconfigured workflows aimed at being used in the vSphere Web Client. You find them in the folder Library | Horizon | Workflows | vSphere Web Client.

Integration into vSphere Web Client

You can use them directly in the vSphere Web Client. However, you can also customize the workflows; for example, you could restrict the workflows to only one view pool (or a couple of pools). To do so, follow these instructions:

  1. Take one of the workflows, such as Desktop Allocation for Users, and create a copy of it.
  2. Edit the copy.
  3. Move the input-parameter poolID as an attribute by right-clicking on the poolID and selecting Move as attribute.
  4. Click on General and then put in the name of the pool. The value is case-sensitive.
  5. Do the same with the PodAlias.
  6. In the Presentation section, click on Presentation (the top element) and then on General, and enter the following text:
          This will add a user to the pool: <b>${poolId}</b> in the Pod: 
          <b>${podAlias}</b> 
    
  7. Running the workflow now will only ask for the user.

An even better method is using configurations (also see the recipe Working with configurations in Chapter 8, Better Workflows and Optimized Working) to manage the settings centrally.

Also, see the example workflow: 11.03 Desktop Allocation for Users.

VRA integration

The Horizon plugin comes with a lot of preconfigured workflows that are ready to be XaaS blueprints and actions.

The process to create a vRA Horizon Integration is a pretty lengthy one and will not fit into this book. However, the Horizon plugin comes with a not so bad PDF that describes the process. Go to the plugin download page or search for using-horizon-vro-plugin-13-guide.pdf.

Some things that are not discussed in this PDF but are essential are as follows:

  • Configure a new Tenant with AD connection and external Orchestrator using basic authentication
  • Install and configure an Orchestrator with vSphere authentication that uses the same AD as Horizon
  • Your Horizon should be connected to the same AD as the Tenant and the Orchestrator (using vSphere Authentication)
  • The users/groups you use in vRA should also have permissions in Horizon
  • The vRA VDI admins should also be delegated admins in the Horizon plugin

The Horizon plugin also contains a collection of icons (Configuration, Library | Horizon | Icon). You can export these to a local disk and then import them into vRA when you import the workflow or action.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset