Complete the following steps to configure your Oracle tenancy with the VMware Tanzu CloudHealth platform.
If a user is configured in the Oracle console with multi-factor authentication (MFA) enabled, ensure that the user can log into the Oracle console and access Oracle Cost and Usage Reports. To verify,
If you can view cost and usage reports, continue configuring the tenancy in Tanzu CloudHealth using the user Oracle Cloud Infrastructure (OCI) Id.
In Oracle Cloud, the cost and usage report (CUR) is generated daily and stored in an Oracle Object Storage bucket. Create a Tanzu CloudHealth user in Oracle Cloud with administrator permissions to access the Object Storage Bucket.
The API key is a unique identifier that is required to authenticate the Tanzu CloudHealth API requests for accessing the CUR from the Oracle Object Storage bucket. The administrator in your organization needs to generate a key pair for signing Tanzu CloudHealth API requests. The public key in the key pair is uploaded to the Oracle console and the private key is added to the Tanzu CloudHealth platform.
Prerequisites:
Run the following commands in OpenSSL to generate API key pair:
Create a .oci
directory to store the key pair credentials: mkdir ~/.oci
For Private Key:
openssl genrsa -out ~/.oci/oci_api_key.pem 2048
chmod go-rwx ~/.oci/oci_api_key.pem
Make a note of the private key, which you use to configure Oracle tenancy in the Tanzu CloudHealth platform.For Public key:
openssl rsa -pubout -in ~/.oci/oci_api_key.pem -out ~/.oci/oci_api_key_public.pem
cat ~/.oci/oci_api_key_public.pem | pbcopy
Make a note of the public key, which you use later to configure the Tanzu CloudHealth user in the Oracle console.
In Oracle Cloud, infrastructure access is granted at the group or compartment level and not to individual users. Therefore, the Tanzu CloudHealth user must be a member of the user group to which the IAM policies are attached. IAM policies grant required permissions to the user group to access the Oracle Object Storage bucket.
Create a new user group or add the Tanzu CloudHealth user to an existing user group.
Create an IAM policy using the following policy statements and attach it to the user group to which the Tanzu CloudHealth user belongs.
These policy statements enable the Tanzu CloudHealth platform to access the Cost and Usage report located in Oracle-owned Object Storage Bucket.
define tenancy usage-report as ocid1.tenancy.oc1..aaaaaaaaned4fkpkisbwjlr56u7cj63lf3wffbilvqknstgtvzub7vhqkggq
endorse group MyGroupName to read objects in tenancy usage-report
This is a Tanzu CloudHealth specific policy statement that grants required privileges to the platform for collecting VM Assets at the tenancy level.
ALLOW GROUP MyGroupName to read instance-family IN TENANCY
This policy statement allows the Tanzu CloudHealth platform to collect the list of your Oracle Cloud resources and its metadata information such as VM names, user-defined tags, etc. VM here refers to Oracle Cloud Infrastructure VM instance.
Prerequisites
Complete the following steps to configure IAM policy to the user group to which the Tanzu CloudHealth user belongs:
In the Policy Builder text box, copy and paste the following policy statements. Add only one policy statement per line.
Cost and Usage Report Policy Statements
define tenancy usage-report as ocid1.tenancy.oc1..aaaaaaaaned4fkpkisbwjlr56u7cj63lf3wffbilvqknstgtvzub7vhqkggq
Do not change the OCID. Add this policy statement as it is.endorse group MyGroupName to read objects in tenancy usage-report
Replace MyGroupName with the appropriate group name. For example: endorse group Tanzu CloudHealth Integration group to read objects in tenancy usage-report
. In this ‘Tanzu CloudHealthTanzu CloudHealth Integration group’ is the name of a group.VM Collection Policy Statement
ALLOW GROUP MyGroupName to read instance-family IN TENANCY
Replace MyGroupName with the appropriate group name. For example: ALLOW GROUP Tanzu CloudHealth Integration group to read instance-family IN TENANCY
. In this ‘Tanzu CloudHealth Integration group’ is the name of a group.Note - For the Inspect type of access, add the following policy statement. ALLOW GROUP MyGroupName to inspect all-resources IN TENANCY
. This policy statement restricts access to any confidential information or user-specified metadata related to the resource.
Click Create. The Policy Detail page will display newly added policy statements.
From the Tanzu CloudHealth platform, configure Oracle Cloud tenancy:
In the Tanzu CloudHealth platform, enter the private key (with no passphrase) generated in the Generate API Signing Key section.
For accuracy, it is recommended to select Upload File option to upload the content of your API Signing Private Key. Click Save Tenancy.
The tenancy appears on the Setup > Accounts > Oracle Cloud Tenancy page with one of the following statuses:
After the configuration is complete, Tanzu CloudHealth collects Oracle Cloud data every 30 minutes.
Note - Currently, Tanzu CloudHealth support collection of OCI defined tags. Other free-form tags are not supported.