Discover and Publish Resources hosted in Oracle Cloud Infrastructure

This article describes features that are only available in the Banyan Enterprise edition.
This article describes features - Discover and Publish IaaS Resources - that are currently in early preview. Contact your account team to enable these features for your organization and for further assistance.

Overview

Banyan automatically discovers Oracle Cloud Infrastructure (OCI) resources that need to be accessed by your end users. You can then publish these discovered resources as Banyan services.

Prerequisites

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

See the pybanyan docs for detailed instructions for OCI.

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

$> banyan cloud-resource test-oci {oci-compartment}
--> Oracle Cloud configuration test passed. Found 6 resources.

Steps

At a high level, you will:

Step 1. Label your resources in OCI

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

In the OCI portal, use the Search bar 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-oci subcommand to get the resource metadata from OCI and submit them via the Banyan API.

$> banyan cloud-resource sync-gcp all {gcp-project-group} --tag_name banyan:discovery

banyan cloud-resource sync-oci all dev

--> Getting list of OCI VM resources:

type    name              public_dns_name    public_ip    private_dns_name    private_ip    ports    provider    region      tags
------  ----------------  -----------------  -----------  ------------------  ------------  -------  ----------  --------  ------
vm      oke-cqqhk6ivu2q-                                                      10.1.85.35    []       oci         phx            2
vm      oke-cko3n7f326q-                                                      10.0.93.236   []       oci         phx            2
vm      oke-cko3n7f326q-                                                      10.0.80.84    []       oci         phx            2


--> Filtering for new OCI resources:

type    name              public_dns_name    public_ip    private_dns_name    private_ip    ports    provider    region      tags
------  ----------------  -----------------  -----------  ------------------  ------------  -------  ----------  --------  ------
vm      oke-cqqhk6ivu2q-                                                      10.1.85.35    []       oci         phx            2


--> Syncing into Banyan Cloud Resource inventory:

--> Added Azure resource id(name): ocid1.instance.oc1.phx.anyhqljreqfgs5acfank3k2codj2srj4cnns3naalfttpmqjwk24digsi6qq(oke-cqqhk6ivu2q-nvp2thc5biq-svjai5qusbq-2)

--> Sync with Oracle Cloud successful.

You can specify the resource_type to be all or a specific supported resource_type - VM, LB, etc. Check pybanyan help for additional filtering options.

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.


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



Last modified: Nov 12, 2021