Book Image

VMware vRealize Orchestrator Cookbook - Second Edition

By : Daniel Langenhan
Book Image

VMware vRealize Orchestrator Cookbook - Second Edition

By: Daniel Langenhan

Overview of this book

VMware vRealize Orchestrator is a powerful automation tool designed for system administrators and IT operations staff who are planning to streamline their tasks and are waiting to integrate the functions with third-party operations software. This book is an update to VMware vRealize Orchestrator Cookbook and is blend of numerous recipes on vRealize Orchestrator 7. This book starts with installing and configuring vRealize Orchestrator. We will demonstrate how to upgrade from previous versions to vRealize Orchestrator 7. You will be taught all about orchestrator plugins and how to use and develop various plugins that have been enhanced in Orchestrator 7. Throughout this book, you will explore the new features of Orchestrator 7, such as the introduction of the control center, along with its uses. You will also come to understand visual programming, how to integrate base plugins into workflows, and how to automate VMware. You will also get to know how to troubleshoot vRealize Orchestrator. By the end of this book, you will be able to get the most out of your Orchestrator installation, and will be able to develop complex workflows and create your own highly integrated automations of vRealize environments.
Table of Contents (19 chapters)
VMware vRealize Orchestrator Cookbook Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface

Preface

Several things have happened since the first edition of this book. The most important thing is that vRealize Orchestrator 7.1 (vRO) was released and changed a lot with the Control Center; I can see that the next thing would be Orchestrator being used more, last but not least, I released the vRealize Orchestrator Essentials book. It allowed me to remove a lot of beginner stuff from this book and have a greater focus on the more interesting stuff.

The release of vRealize Automation 7.1 (vRA) bought about a lot of changes too, as Orchestrator is now even more integrated into vRA than before.

Tip

If you're completely new to Orchestrator I would suggest that you start your journey with the vRealize Orchestrator Essentials book.

To do so go to http://bit.ly/1KVVara.

Changes in this edition

The following are the changes from the First edition:

  • We have restructured all chapters and recipes

  • We have focused on the new Control Center

  • We now have complete chapter on Clusters, distributed design, and loadbalancing

  • We have reworked on all recipes to fit vRO7.1 and vRA7.1

  • We focus on REST and JSON

  • We have included an chapter on how to use PowerShell, REST, PHP and other methods to interact with Orchestrator workflows

  • We have included the NSX, Horizon, Replication, SRM, and VROPS plugins

  • We will introduce you to the new vAPI

  • We have a complete chapter on vRA7.1 integration including Event Broker

A short history of Orchestrator

Orchestrator is VMware's central effort in Automation and Orchestrator.

Orchestrator started its life as Virtual Service Orchestrator (VS-O) with a small company named Dunes in Lausanne, Switzerland. In 2007, VMware bought Dunes, renaming the product as VMware Orchestrator (VMO), and then introduced Orchestrator into vSphere 4.0 as vCenter Orchestrator (vCO). Orchestrator's first stage debut was with VMware Lifecycle Manager, which used Orchestrator to automate the virtual infrastructure life cycle. Orchestrator itself never really received the spotlight until the recent launch of VMware vCloud Automation Center (vCAC). In the beginning, vCAC used Orchestrator only as an extension, but with version 6.1, it became the central tool for automation.

Version 7 replaced the old configuration elements and came up with a fresh and wonderful way to configure things the Control Center. Also, lots of features were reworked on and new ones were made more accessible. The most important step was to reduce the number of Orchestrator installations to two: the Orchestrator appliance and the vRA integrated Orchestrator version.

Note

In October 2014, VMware renamed vCenter Orchestrator (vCO) to vRealize Orchestrator (vRO) to align with their new strategies. vRO is not a new product; it's is just the new name of vCO.

With version 6.2 of vCAC, the product has been renamed to vRealize Automation. We will just refer to it as Orchestrator.

Best approaches to reading this book

