Author: Adrian Page 9 of 12

Using Swagger with the vRealize Orchestrator REST plugin

Representational State Transfer (REST) is a is a software architectural style that describes a uniform interface for numerous software packages and hardware systems in IT environments. The most common protocol for these requests and responses is HTTP, which provides operations (HTTP methods) such as OPTIONS, GET, POST, PUT, PATCH and DELETE.

The OpenAPI Specification (OAS), previously known as the Swagger Specification, is a specification for machine-readable interface files for describing, producing, consuming, and visualizing RESTful web services.

Applications implemented based on OpenAPI interface files can automatically generate documentation of methods, parameters and models. This helps keep the documentation, client libraries, and source code in sync.

Examples of VMware products providing Swagger Specifications are vRealize Automation (vRA) and vRealize Operations (vROps).

To call REST operations from within vRealize Orchestrator (vRO), we can use the HTTP-REST plugin, which allows us to manage REST Web services by providing interaction between vRO and REST hosts. We can define REST services and their operations as inventory objects by running configuration workflows, and perform REST operations on the defined objects. The plug-in contains a set of standard workflows related to managing REST hosts and invoking REST operations.

Compared to a manually created REST Host, a Swagger REST Host comes with configured operations which reduces the risk of misconfiguration when manually adding every operation.

In this article, we’ll cover the creation of a vROps REST host from a Swagger endpoint inside the vRA embedded vRO.

Customizing the VMware Cloud Director Portal

To match corporate branding standards and to create a fully custom cloud experience, we can customize the VMware Cloud Director Service Provider Admin Portal and the VMware Cloud Director Tenant Portal of each organization. In addition, we can modify and add custom links to the two upper right menus in the VMware Cloud Director portals.

As part of the installation, VMware Cloud Director contains two themes – default and dark. We can create, manage, and apply custom themes. In addition, we can change the portal name, the logo, and the browser icon. In addition, the browser title adopts the portal name that we set.

Configure OSPF in NSX-T

In my past blog article on setting up NSX-T, I’ve covered using BGP as the dynamic routing protocol for north-south traffic.
A customer wanted to use OSPF to interconnect their physical networking fabric with NSX-T. Time to play with this setup in the lab 🙂

The logical routing topology which is used in my setup is depicted below:

General vRA troubleshooting

The vRealize Automation appliance is installed on Photon OS since verion 8.0. It includes native Kubernetes to host containerized services.The vRA services run as Docker containers in Kubernetes pods. Each Kubernetes pod hosts one or more containers. Examples of vRA containerized services are:

  • RabbitMQ is the industry-standard message bus used in vRealize Automation.
  • The vRA database is a PostgreSQL database which runs as a pod and uses a Persistent Volume (PV) to store data.
  • The vRealize Orchestrator service runs as a pod hosting two key containers, the control center (manages operations of vRO and plugins) and the vco-server (the orchestration engine).

Another basic container concept is a Namespace. Namespaces are a way to divide Kubernetes cluster resources between multiple users.

As you can see, vRA has many components. Of course, they can fail and some knowledge is required to troubleshoot these scenarios.

Repair docker application engine in vRealize Automation 8

Recently, services didn’t come back up again on vRA 8.6 single node installation after a power loss in my homelab.

The connection to Kubernetes was refused and failed with the following error while executing kubectl get pods:

The connection to the server vra-k8s.local:6443 was refused - did you specify the right host or port?

I was finally able to fix it using the procedure described in VMware KB article 82378:

  1. Take a snapshot of the vRA VM.
  2. Locate an etcd backup at /data/etcd-backup/ and copy the selected backup to /root
  3. Reset Kubernetes by running vracli cluster leave
  4. Restore the etcd backup in /root by using the /opt/scripts/recover_etcd.sh command.
    Example: /opt/scripts/recover_etcd.sh --confirm /root/backup-123456789.db
  5. Extract VA config from etcd with
    kubectl get vaconfig -o yaml > /root/vaconfig.yaml
  6. Reset Kubernetes once again using
    vracli cluster leave
  7. Run to Install the VA config
    kubectl apply -f /root/vaconfig.yaml --force
  8. Run vracli license to confirm that VA config is installed properly.
  9. Run
    /opt/scripts/deploy.sh

Page 9 of 12

All your base are belong to us.