You are on page 1of 289

HANDS-ON LABS MANUAL - 2022

HOL-2201-02-CMP

HOL-2201-02-CMP
Getting Started with
vRealize Automation
HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Table of contents
Lab Overview - HOL-2201-02-CMP Getting Started with vRealize Automation 4

Lab Guidance ...................................................................................4

Module 1 - vRealize Automation Self Service Portal (45 minutes) 7

Introduction......................................................................................7

Introducing the Self Service Catalog .................................................. 9

Explore deployments ...................................................................... 12

Conclusion...................................................................................... 19

Module 2 - Configuring Infrastructure in vRealize Automation (45 minutes) 21

Introduction.................................................................................... 21

Log in to vRealize Automation as holadmin....................................... 22

Reviewing Cloud Accounts, Cloud Zones, and Projects .....................24

Understand Mappings and Profiles.................................................. 40

Conclusion......................................................................................59

Module 3 - Creating and working with Cloud templates (60 minutes) 61

Introduction.................................................................................... 61

Logging in to vRealize Automation ................................................... 61

Creating Your First Cloud Template..................................................63

Cloud Template Iteration .................................................................82

Conclusion......................................................................................94

Module 4 - Multi Cloud and Public Cloud templates (45 minutes) 96

Introduction....................................................................................96

Logging in to vRealize Automation ...................................................96

Launch the Cloud Assembly Service .................................................98


Creating a Cloud-Agnostic Cloud Template ......................................98

Using Public Cloud Objects in Cloud Assembly Cloud Templates ..... 109

Conclusion......................................................................................117

Module 5 - Extensibility Using vRealize Orchestrator and ABX (45 minutes) 118

Introduction................................................................................... 118

Log in to vRealize Automation as holadmin...................................... 118

Custom Day 2 Action utilizing a vRealize Orchestrator Workflow ...... 120

ABX Action Extensibility .................................................................136

Conclusion.................................................................................... 160

Module 6 - Policy-Based Lifecycle Management and Governance (60

HANDS-ON LABS MANUAL | 2


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

minutes) 162

Introduction...................................................................................162

Log in to vRealize Automation as holadmin......................................162

Share Cloud Templates Between Multiple Projects ...........................164

Configuring Policies in Service Broker ............................................. 174

Custom Forms in Service Broker ................................................... 200

Consuming Custom Policies in vRealize Automation.........................218

Conclusion.................................................................................... 227

Module 7 - Introduction to vRealize Automation SaltStack Config (45

minutes) 229

Introduction.................................................................................. 229

vRealize Automation SaltStack Config Overview.............................. 229

Sign in to vRealize Automation SaltStack Config.............................. 232

Overview of vRealize Automation SaltStack Config UI...................... 237

vRealize Automation SaltStack Config in Action............................... 243

Conclusion....................................................................................250

Module 8 - Introducing vRealize Code Stream - DevOps Solutions (45

minutes) 252

Introduction.................................................................................. 252

Sign in to vRealize Code Stream..................................................... 252

Pipelines with vRealize Code Stream .............................................. 255

Conclusion....................................................................................280

Appendix 282

Hands-on Labs Interface ............................................................... 282

HANDS-ON LABS MANUAL | 3


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Lab Overview - HOL-2201-02-CMP Getting Started with vRealize Automation

Lab Guidance [2]

Note: It may take more than 90 minutes to complete this lab. You may only finish 2-3 of the modules during your time. However, you
may take this lab as many times as you want. The modules are independent of each other so you can start at the beginning of any
module and proceed from there. Use the Table of Contents to access any module in the lab. The Table of Contents can be accessed in
the upper right-hand corner of the Lab Manual.

In this lab we will introduce you to vRealize Automation 8.4, by providing you with an understanding of the terminology, configuration
and key features and use cases of the product in order for you to get started with vRealize Automation 8.4

Lab Module List:

•Module
Module 1 - vRealize Automation Self Service Portal (45 minutes) - Basic - In this module we will explore the vRealize

Automation Self Service portal. Here we will walk through a Catalog Request, demonstrating the approval process and

investigate a deployment.

•Module
Module 2 - Configuring Infrastructure in vRealize Automation (45 minutes) - Basic - This module will introduce us to the

concepts of Cloud Accounts, Cloud Zones, Projects, Mappings and Profiles. Here we will demonstrate how and where these

items are configured.

•Module
Module 3 - Creating and Working with Cloud Templates (60 minutes) - Basic - In this module we will explore the creation and

deployment of a simple Cloud Template.

•Module
Module 4 - Multi Cloud and Public Cloud Templates (45 minutes) - Basic - In this module we will demonstrate vRealize

Automation's ability to deploy to Any Cloud including the ability to deploy to a native cloud service.

•Module
Module 5 - Extensibility Using vRealize Orchestrator and ABX (45 minutes) - Basic - In this module we explore the power of

Extensibility using vRealize Orchestrator and ABX.

•Module
Module 6 - Policy-Based Lifecycle Management and Governance (60 minutes) - Basic - In this module we walk through how

to configure governance policies such as leases, approvals, and what day 2 actions a user can invoke. We will also explore

how to use custom forms to modify the appearance of deployment inputs for users.

•Module
Module 7 - Introduction to vRealize Automation SaltStack Config (45 minutes) - Basic - In this module we will introduce

vRealize Automation SaltStack Config to provide configuration management of a deployment.

•Module
Module 8 - Introducing vRealize Code Stream - DevOps Solutions (45 minutes) - Basic - In this module we will introduce

vRealize Code Stream. We will explore how it can be used to orchestrate the DevOps release processes and continuous

application delivery. Applying the same concepts to the Software-Defined Data Center to move infrastructure components

between environments.

Lab Captains:

•Gavin Lees, Lead Solutions Engineer, UK

HANDS-ON LABS MANUAL | 4


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

This lab manual can be downloaded from the Hands-on Labs document site found here:

http://docs.hol.vmware.com

This lab may be available in other languages. To set your language preference and view a localized manual deployed with your lab,
utilize this document to guide you through the process:

http://docs.hol.vmware.com/announcements/nee-default-language.pdf

First time using Hands-on Labs? [3]

Welcome! If this is your first time taking a lab navigate to the Appendix in the Table of Contents to review the interface and features
before proceeding.

For returning users, feel free to start your lab by clicking next in the manual.

HANDS-ON LABS MANUAL | 5


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

You are ready....is your lab? [4]

Please verify that your lab has finished all the startup routines and is ready for you to start. If you see anything other than "Ready",
please wait a few minutes. If after 5 minutes your lab has not changed to "Ready", please ask for assistance.

HANDS-ON LABS MANUAL | 6


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Module 1 - vRealize Automation Self Service Portal (45 minutes)

Introduction [6]

The vRealize Automation Service Broker provides a single interface where catalog items can be requested and managed.

In this module we will explore the following capabilities:

•Introduction to vRealize Automation Service Broker

•Approval workflow of a deployment

•Exploring deployments

vRealize Automation Service Broker [7]

The vRealize Automation Service Broker provides a single point where we can request and manage catalog items. We use vRealize
Automation Service Broker to deploy Cloud Templates to cloud regions or datastores associated with projects.

HANDS-ON LABS MANUAL | 7


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

As a cloud administrator, you create catalog items by importing released vRealize Automation Cloud Assembly Cloud Templates and
Amazon Web Services Cloud Formation templates that your users can deploy to your cloud vendor regions or datastores.

As a user, we can request and monitor the provisioning process. After deployment, we manage the deployed catalog items throughout
the deployment lifecycle.

All content was published for our Service broker user (HOLUser) by the Cloud Administrator. In the next lesson, we will explore vRealize
Service Broker as a user to explore the Service Catalog.

Learn More [8]

To learn more, visit What is vRealize Automation Service Broker.

HANDS-ON LABS MANUAL | 8


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Introducing the Self Service Catalog [9]

In this lesson, we will use the Service Broker from a user's perspective to request a service from the Catalog

Launch Chrome [10]

1. Click on the Chrome icon from your desktop bar

Launch vRealize Automation [11]

From within the Chrome web browser:

1. Click vRealize Automation from the bookmarks bar

HANDS-ON LABS MANUAL | 9


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Log in to vRealize Automation [12]

At the Workspace ONE login screen:

1. Enter holuser into the username field. IMPORTANT: The username will autofill with the holadmin account. You must change it

to holuser for this lesson.

2.Enter VMware1! into the password field.

3.Click Sign In

HANDS-ON LABS MANUAL | 10


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Launch the Service Broker Service [13]

After logging into vRealize Automation we arrive at the Cloud Services Console
Console, under My Services you will find a list of services that this
user has been entitled to.

1. Click the Service Broker service.

HANDS-ON LABS MANUAL | 11


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Review the catalog [14]

Lets first review the Catalog interface before moving on to requesting a service;

1. Click Catalog to ensure that you are looking at the Catalog view, note the additional menu items; Deployment and Approvals.

We will take a look at these later in this module.

2.The My Resources Usage provides information on current resources utilised by this user

3.Available Catalog Items are displayed as tiles, note the details provided on each tile

4.Catalog items can be sorted by utilising the Sort: drop down menu

5.The Search box provides the ability to search catalog items by text. Feel free to type some text to see how the tiles change.
For example, type "machine" in the Search box and hit enter to see all catalog items with the word machine included

6.Click the Filter icon to open the filtering options panel

Review the Filters available in the panel on the left (not shown in the above image). Click through the filters to view how the tiles change

Explore deployments [15]

In this lesson, we will explore a deployment in Service Broker from a user's perspective. We will review the detailed information
available to the user from directly within the vRealize Automation interface.

HANDS-ON LABS MANUAL | 12


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Review Deployments [16]

Take note of the details available from the Deployments interface :

1. Click the Deployments tab

2.Click the Arrow to expand hol-ubuntu. Note that the resources within the deployment are shown - in this case one virtual

machine and one vSphere network.

3.Click the 3 dots next to the hol-ubuntu deployment, here you can view the list of day 2 actions available for a deployment

◦Change Lease - allows you to change the lease duration for the deployment

◦Change Owner - allows you to change ownership of the deployment

◦Delete - will delete the deployment

◦Edit Tags - allows the Tags assigned to the deployment to be modified

◦Power Off - will power off the deployment

HANDS-ON LABS MANUAL | 13


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Review Resources [17]

vRealize Automation allows us to view and manage our Deployments either by Deployment name or by the Resources which have been
deployed.

1. In the left pane select All Resources

2.By default all of the resource types are shown in the resource list. We can use the RESOURCE TYPE drop-down menu to

narrow the list down to a specific set of resource types. Review the resource types available to select or deselect.

3.Click on the filter icon to view what filters are available

HANDS-ON LABS MANUAL | 14


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Review Filtering Resource Types [18]

1. Use the arrows to expand each Filter Category. We can filter resources based on the Project, Cloud Type or Cloud Account

they belong to

2.Finally we can use the search bar to search for a particular resource

3.Click << to close the Filter pane

HANDS-ON LABS MANUAL | 15


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Review the Resource Day 2 Actions [19]

1. Click the 3 dots next to the ubuntu-0003 resource, Here you will notice a list of Day 2 actions that we can perform against the

machine. We can manage the available options utilizing Policies. Note that the menu actions are different from those we saw

earlier for the deployment.

2.Click Deployments to return to the deployments view

HANDS-ON LABS MANUAL | 16


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Open the hol-ubuntu Deployment [20]

1. Click on the hol-ubuntu deployment to view the deployment details

Review the details of deployment [21]

HANDS-ON LABS MANUAL | 17


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

1. Click on the Ubuntu node in the topology canvas to see information about that virtual machine.

2.On the right, expand the General section to see details such as resource name, and IP address.

3.Expand the Storage and Network sections to see those additional details.

Review the Deployment History [22]

1. Click on the History tab

2.In the details section, all the tasks that were executed for the deployment are listed including Timestamp and Status for each

task.

HANDS-ON LABS MANUAL | 18


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Monitoring Performance [23]

For health and perfomance status, vRealize Automation needs to be integrated with vRealize Operations.

1. Click the Monitor tab.

2.In the details section, you can scroll up and down to see performance metrics for CPU, Memory, Network and Storage.

3.You can also choose the duration at which you want the performance metrics to be displayed.

4.Click CLOSE to exit the deployment details view.

Wrapping up [24]

In this lesson we walked through the details available within a deployment. We covered the deployment topology and the health and
performance status that are available for our user.

Conclusion [25]

In this module you learned how to;

•Log into the Service Broker and Request a Catalog Item.

•You were then able to log in as an administrator and view the Approval Request before declining that Request

•Find details about a deployment, including its resources and infrastructure

HANDS-ON LABS MANUAL | 19


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

•Monitor the performance of the deployment over time

You've finished the module [26]

Congratulations on completing the lab module.

To learn more, visit What is vRealize Automation Service Broker

From here you can:

1. Click to advance to the next page and continue with the next lab module

2.Open the TABLE OF CONTENTS to jump to any module or lesson in this lab manual

3.Click on the END button if you are done with the lab for now and want to exit

HANDS-ON LABS MANUAL | 20


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Module 2 - Configuring Infrastructure in vRealize Automation (45 minutes)

Introduction [28]

vRealize Automation 8.4 includes four primary components:

•Cloud
Cloud Assembly
Assembly, the blueprinting engine for vRealize Automation

•Service
Service Broker
Broker, the catalog for consumption of vRealize Automation and other resources

•Code
Code Stream
Stream, the pipeline and release orchestration engine

•Orchestrator
Orchestrator, the workflow engine of vRealize Automation

While each component of vRealize Automation can be used individually, to get the most out of a deployment, proper configuration of
Cloud Assembly resources is required. In this module, we will explore configuration of Cloud Assembly resources as a cloud
administrator.

Configuring Cloud Assembly [29]

Cloud Assembly consists of several resources, including Cloud Accounts and Zones, Image and Flavor Mappings, Network and Storage
Profiles. Configuration of these resources allows cloud template designers to consume them. Proper configuration allows cloud
templates to use these resources in a cloud agnostic manner - meaning that the same cloud template can be used across multiple
clouds without the need to modify them for each specific environment.

HANDS-ON LABS MANUAL | 21


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Log in to vRealize Automation as holadmin [30]

In this lesson we will start by logging into vRealize Automation.

Launch vRealize Automation [31]

From within the Chrome web browser:

1. Click vRealize Automation from the bookmarks bar.

HANDS-ON LABS MANUAL | 22


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Log in to vRealize Automation [32]

At the Workspace ONE login screen:

1. Enter holadmin into the username field.

2.Enter VMware1! into the password field.

3.Click Sign In
In.

HANDS-ON LABS MANUAL | 23


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Reviewing Cloud Accounts, Cloud Zones, and Projects [33]

We will review the configuration in Cloud Assembly. We will take a look at Cloud Accounts, Cloud Zones and Projects.

Cloud accounts are the configured permissions that vRealize Automation Cloud Assembly uses to collect data from the regions or data
centers, and to deploy cloud templates to those regions.

The collected data includes the regions that are later associated with cloud zones.

When cloud zones, mappings, and profiles are created you select the cloud account to which they are associated.

As a cloud administrator, cloud accounts are created for the projects in which team members work. Resource information such as
network and security, compute, storage, and tags content is data-collected from your cloud accounts.

Launch the Cloud Assembly Service [34]

From within the Cloud Services Console


Console, under My Services
Services:

1. Click the Cloud Assembly service.

