Discover and Publish Resources hosted in VMware vSphere

  • Updated on Nov 12, 2021

This article describes features that are only available in the Banyan Enterprise edition.

Overview

Banyan automatically discover the vSphere resources that need to be accessed by your end users. You can then publish these discovered resources as Banyan services.

Steps

At a high level, you will:

Prerequisites

Before proceeding through the steps below, ensure you have installed and configured the Python clients needed to interact with the Banyan and VMware vSphere APIs.

See the pybanyan docs for detailed instructions for VMware.

Run the test-vmware subcommand to ensure you’re correctly authenticated and authorized.

$> banyan discovered-resource test-vmware
--> VMware vSphere configuration test passed. Found 6 resources.

Step 1. Tag your resources in VMware vSphere

In the VMware vSphere management console, add tags to the resources you need to discovered by Banyan. For this guide, we use the category banyan and the tag discovery to label resources that should be discovered by Banyan, but you can use any category and tag for this purpose.

In the VMware vSphere management console, navigate to the Tags and Custom Attributes section to see your tags and view the resources you have tagged.

Step 2. Sync resources into Banyan

Now that your resources are tagged for discovery, use the pybanyan sync-vmware subcommand to get the resource metadata from VMware vSphere and submit them via the Banyan API.

$> banyan discovered-resource sync-vmware VM banyan:discovery

--> Getting list of VMware Resources:
press enter to continue, type "stop" to stop ...


id                                    name      private_ip         tags  cloud_provider    type    datacenter    public_ip
------------------------------------  --------  ---------------  ------  ----------------  ------  ------------  -----------
501d25fa-1aba-6e3e-fdc2-213d7a9d6724  ubuntu1   192.168.101.206       1  VMware            VM      datacenter1
501d89c4-02e8-c09f-1aab-cdfb882d6121  vm1       192.168.101.207       1  VMware            VM      datacenter1
501d4226-81b2-f0b0-1877-d8d249248dc4  vm2       192.168.101.208       2  VMware            VM      datacenter1
501d01b1-2e71-324d-bb35-08a389ce6679  ubuntu2   192.168.101.209       1  VMware            VM      datacenter1
501d203d-6a6a-bbc6-639e-2cf2de1905a3  server1   192.168.101.210       0  VMware            VM      datacenter1
501d0df3-303e-f7c2-dd5d-62df9001efa4  windows1  192.168.101.212       0  VMware            VM      datacenter1


--> Syncing into Discovered Resource:
press enter to continue, type "stop" to stop ...


--> Sync with VMware successful.

You have to specify both the resource_type (VM, LB, etc) as well as the tag_name is the format category:tag to synchronize resources. Please submit an Issue or Pull Request in the pybanyan Github repository if you need to extend the discovery capabilities to additional VMware vSphere resource types.

Step 3. Select discovered resources to publish

Once your cloud resources are synchronized, you will be able to view them in the Manage Services > Discovered Resources > Inventory section in the Banyan Command Center.

Select an individual resource to see more details, such as Private IP Address, Ports and Tags.

Step 4. Publish services

Click on the Publish icon to publish a Banyan service from of this discovered resource.

Select the type of service you wish to create, populate the required fields - such as service domain, access tier, etc - and attach a policy.

Success!

Congrats! You have discovered your VMware vSphere resources and published them for your end-users. You can repeat this process as often as you need.