☁️ OCI Configuration

Details
This page shows version v0.0.0 (dev). The current version can be found here.

Oracle Cloud Infrastructure (OCI) can optionally be configured to enable additional AI Optimizer functionality including:

Configuration

OCI can either be configured through the AI Optimizer interface, a CLI Configuration File, or by using environment variables.

You will need to generate an API Key to obtain the required configuration values.


Interface

To configure OCI access from the AI Optimizer, navigate to Configuration menu and OCI tab:

OCI Config OCI Config

Provide the values obtained by generating an API Key.

OCI GenAI Services can also be configured on this page, once OCI access has been confirmed.


Config File

Depending on the runtime environment, either Bare Metal or Containerized, your local CLI Configuration File can be used to configure AI Optimizer for OCI access.

In addition to the standard configuration file entries, two additional entries can be added to enable OCI GenAI Services:

  • genai_region: the Region for the OCI GenAI Service
  • genai_compartment_id: the Compartment OCID of the OCI GenAI Service

Bare Metal

During startup, the AI Optimizer will automatically look for and consume a CLI Configuration File for configuring OCI access.

Container

When starting the container, volume mount the configuration file to /app/.oci for it to be used.

For example:

podman run -v ~/.oci:/app/.oci -p 8501:8501 -it --rm ai-optimizer-aio

Environment Variables

OCI can also be configured using environment variables. See the OCI CLI Overrides and OCI GenAI sections of the Configuration page for available variables and usage.


Authentication Types

The following authentication types are supported via the AIO_OCI_CLI_AUTH variable or the authentication field in the config file:

ValueDescriptionUse Case
api_keyAPI key with user, fingerprint, tenancy, and private keyDefault; local development and service accounts
instance_principalInstance Principals security tokenOCI compute instances with dynamic group policies
resource_principalResource Principals signerOCI Functions and other resource-principal-enabled services
oke_workload_identityOKE workload identity resource principalPods running on Oracle Kubernetes Engine
security_tokenSecurity token from file with private keyOCI Cloud Shell and token-based authentication