HANDS-ON LABS MANUAL | 24


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Navigate to Infrastructure Tab [35]

1. Click the Infrastructure tab

2.Use the Scroll bar to navigate to the bottom of the list to find Cloud Accounts

3.Select Cloud Accounts

Cloud Accounts specify the configured targets for provisioning of Cloud Assembly resources. Here you will see that the Lab already has
Cloud Accounts set up for AWS, Azure, NSX and vSphere

4.Click OPEN on the AWS Cloud tile to review the configuration

HANDS-ON LABS MANUAL | 25


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Review the AWS Cloud Account [36]

NOTE: There is currently an issue with the configured AWS account so you will see an error on this page. The error is being addressed
and you can proceed with the lesson.

HANDS-ON LABS MANUAL | 26


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Here we can see the configuration details for the AWS Cloud Account

1. Under Status we can see that the Status of the Cloud Account connection is working

2.The name is a name we give to identify this cloud account

3.AWS Cloud Credentials is where we provide the credentials to connect to our Cloud Instance

4.Under Configuration the US-West-01 region was selected to allow users of this Cloud account to deploy to this region

5.Scroll to the bottom of the page and click CANCEL (not shown)

Open the Private Cloud Cloud Account [37]

1. Click OPEN on the Private Cloud Cloud Account

HANDS-ON LABS MANUAL | 27


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Review the vSphere Cloud Account Configuration [38]

HANDS-ON LABS MANUAL | 28


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

The Cloud Account named Private Cloud in this Lab is connected to a vSphere environment.

1. Under Status we can see that the status of the connection is good. Notice that there is an additional check listed for

Kubernetes deployment. vRealize Automation is capable of deploying to and managing Kubernetes on vSphere

2.The name here is the name we assign to this Cloud Account

3.For vSphere the Cloud Account credentials need to connect to a vCenter server

4.RegionA01
RegionA01 is the Data Center that vRealize Automation is allowed to provision to with this Cloud Account. If the vCenter was

managing more than one Data Centre then it would appear in the list and be available to select.

5.NSX Manager provides the details of the NSX Manager Cloud account to allow NSX networking to be deployed.

6.vROPs Cloud account enables integration with vROPs to provide additional information about deployments such as costs and

resource utilisation

7. Scroll to the bottom of the page and click CANCEL


CANCEL(not shown)

Cloud Accounts [39]

1. Click + ADD CLOUD ACCOUNT

HANDS-ON LABS MANUAL | 29


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Review Cloud Accounts [40]

Here we can view the types of Cloud Accounts that can be created. vRealize Automation has support for Public Clouds; Amazon Web
Services, Google Cloud Platform, and Microsoft Azure. Cloud Accounts can also be created to allow interaction with NSX-T, NSX-V,
vCenter, and VMware Cloud Foundation in order to use workload domains as well as VMware Cloud on AWS.

HANDS-ON LABS MANUAL | 30


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

View Cloud Zones [41]

1. Use the scrollbar to scroll up to the top of the left menu

2.Click on Cloud Zones

3.Click OPEN to open the existing RegionA01 cloud zone

HANDS-ON LABS MANUAL | 31


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Review RegionA01 Cloud Zone Summary Tab [42]

HANDS-ON LABS MANUAL | 32


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

1. Click on the Summary tab

2.Click on the Placement policy field to view the Placement Policy options, do not change the setting from SPREAD

Placement Policy determines how vRealize Automation chooses to deploy workloads. Below provides a definition for each available
setting;

•DEFAULT
DEFAULT - Places compute resources on random hosts.

•BINPACK
BINPACK - Will place computes on the most loaded host that still has enough resources to run the given compute.

•SPREAD
SPREAD - Provisions compute resources, at a deployment level, to the cluster or host with the least number of virtual

machines. For vSphere, Distributed Resource Scheduler (DRS) distributes the virtual machines across the hosts.

•ADVANCED
ADVANCED - Will place workload based on vRealize Operations (vROPs) recommendation.

3.View the Capability tags. By specifying a capability tag for this cloud zone, we can configure unique identifiers that Cloud

Templates can use as constraints. Any deployment of a Cloud Template with a constraint tag of cloud:vsphere will be

directed to this cloud zone.

4.Click the Compute tab

Review RegionA01 Cloud Zone Compute Tab [43]

HANDS-ON LABS MANUAL | 33


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

The Cloud Zone Compute tab is where we allocate Compute resources for the Cloud Zone from our Cloud Accounts

1. Click the dropdown and review the options for assigning compute resources to the Cloud Zone

◦Dynamically include compute by tags:- Allows us to dynamically allocate Compute resources based on their tag. In

this example we have dynamically added Compute Resources based on the tag compute:vsphere

◦Include All unassigned compute:- assigns all compute resources that haven't been allocated to a Cloud Zone

◦Manually Select Compute:- will provide a list of all available compute resources that can be manually selected

2.Click the Projects Tab to view the allocated Projects

Review the Cloud Zone Projects Tab [44]

A project determines;

•Which cloud zones a particular user or group can deploy to and a priority value

•The maximum number of virtual machine instances to deploy

•A maximum amount of memory that the deployment can use.

A project is usually defined for a specific business group or purpose.

1. Take time to review the HOL Project values

2.Now that we understand Cloud Zones and their relationship to Cloud Accounts lets take a closer look at Projects, Click

CANCEL

HANDS-ON LABS MANUAL | 34


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Discard Changes [45]

1. If prompted click DISCARD to confirm that you want to discard any changes

Projects [46]

HANDS-ON LABS MANUAL | 35


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Projects control who has access to vRealize Automation Cloud Assembly Cloud templates and where the templates are deployed. We
use projects to organize and govern what our users can do and to what cloud zones they can deploy cloud templates in our cloud
infrastructure.

Cloud administrators set up the projects, to which they can add users and cloud zones. Anyone who creates and deploys cloud
templates must be a member of at least one project.

Navigate to New Projects [47]

Projects are a collection of Users, Cloud Templates, provisioning targets (in the form of cloud zones) and more.

1. Click Projects in the left pane

2.We will review the HOL Project, Click OPEN

HANDS-ON LABS MANUAL | 36


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Review the Project Summary Tab [48]

1. The Summary Tab provides information on the Project as well as where we would specify the name of the project

2.Click on the Users tab

HANDS-ON LABS MANUAL | 37


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Review the Project Users Tab [49]

1. The Users tab allows us to add users or groups to the Project. Users/groups can be assigned using one of three roles:

◦Administrator
Administrator: Can configure resources in the project

◦Member
Member: Can consume resources in the project

◦Viewer
Viewer: Can view resources in the project

2.This toggle allows all users within the project to access other members deployments, it also allows them to change ownership

of the deployment to another member of the project.

3.Click Provisioning to review the Projects provisioning details

HANDS-ON LABS MANUAL | 38


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Review Cloud Zones assigned to the Project [50]

Three cloud zones have been added to the HOL Project project

1. The Provisioning Tab is where we would add the Cloud Zones that we would like to allocate to the Project along with defined

limits that we can put in place to determine priority, the number of instances that can be deployed, Memory Limits, CPU

Limits and Storage Limits. Note that for vSphere cloud zones, resource limits can be set for CPU, memory, and storage, but

for public cloud zones, only CPU and memory limits are available.

2.Users in this project will be able to use the tags applied to each cloud zone in their Cloud Templates in order to direct

deployments to specific cloud zones.

3.Scroll
Scroll down to see the rest of the Provisioning configuration options

HANDS-ON LABS MANUAL | 39


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Additional Provisioning Properties [51]

In addition to specifying cloud zones, priority, and optional limits per cloud zone, project provisioning can;

•Apply tags to deployed resources,

•Include specific constraints for network, storage, and extensibility configuration,

•Apply custom properties to requests,

•Specify a project-specific custom naming standard for deployed objects,


•Set a project-wide request timeout for deployments that need more than the default 2 hours.

1. Click CANCEL to close the project without making changes

In the next lesson we will cover Mappings and Profiles.

Understand Mappings and Profiles [52]

In the previous lesson, we looked at Cloud accounts, their relationship to Cloud Zones and saw how those Cloud Zones could be
assigned to a project. The Cloud Zones specify the compute resources available to projects, but additional configuration is still needed
in order for Cloud Templates to make the most effective use of resources across multiple clouds.

In this lesson we will review mappings and profiles, completing the Cloud Assembly configuration.

HANDS-ON LABS MANUAL | 40


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Navigate to Flavor Mappings [53]

Flavor Mappings consist of sizes to use across multiple clouds. Four flavors are configured in this environment, and for each flavor,
configurations for AWS, Azure and vSphere exist. We will create a new Flavor named XLarge

1. Click on Flavor Mappings

2.Click + NEW FLAVOR MAPPING

HANDS-ON LABS MANUAL | 41


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

New Flavor Mapping [54]

1. We will start by giving our new Flavor Mapping a Name, Type XLarge in the Flavor name Field

2.Click on Search for regions

3.Select Azure Cloud / West US from the drop down menu

HANDS-ON LABS MANUAL | 42


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Azure XLarge Flavor Mapping [55]

1. Click in the Value field, select Standard_B8ms from the dropdown list

2.Click the + at the end of the configuration line so that we can add the mapping for our vSphere cloud

Add a vSphere Flavor for the XLarge Flavor Mapping [56]

HANDS-ON LABS MANUAL | 43


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

1. Click on the Account/Region field in the new line, and select Private Cloud / RegionA01

2.Click in the 1st Value field and type 8

3.Click in the 2nd Value Field and type 32

4.Click CREATE

Flavor Mapping Updates Complete [57]

A flavor mapping groups a set of target deployment sizings for a specific cloud account/region in vRealize Automation using natural
language naming. In this example our XLarge Flavor mapping allowed us to create the XLarge mapping containing similar flavor sizings
across different account regions. When creating a cloud template, we can specify the XLarge Flavor which will then determine the
sizing required based on the deployment target.

1. Click Image Mappings to proceed

HANDS-ON LABS MANUAL | 44


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

View Image Mappings [58]

Image mappings detail the OS-specific images to use. Similar to flavor mappings, image mappings can be configured to include
options for each available cloud, allowing images to be specified in a cloud-agnostic manner in Cloud Templates.

Lets review the Ubuntu20 Image Mapping;

1. Click OPEN for the image mapping named Ubuntu20

Review the Ubuntu20 Image Mapping [59]

HANDS-ON LABS MANUAL | 45


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

The process for adding configurations to an existing image mapping is similar to flavor mappings.

1. On the left we have the Account /Region that we want to create an image mapping for

2.Next we have specified the correct image relating to that region. The vSphere Image name directly relates to a vSphere

template

3.When creating a Cloud Template we can simply specify the Image name for our image map and during deployment the

correct image will be used based on the location that that the Cloud Template is being deployed to.

4.Click CANCEL

Next, we will look at Network Profiles.

Network Profiles [60]

A Network profile describes the behavior of the network to be deployed. It defines a group of networks and network settings that are
available for a cloud account in a particular region or data center in vRealize Automation

1. Click Network Profiles

2.Click OPEN on the vSphere Networks Network Profile

HANDS-ON LABS MANUAL | 46


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Review the Network Profile Summary Tab [61]

1. Here we define the Account / region field that the Network Profile is for.

2.The name defined for this network profile is vSphere Networks

3.Capability tags can be set for use within Cloud Templates

4.Click the Networks tab

HANDS-ON LABS MANUAL | 47


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Review the Networks tab [62]

1. Here we see a vSphere network that has been added to the network profile

2.Click + ADD NETWORK

View Networks [63]

HANDS-ON LABS MANUAL | 48


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

1. Scroll through the list and review the networks that are available to be added to our profile, Both vSphere and NSX networks

can be added to the profile. After setting up Cloud Accounts with vSphere or NSX vRealize Automation will collect an

inventory of the configured networks and make them available for selection here.

2.Click CANCEL we will not add any additional networks to this profile

Configure Added Network [64]

In vRealize Automation terms, the VM-RegionA01-vDS-COMP network is an existing network, since it was discovered by vRealize
Automation. This network can be used as-is, but for machines deployed on this network to have proper network configuration, it will
need an external source for IP addressing (such as a DHCP server, or an IP Address Management system) or additional configuration in
vRealize Automation. In the next steps, we will look at more detail for this network in vRealize Automation.

1. Click the VM-RegionA01-vDS-COMP network to open it

HANDS-ON LABS MANUAL | 49


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Review Network Configuration [65]

1. corp.local has been set for the domain name of the machine. The domain name is passed to the vSphere machine

customisation spec

2.Here we can set the CIDR Block for the network

3.We can also set the default gateway

4.Along with DNS servers

5.Scroll
Scroll down to view additional configuration

HANDS-ON LABS MANUAL | 50


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Add Network Configuration (Continued) [66]

1. Here we can add the DNS search domains

2.Default for zone, this setting will apply the network as the default for the Cloud Zone

3.Click CANCEL

HANDS-ON LABS MANUAL | 51


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

View Managed IP Range [67]

vRealize Automation can manage the IP allocations for machines on this network.

1. Click the checkbox next to VM-RegionA01-vDS-COMP

2.Click MANAGE IP RANGES

Open IP Range [68]

1. Click HOL Private Range to review the settings

HANDS-ON LABS MANUAL | 52


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Configure New IP Range [69]

1. Here we assign the network that the IP Range is intended for

2.We assign a name for our IP Range here

3.Then we add a start and finish address for our IP Range.


4.This tile displays useful information about the range such as, Capacity, Addresses in use and percent utilised of the address

range.

5.Click CANCEL

HANDS-ON LABS MANUAL | 53


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Close Manage IP Ranges [70]

Cloud Assembly will allocate IPs within this range to machines deployed using this network profile. Additional networks can be added
to the profile as needed, and networks can have multiple managed IP ranges, although they must be from the same provider (either
Cloud Assembly, or an external provider such as Infoblox.)

1. Click CLOSE to return to the network profile

HANDS-ON LABS MANUAL | 54


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Close the Network Profile [71]

1. Click CANCEL

2.Click Storage Profiles

HANDS-ON LABS MANUAL | 55


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Storage Profiles [72]

Like network profiles, storage profiles determine how storage within specific cloud zones is used. Storage is usually profiled according
to characteristics such as service level or cost, performance, or purpose, such as backup.

1. Click BROWSE to view the Storage Profile

Review the vSphere Storage Profile [73]

The Storage Profile was created for Private Cloud / RegionA01 Account / Region

1. Click vSphere Storage to view the configuration

HANDS-ON LABS MANUAL | 56


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Configure Storage Profile [74]

HANDS-ON LABS MANUAL | 57


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

1. Here we provide a name for a storage profile

2.We define the Disk type as Standard Disk or First Class Disk

◦Standard disk - Simple vSphere virtual disks which cannot be managed independently without an attached VM.

◦First class disk (FCD) - Improved version of standard virtual disks, designed to be fully managed independent

storage objects

3.Here we define the Datastore or Cluster to deploy our machines to

4.In the Provisioning type field, we can choose to deploy as either Thin, Thick or Eager Zeroed Thick provisioned VM's

5.Click CANCEL

Wrap Up [75]

This is the end of our lesson for Mappings and Profiles

1. Click CLOSE to close the Storage Profile

HANDS-ON LABS MANUAL | 58


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Conclusion [76]

In this module we explored the configuration of Cloud Assembly resources:

•We reviewed Cloud Accounts, Cloud Zones and Projects and how they relate to one another

