GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [ACI] ACI production release · Issue #137 · fixpoint/ke2-docker

[ACI] ACI production release #137

New issue
Copy link
New issue
Copy link
Open
0 / 50 of 5 issues completed
Open
[ACI] ACI production release#137
0 / 50 of 5 issues completed
Copy link
Labels
ACIAzure Container Instances (azureci) production release work
Milestone
ACI production release

Description

@fixpoint-hasan
fixpoint-hasan
opened on Sep 25, 2026
Issue body actions

1. Goal

A customer can deploy and run KE2 on Azure Container Instances (ACI) by following one guide, at the availability level and the security level that section 3 describes. The deployment azureci exists in ke2/cloud/azureci and was tested, but nobody has decided whether it is production grade. Section 1.1 gives, for each change, why it is made and what the customer gets. Section 2 records what azureci is today and what is missing, section 3 has the decisions of the design, and the issues in section 4 take it to a production release. The policy decisions of the AKS and EKS work (issues #114 to #136) carry over, and the technical design is made for ACI.

References use these branches: ke2-docker at develop (commit 777da6a), ke2-admin-manual at develop, and kompira-v2 (private repository) at develop. File paths in the text are relative to the ke2-docker repository root, unless the text says another repository.

1.1. Why and benefit of the changes

The deployment works, and it was tested (deployments and a benchmark). Those tests did not decide whether it is production grade. Reading the template, the README, and the issues shows the problems below. The table gives, for each change, why it is made and what the customer gets. What stays the same: one container group, the six containers, the ports, the Azure Files shares for the data, the images from Docker Hub and kompira.azurecr.io, and the database outside the template.

Change Why (the problem today) Benefit Issue
A script for the resources instead of about 20 hand steps The README has 20 commands before the deployment, hand steps differ between deployments, and the README already had a wrong share name The same result every time, and a shorter guide #138
Three shares instead of five The two config shares only hold files that the template can carry Less to create and to protect, and no hand upload of config files #138
Soft delete of the shares (7 days), TLS 1.2, and no public access to blobs The shares hold the license file, the .secret_key file, the repository, and the audit logs, and the README creates the storage account with the default settings A deleted share can be restored, and the account is safer #138
The script reads the storage account key itself A key typed in a command stays in the shell history (a review of pull request #91 warned about this) Nobody types or copies the key #138
Secure parameters and secureValue, and no databaseUrl parameter The database password, the storage key, and the Log Analytics key are plain values in a file and in the environment, so az container show and the deployment history show them The passwords are not visible outside the container, and they are never in a file or on a command line #138
AMQP_USER and AMQP_PASSWORD The RabbitMQ user is fixed to guest, and ke2-docker makes it configurable The same as ke2-docker, and an external job manager can have its own user #138
A check of the subnet before the deployment A deployment in a virtual network needs a delegated subnet with a NAT gateway, at least /24, and no other resources, and the README says nothing about it A failure is shown before anything is created, with the fix #138
NetworkMode and subnetIds, with no network profile Microsoft retired the network profile from the API 2021-07-01, and two loose parameters can be half set The current API, and two clear modes #138
The config files as secret volumes from configs/ Two shares that a person fills by hand can hold old or wrong files The files always equal those of ke2-docker, and one deployment carries everything #138
The image names and tags as parameters, with the versions of ke2-docker RabbitMQ 3.12 and nginx 1.25 are behind (ke2-docker has 3.13 and 1.27), and the names are fixed The customer runs the versions that ke2-docker tests, and can use an own registry when Docker Hub limits the pulls #138, #146
A liveness probe for kompira and nginx ACI restarts a container that crashes, but not one that hangs A hang is recovered without a person #138
An in-place update with deploy.sh app A new version needs a new deployment, and ACI restarts all containers together An upgrade is one command, the address is usually kept, and cached layers make it faster #138, #144
A Log Analytics workspace, on by default An ACI container keeps 4 MB of log and loses it at a restart The reason of a failure stays in the workspace #138
ssl-cert read-only in nginx, and NGINX_ENVSUBST_FILTER ke2-docker does both, and the old ACI template does not The same protection and behavior as ke2-docker #138
One new README for the deployment and the operations The old README is long, full of hand steps, and has two known defects (a wrong share name, and no note about the NAT gateway) A person who did not write it can deploy alone #144
The database rule with the address of the group or of the NAT gateway The README says to allow the database to any Azure service, so any Azure service can reach the database port Only the group can reach the database port #144
The checklist for public mode A public group cannot be limited by source address, and the guide says nothing about it The customer knows the risk and the way to remove it #144
Tested procedures for backup, restore, and upgrade Only the export of data is described, so a failed update, a lost database, or a deleted share needs guesses, and the encrypted data cannot be read without a copy of the key A known way back, and a known time to recover #144
The update of the admin manual page and the closing of the issue #82 The page is marked "(WIP)", and the issue is open One reliable manual #144
An investigation before the sizes change ACI is 2.2 to 3.0 times slower than AKS with the same database, and the cause is not known, so to change the sizes by guess costs money and can change nothing The defaults of the template come from numbers, and the customer gets the speed that they pay for #140
The smoke test, the adjusted integration test, and the benchmark Without them the release has no evidence, and the integration test uses the old template and fails The same evidence as the other platforms, every later change is tested by the same suite, and the numbers are recorded for the next release #142
The removal of the old template and README, the release step for the image versions, the migration note, and the support table The old and the new files side by side confuse the customer, and the versions already drifted (RabbitMQ and nginx are two minor versions behind) One supported way, no drift, a way to move, and a table of what was examined #146

2. What azureci is today

Location: ke2/cloud/azureci in ke2-docker. It has three files: README.md (Japanese, about 500 lines of manual steps), aci-deployment.json (an ARM template), and aci-parameters.json (a parameter file with placeholders).

The deployment is one ACI container group, azureci, of type Linux with restartPolicy: Always. It has six containers:

Container Image vCPU Memory (GB) Ports
kompira Kompira image (imageTag, default 2.0.5-latest) 1 2 none
kengine Kompira image 1 6 none
jobmngrd Kompira image 0.5 2 none
redis redis:7.2-alpine from Docker Hub 0.5 2 none
rabbitmq rabbitmq:3.12-alpine from Docker Hub 0.5 2 5671
nginx nginx:1.25-alpine from Docker Hub 0.5 2 80 and 443

The total is 4 vCPU and 16 GB. The containers talk to each other over localhost, because they share the network of the group.

The customer creates by hand: the resource group, the storage account, five Azure Files shares (kompira-var, kompira-nginx-conf, rabbitmq-conf, ssl-cert, and kompira-log), an Azure Database for PostgreSQL flexible server (in the Portal), the certificates, and the uploaded config files (nginx and RabbitMQ). Then the customer deploys the ARM template with az deployment group create.

What the template does not have, or does with a weak setting (checked in the template on develop):

Area Today
Secrets databaseUrl (with the password), storageAccountKey, and logAnalyticsKey are plain string parameters, and the environment variables are plain value entries, not secureValue. ACI supports secureValue and hides those values in az container show and in the Portal.
Availability One container group. No liveness or readiness probe (ACI supports both). No availability zones. The IP address of a group can change.
Network exposure In the default mode, a public IP address with ports 80, 443, and 5671 open to the internet. The VNet mode (parameters vnetName and subnetName) has no public IP address.
Template age The API version of the container group is 2019-12-01, and the VNet mode uses a network profile (API 2020-11-01). Microsoft retired network profiles from the API version 2021-07-01.
Images RabbitMQ 3.12 and nginx 1.25, while ke2-docker (compose and Swarm) uses RabbitMQ 3.13 and nginx 1.27. The images come from Docker Hub.
Storage The five shares are mounted with the storage account key. The shares, the config files, and the certificates are prepared by hand. No soft delete or backup is described.
Database Created by hand in the Portal. The README says to allow public access from any Azure service. The password is in the parameter file.
Logs An ACI container keeps only 4 MB of log while it runs, and less after it stops. Log Analytics is optional. The audit and process files go to the kompira-log share, with fixed names because HOSTNAME_SHORT is set.
Upgrade, backup, restore The README describes the export of data. It has no upgrade procedure, no backup procedure, and no restore procedure.
Automation None. The names are fixed in the README (for example KE20RG), and there is no deploy script.
Documents The README is one long manual. The page for azureci in the admin manual is marked "(WIP)". The GitHub issue #82 (update the document) is open.

How it came to be (issues and pull requests in ke2-docker):

  • Issue KE2 Azure CI のデプロイ戦略 #89 (2025-05) compares two deployment strategies. Strategy 1 is a public IP address with a DNS name label, and it is the default of the template. Strategy 2 is a private IP address in a virtual network, with Application Gateway, Azure Firewall, or NAT Gateway added by the customer. Strategy 2 has two variants: 2.1 uses a virtual network and subnet that the customer gives, and 2.2 creates them. The decision was to implement 2.1, and 2.2 is not implemented.
  • Pull request Deploy KE2 ACI inside an Azure subnet #92 (merged 2025-05-23) added variant 2.1 (vnetName and subnetName, a network profile). The review comment to add dependsOn for the network profile was not applied. The reviewer asked the README not to recommend this mode, only to say that it exists, and to state clearly that the group has no public IP address after the deployment.
  • Pull request KE2 ACI: Update document for ke2 data management #91 (merged 2025-06-09) added the data management part of the README (the folder data in the kompira-var share, and the mount of a share on a local machine). The automatic review warned that the storage account key is typed in commands, and it suggested environment variables or Key Vault. The reviewers also decided that the data folder is /var/opt/kompira/data.
  • Issues ACIにおいて、KEのログファイル(process.log、audit.log)をコンテナ内部から外部へ出力するように設定する #83 (log options), ACIにもnginxの共通設定を利用する #75 (common nginx config), and Add max executor option #62 (maxExecutor) are done. Issue Azure CI documentの更新 #82 (update the document: the composition, the database size and cost, and the parameter section) is open.

More defects found in the current files:

  • The README tells the customer to upload the certificate files and then to open the share kompira-nginx-conf in the Portal. The certificates are in the share ssl-cert.
  • The container group does not have dependsOn for the network profile. The template refers to the profile only by its ID in a property, and ARM does not add a dependency from that, so the first deployment in the VNet mode can fail when the profile is not ready (to confirm on a real deployment).
  • The README does not say that a group in a virtual network needs a NAT gateway for outbound traffic. The nodes need it for the images and for LDAP, mail, and the job targets.

The benchmark that exists (an internal report of April 2025, with the tool KeBenchmark, the total elapsed time, and a lower number is faster; the numbers are in the report and not in this issue). It compares four systems (vSphere, ACI, AKS, and ECS Fargate) at the parallel counts 1, 2, 4, and 8. All four systems have 4 CPUs and 16 GB. ACI and AKS use Azure Database for PostgreSQL (General Purpose, D4ds_v5, 4 vCPU, 16 GiB, 2880 maximum IOPS). The vSphere system runs PostgreSQL 16.3 in a Docker container, and ECS Fargate runs PostgreSQL 16.6.

The report says that ACI is 4.68, 6.40, 6.69, and 6.70 times slower than vSphere, AKS is about 2.1 to 2.3 times slower, and ECS is about 2.8 to 2.9 times slower. Computed from the numbers of the report, ACI is 2.2 to 3.0 times slower than AKS with the same database. The report says that the ACI time changes much more than the others when the parallel count grows, and that tuning may help. It does not name a cause. It also does not say which KE version and which template version were tested. The full report is in a Google spreadsheet and in DocBase.

Facts from the ACI documentation (checked on 2026-09-25, pages of Azure Container Instances on Microsoft Learn):

  • Hard limits: 5 ports for each IP address, 60 containers and 20 volumes for each group. The log size of a running container is 4 MB. A group of more than 4 vCPU and 16 GB can fail to deploy when the region has no capacity.
  • A group in a virtual network needs a delegated subnet that has no other resources, at least a /24 subnet, and a NAT gateway for outbound traffic (it is the only supported way). It cannot have a public IP address or a DNS label. A storage account needs a service endpoint. Outbound port 25 is not supported. The DNS settings of the network are not inherited.
  • A group in a virtual network can pull images only from a public registry or from Azure Container Registry with a managed identity.
  • A public container group cannot be limited by source address. Network security groups are not supported for it, and the answers of Microsoft (Microsoft Q&A, not the documentation pages) say to put Azure Firewall or a load balancer in front, or to deploy in a virtual network (to confirm).
  • Scaling is not available for a container group. More instances need more groups, behind a Standard Load Balancer in a virtual network.
  • The IP address of a group can change after it is created or deleted. NAT Gateway or Application Gateway give a fixed address.
  • A liveness probe restarts a container in place, and the IP address stays. The restart policy has priority over the probe.
  • Secure environment variables are not shown in the container properties. Only the container can read them.

3. Decisions

3.1. Decided

The availability target is decided: single-instance production. azureci is one container group, and ACI cannot scale it (section 2). ACI restarts a container that fails its liveness probe, in place, and the IP address stays. The customer can restart the group to recover it. The deployment does not survive the loss of a host, because it has no availability zone, and the service is down while the group restarts or is updated. The guide says so. A customer who needs high availability uses AKS or EKS.

The policy decisions of the AKS and EKS lists carry over to azureci:

  • Support boundary: Fixpoint provides and supports the template, the script, the images, and the guide, with the procedures for backup and upgrade. The customer owns the Azure resources, the network, the security of the public database and the public address, running the backups, and running the upgrades.
  • Releases: the azureci files are released together with ke2-docker. Each release is examined only with its own default KE version. The guide has a support table with one row for each release: the release tag, the template version, the KE version, and a Note. The template version is a metadata value of the Bicep template (Bicep writes contentVersion itself), and it replaces the chart version of AKS and EKS.
  • Security level: the same as ke2-docker.
  • Database: outside the template. The guide explains a new database and an existing one.
  • Image tag: a value that the customer sets at deploy. An upgrade stops the whole system, updates it, and starts it again.
  • Guide: Japanese only.

The template tool is decided: a new Bicep template (a new file, so it can have comments) and one script, deploy.sh, with three steps. infra creates the resource group, the storage account, the file shares, and (optional) the Log Analytics workspace. certs uploads the certificates to the ssl-cert share. app creates the container group. The old ARM template (aci-deployment.json) and the manual steps of the README are replaced. The API version of the container group is a current one, and a VNet deployment uses subnetIds, because Microsoft retired network profiles from the API version 2021-07-01. A customer of the old template deploys again with the new steps, and the data stays in the shares.

The secrets are decided: databaseUrl is not a parameter any more, and the three secrets (the database password, the storage account key, and the Log Analytics key) are securestring parameters, and their environment variables use secureValue, so az container show and the deployment history do not show them. deploy.sh reads the storage account key itself with az storage account keys list, so the customer never types it. The database values come from the environment variables DATABASE_HOST, DATABASE_USER, DATABASE_NAME, and DATABASE_PASSWORD, and the script asks for a value that is not set. The RabbitMQ user and password are configurable with AMQP_USER and AMQP_PASSWORD, the same names as in ke2-docker. No password is on a command line or in a file. This is a little beyond ke2-docker, which passes these values as plain environment values, and it is the same as the decision for AKS and EKS. The key stays in the definition of the container group, because Azure Files in ACI accepts only the storage account key. Key Vault is not used, because ACI cannot put a Key Vault secret into an environment variable and KE has no code to read one.

The network modes are decided: one template parameter, NetworkMode, with two values. In public mode, the group has a public IP address and a DNS name label (required, because the IP address can change), with the ports 80, 443, and 5671. The guide says that a public group cannot be limited by source address, and that the exposure is the responsibility of the customer. In private mode, the customer gives an existing virtual network and subnet. The subnet must be delegated to Microsoft.ContainerInstance/containerGroups, must have a NAT gateway (the only supported way out, and the images need it), and must be at least a /24 subnet. The customer prepares it before the deployment. The template does not create or change a subnet or a NAT gateway. deploy.sh checks the subnet before it deploys (az network vnet subnet show: delegation, NAT gateway, and size) and stops with a clear message if a check fails. A public address for a private group (Application Gateway or Azure Firewall) is the choice and the work of the customer. Variant 2.2 of issue #89 (a template that creates the network) stays out.

The storage and the config files are decided: the config files of nginx (nginx.conf) and RabbitMQ (rabbitmq-auth.conf and rabbitmq-ssl.conf) are read from the root configs/ folder of ke2-docker by the Bicep template (loadFileAsBase64) and given to the containers as ACI secret volumes. A secret volume is read-only and in memory. A config change is a new deployment of the group. The two config shares (kompira-nginx-conf and rabbitmq-conf) are removed, so the storage account has three shares: kompira-var, kompira-log, and ssl-cert. The certificates stay on the ssl-cert share, so that a customer can replace them by an upload and a reload, without a new deployment. The storage account follows the decisions for AKS: the template sets the soft delete of the shares (7 days), the tier and the redundancy are parameters that the customer chooses (no default), the minimum TLS version is 1.2, and public access to blobs is off. Shared key access stays on, because Azure Files in ACI needs the key.

The images are decided: the versions are the same as in ke2-docker at the release (RabbitMQ 3.13-alpine, nginx 1.27-alpine, and Redis 7.2-alpine now), from the same registries (Docker Hub for these three, and kompira.azurecr.io for the Kompira image). The image names and tags are template parameters, and the defaults are the values of ke2-docker. There is no mirror. Updating the three versions to those of ke2-docker is a step of every release. The guide has a note: Docker Hub limits anonymous pulls, so a customer who meets the limit copies the images to their own Azure Container Registry and changes the image parameters. A group in a virtual network pulls from a private registry only with a managed identity.

The logs and the monitoring are decided: the template has the parameter EnableLogAnalytics, with the default true, because an ACI container keeps only 4 MB of log and loses it when the group restarts, and a restart is how ACI recovers a failed container. The infra step creates the Log Analytics workspace (the retention is a parameter, with 30 days as the default), and the app step connects the group to it with the key that deploy.sh reads itself. The customer can turn it off. The guide has a note on the cost, the retention, and the commands to search the logs. The audit files stay on the kompira-log share with their fixed names (audit-kompira.log and audit-kengine.log). The guide has a short list of what to watch, with no thresholds: the containers are Running, the restart count, the capacity of the shares and the database, and the certificate expiry.

The upgrade and the restore are decided. The upgrade is an in-place redeploy of the group with deploy.sh app: read the release notes, stop the job flows if possible, update the ke2-docker package, run deploy.sh app with the new image tag and the same environment variables as at the first deployment, and check /.status. ACI restarts all containers of the group together in place, which is the same as the ke2-docker steps (stop all, update, start all). The service is down during the update, and running job flow processes are aborted. The IP address is usually kept, and the DNS name label (required in public mode) keeps the name. When the image tag does not change (a rebuilt -latest tag), the customer runs deploy.sh app again, because a redeploy restarts the group and pulls the changed layers (to confirm). A change of the CPU or the memory, the restart policy, or the zone needs az container delete first, and then deploy.sh app, because ACI cannot update these properties. The data stays in the shares, and the database is outside. The backup is the export_data output, a copy of the license file, a copy of the .secret_key file outside the share (required), the backup of the database service, the soft delete of the shares and an optional manual snapshot, and the environment values in a safe place. The restore has two cases: the database is fine and the group is lost (deploy again), and the database is lost (a new or a point-in-time database, deploy, import_data, and put back the key and the license). The guide says to try a restore once. There is no promise of a rollback to an older version.

The performance is decided: first an investigation, then the defaults. The benchmark of April 2025 shows that ACI is 2.2 to 3.0 times slower than AKS with the same database, and the cause is not known. The investigation runs KeBenchmark on the new template and changes one thing at a time: the CPU and the memory of kengine, the type of the file share (Standard or Premium), and maxExecutor. It records the results in its issue. The defaults of the template (the sizes and the type of the shares) follow the answers. No target number is set before the investigation. At the end, the benchmark test of the release records the final result.

4. Issue list and order of work

The issues are split so that each one can be tested as a whole when its work is finished, and small tasks are in one issue. The IDs use the letter C (container instances), and they follow the order of work. The step number in the title of an issue shows which issue starts first. Issues with the same step number can run in parallel, and the letter only tells them apart. An issue can start when all issues in its "Depends on" column are done, and its step is the first step in which that can be true.

Step # Issue What it delivers Depends on
1 #138 ACI template and deploy script deploy.sh with the steps infra, certs, and app, and the Bicep template: the storage, the certificates, the check of the subnet, the six containers, the secure values, the config files as secret volumes, the probes, the network modes, and the in-place update None
2a #140 ACI performance investigation The cause of the slow benchmark result, measured one change at a time, and the template defaults that follow #138
2b #144 ACI guide (Japanese), backup, restore, and upgrade One README for the deployment and the operations, the tested procedures, and the update of the admin manual page #138
3 #142 ACI tests: smoke test, integration test, and benchmark The three tests run on the ACI release deployment (the integration test of azureci in kompira-v2-integration-test is adjusted), and the results are recorded #138, #140
4 #146 ACI release packaging Release notes, the versions, the support table, and the removal of the old template #138 to #142
flowchart LR
    subgraph S1["Step 1"]
        A1["1 Template and deploy script (issue 138)"]
    end
    subgraph S2["Step 2: in parallel"]
        B1["2a Performance investigation (issue 140)"]
        B2["2b Guide, backup, restore, and upgrade (issue 144)"]
    end
    subgraph S3["Step 3"]
        C4["3 Tests: smoke, integration, and benchmark (issue 142)"]
    end
    subgraph S4["Step 4"]
        D1["4 Release packaging (issue 146)"]
    end
    S1 --> S2
    B1 --> C4
    C4 --> D1
    B2 --> D1
Loading

5. Issues

The issues in section 4 are sub-issues of this issue. Every issue of this work, including this one, has the label ACI, the milestone "ACI production release", and the title prefix "[ACI]" followed by the step number of section 4, for example "[ACI] 1. ACI template and deploy script". The step number shows the order of work: issues with the same step number can run in parallel.

Every issue has the same parts: Goal, Description, Implementation design, Test plan, and ref. The issue about the tests (#142) has only a short Goal and Description for now. Its implementation design and test plan are written later.

  • Implementation design is the design of the work: a diagram where it helps, and a checklist of what to do. A line that starts with "Note:" under a checklist item explains why the item is needed.
  • Test plan lists what to check when the work is done. Each line has an action and the expected result. Lines that need an Azure test environment are run by hand.

Each issue can be tested as a whole when its work is finished. The first release includes every checklist item. Some statements are marked "to confirm". They come from reading code, documentation, and configuration, not from running a deployment.

Sub-issues

Collapse Sub-issuesSub-issues

0 of 50 of 5 Issues completed
Loading 5 sub-issues

Activity

  1. fixpoint-hasan
    added this to the ACI production release milestone on Sep 25, 2026
  2. fixpoint-hasan
    added
    ACIAzure Container Instances (azureci) production release work
    on Sep 25, 2026
  3. fixpoint-hasan
    added sub-issues on Sep 25, 2026
    • [ACI] 1. ACI template and deploy script #138
    • [ACI] 2. ACI container group template #139
    • [ACI] 2a. ACI performance investigation #140
    • [ACI] 3b. ACI backup, restore, and upgrade #141
    • [ACI] 3. ACI tests: smoke test, integration test, and benchmark #142
    • [ACI] 3d. ACI integration test #143
    • [ACI] 2b. ACI guide (Japanese), backup, restore, and upgrade #144
    • [ACI] 4b. Benchmark test on ACI #145
    • [ACI] 4. ACI release packaging #146
  4. fixpoint-hasan
    removed sub-issues on Sep 25, 2026
    • [ACI] 2. ACI container group template #139
    • [ACI] 3b. ACI backup, restore, and upgrade #141
    • [ACI] 3d. ACI integration test #143
    • [ACI] 4b. Benchmark test on ACI #145
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ACIAzure Container Instances (azureci) production release work

    Type

    No type

    Projects

    No projects

      Milestone

      • ACI production releaseNo due date

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402792 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.