feat: add the a2 role #55

Closed
aleksei wants to merge 2 commits from feat/a2-role into main
Owner

Installs AIClient2API as a Compose stack under /opt/a2, the way the bifrost role installs its proxy: a pinned image, a rendered .env, the compose file and the state kept next to it.

  • image pinned to justlikemaki/aiclient-2-api:3.7.5 (Docker Hub tags carry no v prefix, unlike the GitHub release v3.7.5);
  • the Web UI (3000) and the OAuth callback listeners (Antigravity 8085-8087, Codex 1455, Grok CLI 56121, Kiro 19876-19880) are published on the host, because the callbacks are opened by the browser that runs the authorisation flow; every port is a variable with the upstream default;
  • configs, .private and plugins are created up front, so the provider configuration with the OAuth credentials, the plugin signing key and the user plugins survive a container recreation;
  • the bootstrap task reports changed only when Compose creates, recreates or starts a container (Container ... Running is not a change), so a second run is idempotent, unlike the plain docker compose up in the bifrost role;
  • the host backs the three state directories up with restic, as state.md requires.

Deployed with ansible-playbook playbooks/ai.yaml on ai.lan: the stack is up and healthy, the UI answers 200 on http://ai.lan:3000/, /health reports {"status":"healthy"}, and /v1/models answers 401 until an API key is configured. A second run reports changed=0. A restic backup run on the host now snapshots /opt/a2/configs, /opt/a2/.private, /opt/a2/plugins next to /opt/bifrost/data.

Installs [AIClient2API](https://github.com/justlovemaki/AIClient-2API) as a Compose stack under `/opt/a2`, the way the `bifrost` role installs its proxy: a pinned image, a rendered `.env`, the compose file and the state kept next to it. - image pinned to `justlikemaki/aiclient-2-api:3.7.5` (Docker Hub tags carry no `v` prefix, unlike the GitHub release `v3.7.5`); - the Web UI (3000) and the OAuth callback listeners (Antigravity 8085-8087, Codex 1455, Grok CLI 56121, Kiro 19876-19880) are published on the host, because the callbacks are opened by the browser that runs the authorisation flow; every port is a variable with the upstream default; - `configs`, `.private` and `plugins` are created up front, so the provider configuration with the OAuth credentials, the plugin signing key and the user plugins survive a container recreation; - the bootstrap task reports `changed` only when Compose creates, recreates or starts a container (`Container ... Running` is not a change), so a second run is idempotent, unlike the plain `docker compose up` in the bifrost role; - the host backs the three state directories up with restic, as `state.md` requires. Deployed with `ansible-playbook playbooks/ai.yaml` on ai.lan: the stack is up and `healthy`, the UI answers `200` on `http://ai.lan:3000/`, `/health` reports `{"status":"healthy"}`, and `/v1/models` answers `401` until an API key is configured. A second run reports `changed=0`. A restic backup run on the host now snapshots `/opt/a2/configs`, `/opt/a2/.private`, `/opt/a2/plugins` next to `/opt/bifrost/data`.
The role installs AIClient2API as a Compose stack under /opt/a2, the same way the bifrost role installs its proxy: a pinned image, a rendered .env and the configuration kept next to the compose file. It publishes the Web UI and the OAuth callback listeners (Antigravity, Codex, Grok CLI, Kiro), since those callbacks are opened by the browser that runs the authorisation flow.
The provider configuration with the OAuth credentials, the plugin signing key and the user plugins are the state of the role, so they join the restic set of the host.
Author
Owner

Superseded: a2 is replaced by the cli_proxy_api role (CLIProxyAPI).

Superseded: a2 is replaced by the cli_proxy_api role (CLIProxyAPI).
aleksei closed this pull request 2026-11-28 11:59:45 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
zoo/infra!55
No description provided.