•We reviewed Mappings and Profiles, creating a new Flavor Mapping

You've finished the module [77]

Congratulations on completing the lab module.

If you are looking for additional information, see:

•Getting Started with vRealize Automation Cloud Assembly

•Building Your Resource Infrastructure

HANDS-ON LABS MANUAL | 59


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

From here you can:

1. Click to advance to the next page and continue with the next lab module

2.Open the TABLE OF CONTENTS to jump to any module or lesson in this lab manual

3.Click on the END button if you are done with the lab for now and want to exit

HANDS-ON LABS MANUAL | 60


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Module 3 - Creating and working with Cloud templates (60 minutes)

Introduction [79]

Cloud Templates are a critical component to enabling multi-cloud automation and self-service. In this lesson we are going to look at
how to create a Cloud Template and add tags to make them dynamic.

Logging in to vRealize Automation [80]

In this lesson we will start by logging into vRealize Automation.

Launch vRealize Automation [81]

From within the Chrome web browser:

1. Click vRealize Automation from the bookmarks bar.

HANDS-ON LABS MANUAL | 61


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Log in to vRealize Automation [82]

At the Workspace ONE login screen:

1. Enter holadmin into the username field.

2.Enter VMware1! into the password field.

3.Click Sign In
In.

HANDS-ON LABS MANUAL | 62


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Creating Your First Cloud Template [83]

Cloud Templates describe a topology of components that need to be provisioned for an application to run on. In this section you will
create a new Cloud template and then work with some pre-configured abstractions to control where (and in some cases how) these
components are provisioned.

Navigate to Cloud Assembly [84]

1. Click on Cloud Assembly to open it

The Cloud Assembly service orchestrates and expedites infrastructure and application delivery in line with DevOps principles. Cloud
Assembly is where we create Cloud Templates.

HANDS-ON LABS MANUAL | 63


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Create a New Cloud Template [85]

1. Click on the Design tab to open up the initial Cloud Templates page.

You will note that there are a number of actions here apart from just the ability to create or delete a blueprint.

2.Click on the NEW FROM drop down

3.Select Blank canvas from the drop down menu to create a Cloud Template using the canvas

HANDS-ON LABS MANUAL | 64


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Add Cloud Template Details [86]

On this page, we will enter some basic details about our Cloud Template. In the context of this lab, the amount of information added
here is not going to have significant impact. However, in a production environment where there would be a larger number of Cloud
Templates, adding details in the Description field becomes far more useful, due to the ability to search against this information.

1. In the Name field, type My First App


App.

2.In the Project drop-down, select HOL Project


Project.

3.Click the CREATE button.

HANDS-ON LABS MANUAL | 65


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Exploring the Canvas [87]

The canvas is split up into three main sections:

1. The Components panel, where you select the components that you want to use for your application. Scroll down the list to

view the various components that can be used to build a Cloud Template.

2.The Canvas, where your application infrastructure topology is represented.

3.The Editor where your YAML will be presented and modified.

There are two other useful items to be aware of on this page that will help you with managing screen real estate:

4.The Components hide/show button

5.The Editor hide/show button. Hide or show these panels as you see fit throughout the lab to make viewing relevant content

easier.

HANDS-ON LABS MANUAL | 66


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Add a vSphere Cloud Machine [88]

1. Find the Machine object within vSphere category and drag it onto the canvas.

2.You will see that the YAML is automatically populated.

3.Click on the properties field to see a list of all available properties that can be defined for this object type. After you are done

looking at the content in the pop-up box, click anywhere in the blueprint area to close the pop-up box.

4.Note the warning exclamation mark, this is because some required detail for this component is missing, we will add that detail

next.

HANDS-ON LABS MANUAL | 67


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Edit the YAML Description [89]

Our vSphere Machine object is missing some required detail, we need to define the image that vRealize Automation should use to
deploy this vSphere machine with.

1. Click between the single quotes on the image field. You will see the list of images that have been defined in vRealize

Automation and have been made available to the Project you are working in. You can learn more about defining image

mappings in Module 2 Configuring vRealize Automation Infrastructure

2.Click to select Ubuntu18


Ubuntu18.

Note that the Warning exclamations should now disappear, providing that the syntax is correct.

HANDS-ON LABS MANUAL | 68


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Add a Constraint [90]

Constraints allow us to specify parameters that must match a tag on a the infrastructure (a Cloud Zone for example). The constraint is a
way to force vRealize Automation to only deploy the blueprint to infrastructure that has a matching tag.

1. Place your cursor after the totalMemoryMB: 1024 property and press the Enter key to add a new line in your YAML that is

aligned under the properties section then type con and pause so see the auto-populate options

2.Click to select constraints: from the list

HANDS-ON LABS MANUAL | 69


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Add a Constraint Tag to the Virtual Machine [91]

In our environment, we have applied the "compute:vsphere" tag to the our two compute clusters in the vRA-Managed vSphere
Compute cloud zone but not to our management hosts or cluster. By using that constraint tag in our Cloud Template, we will ensure
that the virtual machine gets provisioned to our compute clusters and not to our management cluster.

1. Press the Enter key to add a new line under constraints:

2.Click tag: to add a tag constraint

HANDS-ON LABS MANUAL | 70


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

3.Click the compute:vsphere tag to select it

Note that you could also have typed the tag value here and if the tag had not previously been defined in vRealize Automation, it would
have been created at that point.

Be aware that YAML is whitespace sensitive, and incorrect indenting may lead to issues with provisioning. If you do make a mistake, you
should see a red exclamation appear beside the line where the mistake has been made. Try it out now if you like by adding an extra
space before image
image. Resolve the error and move to the next page.

HANDS-ON LABS MANUAL | 71


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Add a Network [92]

Since we will want our virtual machine to be attached to a network, we need to add a network object to the blueprint.

1. Drag a Network object from the vSphere section onto the canvas.

2.To attach your Machine object to the network, hover over the white circle on the left hand side of the

Cloud_vSphere_Machine_1 box until it turns blue, and then click and drag the circle onto the Cloud_vSphere_Network_1

box.

3.You will see the YAML definition for the network itself and for the networks section added to your VM resource.

In this environment we have configured the vsphere-networks Network Profile with three different networks that were discovered in
vSphere. There is no need to verify this but if you want to, you can do so on the Infrastructure tab.

HANDS-ON LABS MANUAL | 72


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Configure the Network [93]

Now it's time to configure the network object.

1. Use what you have learned about YAML editing to add a new entry on the vSphere Machine object under -network to set the

IP address assignment to static

2.Use what you have learned about YAML editing to add a new constraint tag "net:vsphere
net:vsphere" to the vSphere Network object

HANDS-ON LABS MANUAL | 73


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Finish Your Cloud Template [94]

1. Once that is complete, click on the VERSION button to begin the versioning process.

HANDS-ON LABS MANUAL | 74


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Version Your Cloud Template [95]

Now that your basic configuration has been setup, it would be a good idea to capture the state it is in as a version 1 blueprint.

1. In the Version field set it to 1

2.In the Change log text box, type Initial Configuration


Configuration.

3.Click on CREATE
CREATE.

We will look at versioning in more detail later in the lesson, including how you can identify differences between versions.

HANDS-ON LABS MANUAL | 75


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Test Your Cloud Template [96]

1. Click on TEST to validate your Cloud Template.

The Test will test the validity of the Cloud Template without needing to deploy it.

HANDS-ON LABS MANUAL | 76


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Review the Cloud Template Test Results [97]

Review the test results for the Cloud Template;

1. Ensure that the Cloud_vSphere_Network_1 test was successful

2.Ensure that the Cloud_vSphere_Machine_1 test was successful

3.Close the Test Result Window

HANDS-ON LABS MANUAL | 77


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Deploy Your Cloud Template [98]

Now it's time to deploy the Cloud Template.

1. Click the DEPLOY button

The DEPLOY button allows a Cloud Template developer the ability to deploy their template without the need to create a self service
catalog item.

HANDS-ON LABS MANUAL | 78


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Deployment Information [99]

1. In the Deployment Name field, enter My First App


App.

2.Select Current Draft in the Cloud Template Version field.

3.Click on the DEPLOY button

HANDS-ON LABS MANUAL | 79


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Explore Your Deployment [100]

The deployment will take a few minutes to come up. Note that due to browser zoom and rendering in this lab environment, you might
not see the linkage between the vSphere Machine and the vSphere network in the topology diagram. Rest assured that the linkage is
still there.

1. Once the deployment has successfully deployed, you will see the status change to "Create
Create Successful
Successful". You may need to click

the refresh icon to the right of the Actions drop-down in order to get the status to update.

2.Click on the Cloud vSphere Machine object to highlight it


3.Take a look at the information panel to the right. Your deployment should be powered on and you can see details about the

virtual machine. If you scroll down in the information pane, there is additional information to explore.

4.Note that the machine has an IP address assigned (Make a note of it)

HANDS-ON LABS MANUAL | 80


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

View Available Actions [101]

In the information panel, you can also access a list of actions that you can take on the virtual machine

1. Click the ACTIONS link to see the list of available actions. Note that this list can be modified via policies in the Service Broker

module of vRealize Automation.

2.Click Connect to Remote Console

This will open a new tab in your browser with a remote console session to the deployed virtual machine.

HANDS-ON LABS MANUAL | 81


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Logon to the deployed machine [102]

1. In the Remote Console session window, Enter root for the Login

2.Enter the Password VMware1!

3.Run the command ip addr show

4.Verify that the IP address matches the one recorded earlier from the deployment, note that the IP address shown in the

image may different.

5.Close the browser tab for the Remote Console

Cloud Template Iteration [103]

Cloud Templates are a way of describing a topology of components that need to be provisioned for an application to run on. In this
section we will update our Cloud Template and then work with some pre-configured abstractions to control where (and in some cases
how) these components are provisioned.

HANDS-ON LABS MANUAL | 82


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Increase the Number of Machine Instances [104]

We are now going to modify the blueprint to increase the number of deployed virtual machines to two.

1. Lets return to the Design tab by selecting it

2.Click the vSphere Machine on the canvas to select it

3.In the right panel, click Properties to open the properties pane. Note that if you find it easier to build and modify your

blueprint with forms and fields instead of by editing YAML code, you might prefer to work in this tab.

4.Click the toggle to Show all properties

5.In the Count field, change the value to 2

Note that on the canvas, the image for the vSphere machine changes from a single box to stacked boxes. This is an indication that the
object count is greater than one.

You can click on the Code tab if you want and see that the YAML definition was updated with the count: 2 property

6.Click TEST to test your blueprint for proper syntax

HANDS-ON LABS MANUAL | 83


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Test Results [105]

1. The test should return Successful


Successful. If it doesn't, address the issue before proceeding.

2.Click the X to close the test window

Create a New version of the Cloud Template [106]

We will now create a new version of the Cloud Template

1. Click the VERSION button

HANDS-ON LABS MANUAL | 84


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Add Cloud Template Version Details [107]

1. Note the Version field was automatically set to version 2

2.In the Change Log text box, type Updated VM Count to 2

3.Click the CREATE button to create the new version

HANDS-ON LABS MANUAL | 85


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Deploy the new version [108]

1. Click DEPLOY to open the Deployment options

Update the existing Deployment [109]

HANDS-ON LABS MANUAL | 86


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

vRealize Automation gives you the option of updating an existing deployment. So instead of having to delete or current deployment
with a single VM, we can update the deployment by applying this revised Cloud Template.

1. From the deployment type drop-down select Update an existing deployment


deployment.

2.In the Cloud Template version field delete the existing text, then type and select version 2

3.Click the radio button next to My First App

4.Click the NEXT button.

View the Plan [110]

At this stage, you will be notified of additions, changes or deletions that will occur to the existing deployment.

1. Expand the Adds and Deletes sections to see what changes will be made to the deployment

2.Click the DEPLOY button

HANDS-ON LABS MANUAL | 87


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Wait Patiently [111]

1. As the provisioning is progressing, click History to expand the request history.

2.Click on Provisioning diagram link

HANDS-ON LABS MANUAL | 88


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Navigation of Request Details [112]

1. Scroll down to review the request information.

2. Click the Dev mode toggle to see additional information

If we were to have a resource mapping issue it would be highlighted here

HANDS-ON LABS MANUAL | 89


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Request Details in Dev mode [113]

Explore the Request Details page to get familiar to the request workflow.

1. Close the provisioning diagram by clicking CLOSE when you are done exploring the page

If the request failed, you would be able to see in this view which steps the deployment had problems with

HANDS-ON LABS MANUAL | 90


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Clean Up [114]

Once your deployment updates successfully, you can explore the details either here or on the deployment tab.

To ensure you have enough resources for future tasks in this lab, you will need to clean up your deployment.

1. Click on the Actions drop-down

2.Click to Delete the deployment, note you do not need to wait in order to continue with this module.

3.Next lets take a closer look at versioning, so click on the Design tab.

HANDS-ON LABS MANUAL | 91


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Cloud Template Version History [115]

The version history for each blueprint is stored with the blueprint.

1. In order to access it, click on VERSION HISTORY

HANDS-ON LABS MANUAL | 92


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Reviewing Version Differences [116]

1. To get started, select version 2.

2.Click Diff to see the differences between the versions

3.In the Diff against drop-down, select 1.

This shows the differences in the YAML between the two blueprint versions. Scroll down and take a look at the changes that have
occurred. The detailed diff is quite valuable, but doesn't lend itself to a quick view of what has changed.

4.Click on Diff Visually

HANDS-ON LABS MANUAL | 93


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Visual Differences [117]

Depending on what you want to investigate, a visual representation may be easier to see the difference between versions

1. See how the differences are highlighted

Wrapping it Up [118]

In this lesson, you learned how to configure Cloud Assembly to get it ready for provisioning, as well as how to navigate the Design
canvas to create, version and deploy Cloud Templates.

Conclusion [119]

In this module we created our first Cloud Template utilising resources in Cloud Assembly

•We explored the Cloud Template design canvas, placing objects on it and configuring them using tags and flavors

•We versioned the Cloud Template and reviewed Cloud Template Iteration

HANDS-ON LABS MANUAL | 94


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

You've finished the module [120]

Congratulations on completing the lab module.

If you are looking for additional information, see;

Designing your vRealize Automation Cloud Assembly deployments

From here you can:

1. Click to advance to the next page and continue with the next lab module

2.Open the TABLE OF CONTENTS to jump to any module or lesson in this lab manual

3.Click on the END button if you are done with the lab for now and want to exit

HANDS-ON LABS MANUAL | 95


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Module 4 - Multi Cloud and Public Cloud templates (45 minutes)

Introduction [122]

In this module, we are going to focus on creating a Cloud agnostic Cloud Template. We will then look at how we can use vRealize
Automation to deploy a Cloud Native Service

Logging in to vRealize Automation [123]

In this lesson we will start by logging into vRealize Automation.

Launch vRealize Automation [124]

From within the Chrome web browser:

1. Click vRealize Automation from the bookmarks bar.

HANDS-ON LABS MANUAL | 96


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Log in to vRealize Automation [125]

At the Workspace ONE login screen:

1. Enter holadmin into the username field.

2.Enter VMware1! into the password field.

3.Click Sign In
In.

HANDS-ON LABS MANUAL | 97


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Launch the Cloud Assembly Service [126]

Use this for launching the cloud assembly service in your modules

Launch the Cloud Assembly Service [127]

From within the Cloud Services Console


Console, under My Services
Services:

