Azure Container Apps Deployment
AgentCube ships as Linux container images. A deployment runs the Context Engine plus one or more connector containers per Oracle system. This guide covers deployment on Azure Container Apps, the primary supported platform. For other platforms, see the guides below.
- AWS ECS Express Mode (Beta)
- OCI Container Instances (Beta)
- On-Premise / Docker (Beta)
See Container Images & Specifications for image names, GHCR authentication, and resource requirements. The images are private, so every az containerapp create below passes the GHCR credentials Caprus AI provides ({github_username}, {github_pat}).
The Context Engine is the endpoint your AI platform connects to, so it gets external ingress. Connectors are reached only by the Context Engine, so they can use internal ingress inside the same environment.
Azure Container Apps Deployment
Section titled “Azure Container Apps Deployment”1. Create a Container Apps Environment
Section titled “1. Create a Container Apps Environment”A Container Apps Environment is required before creating the apps. If you already have one, skip this step.
az containerapp env create --name {environment_name} --resource-group {resource_group} --location {location}az containerapp env create \ --name {environment_name} \ --resource-group {resource_group} \ --location {location}2. Deploy the Context Engine
Section titled “2. Deploy the Context Engine”The Context Engine needs a PostgreSQL database you provision (AGENTCUBE_CE_DATABASE_URL) with the pgvector extension installed. The Context Engine’s database user usually cannot create extensions, so have your database administrator run CREATE EXTENSION vector; on the database once, before the first start. On Azure Database for PostgreSQL Flexible Server, first allow VECTOR in the server’s azure.extensions parameter. Without pgvector, the first start stops during database setup with an error naming the missing extension.
It also needs a credential key (AGENTCUBE_CE_CREDENTIAL_KEY). The Context Engine uses the credential key to encrypt the secrets it stores in its database, which are the service-account credentials you enter for connected systems and the installed license key. It is required. Without it you cannot register connected systems or install a license. Generate it once:
$b = [byte[]]::new(32); [System.Security.Cryptography.RandomNumberGenerator]::Create().GetBytes($b)[Convert]::ToBase64String($b).Replace('+','-').Replace('/','_')openssl rand -base64 32 | tr '+/' '-_'The first start also needs the initial admin console sign-in, set with AGENTCUBE_CE_ADMIN_USERNAME and AGENTCUBE_CE_ADMIN_PASSWORD. While no admin account exists, the Context Engine refuses to start without both. They are read only to create that first account. After you sign in and change the password under Admin & Security → Change password, you can remove both values.
Then create the app:
$ceArgs = @( "--name", "{ce_app_name}", "--resource-group", "{resource_group}", "--environment", "{environment_name}", "--image", "ghcr.io/caprusai/agentcube-ce:{version}", "--registry-server", "ghcr.io", "--registry-username", "{github_username}", "--registry-password", "{github_pat}", "--target-port", "8080", "--ingress", "external", "--min-replicas", "1", "--cpu", "1.0", "--memory", "2Gi", "--secrets", "ce-database-url={database_url}", "ce-credential-key={credential_key}", "ce-admin-password={admin_password}", "--env-vars", "AGENTCUBE_CE_DATABASE_URL=secretref:ce-database-url", "AGENTCUBE_CE_CREDENTIAL_KEY=secretref:ce-credential-key", "AGENTCUBE_CE_ADMIN_USERNAME={admin_username}", "AGENTCUBE_CE_ADMIN_PASSWORD=secretref:ce-admin-password")az containerapp create @ceArgsaz containerapp create \ --name {ce_app_name} \ --resource-group {resource_group} \ --environment {environment_name} \ --image ghcr.io/caprusai/agentcube-ce:{version} \ --registry-server ghcr.io \ --registry-username {github_username} \ --registry-password {github_pat} \ --target-port 8080 \ --ingress external \ --min-replicas 1 \ --cpu 1.0 \ --memory 2Gi \ --secrets ce-database-url={database_url} ce-credential-key={credential_key} ce-admin-password={admin_password} \ --env-vars \ AGENTCUBE_CE_DATABASE_URL=secretref:ce-database-url \ AGENTCUBE_CE_CREDENTIAL_KEY=secretref:ce-credential-key \ AGENTCUBE_CE_ADMIN_USERNAME={admin_username} \ AGENTCUBE_CE_ADMIN_PASSWORD=secretref:ce-admin-passwordTo require sign-in, see Single Sign-On: add the AGENTCUBE_CE_AUTH_MODE=oidc settings it describes, with the full reference in Environment Variables.
3. Deploy a Connector
Section titled “3. Deploy a Connector”Each connector runs in one of two lanes. The recommended pairing, which is the same for Essbase, Planning and FCCS:
- Admin lane:
AGENTCUBE_CONNECTOR_MODE=adminwithAGENTCUBE_AUTH_MODE=delegated_basic. The connector holds no credentials. You enter the Oracle service-account username and password when you register it in the Context Engine. - User lane:
AGENTCUBE_CONNECTOR_MODE=userwithAGENTCUBE_AUTH_MODE=internal(single sign-on through the Context Engine). This lane needs theAGENTCUBE_INTERNAL_*,OCI_*and signing-key variables listed in Environment Variables, and SSO turned on in the Context Engine. SetAGENTCUBE_INTERNAL_AUDIENCEto{connector_url}and give the connector the same audience in the Context Engine, so a token meant for one connector is refused by the others.
See Auth Modes for how to choose. The example below deploys the Essbase admin lane:
$connArgs = @( "--name", "{app_name}", "--resource-group", "{resource_group}", "--environment", "{environment_name}", "--image", "ghcr.io/caprusai/agentcube-essbase:{version}", "--registry-server", "ghcr.io", "--registry-username", "{github_username}", "--registry-password", "{github_pat}", "--target-port", "8080", "--ingress", "internal", "--min-replicas", "1", "--cpu", "0.25", "--memory", "0.5Gi", "--env-vars", "AGENTCUBE_CONNECTOR_MODE=admin", "AGENTCUBE_AUTH_MODE=delegated_basic", "ESSBASE_SERVER_URL={essbase_url}")az containerapp create @connArgsaz containerapp create \ --name {app_name} \ --resource-group {resource_group} \ --environment {environment_name} \ --image ghcr.io/caprusai/agentcube-essbase:{version} \ --registry-server ghcr.io \ --registry-username {github_username} \ --registry-password {github_pat} \ --target-port 8080 \ --ingress internal \ --min-replicas 1 \ --cpu 0.25 \ --memory 0.5Gi \ --env-vars \ AGENTCUBE_CONNECTOR_MODE=admin \ AGENTCUBE_AUTH_MODE=delegated_basic \ ESSBASE_SERVER_URL={essbase_url}4. Install Your License
Section titled “4. Install Your License”After the Context Engine is running, sign in to the admin console at https://{ce_hostname}/admin/ with the admin username and password from step 2, and open Admin & Security → License. Paste the key Caprus AI issued into License key and select Save. The Context Engine validates the key with the Caprus AI licensing service and stores it, encrypted, only if the service accepts it. Allow outbound HTTPS (443) from the Context Engine to https://licensing.caprus.ai. Until a license is installed, new data sources cannot be added.
5. Configure Custom Domain (Optional)
Section titled “5. Configure Custom Domain (Optional)”If using a custom domain with TLS for the Context Engine:
- Add a custom domain in the Azure Portal under your Container App → Custom domains
- Configure DNS (CNAME or A record) pointing to the Container App URL
- Enable managed certificate for automatic TLS
6. Verify
Section titled “6. Verify”Invoke-RestMethod https://{ce_hostname}/healthcurl https://{ce_hostname}/healthA healthy Context Engine returns "status": "healthy" with persistence, license and connectors blocks. Check license.installed after step 4.
Connectors with internal ingress are reachable only from inside the environment. From there, GET {connector_url}/health returns "status": "healthy" and an auth_mode field. In delegated, SSO and OIDC modes, watch backend.status for backend reachability. backend_connected appears only in basic mode.
Environment Variables
Section titled “Environment Variables”See Environment Variables for the complete reference.