VMware vRealize Orchestrator Cookbook

Master the configuration, programming, and interaction of plugins with Orchestrator to efficiently automate your VMware infrastructure

VMware vRealize Orchestrator Cookbook

Daniel Langenhan

Master the configuration, programming, and interaction of plugins with Orchestrator to efficiently automate your VMware infrastructure
Mapt Subscription
FREE
$29.99/m after trial
eBook
$10.00
RRP $29.99
Save 66%
Print + eBook
$49.99
RRP $49.99
What do I get with a Mapt subscription?
  • Unlimited access to all Packt’s 6,000+ eBooks and Videos
  • 100+ new titles a month, learning paths, assessments & code files
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$10.00
$49.99
$29.99 p/m after trial
RRP $29.99
RRP $49.99
Subscription
eBook
Print + eBook
Start 14 Day Trial

Frequently bought together


VMware vRealize Orchestrator Cookbook Book Cover
VMware vRealize Orchestrator Cookbook
$ 29.99
$ 10.00
VMware vRealize Orchestrator Cookbook - Second Edition Book Cover
VMware vRealize Orchestrator Cookbook - Second Edition
$ 47.99
$ 10.00
Buy 2 for $20.00
Save $57.98
Add to Cart

Book Details

ISBN 139781784392246
Paperback382 pages

Book Description

Through this practical guide, you will gain an understanding of VMware vRealize Orchestrator and its role in the vSphere architecture and automation. You will learn about Orchestrator clusters as well as vRealize Automation integration. A full introduction to using the visual programming tools without needing any additional infrastructure is aimed at beginners with limited resources. This is followed by an extensive look at how to integrate the base plugins into your workflows, such as e-mail, AMQP, SNMP, and so on. We will also look at how to use the Orchestrator API to trigger workflows from other programs.

Through this book you will be able to get the most out of your Orchestrator installation, and develop complex workflows and create your own highly integrated automations of vCenter, vCloud, and vRealize environments.

 

 

Read an Extract from the book

Creating a Vcenter workflow

In this recipe, we will work through the process of creating a workflow. We will see how to add and use variables as well as run a workflow.

Getting ready

We just need a working Orchestrator, and you will need the rights to create new workflows and run them. We will work with the Orchestrator Client.

How to do it...

We will break up the recipe into several sections.

Creating a new workflow

  1. Open the Orchestrator Client and switch to the workflows.
  2. If you haven't made a new folder yet, right-click on the root of the tree and select Add Folder.
  3. Give the folder a name and click on OK.
  4. Right-click on the new folder and select New workflow.
  5. Give the workflow a name. The workflow will open in the edit mode.

Adding an attribute

  1. Click on General and then scroll down to Attributes.
  2. Click on . A new variable will be put under Attributes and named att0.
  3. Click on att0 and give the variable a new name, such as text.
  4. Click on String under the Type column to change the variable type, but for this example, we leave it as String.
  5. In the Value column, fill in some text, such as Test. Give it a description. A description isn't needed, but it's a best practice to document what this variable is used for.

Adding an input parameter

  1. Click on Inputs and then on .
  2. Add an input parameter named input by following the same procedure as in Adding an attribute.

Note that you cannot define a value here, as it is defined during runtime.

Add an output parameter

  1. Click on Outputs and then on .
  2. Add an output parameter named output by following the same procedure as in Adding an attribute.

Note that you cannot define a value here, as it is defined during the workflow execution.

Adding a scripting element

A scripting element allows us to use JavaScript in it and manipulate the variables we have defined earlier.

  1. Click on Schema.
  2. Drag Scriptable task between the start and end symbols.
  3. Hover the mouse on the scriptable task and then select the edit icon (the pencil icon).
  4. Click on In and then the bind icon (see the following screenshot).
  5. All in-parameters and attributes are displayed. Select the input variable as well as the text attribute you have created earlier.
  6. Click on OK and then OUT.
  7. Follow the same method as the previous one to bind the output parameter output to the script element.
  8. Click on Scripting. You will now see all the variables you have assigned to the scriptable task.
  9. By clicking on a variable, you can insert it into the script. Make the following script:output=input+text;
  10. Click on Close to close the scriptable task.
  11. Click on Save and Close.
  12. You are asked whether you would like to increase the version history. Click on Increase version. See the Version control recipe in this chapter for more information.
  13. Run the workflow by clicking on the RUN icon (the play button).
  14. Enter a text for the input variable and click on Submit.
  15. Check the result of the workflow by clicking on the workflow execution and then on Variables, as seen in the following screenshot:

How it works...

In this recipe, we have introduced some very basic working methods. Let's just discuss some more details we have glossed over.

Exiting a workflow

There are four buttons on the bottom of the edit workflow screen:

Button

Description

Cancel

Before exiting the edit mode, Orchestrator will display the Save and Close or Close anyway options. Close anyway will exit the workflow without saving any changes.

Revert

This reverts the workflow to the state when it was opened for edit.

Be careful that it doesn't ask you whether you are sure.

Save

This saves changes to the workflow without exiting.

Save and Close

This will save all changes to the workflow and exit the edit mode.

Validation

When you are exiting the edit mode, Orchestrator will validate the workflow. This means that Orchestrator checks whether all the variables are assigned, they are not used, and a script contains errors. It also checks whether elements, such as other workflows, actions, configuration items, and so on exist. You can run the validation at any stage by just clicking on Validate in the schema.

In the validation window, you will see each error or warning message (Title) and next to it, the element (Owner) that is the source of the problem; the Quick fix action link can be used to access the element and remedy the problem. You should always check the warning/error before using a quick fix action. For example, the quick fix action for an attribute that is not used in a workflow is Delete parameter, but maybe you have just forgotten to bind it as an input or output of one of the workflow elements, so first check before using the quick fix action. A typical example here is an attribute that is used for presentation purposes only.

Warnings can be ignored, whereas errors will result in workflows not being able to start. However, it's always best to resolve all issues.

Assigning a workflow variable

When you add an existing workflow, action, or workflow element to your schema, you will need to bind its input and output variables to your variables.

  1. In a workflow, hover the mouse over an element and then click on Edit (the pencil icon).
  2. Select IN and click on not set for any one of the variables.
  3. You now can either select an already-existing variable, or create a new one by clicking on Create parameter/attribute in workflow.
  4. You can choose whether you want to create an input (or output) parameter or an attribute. If you define an attribute, you can also assign it a value directly.

Re-run a workflow

You can rerun a workflow by either:

  • Right-clicking on the workflow and selecting Start last workflow run
  • Right-clicking on a workflow execution and selecting Run again

Also, you can run a workflow with other credentials by choosing Start workflow as.

 

Table of Contents

What You Will Learn

  • Install, configure, and optimize Orchestrator installations (Windows, Appliance as well as vRA integrated)
  • Explore all the visual programming elements without the need for additional infrastructure
  • Work with plugins such as SSH, mail, SQL, PowerShell, AD, SOAP, SNMP, AMQP, and REST
  • Discover how to create VMware automation
  • Get to grips with user management, synchronization, and packaging applications
  • Understand policies and resources
  • Work more efficiently with distributed Orchestrator environments

Authors

Table of Contents

Book Details

ISBN 139781784392246
Paperback382 pages
Read More

Read More Reviews

Recommended for You

VMware vRealize Orchestrator Cookbook - Second Edition Book Cover
VMware vRealize Orchestrator Cookbook - Second Edition
$ 47.99
$ 10.00
Linux Networking Cookbook Book Cover
Linux Networking Cookbook
$ 27.99
$ 10.00
Learning VMware NSX - Second Edition Book Cover
Learning VMware NSX - Second Edition
$ 31.99
$ 10.00
Hacking Vim: A Cookbook to get the Most out of the Latest Vim Editor Book Cover
Hacking Vim: A Cookbook to get the Most out of the Latest Vim Editor
$ 23.99
$ 10.00
Ansible Playbook Essentials Book Cover
Ansible Playbook Essentials
$ 23.99
$ 10.00
Learning Ansible 2 - Second Edition Book Cover
Learning Ansible 2 - Second Edition
$ 35.99
$ 10.00