1. Click the Cloud Assembly service.

Creating a Cloud-Agnostic Cloud Template [128]

Building agnostic Cloud Templates keeps the architecture and topology to be about the application or service and less about the cloud
or location to which it will run.

In this module, we focus on designing a Cloud Template that can be deployed to the cloud of your choice.

1. The Test will run for a short amount of time until it is successfully simulated.

2.Click the Provisioning Diagram link to see how it works

If the Test fails, you must compare the yaml code on the screen to the yaml code here to correct any differences like mismatch on cases
for example Cloud:Aws vs cloud:aws

HANDS-ON LABS MANUAL | 98


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

New Cloud Template [129]

1. Select the Design tab.

2.Click the +NEW FROM drop down

3.Select Blank canvas from the menu option

HANDS-ON LABS MANUAL | 99


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Enter the Cloud Template Details [130]

1. Name the Cloud Template Cloud Application

2.Next, select the HOL Project from the Project list.


3.Click the CREATE button

HANDS-ON LABS MANUAL | 100


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Cloud Agnostic Cloud Template [131]

1. In the Resources Pane, drag Cloud Agnostic Machine object onto the design canvas.

Next, we will set the machine properties

2.Click between the single quotes in the line image: ' ' select Ubuntu18 from the dropdown list

3.Click between the single quotes in the line flavor: '' select tiny from the dropdown list

Next we will create some inputs to determine which cloud to deploy the machine to at the time of request

4.We can continue to edit the YAML to provide inputs but lets do this from the inputs panel. Click Inputs.

HANDS-ON LABS MANUAL | 101


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Begin Creating Inputs [132]

1. On the Inputs Panel, Click + NEW CLOUD TEMPLATE INPUT

HANDS-ON LABS MANUAL | 102


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Begin defining Input details [133]

1. Enter Cloud for the input name

2.Enter Cloud for the Display Name

3.Enter cloud:vsphere as the Default Value

4.Click More Options to expand the More Options details

5.Scroll down to continue adding more details

HANDS-ON LABS MANUAL | 103


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Adding the Input Values [134]

1. Add the following values to the Enum field using the + sign to add additional lines as required

a.cloud:aws

b.cloud:azure

c. cloud:vsphere

2.Click CREATE to create the values

HANDS-ON LABS MANUAL | 104


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Add Constraints [135]

Now that we have created the Inputs we need to be able to do something with them

1. Click Code to return to the YAML code, take note of the entries added from the Input values we have just created.

2.At the end of the line flavor: 'tiny' Press the ENTER key, type in constraints and hit the ENTER key again

3.Now type in tag and set it to '${input.Cloud}'


'${input.Cloud}'. This denotes that we are going to capture the information on the request form

that will be used to define this tag.

Note that when you typed tag you were given the option to select a tag. Some of the tags in that list matched the input values we
specified earlier. In this example we are using tags to determine which Cloud Zone to deploy our machine to. We will provide an input
at the time of making a deployment request to specify which tag to use. This in turn will determine which Cloud the machine will be
deployed to.

HANDS-ON LABS MANUAL | 105


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Test Cloud Template [136]

Now we will test the Cloud Template

1. Click the TEST button on the botton left.

Select an Input [137]

Notice how the default input value is set to cloud:vsphere which was the value we said to use as the default input value

1. Select cloud:aws from the Cloud dropdown list.

2.Click TEST

HANDS-ON LABS MANUAL | 106


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Test Results [138]

HANDS-ON LABS MANUAL | 107


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Reviewing the Request Details [139]

Now lets review the Request Details to see how vRealize Automation decided where to deploy our Cloud Agnostic Template

1. If the Dev mode toggle is switched on, click the toggle to switch it off

2.Notice that the Contraint was set to cloud:aws:hard this tag was taken from the input we selected during request time. Tags

can be set as hard or soft, by default if not specified the tag is treated as hard. Tags that are set to hard must be met, where

as soft tags vRealize Automation will attempt to meet.

3.Use the scroll bar to view the rest of the request details

HANDS-ON LABS MANUAL | 108


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Placement [140]

1. Here we can see that vRealize Automation needs to make a decision on where to place our Cloud Template. As we specified

that the tag to use was cloud:aws based on our input only one Cloud Zone meets the requirement.

Congratulations this is the end of this lesson. We have successfully created a Cloud Agnostic Cloud Template which will deploy to either
vSphere, AWS or Azure based on the information we provided at request time.

Using Public Cloud Objects in Cloud Assembly Cloud Templates [141]

vRealize Automation is capable of deploying Public Cloud Objects. In this lesson, we will build a Cloud Template that will deploy an
Azure SQL Server.

HANDS-ON LABS MANUAL | 109


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

New Cloud Template [142]

1. Make sure that you are in the Design tab

2.Click the +NEW FROM button

3.Select Blank canvas from the dropdown menu

HANDS-ON LABS MANUAL | 110


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Cloud Template Details [143]

1. Enter a Name for the Cloud Template Azure SQL Server

2.Select HOL Project from the Project list


3.Click CREATE to begin

HANDS-ON LABS MANUAL | 111


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

SQL Server Properties [144]

1. In the Search field on the Resources pane, type in SQL

2.Drag SQL Server to the design canvas

3.Enter the SQL object properties as follows:

1. name: 'az-sql-svr-xxyy' replace xx with your initials and yy with a random 2 digit number this is necessary due to the

labs sharing the same Azure Cloud Zone

2.region:
region: 'westus'

3.account:
account: 'Azure Cloud'

4.version:
version: '12.0'

5.administrator_login:
administrator_login: 'sqladmin'

6.resource_group_name:
resource_group_name: 'NetworkWatcherRG'

7. administrator_login_password: 'VMware1!'

4.Click TEST to begin testing the deployment

HANDS-ON LABS MANUAL | 112


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Test Deployment [145]

1. After a few seconds, confirm the result displayed is successful

2.Close the Test Results window

3.Now, click the DEPLOY button to begin deployment.

HANDS-ON LABS MANUAL | 113


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Deploy SQL Server [146]

1. Give the deployment a name e.g. HOL Azure SQL Server

2.Click DEPLOY

HANDS-ON LABS MANUAL | 114


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Deployment Complete [147]

1. Whilst you wait for the deployment to complete check the History to view the progress

2.Monitor the deployment until the status Create Successful appears.

Congratulations you have just deployed an Azure SQL server utilising a vRealize Automation Cloud Template

3.We can now CLOSE the deployment

HANDS-ON LABS MANUAL | 115


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Cleanup [148]

We now need to delete the deployment and destroy the Azure SQL server that was created

1. Click the 3 dots next to the Azure SQL Server Deployment

2.Select Delete from the dropdown list

Confirm the Delete [149]

1. Click SUBMIT to confirm that you want to delete the Azure SQL Server deployment

The Delete process will begin and take a few moments to run, you can continue without waiting for this process to complete

HANDS-ON LABS MANUAL | 116


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Conclusion [150]

In this module, we explored options for configuring Cloud Assembly resources in a cloud agnostic manner. With an understanding of
these resources, we can make optimal use of Cloud Assembly Cloud Templates. Finally we explored the ability to deploy an Azure SQL
Server demonstrating the Multi Cloud ability of vRealize Automation

You've finished the module [151]

Congratulations on completing the lab module.

If you are looking for additional information, see;

Designing your vRealize Automation Cloud Assembly deployments

From here you can:

1. Click to advance to the next page and continue with the next lab module

2.Open the TABLE OF CONTENTS to jump to any module or lesson in this lab manual

3.Click on the END button if you are done with the lab for now and want to exit

HANDS-ON LABS MANUAL | 117


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Module 5 - Extensibility Using vRealize Orchestrator and ABX (45 minutes)

Introduction [153]

In this module, we will quickly cover the basics of using VMware vRealize Orchestrator and vRealize Automation to perform extensibility
tasks.

The lab module will provide a brief overview of the following topics:

•Build a Custom Day 2 Action utilizing a vRealize Orchestrator Workflow

•ABX Action Extensibility using vRealize Automation

Log in to vRealize Automation as holadmin [154]

In this lesson we will start by logging into vRealize Automation.

Launch vRealize Automation [155]

From within the Chrome web browser:

1. Click vRealize Automation from the bookmarks bar.

HANDS-ON LABS MANUAL | 118


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Log in to vRealize Automation [156]

At the Workspace ONE login screen:

1. Enter holadmin into the username field.

2.Enter VMware1! into the password field.

3.Click Sign In
In.

HANDS-ON LABS MANUAL | 119


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Launch the Cloud Assembly Service [157]

From within the Cloud Services Console


Console, under My Services
Services:

1. Click the Cloud Assembly service.

Custom Day 2 Action utilizing a vRealize Orchestrator Workflow [158]

After you deploy a cloud template, you can run day 2 actions that change the deployment. vRealize Automation Cloud Assembly
includes many day 2 actions, but you might want to provide others. You can create custom resource actions and make them available to
users as day 2 actions.

The custom resource actions are based on vRealize Orchestrator workflows.

HANDS-ON LABS MANUAL | 120


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Navigate to Resource Actions [159]

Our Resource Action will create a Day 2 action to Move a vSphere Machine into a specified folder. We will be using a vRealize
orchestrator in order to achieve this action.

1. Click on the Design Tab

2.Select Resource Actions

3.Select + NEW RESOURCE ACTION to begin creating our new Day 2 Action

HANDS-ON LABS MANUAL | 121


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Configure Resource Action [160]

We will begin to enter the required information to create the resource action.

1. Enter Move_VM_Folder for the name of our resource action

2.Enter HOL Move VM to New Folder, this will be the display name for our Day 2 action

3.Toggle the Activate so that we enable the Resource Action

4.Click
Click +Add to add the Resource Type that this action is for

HANDS-ON LABS MANUAL | 122


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Select the Resource Type [161]

As this Resource action will be for a vSphere Machine we will need to specify this for our Resource Type

1. Type Cloud.vSphere and press Enter in the search bar

2.Select Cloud.vSphere.Machine from the search results

3.Click Add

HANDS-ON LABS MANUAL | 123


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Adding a Workflow [162]

Now that we have selected our Resource Type we now need to select the workflow that we would like to run against it.

1. Scroll down to view the rest of the form

2.Click +Add to add a workflow

HANDS-ON LABS MANUAL | 124


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Select the Workflow [163]

vRealize Orchestrator comes with a ready made workflow to move virtual machines to a folder.

1. In the search field enter Move virtual machine to folder

2.Select the Move virtual machine to folder workflow from the search results

3.Click Add to add it to our Resource Action

Edit Property Bindings [164]

HANDS-ON LABS MANUAL | 125


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

A new section is added detailing Property Bindings.

1. The Action Inputs were taken from our vRealize Orchestrator Workflow. You can see that our workflow requires two inputs,

VM and Folder.

2.The binding for both inputs is set to in request, however we want to make the Day 2 Action as seamless as possible and

therefore we will set up a binding for VC:VirtualMachine to map it to our Cloud.vSphere.Machine. The system provides the

name in the workflow so that the user does not have to do it. Click in Request

Set up Property Binding [165]

HANDS-ON LABS MANUAL | 126


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

1. Select with binding action

2.The findVcVmByVcAndVmUuidaction is automatically selected. This action comes preconfigured due to the vRealize

Orchestrator integration with vRealize Automation Cloud Assembly.

3.Click SAVE

Edit the Request Parameters [166]

1. Click EDIT REQUEST PARAMETERS

HANDS-ON LABS MANUAL | 127


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Save Changes [167]

1. Click SAVE to save our Resource Action before we edit the Request Parameters form.

Update the Request Form [168]

HANDS-ON LABS MANUAL | 128


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

It's possible to customise the request form for our Day 2 Action, as the user will not need to provide the Virtual Machine name due to
the property binding earlier we will make this input request invisible.

1. Select the Virtual Machine to Move field on the Form

2.Set Visibility to No

3.Click SAVE to save the changes

HANDS-ON LABS MANUAL | 129


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Open vSphere Client [169]

Lets view a Virtual Machine in vSphere to test our Custom Day 2 Action on

1. Open a new Tab in Chrome

2.Open the vSphere Client by selecting it from the favourites bar

3.Select Use Windows session authentication

4.Click Login

HANDS-ON LABS MANUAL | 130


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

View the Virtual Machine [170]

1. Select the VM's and templates view

2.Expand the Workloads Folder

3.Make note of the ubuntu-0003 virtual machine, this virtual machine was pre deployed for in the lab by vRealize Automation

4.Will will use our Custom Day 2 action to move the ubuntu-0003 virtual machine to the Development folder

5.Return to the Cloud Assembly tab

HANDS-ON LABS MANUAL | 131


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Run the Day 2 Custom Action [171]

1. Select the Deployments to find our Ubuntu deployment

2.Expand the hol-ubuntu deployment

3.Click the 3 dots next to the ubuntu-0003 machine to view the list of Day 2 actions

4.Notice that our Custom Day 2 Action appears in the list, Select HOL Move VM to New Folder

HANDS-ON LABS MANUAL | 132


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Provide the Request details [172]

Notice that our request form does not have an input for virtual machine name, this is because we stated visibility = no when customising
the form for that field.

1. Begin typing Development in the Destination folder field and select it from the drop down list

2.Click SUBMIT to submit our request

HANDS-ON LABS MANUAL | 133


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Confirm the Request was successful [173]

1. The request will take a short while to complete. Return to the vSphere tab

2.Notice that our ubuntu-0003 machine has moved to the Development folder

HANDS-ON LABS MANUAL | 134


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Open vRealize Orchestrator [174]

Before we finish up this lesson lets take a quick look at vRealize Orchestrator

1. Return to the vRealize Automation tab and select the 9 dots in the top right hand corner

2.Select Orchestrator

HANDS-ON LABS MANUAL | 135


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Confirm that the Workflow was run in vRealize Orchestrator [175]

1. Click Dashboard in the left pane

2.Ensure that the USAGE panel is selected

3.Note in the Recent Workflow Runs section you will see that the workflow Move virtual machine to folder was completed

Congratulations you have successfully created a Custom Day 2 action which calls a vRealize Orchestrator Workflow to move a virtual
machine to a folder in vSphere

ABX Action Extensibility [176]

In vRealize Automation ABX Actions are executed based on lifecycle events, using functions-as-a-service (FaaS), to extend the
functionality of the platform. They support several languages, including PowerShell, NodeJS, and Python and can be executed in either
Public Cloud FaaS (Function as a Service) Providers or On Prem. In this section of the lab, we will utilize a custom PowerShell ABX
Action, a Subscription, and a Custom Form Input to change the name of a Virtual Machine resource. ABX Actions are a powerful
method to extend the functionality of vRealize Automation.

If your browser isn't already open, launch Google Chrome

1. Click the Chrome icon on the Windows Quick Launch Task Bar

Open the Chrome Browser from Windows Quick Launch Task Bar [177]

HANDS-ON LABS MANUAL | 136


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Open the bookmark for vRealize Automation [178]

1. Click the vRealize Automation bookmark in the bookmark bar

HANDS-ON LABS MANUAL | 137


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Log in to vRealize Automation [179]

Login using the following credentials:

Username: holadmin

Password: VMware1!

1. Click Sign in to log in to the vRealize Automation Cloud Services Console

HANDS-ON LABS MANUAL | 138


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Open the Cloud Assembly Service [180]

Open the Cloud Assembly service:

1. Click Cloud Assembly to open the vRealize Code Stream Service

