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

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"); 
    ...