Discover and Publish Cloud Resources hosted in Azure

This article describes features - Azure Discover and Publish - that are currently in early preview. Contact your account team to enable these features for your organization and for further assistance.

Overview

Banyan leverages Azure tags to automatically discover the Azure 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 Azure APIs.

Then, using pybanyan, run the test-azure subcommand to ensure you’re correctly authenticated and authorized.

$> banyan discovered-resource test-azure
--> Azure configuration test passed. Found 4 resources.

Step 1. Tag your resources in Azure

In the Azure portal, add tags to the resources you need to discovered by Banyan. For this guide, we use the tag banyan:discovery to label resources that should be discovered by Banyan, but you can use any tag for this purpose.

In the Azure portal menu, search for the Tags service to view the resources you have tagged.

Step 2. Sync resources into Banyan

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

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

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


location    group       name            public_ip     private_ip      tags  cloud_provider    type
----------  ----------  --------------  ------------  ------------  ------  ----------------  ---------------------------------
westus2     td-testing  td-ubuntu-play  52.229.36.55  10.0.0.4           2  Azure             Microsoft.Compute/virtualMachines


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


--> Sync with Azure successful.

You have to specify both the resource_type (VM, LB, etc) as well as the tag_name 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 Azure 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 > IaaS 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. Populate the required fields - such as service domain, access tier, etc - and attach a policy.

Success!

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



Last modified: Jul 22, 2021