We are now signed into the Cloud Assembly service as the holadmin user.

HANDS-ON LABS MANUAL | 139


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Make a new Extensibility Action [181]

We will perform the following steps:

1. Open the Extensibility tab

2.Open the Actions view

3.Create a New Action


Action.

HANDS-ON LABS MANUAL | 140


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Name the Action [182]

1. We will name our action renameVirtualMachine

2.Assign our action to the HOL Project

3.Click Next to continue.

HANDS-ON LABS MANUAL | 141


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Multi Language Support in ABX Actions [183]

Once the ABX Action is open, we can choose which of the Action languages we want to use to write the code for our action in. Thanks
to polyglot support, Nodejs, PowerShell, and Python are all supported. For this section of the lab we will be utilizing PowerShell to
create an action to rename our Virtual Machine based on a custom input.

1. Once the view loads, click on the dropdown

2.Change the language to PowerShell

HANDS-ON LABS MANUAL | 142


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Change the Action to Execute On Prem [184]

ABX Actions can be executed in several FaaS (Function as a Service) Cloud Providers or they can be executed On Prem
Prem. We will make
sure our action is going to execute On Prem by:

1. Selecting the FaaS Provider dropdown.

2.Click on On Prem
Prem.

HANDS-ON LABS MANUAL | 143


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Coding our Action [185]

1. We will begin coding our action by highlighting all of the existing code first. Delete the code from the action, in the next step

we will add our own custom code back to our action.

HANDS-ON LABS MANUAL | 144


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Coding our Action (continued) [186]

The code that we will be using can be found in the C:\hol-2201-lab-files\labfiles\HOL-2201-02\ folder on the control center VM we are
working from.

1. We will open a Windows Explorer window to that folder. The simplest way to do this is to click on Lab Files in the Favorites
section of the Explorer Window.

2.We will need to open the script in notepad by double clicking on 2201-02-module5-ABXps.txt
2201-02-module5-ABXps.txt.

3.[Not Shown] Copy all of the code from the 2201-02-module5-ABXps.txt file

Note: If, when trying to paste from the clipboard using the paste keyboard shortcut (ctl-v or command-v), you may have enabled the
Paste Intercept feature in the lab environment. To disable the setting, see the information in the Lab Guidance section here and then
use the Table of Contents to return to this place in the lab manual.

HANDS-ON LABS MANUAL | 145


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Save and close the Action [187]

After entering the code, we should:

1. Save the action by clicking on Save


Save.

2.Close out of the Action view by clicking on Close


Close.

Create a new Subscription [188]

HANDS-ON LABS MANUAL | 146


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Once we are back in the Extensibility view, we will perform the following steps:

1. Navigate to Subscriptions

2.Create a New Subscription

Configure the new Subscription [189]

1. We will first configure the subscription with the Name of renameVmSubscription

2.Provide a Description that says Rename a VM to a Custom Name


Name.

3.Click on the ADD button under Event Topic to add a new event topic and then proceed to the next step.

HANDS-ON LABS MANUAL | 147


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Add an Event Topic [190]

We will perform the following steps:

1. Start by searching within the window that pops up for compute allocation

2.Select Compute allocation in the list.

3.Click Select

HANDS-ON LABS MANUAL | 148


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Add the Action [191]

After adding our Event Topic, we will go back to the Subscription view and then:

1. We can click on the + Add Button for the Action/Workflow to add to this subscription.

HANDS-ON LABS MANUAL | 149


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Add the action (continued) [192]

From the window that pops up, we will perform the following steps:

1. Select our renameVirtualMachine action from the list

2.Click on SELECT to add it to the Subscription

HANDS-ON LABS MANUAL | 150


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Set Blocking and Save the Subscription [193]

Back in the Subscription view, we will perform the following steps:

1. Set our Subscription to Block so our pipeline won't continue until it is complete

2.Click Save to save the subscription

HANDS-ON LABS MANUAL | 151


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Edit the Cloud Template [194]

Next, we will clone our Ubuntu 18 Cloud Template so that we can customize it.

1. Click on the Design Tab

2.Select the checkbox next to the Ubuntu 18 blueprint

3.Click Clone

HANDS-ON LABS MANUAL | 152


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Configure the clone [195]

We will perform the following steps:

1. Name our Blueprint, myCustomCloudTemplate

2.Assign it to the HOL Project

3.We will select Current Draft for the version

4.Click the Clone button

HANDS-ON LABS MANUAL | 153


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Edit the Custom Cloud Template [196]

1. We will need to open our Cloud Template so that we can edit it and have it call our custom renaming action. Open the

blueprint by clicking on myCustomCloudTemplate


myCustomCloudTemplate.

Adding an input [197]

1. We will now add a new input to our VM by clicking on the Inputs tab in the left side pane.

2.From there we can click on the NEW CLOUD TEMPLATE INPUT button to add a new input.

HANDS-ON LABS MANUAL | 154


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Adding an input (continued) [198]

1. From the New Cloud Template Input window that pops up, we will assign a name of customVmName to our input.

2.We can then click on Create to create our new Input


Input.

HANDS-ON LABS MANUAL | 155


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Editing the Cloud Template to call our action [199]

We will need to assign the value from our input to a property that will be used by the Action we created earlier

1. In this step we will edit our Cloud Template YAML by clicking back on the Code tab
tab.

2.We will be adding a new property line under the properties as follows; customName: '${input.customVmName}'

The complete YAML for the Cloud Template will now look as follows.

HANDS-ON LABS MANUAL | 156


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

formatVersion: 1
name: Ubuntu 18
version: 1
inputs:
customVmName:
type: string
resources:
ubuntu:
type: Cloud.vSphere.Machine
properties:
customName: '${input.customVmName}'
image: Ubuntu18
flavor: tiny
constraints:
- tag: 'cloud:vsphere'
networks:
- network: '${resource.vsphere_network.id}'
assignment: static
vsphere_network:
type: Cloud.vSphere.Network
properties:
networkType: existing
constraints:
- tag: 'net:vsphere'

Deploy our Cloud Template [200]

1. At this point, we can click on the Deploy button in the bottom left of the window and begin deploying our Cloud Template

HANDS-ON LABS MANUAL | 157


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Deployment Options [201]

From the deployment window that opens, we will perform the following steps:

1. Provide a Deployment Name of myCustomDeployment

2.Click Next

HANDS-ON LABS MANUAL | 158


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Deployment Options (continued) [202]

From the deployment Inputs window, we will now perform the following steps:

1. Enter the Custom Vm name for our Virtual Machine as rainpole

2.Click Deploy

HANDS-ON LABS MANUAL | 159


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Monitor the Deployment [203]

The Deployment Creation window will launch, and the topology will be deployed. This may take a few minutes so please be patient as
the VM is deployed. We can perform the following steps:

1. Click the Refresh


efresh Button to refresh the deployment status and monitor the progress.

2.Wait for the deployment window to show the Virtual Machine Resource

3.Click on it and observe that the Resource Name is rainpole

That concludes a brief introduction to ABX Extensibility options. There are many other ways to utilize the ABX extensibility within
vRealize Automation so we hope you'll look at some of the resources at the end of the lab and see what else you can do with these
amazing automation and extensibility options.

Conclusion [204]

In this module we walked through the basics of using VMware vRealize Orchestrator and vRealize Automation to perform extensibility
tasks.

HANDS-ON LABS MANUAL | 160


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

You've finished the module [205]

Congratulations on completing the lab module.

If you are looking for additional information on extensibility have a look here;

https://www.vmware.com/products/vrealize-orchestrator.html

https://www.vmware.com/products/vrealize-automation.html

From here you can:

1. Click to advance to the next page and continue with the next lab module

2.Open the TABLE OF CONTENTS to jump to any module or lesson in this lab manual

3.Click on the END button if you are done with the lab for now and want to exit

HANDS-ON LABS MANUAL | 161


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Module 6 - Policy-Based Lifecycle Management and Governance (60 minutes)

Introduction [207]

In this module, we will explore the Service Broker component of vRealize Automation. As an administrator, we will leverage policies and
custom forms to provide governance and customization, and as an end user, we will see what governance looks like.

Log in to vRealize Automation as holadmin [208]

In this lesson we will start by logging into vRealize Automation.

Open Chrome Browser from Windows Quick Launch Task Bar [209]

1. Click on the Chrome Icon on the Windows Quick Launch Task Bar.

Launch vRealize Automation [210]

From within the Chrome web browser:

1. Click vRealize Automation from the bookmarks bar.

HANDS-ON LABS MANUAL | 162


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Log in to vRealize Automation [211]

At the Workspace ONE login screen:

1. Enter holadmin into the username field.

2.Enter VMware1! into the password field.

3.Click Sign In
In.

HANDS-ON LABS MANUAL | 163


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Launch the Cloud Assembly Service [212]

From within the Cloud Services Console


Console, under My Services
Services:

1. Click the Cloud Assembly service.

Share Cloud Templates Between Multiple Projects [213]

Cloud Templates can be shared between multiple projects. In this lesson, we will create a new project and assign an existing Cloud
Template to it, rather than creating a new one.

HANDS-ON LABS MANUAL | 164


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Navigate to Projects [214]

1. Click the Infrastructure tab

2.Click Projects
3.Click + NEW PROJECT to add a new project

HANDS-ON LABS MANUAL | 165


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Create a New Project [215]

1. For Name, enter Rainpole Project

2.Click the Users tab to proceed

Add Users to Project [216]

HANDS-ON LABS MANUAL | 166


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

1. Click + ADD USERS to open the Add Users window

Add Member to Project [217]

1. In the Users field, type holservicedesk but do not click Enter. When User holservicedesk appears in the list, select it and it will

appear in green as in the screenshot above.

2.Click ADD to add this user as a member of the project

The holservicedesk User will be able to consume project resources, but not be able to create or administer any policies.

HANDS-ON LABS MANUAL | 167


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Add Administrator to Project [218]

1. Click + ADD USERS to open the Add Users window again (not shown)

2.In the Users field, type holadmin but do not click Enter. When Admin HOL appears in the list, select it and it will appear in

green as in the screenshot above.

3.Click the Assign role field and select Administrator from the list

4.Click ADD to add holadmin as an Administrator of this project

HANDS-ON LABS MANUAL | 168


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Configure Provisioning Settings [219]

By default, no cloud zones will be assigned to this project. Assigning cloud zones to the project will allow users assigned to the project
to deploy cloud templates using resources in those cloud zones.

1. Click the Provisioning tab

2.Click + ADD ZONE to add cloud zones to this project

3.Select Cloud Zone from the menu

HANDS-ON LABS MANUAL | 169


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Add Cloud Zone to Project [220]

1. Click on the Cloud zone field, and select RegionA01 from the list

2.Click ADD to add this cloud zone as a provisioning target for this project

In this lesson we will not be setting limits within this cloud zone for the project. But project-specific limits for resources and number of
instances can be specified per cloud zone within the project.

HANDS-ON LABS MANUAL | 170


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Create the Project [221]

1. Click the Summary tab

2.Click CREATE to create this project and return to the list of available projects

HANDS-ON LABS MANUAL | 171


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Navigate to Cloud Templates [222]

With the new project created, new Cloud Templates can be created as part of the project. However, rather than creating new Cloud
Templates from scratch, in this lesson we will modify an existing Cloud Template so that it can be shared between multiple projects.

1. Click the Design tab to view the list of available Cloud Templates

2.Click on the Ubuntu 18 Cloud Template to open it in the Canvas

Modify Cloud Template Settings [223]

1. Click SETTINGS to open the Cloud Template settings

HANDS-ON LABS MANUAL | 172


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Configure Cloud Template Sharing [224]

1. Click the button next to Allow an administrator to share with any project in this organization

2.Click SAVE to save the setting change

3.Click CLOSE (not shown) to close the Cloud Template and return to the list

HANDS-ON LABS MANUAL | 173


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Verify Cloud Template Sharing [225]

1. Note that the Ubuntu 18 Cloud Template includes an icon in the Project column signifying that this blueprint can be shared

with other projects in the organisation

Now that this Cloud Template is available to the newly created Rainpole Project, we will enable it in Service Broker and create policies
that will apply to HOL Service Desk User's deployments of this Cloud Template.

Configuring Policies in Service Broker [226]

In the previous lesson, we created a new project for a specific Rainpole Service Desk team. But rather than creating new Cloud
Templates specifically for that project, we enabled a specific Cloud Template to be shared among multiple projects. In this lesson, we
will move from Cloud Assembly to Service Broker, share the Cloud Template, and set up policy and customization for more specific
control over deployments in this project.

HANDS-ON LABS MANUAL | 174


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Navigate to Service Broker [227]

1. On the right side of the browser window, click the 9 dots in the upper right and the menu will slide open
2.Click Service Broker to switch to the Service Broker service

HANDS-ON LABS MANUAL | 175


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

View Catalog [228]

Note that, as the holadmin user, we already have access to several Cloud Templates due to membership in the HOL Project project.
The Ubuntu 18 Cloud Template was made shareable in the previous lesson, and we will now update Service Broker and then add this
Cloud Template to the new Rainpole Project.

1. Click Content & Policies

HANDS-ON LABS MANUAL | 176


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Update Content Source [229]

The Cloud Template we want to add to our new project (Ubuntu 18) is already available to Service Broker as part of the HOL Cloud
Templates content source. By updating this content source, Service Broker will update the Cloud Template setting change we made in
the previous lesson.

1. Click HOL Cloud Templates to open the content source

HANDS-ON LABS MANUAL | 177


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Update Content Source (Continued) [230]

This content source pulls Cloud Assembly Cloud Templates assigned to the HOL Project project. By updating the content source, we
will update Service Broker to include the sharing changes made to the Ubuntu 18 blueprint.

1. Click VALIDATE to verify the content. Note the number of items found in the validation message.

2.Click SAVE & IMPORT to save this updated content source.

HANDS-ON LABS MANUAL | 178


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Add Item to New Project [231]

With Service Broker updated, we can now share the updated blueprint with the Rainpole Project project.

1. Click on Content Sharing on the left to proceed

2.Click on the Project field to open the list of projects

3.Select Rainpole Project from the list

HANDS-ON LABS MANUAL | 179


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Add Item to New Project (Continued) [232]

With the project specified, the Add Items button will become usable.

1. Click + ADD ITEMS

HANDS-ON LABS MANUAL | 180


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Select Items to Add [233]

1. Click the arrow next to HOL Cloud Templates to expand the content source. Note that the Ubuntu 18 Cloud Template is the

only one listed, because this is the Cloud Template that we modified to be shareable.

2.Click the checkbox to share all shareable items in this content source with Rainpole Project

3.Click SAVE to proceed

HANDS-ON LABS MANUAL | 181


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

View Catalog Items [234]

Now that the Ubuntu 18 Cloud Template has been shared with Rainpole Project, it will be available for HolServicedesk to use. But when
we return to the Catalog tab, we still see the same set of Cloud Templates as before. This is because holadmin belongs to several
projects in this org.

1. Click the Catalog tab to return to the catalog

2.Note the projects listed for the Ubuntu 18 Cloud Template, and how it varies from the other Cloud Template shown

3.Click the Filter icon to open the filter options

HANDS-ON LABS MANUAL | 182


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Filter Catalog View [235]

1. Click the checkbox next to Rainpole Project in the filter list. After a moment, the Catalog Items list will update and only show 1

item - our shared Ubuntu 18 Cloud Template. This is what HolServicedesk user will see in the catalog upon logging in, since

