Skip to main content

Azure Container Apps

This guide walks you through deploying the Superblocks On-Prem Agent on Azure Container Apps using either a YAML File, the Azure CLI or the Azure Portal.

Prerequisites

Deploy

Environment Creation - Azure Portal

Portal Quickstart

  1. Go to Azure Portal > Container Apps Environments > + Create
  2. Enter environment name and region
  3. For public access: choose External, or for private deployment choose Internal with a connected VNet + /27 subnet

For More Information on Public vs. Private Endpoints: Networking in Azure Container Apps Environment

Environment Creation - Azure CLI

az containerapp env create \
--name superblocks-env \
--resource-group myresourcegroup \
--location eastus

Deploy with YAML

You can deploy the On-Premise Agent on Azure Container Apps by creating a .yaml file and calling it when running az containerapp create.

properties:
environmentId: "/subscriptions/<subscription_id>/resourceGroups/<resource_group_name>/providers/Microsoft.App/managedEnvironments/<environment_name>"
configuration:
ingress:
external: <true/false>
allowInsecure: <true/false>
targetPort: 8080
secrets:
- name: "agent-key"
value: "<agent_key_value>"
template:
containers:
- image: ghcr.io/superblocksteam/agent:latest
name: <container_app_name>
resources:
cpu: 2.0
memory: 4.0Gi
env:
- name: "SUPERBLOCKS_ORCHESTRATOR_SUPERBLOCKS_KEY"
secretRef: "agent-key"
- name: "SUPERBLOCKS_AGENT_KEY"
secretRef: "agent-key"
- name: "SUPERBLOCKS_AGENT_DATA_DOMAIN"
value: "app.superblocks.com"
- name: "SUPERBLOCKS_ORCHESTRATOR_AGENT_HOST_URL"
value: "https:<container_app_name>.<defaultDomain>"
- name: "SUPERBLOCKS_ORCHESTRATOR_AGENT_TAGS"
value: "profile:*"
scale:
minReplicas: 1
maxReplicas: 1

Run:

az containerapp create -n <container_app_name> -g <MyResourceGroup> --environment <MyContainerappEnv> --yaml "path/to/yaml/file.yml"

Final Steps

In Superblocks:

Billable services

The Superblocks On-Premise Agent may make use of the following Azure services. Be aware of the pricing associated with these.

  • Azure Container Apps - Serverless container platform with consumption-based pricing (includes free monthly grants of 180,000 vCPU-seconds, 360,000 GiB-seconds, and 2M requests)
  • Azure Monitor & Log Analytics - Logging and monitoring solution for diagnostics (optional)
  • Azure Key Vault - Secure secret storage for credentials and configuration (optional)
  • Virtual Network - Network infrastructure for private deployments (optional)