As I already said, if you’re a total beginner with Orchestrator, work through the vRealize Orchestrator Essentials book first, which is more like a classroom that starts and develops your starting skills. Also refer to the upgrade link of the vRealize Orchestrator Essentials book (http://langenhan.info/vRO-Essential_update.pdf) for vRO7.

If you plan to use vRealize Automation, it's is best to start with Chapter 13, Working with vRealize Automation , before diving deeper. vRealize Automation just leverages Orchestrator workflows and plugins. Check out Chapter 1, Installing and Configuring Orchestrator .

If you plan to automate your vSphere infrastructure, you can dive straight into Chapter 13, Installing and Configuring Orchestrator , and then check out Chapter 12, Working with vSphere . Then I would start looking at the different plugins.

If you would like to improve your existing skills, check out Chapter 4, Programming Skills , to Chapter 8, Better Workflows and optimized working

What this book covers

Chapter 1, Installing and Configuring Orchestrator , shows you how to install, configure, and access Orchestrator.

Chapter 2, Optimizing Orchestrator Configuration , dives into more specialized tasks such as tuning the Orchestrator appliance, changing certificates and dealing with logs.

Chapter 3, Distributed Design,  focuses on Clusters, distributed Orchestrator setups and loadbalancing.

Chapter 4, Programming Skills , contains all the little secrets that you need to know to make Orchestrator programming easier.

Chapter 5, Visual Programming , introduces and dives into the visual programming of Orchestrator.

Chapter 6, Advanced Programming , dives into more advanced operations such complex Java objects, JSON and other items that will add value to your workflows.

Chapter 7, Interacting with Orchestrator , focuses on how to interact with Orchestrator. We will use PowerShell, REST, and PHP to interact with workflows.

Chapter 8, Better Workflows and Optimized Working , dives into resources, configurations, packages, and more for optimizing your workflows.

Chapter 9, Essential Plugins , deals with the most plugins used, such as e-mail, files, SSH and REST.

Chapter 10, Built-in Plugins , dives into all the other plugins that are preinstalled in Orchestrator.

Chapter 11, Additional Plugins , takes a look at NSX, Horizon, Replication, SRM and vROPS plugins.

Chapter 12, Working with vSphere , is a full chapter dedicated to all things vSphere (vCenter).

Chapter 13, Working with vRealize Automation , dives into how to use Orchestrator in vRealize Automation.

What you need for this book

This book covers a lot of ground and discusses the interactions with a lot of other infrastructure services such as Active Directory (AD), e-mail, the vSphere infrastructure, and vRealize Automation.

You can use this book with Orchestrator versions 5.0, 5.1, and 5.5 and with the renamed version, vRealize Orchestrator (5.5.2.x, 6.x, 7.x, and newer).

The requirements differ from chapter to chapter. For Chapter 1, Installing and Configuring Orchestrator , and Chapter 2, Optimizing Orchestrator Configuration , you just require some space on your virtual infrastructure to deploy Orchestrator and maybe a working vCenter. Chapter 3, Distributed Design , requires more space and a loadbalancer or NSX. For Chapter 7, Interacting with Orchestrator , you may need a web server. Chapter 9, Essential Plugins , requires SSH, e-mail and a REST host; however, in the examples we will use easily accessible methods. Chapter 10, Build-in Plugins , is about SQL, PowerShell (Windows host), Active Directory SNMP, and AMQP, so there is some requirement for these services; again, I will provide some easy ways to handle this. Chapter 11, Additional Plugins , deals with NSX, Horizon, Replication, SRM, and vROPS. I will provide links that will help you set them up, but you will need to provide the infrastructure. Chapter 12, Working with vSphere , is about vCenter, and you should have that already. The last Chapter 13, Working with vRealize Automation , is about vRealize Automation. You will need to install and configure it in order to use it. This is much easier and straightforward in vRA7 than in all the other versions.

Some readers might not have all the resources or infrastructure to rebuild or play with some of the recipes; however, I sometimes have been in the same boat. I used the following little mini lab.

My mini lab is a Shuttle XPC-SZ170R8 with an i7 4 GHz and 64 GB using 1 TB SSD and 3 TB HHD.

My base VMs in my domain Mylab.local look like this:

Name

Content

Virtual hardware

Central

AD, DNS, DHCP, MS-SQL 2k14R2, HMail, NFS, SMB, CA, NTP, RabbitMQ

Windows 2 K12R2, 2 vCPU, 8 GB, 40 GB

vCenter

vCenter Appliance

Appliance, 2 vCPU, 8 GB, ~15 GB

vRO

vRealize Orchestrator Appliance

Appliance, 2 vCPU, 6 GB, 12 GB

vRA

vRA Appliance

Appliance, 4 vCPU, 18 GB, 65 GB

IaaS

IaaS server for vRA

Windows 2 K12R2, 2 vCPU, 8GB, 40 GB

NSX

NSX Manager

Appliance, 2 vCPU,16 GB, 60 GB

vROPS

vROPS Appliance

Appliance, 4 vCPU, 16 GB, 270 GB

vLI

vRealize Loginsight

Appliance, 4 vCPU, 8 GB, 530 GB

For the vSphere Replication, SRM, and Horizon recipes I used extra setups.

Tip

The trick is to choose the minimum number of VMs to power on at the same time.

Who this book is for

This book addresses intermediate and advanced VMware enthusiast. You should have some know-how about Orchestrator. An absolute beginner should take a look at the vRealize Orchestrator Essentials book.

Example workflows

All workflows, actions, and so on that you can find in this book are also available for download. The example package that contains more than 140 workflows and actions is available for download. Simply follow these instructions:

Navigate to https://www.packtpub.com/virtualization-and-cloud/vmware-vrealize-orchestrator-cookbook-second-edition

Click on Code Files and download the example package.

Follow the recipe, Working with packages, in Chapter 4, Programming Skills , to upload the example package into your Orchestrator.

All example workflows can be found in the Orchestrator Cookbook 2ndEdition folder and the actions can be found in the com.packtpub.Orchestrator-Cookbook2ndEditor modules.

Tip

I have also packed some extras in. Check out the workflow folder Daniels Toolsbox.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: All example workflows can be found in the folder Orchestrator Cookbook 2ndEdition.

A block of code is set as follows:

var current = new Date(); 
return current

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

configurationElement.setAttributeWithKey(Key, Value);

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "After selecting Create project, you'll be brought to the Editor Window"

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.

To send us general feedback, simply e-mail [email protected], and mention the book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code 

You can download the example code files for this book from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

You can download the code files by following these steps:

  1. Log in or register to our website using your e-mail address and password.

  2. Hover the mouse pointer on the SUPPORT tab at the top.

  3. Click on Code Downloads & Errata.

  4. Enter the name of the book in the Search box.

  5. Select the book for which you're looking to download the code files.

  6. Choose from the drop-down menu where you purchased this book from.

  7. Click on Code Download.

You can also download the code files by clicking on the Code Files button on the book's webpage at the Packt Publishing website. This page can be accessed by entering the book's name in the Search box. Please note that you need to be logged in to your Packt account.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

  • WinRAR / 7-Zip for Windows

  • Zipeg / iZip / UnRarX for Mac

  • 7-Zip / PeaZip for Linux

The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/VMware-vRealize-Orchestrator-Cookbook-Second-Edition. We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Downloading the color images of this book 

We also provide you with a PDF file that has color images of the screenshots/diagrams used in this book. The color images will help you better understand the changes in the output. You can download this file from https://www.packtpub.com/sites/default/files/downloads/VMwarevRealizeOrchestratorCookbookSecondEdition_ColorImages.pdf.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at [email protected] with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at [email protected], and we will do our best to address the problem.