that user only belongs to Rainpole Project.

At this point, HolServicedesk can request deployments of the Ubuntu 18 Cloud Template through Service Broker. But currently, the user
has no limitations on the number of deployments because we did not set limits when assigning the cloud zone to the project previously.
What if we want to provide more control over resources used in this project?

HANDS-ON LABS MANUAL | 183


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Navigate to Policy Definitions [236]

1. Click Content & Policies

2.In the Policies section of the menu on the left, click Definitions

3.Click + NEW POLICY to begin the process of creating a new policy

HANDS-ON LABS MANUAL | 184


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Policy Types [237]

Three Policy Types are available:

•Day 2 Actions Policies, which will allow for specific Day 2 actions to be available to deployed resources

•Lease Policies, which allow administrators to set expiration dates for deployed resources

•Approval Policies, which will pause deployment requests for approval by one or more approvers

•Resource Quota Policies allow the cloud administrator to limit the consumption of cloud resources for VM, CPU, memory, and

storage

All policies can be applied conditionally.

1. First, we will create a new approval policy. Click Approval policy to proceed.

HANDS-ON LABS MANUAL | 185


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Create New Approval Policy [238]

1. For Name, enter Rainpole Approval

2.Select Project from the Scope field,

3.Begin typing Rainpole Project in the search field and select it to limit this approval policy to this project specifically. Policies

can be applied to a specific project, or to the entire organization.

4.Click the + button to add Deployment criteria

HANDS-ON LABS MANUAL | 186


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Set Deployment Criteria [239]

Adding deployment criteria for a policy allows for conditional application of that policy, giving project administrators granular control
over how policies are applied. Individual criteria or groups of criteria can be combined with and/or logic in order to make the criteria as
specific as desired.

1. Click Select clause to open the menu

2.Click Cloud Template to set this value

Set Deployment Criteria (Continued) [240]

HANDS-ON LABS MANUAL | 187


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

1. Click on the Select operator field, and select equals from the list

2.Click on the Enter value field, and select Ubuntu 18 from the list

This establishes a single criteria for the approval policy, allowing this approval policy to be applied to every deployment of the Ubuntu
18 Cloud Template within the Rainpole Project project.

Continue Policy Creation [241]

Click the scrollbar (not shown) to scroll down to view the rest of the approval policy settings. In an approval policy, multiple approvers
can be specified. Policy settings can require all users to approve, or any single user.

1. Click + ADD USERS to add an Approver to this policy

2.In the Add Users window (not shown,) enter holadmin and wait for the selection, select Admin HOL - holadmin@corp.local
holadmin@corp.local,

and press Add to add holadmin as an approver

HANDS-ON LABS MANUAL | 188


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Approval Policy Creation [242]

1. Note that the holadmin user is now available as an approver following the previous step

2.Click on the Auto expiry decision field, and select Reject


Reject. This will allow for requests that expire to be automatically rejected.

3.For Auto expiry trigger, enter 2. Combined with the Auto expiry decision setting, this will cause all approval requests to

automatically be rejected after 2 days.

4.Click on the Actions field, begin typing Deployment.Create and select Deployment.Create from the list. This approval policy

will only be enforced when new deployments of this blueprint are created.

5.Click CREATE to complete the creation of this approval policy

HANDS-ON LABS MANUAL | 189


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Approval Policy Created [243]

Note that the Rainpole Approval approval policy is now created. This policy will:

•Only apply to the Rainpole Project project

•Apply to all new deployments of the Ubuntu 18 Cloud Template specifically

•Require the approval of holadmin to proceed

•Automatically be rejected if not approved within 2 days

With the approval policy in place, we will create additional policies to further enforce governance of the Rainpole Project.

1. Click + NEW POLICY

HANDS-ON LABS MANUAL | 190


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Create Day 2 Actions Policy [244]

1. Click Day 2 Actions Policy

HANDS-ON LABS MANUAL | 191


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Configure Day 2 Actions Policy [245]

HANDS-ON LABS MANUAL | 192


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Day 2 actions policies allow for control over what actions can be executed on deployed resources. Example actions include rebooting
machines, taking or deleting snapshots, and deleting deployments, but custom day 2 actions can also be created and then controlled
via policy.

The initial configuration of this policy will be similar to the approval policy - limited to the Rainpole Project project, and applicable to
deployments of the Ubuntu 18 blueprint.

1. For Name, enter Rainpole Actions

2.Select Project from the Scope field,

3.Begin typing Rainpole Project in the search field and select it to limit this policy to this project specifically. Policies can be

applied to a specific project, or to the entire organization.

4.Click the + to add one deployment criteria

5.Set the clause to Cloud Template, the operator to equals


equals, and the value to Ubuntu 18
18, as shown in the screenshot above
6.Scroll down to view the rest of the policy settings (not shown)

HANDS-ON LABS MANUAL | 193


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Configure Day 2 Actions Policy (Continued) [246]

1. Click on the Role field, and change the value to Member


Member. This will apply the policy to all users in the Rainpole Project

assigned to the Member role (recall from the previous lesson that HolServicedesk is a member of this project.)

2.For Actions, click in the filter field and type snapshot to narrow down the list of available actions

3.Select Cloud.vSphere.Machine.Snapshot.Create
loud.vSphere.Machine.Snapshot.Create, Cloud.vSphere.Machine.Snapshot.Delete
Cloud.vSphere.Machine.Snapshot.Delete, and

Cloud.vSphere.Machine.Snapshot.Revert from the list (Note: after each selection, you will need to click on the filter menu

again to reopen the list.)

HANDS-ON LABS MANUAL | 194


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Add Lease Action to Policy [247]

1. Click in the filter field again, and replace the snapshot filter with lease

2.Select Deployment.ChangeLease from the list to add it to the list of available actions

In this way, the day 2 actions policy limits all members of the project to only these specific actions on deployments.

3.Click CREATE

HANDS-ON LABS MANUAL | 195


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Day 2 Actions Policy Created [248]

Note that the Rainpole Actions day 2 actions policy is now created. This policy will:

•Only apply to the Rainpole Project

•Apply to deployments of the Ubuntu 18 Cloud Template specifically

•Limit all members of the Rainpole Project to only take, delete, or revert to snapshots of vSphere machines, and to change the

lease of deployed resources

We have one more policy to create.

1. Click + NEW POLICY

HANDS-ON LABS MANUAL | 196


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Create Lease Policy [249]

1. Click Lease Policy

HANDS-ON LABS MANUAL | 197


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Configure Lease Policy [250]

Lease policies allow for deployments to be deleted after a specified time, freeing up resources to be used by the rest of the
organization.

The initial configuration of this policy will be similar to the previous policies - limited to the Rainpole Project project, and applicable to
deployments of the Ubuntu 18 blueprint.

1. For Name, enter Rainpole Lease

2.Click on Scope and select Rainpole Project from the list

3.Click the + to add one deployment criteria

4.Set the clause to Cloud Template, the operator to equals


equals, and the value to Ubuntu 18
18, as shown in the screenshot above

5.Scroll down to view the rest of the policy settings (not shown)

HANDS-ON LABS MANUAL | 198


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Configure Lease Policy (Continued) [251]

1. For Maximum lease (days), enter 7

2.For Maximum total lease (days), enter 30

3.For Grace period (days), enter 2

For all deployments to which this lease policy applies, the deployments will be available for a maximum of 30 days. The lease will expire
after 7 days, and the user has a 2 day grace period to extend the lease for a maximum of 7 days each time, until the 30 day timeframe is
met.

4.Since this policy may affect existing deployments, a preview option is included to validate the effect the policy creation will

have. Click Preview to open the Policy Enforcement Preview window, to view the impact of enforcing this policy.

5.Click the x to close the Policy Enforcement Preview window (not shown,) and click CREATE to create the policy

HANDS-ON LABS MANUAL | 199


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Lease Policy Created [252]

Note that the Rainpole Lease lease policy is now created. This policy will:

•Only apply to the Rainpole Project project

•Apply to deployments of the Ubuntu 18 Cloud Template specifically

•Apply a lease of 7 days to all deployments, which can be renewed 7 days at a time up to a maximum of 30 days. This includes

a 2 day grace period to renew the 7 day lease.

Custom Forms in Service Broker [253]

Content in Service Broker can be enhanced with a custom form. Custom forms allow administrators to specify default values, customize
the name and appearance of request form items, and to include specific details generated from vRealize Orchestrator workflows.

HANDS-ON LABS MANUAL | 200


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Open Custom Form Designer for Ubuntu 18 Blueprint [254]

1. Click Content in the left menu

2.Click the 3 vertical dots next to the Ubuntu 18 Cloud Template to open the customization menu

3.Click Customize form

HANDS-ON LABS MANUAL | 201


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

View Custom Forms Designer [255]

The Custom Forms Designer allows several options for customizing existing Cloud Template inputs, as well as adding new ones.

1. Click and drag the bar above Generic Elements to drag the menu and reveal several of the elements that can be added to a

request form.

2.The canvas shows current inputs for the Cloud Template. This particular Cloud Template does not have any custom inputs at

the moment, but we will make several changes to the form in this lesson. Drag the Text Area Element onto the form canvas

3.Details of selected inputs will appear in the Properties pane. The default appearance and value of the element can be

modified, and constraints (such as a pattern, minumum/maximum length, and others) can be set as well. Type Description in

the Label field.

4.Click the Values tab

HANDS-ON LABS MANUAL | 202


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Set Conditional Value for Description Element [256]

1. Click the down arrow next to Default value to expose additional options

Form elements can have several types of values, including:

•A constant
constant, such as a string or a number

•A conditional value
value, based on one or more statements

•A value from an external source (a vRealize Orchestrator workflow)

•A specific value based on the value of another field in the request form (bind
bind field
field)

•A computed value - either a concatenated string or a calculated number

In this lesson, we will set a conditional value for the Description element.

2.Click the Value source field and select Conditional value

3.For Set value, type Service Desk User's deployment for Rainpole Project

4.Click on the first field under If a new window will open

HANDS-ON LABS MANUAL | 203


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Selected Requested by Value [257]

1. Click the arrow to expand the Request info fields

2.Select Requested by

3.Click Select

HANDS-ON LABS MANUAL | 204


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Continue building the expression [258]

1. Click on the second field, and select Equals

2.Click on the field labeled Enter value, and type holservicedesk@corp.local

This expression will set a specific description when this Cloud Template is requested by holservicedesk. Otherwise, the description field
will be empty.

HANDS-ON LABS MANUAL | 205


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Add DropDown Element to Form [259]

1. Click and drag the DropDown element from the Generic Elements section onto the canvas as shown

2.Click on the newly added DropDown element on the canvas to select it

HANDS-ON LABS MANUAL | 206


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Change Input Appearance [260]

1. Click on the label field, and change the value to Cloud to rename the DropDown field

2.Click the down arrow next to Custom help

3.For Signpost help, enter Preview - not in use yet

Adding text to the Signpost help field will add a small help icon next to the DropDown field in the form itself. Clicking on that icon will
reveal this message. In addition to the help message, the field's visibility can be set in this tab, and the field can be marked as Read-
only if needed.

HANDS-ON LABS MANUAL | 207


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

View Values for DropDown Field [261]

DropDown value options can be set from a vRealize Orchestrator workflow (an external source,) or a specific list of values can be
defined. In this lesson, we will set a list of constants.

1. Click the Values tab

2.Click the down arrow next to Value options

Note the format for the values: Value|Label|Description(optional),Value|Label|Description

HANDS-ON LABS MANUAL | 208


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Set Values for DropDown [262]

1. In the Value source text area, type none|No Preference|No preferred cloud,vsphere|vSphere|Private Cloud,aws|AWS|AWS,

azure|Azure|Azure and press Enter (Note: select the text in the manual, and drag and drop it into the lab console to copy and

paste)

Remember that the format is Value|Label|Description. The Label entries will appear to the requestor in the form, and when a specific
item in the list is selected, that it's Description entry will appear beneath the DropDown element.

2.Set a default value of none (or any other of the Value entries in the Value source text area, to set a different default value)

3.Click on the Appearance tab to save the value

HANDS-ON LABS MANUAL | 209


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Add Text to Top of Form [263]

1. Click and drag the Text element from the Generic Elements section to the small section above Deployment Name at the top of

the form

2.Click on the Text element in the form to select it

HANDS-ON LABS MANUAL | 210


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Set Value for Text Element [264]

1. In the Properties pane, click on the Values tab

2.For Default value, enter Rainpole Project Machine Request Form

3.Note the Field ID for this element. Select it, and then right click and select Copy to save this ID for later

In addition to customizing the appearance and values of form elements, it is also possible to further customize the appearance of the
request form with CSS.

Open Visual Studio Code [265]

1. Click the Visual Studio Code icon in the taskbar to open it

HANDS-ON LABS MANUAL | 211


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Open CSS File [266]

1. In Visual Studio Code, Click File


File, and select Open File (not shown)

2.Click the Lab Files folder in the Favorites list, and double click on the folder named HOL-2201-02 (not shown)

3.Click on the RP_Custom.css file to select it

4.Click Open

HANDS-ON LABS MANUAL | 212


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Replace CSS Element with Text Element ID [267]

1. Select the <field_ID> entry in line 1 of the file (note: be sure to include the < and >, but not the # on the line)

2.Right
Right click on the selection, and select Paste to paste the field ID value copied from the Text element in the request form

HANDS-ON LABS MANUAL | 213


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

View and Save CSS File [268]

The file should look similar to the following:

1. The first block will apply customization to the text area we added to the request form. Note that the specific ID of this field in

the lab may vary from the screenshot, which is why it was necessary to copy and paste.

2.The second block will apply customization to the Description field in the request form.

3.Click on the File menu and select Save to save the changes, and click the Service Broker browser in the taskbar (not shown) to

return to Service Broker

HANDS-ON LABS MANUAL | 214


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Import CSS File [269]

1. Click ACTIONS to open the menu

2.Select Import CSS from the list

HANDS-ON LABS MANUAL | 215


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Choose File to Import [270]

1. Click the Lab Files folder in the Favorites list, and double click on the folder named HOL-2201-02 (not shown)

2.Click on the RP_Custom.css file to select it

3.Click Open to import the customizations

HANDS-ON LABS MANUAL | 216


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

CSS Import Complete [271]

The import will complete quickly, although the changes are not reflected in the canvas.

1. Click ENABLE to enable the custom form for this Cloud Template. With the form enabled, the changes we've made will be

visible to anyone who requests this Cloud Template from the catalog.

Save Custom Form Settings [272]

HANDS-ON LABS MANUAL | 217


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

1. Click SAVE to save the custom form settings

Consuming Custom Policies in vRealize Automation [273]

In previous lessons, we created a new project and shared an existing Cloud Template with it, and then configured policies and a custom
form for members of that project. But what does this look like for the Service Broker consumer? In this lesson, we will assume the role
of the 'holservicedesk' user and request a deployment in Service Broker.

Open Incognito Browser Window [274]

1. Click the 3 vertical dots to the right of the URL bar in the browser to open the menu

2.Select New incognito window from the list

HANDS-ON LABS MANUAL | 218


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Log in to vRealize Automation [275]

1. Click the vRealize Automation bookmark in the bar to connect to vRealize Automation

2.Since this is an incognito session, you will be presented with a domain selection screen. Click Next to continue.

HANDS-ON LABS MANUAL | 219


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Log In to vRealize Automation (Continued) [276]

1. For username, enter holservicedesk

2.For password, enter VMware1!

3.Click Sign in to log in

HANDS-ON LABS MANUAL | 220


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Open Service Broker [277]

With only Member access to the Rainpole Project project, holservicedesk has fewer options than holadmin.

1. Click Service Broker

HANDS-ON LABS MANUAL | 221


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Request Deployment [278]

The Ubuntu 18 Cloud Template we previously shared with Rainpole Project is available to be requested.

1. Click REQUEST

HANDS-ON LABS MANUAL | 222


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Enter Request Details [279]

HANDS-ON LABS MANUAL | 223


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Note that the customizations made to the form in the previous lesson are visible, including:

•The text added to the top of the form, with new font style and color

•Similar changes to the Description element

•The text in the Description field, set because we are requesting as holservicedesk@corp.local

•the Cloud input, with the default value set and the descriptive text below the select box (feel free to set this input to any value)

•The signpost icon next to the Cloud input, which will display the help text when clicked on

Next, we will begin the deployment.

1. For Deployment Name, enter Linux Test

2.Click SUBMIT

Note Pause for Approval [280]

1. The deployment will begin as usual, but it will pause at step 3 with a status of Create - Approval Pending due to the approval

policy configured earlier. This deployment will not proceed until holadmin approves the request.

2.Click the other browser task in the taskbar to return to holadmin's session (note: if the session has timed out, click the vRealize
Automation bookmark in the bookmark bar, log in with the stored holadmin credentials, and go to Service Broker.)

