Creating an Application
Applications define managed runtime settings for hosted deployments, including scaling, managed storage, networking, and authentication. This task explains how to create an application by using the Oracle Cloud Console in the OCI Generative AI service.
On the Applications list page, select Create application. If you need help finding the list page, see Listing Applications.
Basic Information
Tags
- (Optional) Select Add tag and assign tags to this application. See Resource Tags.
- Select Create.
Scaling
If you plan to enable persistent file storage in step 3, set Minimum replicas and Maximum replicas to
1. Persistent file storage supports one replica in this release.Storage
In step 3, enable the service-managed storage that deployments in the application need: File Storage, OCI PostgreSQL, OCI Cache, or Oracle Autonomous AI Database. You can attach one storage resource of each type.
File Storage is available at a container mount path. Database and cache connection details are provided through environment variables. The service manages access to the application's storage.
- Persistent file storage
Retain files across container restarts and redeployments. Each application can have one file storage attachment with a fixed 50 GB quota (50,000,000,000 bytes).
For this option:
- Turn on Persistent file storage.
- Ensure that Minimum replicas and Maximum replicas in the scaling settings are both
1. Persistent file storage supports one replica in this release. - Under Storage, select one of the following:
- Create a new storage: Enter a Storage name. The service creates a storage configuration in the application's compartment.
- Select an existing storage in the current compartment: Under Storage name, select one active file storage resource. You can use Search and Filter to find a resource. If no active file storage is available, select Create a new storage.
- For Mount path, keep
/mnt/persistent/dataor enter another valid absolute container path. You can't change this path after the application is created.
Applications that use the same storage resource receive separate file systems. Selecting existing storage reuses its configuration. It doesn't share another application's files.
Configure your application to read and write persistent files at the mount path. File Storage doesn't use an environment variable for connection information. For path requirements, API configuration, and attachment status, see Persistent File Storage for Hosted Applications.
- OCI PostgreSQL
Enable OCI PostgreSQL to provide a managed database for deployments in this application.
For this option:- Enter the environment variable name that receives the OCI PostgreSQL connection URI. The service adds the connection string to the specified environment variable.
- Storage: Select whether to create storage or use existing storage. If you select existing storage, the application shares the OCI PostgreSQL storage resource with other applications in the tenancy. Each application is assigned a dedicated database, and this application has permission to access only its dedicated database.
- OCI CacheEnable OCI Cache to provide a managed cache for deployments in this application. For this option:
- Enter the environment variable name that receives the OCI Cache connection URI.
- Storage: Select whether to create storage or use existing storage.
- Oracle Autonomous DatabaseEnable Oracle Autonomous AI Database to provide a managed database for deployments in this application. For this option:
- Enter the environment variable name that receives the Autonomous AI Database connection URI.
In addition to the connection string, the service mounts the database user credentials to the following local files in the container:/mnt/secrets/adb/username /mnt/secrets/adb/password
Environment
Networking (Optional)
Select how deployments in this application route outbound traffic, and how clients access the deployment endpoint.
Authentication
In step 6, select one of the following authentication options:
- Identity domain bearer token: Uses an OAuth access token issued by an OCI IAM identity domain. The token is sent to the target service as a bearer token, and the service validates the token before accepting the request. As a prerequisite, perform the tasks in Setting Up Identity Domain Bearer Token Authentication.
- Identity domain browser session: Uses the OAuth 2.1 Authorization Code flow with Proof Key for Code Exchange (PKCE). Browser users are redirected to an OCI identity domain to sign in. The hosted application service obtains an access token on their behalf and establishes a browser session that uses a session cookie.
- OCI IAM: Uses OCI IAM request-signature authentication. Each request is cryptographically signed according to OCI API request-signing requirements.
- No authentication: Allows requests without platform-managed authentication. Use this option for public content or when your application manages authentication.
When using the API, use CreateHostedApplication for identity domain authentication or no authentication. In inboundAuthConfig, set inboundAuthConfigType to one of the following values:
IDCS_AUTH_CONFIG: Identity domain bearer token authentication.IDCS_SESSION_AUTH_CONFIG: Identity domain browser session authentication using the OAuth 2.1 Authorization Code flow with PKCE.NO_AUTH_CONFIG: Disables platform-managed caller authentication. OmitidcsConfig.
For either identity domain authentication type, include idcsConfig with the required domainUrl and scope values. The API schema marks audience as optional. It also defines clientId and clientSecretVaultId as optional fields that apply only to IDCS_SESSION_AUTH_CONFIG. The clientSecretVaultId value is the OCID of an OCI Vault secret containing the OAuth client secret. For details, see InboundAuthConfig and IdcsAuthConfig.
To configure no authentication, supply the following object. No separate tenancy enrollment is required.
"inboundAuthConfig": {
"inboundAuthConfigType": "NO_AUTH_CONFIG"
}Omitting inboundAuthConfig from an update leaves the application's current authentication configuration unchanged. To explicitly disable platform-managed caller authentication, set inboundAuthConfigType to NO_AUTH_CONFIG and omit idcsConfig.
To create an application that uses OCI IAM authentication, use CreateHostedApplicationIam with CreateHostedApplicationIamDetails. The OCI IAM API doesn't require an OAuth or IDCS configuration.
Follow the steps for the authentication type that you select.
Identity domain bearer token
Identity domain browser session
Obtain the identity domain URL, scope, audience, and client ID for the OAuth application configured for the Authorization Code flow with PKCE. Store the OAuth client secret in OCI Vault and record the secret's OCID for the Client secret vault ID field.
OCI IAM
No authentication
With this option, anyone who can reach the endpoint can send requests without platform-managed authentication. If access needs restriction, your application must enforce authentication and authorization. See Using No Authentication.
Enable Application Logs
Enable resource logging to track application activity, troubleshoot issues, and collect operational insights for hosted deployments.
Review and Create
Review the application settings, then select Create application.
Application creation time depends on the resources that the service provisions for the application.
-
If managed storage is enabled, the service provisions or attaches the selected storage, which might take several minutes.
-
If custom networking is selected, the service provisions the required network bridging resources, which might also take several minutes.
After creation, view Authentication type under Authentication on the application's Configuration tab.
After you create an application, you can view its details and perform other tasks, such as moving it to a different compartment, managing its tags, or deleting it. Use the in the Console to access these tasks. You can also create a deployment for the application from its detail page. For more information, see Listing Applications.