HANDS-ON LABS MANUAL | 224


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

View Approval Request [281]

1. Click the Approvals tab

A summary of the approval is shown. Note that details of the deployment (name, requestor, and project) are shown, as well as the
action awaiting approval (Deployment.Create) and the associated approval policy. This approval request is set to expire in 48 hours due
to policy setting we made.

2.Click on the Actions dropdown menu and select Approve

Approve the Request [282]

1. For Comment, enter Approved


2.Click APPROVE to approve the request

HANDS-ON LABS MANUAL | 225


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

View Request in Progress [283]

Click on the other browser task in the taskbar (not shown) to return to the holservicedesk session. Note that the deployment status is
now Create - In Progress following holadmin's approval. The request will complete in 3-5 minutes.

1. While the deployment is in progress, click on the deployment name Linux Test to open the deployment

View Deployment Actions [284]

When the deployment completes, a green Create Successful message will appear.

1. Click ACTIONS next to the success message to open the menu of deployment actions. Note that the only action available is

Change Lease, since that was the only deployment action that we set previously in the Rainpole Actions Day 2 Actions policy.

Note: You can attempt to change the lease for this deployment, but since it was only recently deployed and the maximum lease time is
7 days per the Rainpole Lease policy, it may only be possible to extend the lease by a few minutes.

HANDS-ON LABS MANUAL | 226


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

View Machine Actions [285]

1. The ubuntu machine may already be selected in the Topology section. If not, click on it to select it.

2.In the details pane on the right, click ACTIONS to see available actions for this machine. Since the only vSphere Machine

actions allowed per the Rainpole Actions policy are for snapshot create/delete/revert, only those actions will be available for

holservicedeskuser

Conclusion [286]

In this module, we explored Service Broker from the cloud administrator's perspective, and the end user's perspective. Policies in
Service Broker allow for a considerable range of governance options for requests and existing deployments, and custom forms allow
administrators to further enhance request forms for end users.

HANDS-ON LABS MANUAL | 227


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

You've finished the module [287]

Congratulations on completing the lab module.

If you are looking for additional information, see:

•Getting Started with vRealize Automation Service Broker

•Setting up vRealize Automation Service Broker Policies


•Customize a vRealize Automation Service Broker Icon and Request Form

From here you can:

1. Click to advance to the next page and continue with the next lab module

2.Open the TABLE OF CONTENTS to jump to any module or lesson in this lab manual

3.Click on the END button if you are done with the lab for now and want to exit

HANDS-ON LABS MANUAL | 228


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Module 7 - Introduction to vRealize Automation SaltStack Config (45 minutes)

Introduction [289]

This Module will introduce the vRealize Automation SaltStack Config feature within vRealize Automation. The module with provide

•An overview of vRealize Automation SaltStack Config and how it can be used.

•We will then look at some of the configurations for vRealize Automation SaltStack Config, and then

•A demo of vRealize Automation SaltStack Config in action.

vRealize Automation SaltStack Config Overview [290]

vRealize Automation SaltStack Config is a solution that provides server configuration and the ability for managing self-healing systems
at scale. It focuses on orchestration to be a complete solution that encourages a declarative approach to configuration management.

vRealize Automation SaltStack Config utilises a Master-Minion Architecture in which clients, called minions can be commanded and
controlled from a central command server called a master
master. vRealize Automation SaltStack Config uses a push approach where the
master pushes the configurations to the nodes/agents.

vRealize Automation SaltStack Config is simple to install and manage. The vRealize Automation SaltStack Config master doesn’t have
any complex prerequisites on a message system or a special database to perform its intended job. Installing the vRealize Automation
SaltStack Config minion on hundreds of servers is easy using the bootstrap script provided by vRealize Automation SaltStack Config
Config.

VMware is committed to open source software. Salt, the open source software at the core of vRealize Automation SaltStack Config
Config, will
continue to be open source and more details about VMware's open source initiatives can be found at https://www.vmware.com/
opensource.html.

HANDS-ON LABS MANUAL | 229


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Enhancing Automation [291]

vRealize Automation SaltStack Config can help with a variety of use cases and scenarios:

•Configuration
Configuration Management – vRealize Automation SaltStack Config uses a declarative YAML approach. It is simple to learn

and it helps complete the digital infrastructure automation story for vRealize Automation.

•Dealing
Dealing with Systems at Scale – The backbone of vRealize Automation SaltStack Config is the remote execution engine, which

creates a high-speed, secure and bi-directional communication channel for groups of systems. Master – Minion configuration

makes it easy to run commands and functions on thousands of system simultaneously.

•Self-Healing
Self-Healing Systems – With the Beacon system of vRealize Automation SaltStack Config, systems can be monitored for

scenarios like brute force attacks, deadlocks, disk utilization, unwanted processes and services running etc. Pairing this with

the Reactor system, vRealize Automation SaltStack Config can restore those systems to a desired state. Real time event

driven automation can significantly reduce downtime by proactively healing systems.

•Support
Support for SecOps – vRealize Automation SaltStack Config delivers full-service, closed-loop automation for compliance and

security. This enables security teams to automate identifying and fixing issues by defining compliance and control to

operations teams thus enabling coordination and better cloud security.

HANDS-ON LABS MANUAL | 230


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

vRealize Automation SaltStack Config Architectural Overview [292]

HANDS-ON LABS MANUAL | 231


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

The architecture consists of an Enterprise Console


Console, combined with PostgreSQL and Redis Databases. These systems communicate
using the SaltStack API to the Salt Master systems that then communicate with all of the Salt Minions
Minions.

Minions, Beacons, Reactors, Grains, and Pillars [293]

vRealize Automation SaltStack Config utilizes a few concepts that are helpful to be familiar with. We are defining them here so if you
see references to them, they can be more clearly understood in the lab.

Minions are servers that are running the vRealize Automation SaltStack Config daemon and listen to commands coming from the Salt
master.

Beacons get deployed to minions and look for events, like file changes or operating system changes and report back to the vRealize
Automation SaltStack Config Master when an event occurs.

Reactors are a mechanism that triggers actions for when events occur.

Grains are static metadata about the vRealize Automation SaltStack Config minions.

Pillars are user-defined variables. vRealize Automation SaltStack Config's pillar data securely stores values such as ports, file paths,
configuration parameters, and passwords.

Sign in to vRealize Automation SaltStack Config [294]

In this section of the lab, we are going to sign in to the vRealize Automation SaltStack Config.

Open Chrome [295]

1. Click on the Chrome icon from your desktop bar

HANDS-ON LABS MANUAL | 232


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Launch vRealize Automation [296]

From within the Chrome web browser:

1. Click vRealize Automation from the bookmarks bar

HANDS-ON LABS MANUAL | 233


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Log in to vRealize Automation [297]

At the Workspace ONE login screen:

1. Enter holadmin into the username field.

2.Enter VMware1! into the password field.

3.Click Sign In

HANDS-ON LABS MANUAL | 234


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Launch SaltStack Config [298]

After logging into vRealize Automation we arrive at the Cloud Services Console
Console, under My Services you will find a list of services that this
user has been entitled to.

1. Click the SaltStack Config service.

HANDS-ON LABS MANUAL | 235


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Log in to SaltStack Config [299]

1. Enter holadmin for the username

2.Enter VMware1! for the password

3.Click LOG IN WITH CORP.LOCAL

A future release of vRealize Automation will not require this additional logon step

HANDS-ON LABS MANUAL | 236


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Overview of vRealize Automation SaltStack Config UI [300]

In this lesson we will provide an overview of the vRealize Automation SaltStack Config interface.

Observe the Minions [301]

1. In the left pane select Minions

2.Under Targets, ensure that All Minions is selected

3.Note that there are 3 minions in the list, our Saltmaster , an ubuntu server and a windows server

From here, it is possible to filter the minions based on Operating System using the Targets panel. It is also possible to run jobs and
commands against different minions present in the list.

HANDS-ON LABS MANUAL | 237


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

View the Minion Keys [302]

1. Expand the Minion Keys section

2.Select Accepted

The Minion Keys section is where you will manage keys for Minions within vRealize Automation SaltStack Config. In this section we can
see which Minions have keys that have been accepted.

HANDS-ON LABS MANUAL | 238


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Open the Activity Section [303]

1. Expand the Activity section.

2.Click on Completed to view any completed jobs

From the Activity tab, you can see jobs that have completed or jobs that are running. Information about the jobs is available, including
which function the job was running and the status. Currently there are no completed jobs but we will change that later within this
module.

HANDS-ON LABS MANUAL | 239


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Review the Config Section [304]

1. Expand the Config section in the left pane

2.Select Jobs

From the Config section, we can view and edit jobs that are available for vRealize Automation SaltStack Config to run as well as see
Schedules, Pillars, and the vRealize Automation SaltStack Config File Server.

HANDS-ON LABS MANUAL | 240


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Review the File Server section [305]

From within the File Server section, we can view, create, and edit files available to vRealize Automation SaltStack Config
Config.

1. Click File Server under the Config section

2.Click the > to expand the base environment

3.Expand the Webserver section by clicking on > next to the Webserver folder
4.Select the index.html file

Here we have a simple html file that we want to deliver to our webserver;

HANDS-ON LABS MANUAL | 241


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

VMware vRealize Automation SaltStac

This file is brought to you by VMware vRealize Automation SaltStack Con

Explore a Salt State File [306]

HANDS-ON LABS MANUAL | 242


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

The state system is built on SLS (SaLt State) formulas. These formulas are built out in files on Salt's file server

1. Select the init.sls file

Here we have a basic Salt State file;

apache2 Service:
service.running:
- name: apache2
- enable: True

/var/www/html/index.html:
file:
- managed
- source: salt://webserver/index.html

2.The first block of the declarative statement ensures that the apache service on the target machine is running

3.The second block creates a the index.html file in /var/www/html/ the source of which is the index.html files stored on the

fileserver that we viewed in the previous step

This concludes the overview of vRealize Automation SaltStack Config UI and State Files, in the next section we will create a job and run
it against a targeted machine

vRealize Automation SaltStack Config in Action [307]

In this lesson we will create a job to apply our Webserver Salt state file to an Ubuntu target.

Open Putty [308]

We will begin by setting up our test.

1. Open Putty from the task bar

HANDS-ON LABS MANUAL | 243


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Open Putty session to Ubuntu-0003 [309]

1. Scroll down and select ubuntu-0003 from the saved sessions menu
2.Click Open

HANDS-ON LABS MANUAL | 244


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Stop the Apache Service [310]

The webserver Salt State file declares that the apache service should be running, as it is already installed and running on our target
machine lets stop it so that we can demonstrate that Saltstack will start it.

1. At the command line type:

sudo systemctl stop apache2

HANDS-ON LABS MANUAL | 245


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Create a new Job [311]

1. Return back to Chrome (Not shown) and select Jobs

2.Click Create Job to begin creating our first job

HANDS-ON LABS MANUAL | 246


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Enter the Job Configuration Details [312]

Here we enter the job details,

1. In the Name field type HOL Deploy Webserver

2.For Targets, select Ubuntu from the dropdown menu

3.In the Function field begin typing state.apply and select it from the dropdown menu

4.Select base for the Environments field from the dropdown menu

5.In the States field, select Webserver from the dropdown menu

6.Click Save to save our new job

HANDS-ON LABS MANUAL | 247


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Run the HOL Deploy Webserver Job [313]

Now lets run our newly created job which will deploy the webserver saltstate to our Ubuntu machine

1. Click the 3 dots next to the HOL Deploy Webserver Job that we just created and select Run Now

HANDS-ON LABS MANUAL | 248


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Confirm the Run Job task [314]

1. Click RUN NOW

Confirm the Job completed successfully [315]

HANDS-ON LABS MANUAL | 249


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

1. Click Completed under the Activity section in the left pane

2.The job will take a moment to run before appearing in the completed jobs list, refresh the page if it hasn't already appeared.

Under the Success there should be a 1 this is because we only have 1 Ubuntu minion registered with SaltStack

Now lets check that the Apache service was started and the index.html file was deployed

View the Webpage [316]

1. Open a new browser tab

2.Enter 192.168.110.120 into the address bar and hit enter to display our webpage

The Apache server was started on our Ubuntu machine and the index.html file was deployed by applying our webserver state file.

Conclusion [317]

In this module we gained an understanding of vRealize Automation SaltStack Config and learned how to navigate the UI before
reviewing a simple Salt State file. We then created a Job to deploy this state to an Ubuntu server ensuring that the Apache service was
running and deploying a simple html file.

HANDS-ON LABS MANUAL | 250


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

You've finished the module [318]

Congratulations on completing the lab module.

If you are looking for additional information on vRealize Automation SaltStack Config please review the following links;

SaltStack Getting Started Tutorials

From here you can:

1. Click to advance to the next page and continue with the next lab module

2.Open the TABLE OF CONTENTS to jump to any module or lesson in this lab manual

3.Click on the END button if you are done with the lab for now and want to exit

HANDS-ON LABS MANUAL | 251


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Module 8 - Introducing vRealize Code Stream - DevOps Solutions (45 minutes)

Introduction [320]

In this module, we will introduce you to VMware vRealize Code Stream.

The lab module will provide a brief overview of the following topics:

•Introduction to vRealize Code Stream

•Pipelines in vRealize Code Stream

•Monitoring and Approvals of Pipelines in vRealize Code Stream

Sign in to vRealize Code Stream [321]

We are going to sign in to the vRealize Code Stream environment in this section of the lab.

If your browser isn't already open, launch Google Chrome

1. Click the Chrome icon on the Windows Quick Launch Task Bar

Open the Chrome Browser from Windows Quick Launch Task Bar [322]

Open the bookmark for vRealize Automation [323]

HANDS-ON LABS MANUAL | 252


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

1. Click the vRealize Automation bookmark in the bookmark bar

Log in to vRealize Automation [324]

HANDS-ON LABS MANUAL | 253


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Login using the following credentials:

Username: holadmin

Password: VMware1!

1. Click Sign in to log in to the vRealize Automation Cloud Services Console

Open the Code Stream Service [325]

Open the Code Stream service:

1. Click Code Stream to open the vRealize Code Stream Service

HANDS-ON LABS MANUAL | 254


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Code Stream Guided Setup Diagram [326]

It is possible that the Code Stream Guided Setup Diagram will popup when we sign in to Code Stream. If it does then we should click
Continue to open Code Stream.

We are now signed into the Code Stream service as the holadmin user.

Pipelines with vRealize Code Stream [327]

vRealize Automation Code Stream models the tasks in the software release process, and automates the development and testing of

HANDS-ON LABS MANUAL | 255


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

developer code to release it to production. It integrates release processes with developer tools to accomplish specific tasks, and tracks
all code artifacts and versions through the use of pipelines and Key Performance Indicators (KPIs).

We can create pipelines that run actions to build, deploy, test, and release our software. vRealize Automation Code Stream runs our
software through each stage of a pipeline until it is ready to be released to production. We can integrate our pipeline with one or more
DevOps tools such as data sources, repositories, or notification systems, which provide data for the pipeline to run or our pipeline can
communicate out to those systems to perform additional tasks.

We will explore a pipeline to; create an environment for us to deploy our code into, deploy our code, run tests, and repeat the cycle
through each stage of our lifecycle. In this section of the lab, we will review a pipeline to deploy our code and then simulate running an
acceptability test before our environment is destroyed. We will let the pipeline run automated through the use of a webhook to our Git
repository.

Next, we will add an SSH Task to our Pipeline after the Deploy Task we just created. You may need to scroll down in the palette to see
the SSH Task
Task.

We will perform the following steps to configure the SSH task:

1. The task name has been DeployCode

2.This time the task type is SSH. The SSH Task will execute some basic commands against the VM we provisioned in the Deploy

Task by deploying our code on the VM and configuring it.

3.The following variable in the host field ${Development.Deploy.output.deploymentDetails.resources.ubuntu.address} allows us

to connect to the VM we deployed in the Deploy Task

4.A username and password has been set to allow us to connect to the provisioned VM

5.The last step with configuring the SSH Task is to provide the script commands that we want to run on the system we are

connecting to. These commands will be as follows and will utilize variables based on the Input Parameters we reviewed

previously as part of this Pipeline.

HANDS-ON LABS MANUAL | 256


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

The code will connect to our Git repository and download our code

1. Click on the Verify task, so that we can review its configuration

2.The Verify task type has been set to User Operation


Operation, this allows us to pause the pipeline and require user intervention to allow

it to continue.

3.The holadmin user has been added to Approvers

4.The Summary will utilize variables to provide a summary

5.The Description also utilises variables for our Deployment's IP address to provide additional information to the approver.

We will be testing the affects of this task later within this module

The Destroy task was created to clean up our deployment post the approval from our Verify step.

1. Click on the Destroy Task so that we can review the configuration

2.Note that the Type is VMware Cloud Template just like the Deploy task we reviewed earlier

3.In the Precondition field we have specified a condition ${Development.Verify.status} == "COMPLETED" to ensure that our

task is executed if our Verify step passes approval

4.The Action is set to Delete Deployment so that we can cleanup after our deployment

HANDS-ON LABS MANUAL | 257


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

5.We use the following variable ${Development.Deploy.output.deploymentName} to provide the Deployment Name

HANDS-ON LABS MANUAL | 258


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

HANDS-ON LABS MANUAL | 259


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Open the Pipelines Section from Navigation Sidebar [328]

1. Code Stream should launch immediately into the Pipelines section from the navigation sidebar but if it does not then please

open it.

HANDS-ON LABS MANUAL | 260


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

View Existing Pipelines [329]

A number of pipelines have already been created for the Hands-on Labs Environment

1. We will be working with the MyDevPipeline Click Open so that we can review the pipeline stages

HANDS-ON LABS MANUAL | 261


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Name the new Pipeline and select a Project [330]

1. Here we can see that our MyDevPipeline consists of a single Stage named Development. The Development Stage consists of

4 tasks

◦Deploy

◦DeployCode

◦Verify

◦Destroy
2.Note you can adjust the viewable screen by resizing the pane or using the scrollbar

3.Click the Input tab

HANDS-ON LABS MANUAL | 262


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Add the inputs [331]

1. Our Pipeline has had some Input Parameters added. These inputs are relatively simple inputs for our Git project but they are

required to make the pipeline work.

2.Most of our input parameters were automatically added by selecting Git as our source to Auto Inject Parameters from.

3.Click Model so that we can start to review the Tasks within the Development stage of our pipeline

HANDS-ON LABS MANUAL | 263


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Review the Deploy Stage [332]

1. Click the Deploy Task

2.Here we have set the name of the Task to Deploy

3.The Task type is a VMware Cloud Template

4.Here we have defined the action that we want to take as Create Deployment

5.The Cloud Template source is set to Cloud Assembly

6.And the name of the template we want to deploy is Ubuntu18

So in summary the first task of our Development stage will be to deploy a Cloud Template named Ubuntu18. This will provide the
machine that we can then deploy code to and test.

7. Click the DeployCode task so that we can review it

Review the DeployCode Task [333]

HANDS-ON LABS MANUAL | 264


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Review the Verify Task [334]

Review the Destroy Task [335]

Closing the Pipeline [336]

HANDS-ON LABS MANUAL | 265


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Now that we are finished we can close the pipeline.

1. Click CLOSE
CLOSE.

Review the Git Endpoint [337]

Our Pipeline requires a Git endpoint and a trigger to automate its execution whenever we commit a code change. We will review the
Git Endpoint using the following steps:

1. To review our Git Endpoint Click Endpoints in the right navigation pane under Configure

2.Click OPEN on the myWebsite tile

HANDS-ON LABS MANUAL | 266


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Configure the Git Endpoint [338]

HANDS-ON LABS MANUAL | 267


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

We will review the Git Endpoint Configuration:

1. The Endpoint is associated to the HOL Project

2.Git
Git the Type of Endpoint

3.The name of the Endpoint has been set to myWebsite

4.GitLab-Enterprise
GitLab-Enterprise was selected for the Git server Type
Type, which serves to define the on premises GitLab that is available in our

lab environment

5.The Repo URL is set to https://hol@gitlab.hol/hol/hol-2201-02

6.The Branch to set to main, as this is the code branch we will be using

7. A Username and password have been provided to allow the connection to our GitLab environment

8.Click Validate to validate this endpoint.

9.Click Save

HANDS-ON LABS MANUAL | 268


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Adding the Git Trigger [339]

Once we've added the Git Endpoint, we will need to configure a Git Webhook (or Trigger). We will do this by

1. Selecting Git from under the Trigger navigation pane on the left

2.Selecting Webhooks for Git at the top

3.We can click on New Webhook for Git to create our webhook

HANDS-ON LABS MANUAL | 269


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Configuring a Git Webhook [340]

Once we create the Webhook, we will need to configure it using the following steps:

1. We will start by assigning the Project to HOL Project


Project.

2.We will give our Webhook the Name of myWebhook


myWebhook.

3.From the Endpoint dropdown, select the myWebsite Git Endpoint that we previously created.

4.We will need to generate a Secret Token by clicking on Generate (The token in the lab will be different than the one in this

screenshot.

Scroll down to continue configuring our Git Webhook

HANDS-ON LABS MANUAL | 270


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Configuring a Git Webhook (Continued) [341]

1. We will want to leave the Trigger For Git set to PUSH


PUSH.

2.We will also want to generate an API Token by clicking on Generate Token
Token. From the dialog that appears when you click this,

enter holadmin@corp.local as the username and VMware1! as the Password, then click Generate to generate the token, and

then click Close when the token is displayed to return to the Webhook configuration.

3.Assign the pipeline to MyDevPipeline

4.Click Create to create the Webhook

HANDS-ON LABS MANUAL | 271


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Open GitLab to Modify Code [342]

Now lets test our pipeline and Git Webhook to trigger it. We will modify our code using the GitLab integrated browser editor. This is
taking the place of a normal Git commit process that would be run by a developer.

1. Start by opening a new tab in the Chrome web browser

2.Click on the GitLab shortcut in the Other Bookmarks folder

3.Enter hol as the username.

4.Enter VMware1! as the password.

5.Click Sign in.

HANDS-ON LABS MANUAL | 272


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Open our Git Project [343]

1. Once we are signed in to GitLab, we can open our project so that we can modify one of the files inside of it. The project is

called hol-2201-02 and you can open it by clicking on the name.

HANDS-ON LABS MANUAL | 273


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Open a File for Editing [344]

1. Find the index.html file and click on it to open it.

HANDS-ON LABS MANUAL | 274


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Edit a file in Gitlab [345]

1. Click on the edit button

2.Find the line that says Code Stream Rocks! between the <h1> tags. It should be line 10.

HANDS-ON LABS MANUAL | 275


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Commit Changes to Git [346]

HANDS-ON LABS MANUAL | 276


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

1. We are going to edit this line to say something else. We could make it say Code Stream is Awesome! or Code Stream is

Amazing! or whatever we like. We are relying on the change to trigger a Git commit once we save the edit.

2.We will need to scroll down in the browser window to see the Commit changes button (not shown). We need to commit the

change we made to the file by clicking on Commit changes after we have edited the line.

Monitoring Pipeline Execution [347]

1. After committing the change in GitLab, we will need to switch back to Code Stream in the Chrome Browser

2.Click on Executions in the navigator on the left side.

3.Once our pipeline execution has started, we can click on the name of the Pipeline Execution to monitor the stages of the

Pipeline along with the Tasks that are being run and the current Pipeline status for those tasks.

HANDS-ON LABS MANUAL | 277


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Monitoring the Pipeline [348]

1. We will monitor the pipeline as it goes through each Task and and finally comes to rest at the Verify task. We can select the

Verify task

2.In the Description field we can find the Website Address of our VM so that we can verify our code. We can copy out that URL

for the next step in the lab.

Note: The IP Address in the screenshot is not necessarily going to be the IP of your Deployment so please use the one from the lab.

HANDS-ON LABS MANUAL | 278


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Verifying Our Change [349]

This step is meant as a facsimile of what an automated test or some form of QA test may appear as.

1. We are going to open a new Chrome browser tab

2.We are going to paste in the URL we copied from the last step so we can view our website and observe our change.

3.We can see that once we visit our URL, our change has worked and the website is showing our new text.

HANDS-ON LABS MANUAL | 279


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Approving the Change [350]

1. We can now switch back over to the Code Stream tab in Chrome (not shown in the screenshot) and our pipeline execution

where it is awaiting our Approval of the change.

2.We will click Approve and then our Pipeline will progress to the next stage where it will destroy the Virtual Machine

automatically as a means of cleaning up the environment.

Conclusion [351]

In this module we introduced vRealize Code Stream. We've learned about pipelines, integrating with a Git Endpoint and finally creating
a Trigger for the pipeline using a Git Webhook.

HANDS-ON LABS MANUAL | 280


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

You've finished the module [352]

Congratulations on completing the lab module.

If you are looking for additional information on vRealize Code Stream, you can start here: https://cloud.vmware.com/code-stream

From here you can:

1. Click to advance to the next page and continue with the next lab module

2.Open the TABLE OF CONTENTS to jump to any module or lesson in this lab manual

3.Click on the END button if you are done with the lab for now and want to exit

HANDS-ON LABS MANUAL | 281


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Appendix

Hands-on Labs Interface [354]

Welcome to Hands-on Labs! This overview of the interface and features will help you to get started quickly. Click next in the manual to
explore the Main Console or use the Table of Contents to return to the Lab Overview page or another module.

Location of the Main Console [355]

1. The area in the large RED box contains the Main Console. The Lab Manual is on the tab to the right of the Main Console.

2.Your lab starts with 90 minutes on the timer. The lab cannot be saved. Your lab will end when the timer expires. Click the

EXTEND button to increase the time allowed. If you are at a VMware event, you can extend your lab time twice up to 30

minutes. Each click gives you an additional 15 minutes. Outside of VMware events, you can extend your lab time up to 9

hours and 30 minutes. Each click gives you an additional hour.

Alternate Methods of Keyboard Data Entry [356]

In this lab you will input text into the Main Console. Besides directly typing it in, there are two very helpful methods of entering data
which make it easier to enter complex data.

HANDS-ON LABS MANUAL | 282


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Do Not Enable The Intercept Paste Feature [357]

The lab interface environment has the option of intercepting your paste keyboard shortcut (ctrl-v
ctrl-v on Windows, command-v on Mac) to
paste from your desktop environment into the lab console. This is not recommend for the lab because you will be copying and pasting
within the lab console and enabling this feature will make that impossible.

When you first attempt to use your paste keyboard shortcut within a lab session, you will be prompted to enable the intercept feature. If
you are prompted, be sure to:

1. Click CANCEL

HANDS-ON LABS MANUAL | 283


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

To Disable Paste Intercept [358]

If you do find when copying text in the lab console and attempting to paste it that you are either not getting any text pasted or the text
is coming from the host computer where you are accessing the lab, you will need to turn off the Intercept Paste feature.

1. Click the gear icon at the top-right corner of the interface above the docked manual

HANDS-ON LABS MANUAL | 284


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

2.Uncheck the Intercept Paste box

HANDS-ON LABS MANUAL | 285


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Click and Drag Lab Manual Content Into Console Active Window [359]

https://www.youtube.com/watch?v=xS07n6GzGuo

You can also click and drag text and Command Line Interface (CLI) commands directly from the Lab Manual into the active window in
the Main Console.

Accessing the Online International Keyboard [360]

You can also use the Online International Keyboard found in the Main Console.

1. Click on the keyboard icon found on the Windows Quick Launch Task Bar.

HANDS-ON LABS MANUAL | 286


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Click once in active console window [361]

In this example, you will use the Online Keyboard to enter the "@" sign used in email addresses. The "@" sign is Shift-2 on US keyboard
layouts.

1. Click once in the active console window.

2.Click on the Shift key.

Click on the @ key [362]

1. Click on the "@"


@" key.

Notice the @ sign entered in the active console window.

HANDS-ON LABS MANUAL | 287


HOL-2201-02-CMP: HOL-2201-02-CMP Getting Started with vRealize Automation

Activation Prompt or Watermark [363]

When the lab starts you may notice a watermark on the desktop indicating that Windows is not activated.

A major benefit of virtualization allows virtual machines to be moved and run on any platform. Hands-on Labs utilizes this benefit and
hosts labs from multiple datacenters. However, these datacenters may not have identical processors which triggers a Microsoft
activation check through the Internet.

Rest assured VMware and Hands-on Labs are in full compliance with Microsoft licensing requirements. The lab that you are using is a
self-contained pod and does not have full access to the Internet. Without this the Microsoft activation process fails, and you see this
watermark.

This cosmetic issue has no effect on your lab.

Return to Lab Guidance [364]

Use the Table of Contents to return to the Lab Overview page or another module.

HANDS-ON LABS MANUAL | 288


VMware, Inc. 3401 Hillview Avenue Palo Alto CA 94304 USA Tel 877-486-9273 Fax 650-427-5001 vmware.com.
Copyright © 2022 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware products are covered by one or
more patents listed at vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. and its subsidiaries in the United States and other jurisdictions. All other
marks and names mentioned herein may be trademarks of their respective companies. Lab SKU: HOL-2201-02-CMP Version: 20220926-153946

You might also like