diff --git a/IMPLEMENTATION.md b/IMPLEMENTATION.md index 88c0c41..2dfa831 100644 --- a/IMPLEMENTATION.md +++ b/IMPLEMENTATION.md @@ -236,6 +236,7 @@ After Docker install, re-SSH so the `docker` group membership takes effect. | `print_forge` | django (docker) | all webservers | beta + prod | **stopped** (`enabled: false`, [#33](https://git.aimloperations.com/ai_ml_operations/server-infra/issues/33)). Ports reserved. Re-enable + `deploy.sh` to bring back. Worker was adama-only. | | `abc_be` | django (docker) | all webservers | **beta only** | AI Benefits Coach API; no bundled Postgres; Ollama `http://10.0.0.128:11434`; shares DB `abc_be_beta` with `abc_worker` | | `abc_worker` | django-type compose (FastAPI) | all webservers | **beta only** | same Postgres as `abc_be`; `migrate_cmd: true`; WS on host port 8018 | +| `abc_voice` | django-type compose (FastAPI) | all webservers | **beta only** | Same repo as `abc_worker`, compose `docker-compose.voice.yml`, join API on host port 8020. One uvicorn worker. | | `abc_fe` | node-static (Vite) | all webservers | **beta only** | built to `/var/www/.abc.aimloperations/html`; no prod `host_apps` row | | `livekit` | django-type compose (LiveKit SFU) | all webservers | **beta only** | Docker like `abc_worker`. Host network `:7880`. **Do not NPM-balance** until Redis — pick one upstream (adama). Router DNAT UDP 3478 + 50000–60000 and TCP 7881 to that host. Secrets `~/Documents/secrets/livekit/livekit_beta.env` | @@ -273,6 +274,7 @@ future beta replica. | print_forge | **8019** (*stopped*) | **8007** (*stopped*) | all webservers (`enabled: false`) | | abc_be | **8017** | 8009 (*not deployed*) | all webservers | | abc_worker | **8018** | 8008 (*not deployed*) | all webservers | +| abc_voice | **8020** | — | all webservers | | dta_webapp (nginx) | 8081 | 8080 | all webservers | | chat_web_app (nginx) | 8083 | 8082 | all webservers | | abc_fe (nginx) | **8085** | 8084 (*not deployed*) | all webservers | @@ -360,6 +362,7 @@ point each domain at the backend(s): | abc_fe | `beta.abc.aimloperations.com` (beta only) | `adama:8085` + same on roslin / starbuck / apollo / ai-server-4080 | | abc_be | `beta.abc.be.aimloperations.com` (beta only) | `adama:8017` + same on roslin / starbuck / apollo / ai-server-4080 | | abc_worker | `beta.abc.worker.aimloperations.com` (beta only; HTTP + WebSocket upgrade) | `adama:8018` + same on roslin / starbuck / apollo / ai-server-4080 | +| abc_voice | `beta.abc.voice.aimloperations.com` (beta only). Balance this host. Do not balance LiveKit. | `adama:8020` + same on roslin / starbuck / apollo / ai-server-4080 | | livekit | `LIVEKIT_DOMAIN` (e.g. `livekit.aimloperations.com`) — NPM Proxy Host, WebSocket, **single upstream** | `adama:7880` (do not balance until Redis) | ### Required changes IN each app repo (owned separately) @@ -406,6 +409,7 @@ do not). | print_forge | beta | `print_forge_beta` | `postgres://westfarn:@10.0.0.230:5432/print_forge_beta` | | abc_be | beta | `abc_be_beta` | `postgres://westfarn:@10.0.0.230:5432/abc_be_beta` | | abc_worker | beta | *(same `abc_be_beta`)* | worker uses `DB_*` pointing at `abc_be_beta` — do **not** create a second DB | +| abc_voice | beta | *(same `abc_be_beta`)* | voice container uses the worker DB settings — do **not** create a second DB | Server prereqs on 10.0.0.230: create each DB + grant `westfarn`; `listen_addresses` covers LAN; `pg_hba.conf` allows `10.0.0.0/24`; firewall opens @@ -461,13 +465,16 @@ Control-node secrets (never git, mode `600`): ```text ~/Documents/secrets/abc_be/abc_be_beta.env ~/Documents/secrets/abc_worker/abc_worker_beta.env +~/Documents/secrets/abc_voice/abc_voice_beta.env ``` -Templates: `GIS/abc_be` `.env.beta.example`, `GIS/abc_worker` `.env.beta.example`. +Templates: `GIS/abc_be` `.env.beta.example`, `GIS/abc_worker` `.env.beta.example`, `GIS/abc_worker` `.env.voice.beta.example`. +`abc_voice` is the same checkout as `abc_worker` with `docker-compose.voice.yml`. Copy the worker beta env, set `VOICE_ENABLED=true`, `CARTESIA_API_KEY`, and the LiveKit keys. `abc_be` then uses `WORKER_AV_URL=https://beta.abc.voice.aimloperations.com`. `abc_fe` has no secret file — public `VITE_*` URLs live in committed `.env.beta`. Create Postgres DB `abc_be_beta` and grant `westfarn` before first deploy. NPM: `beta.abc.aimloperations.com` → `:8085`, `beta.abc.be.aimloperations.com` → `:8017`, -`beta.abc.worker.aimloperations.com` → `:8018` (enable WebSocket). No prod ABC +`beta.abc.worker.aimloperations.com` → `:8018` (enable WebSocket), +`beta.abc.voice.aimloperations.com` → `:8020` on all five webservers. No prod ABC `host_apps` rows; ports **8009** / 8008 / 8084 reserved (`print_forge` took prod **8007**). Companion workflows: [abc_be#22](https://git.aimloperations.com/GIS/abc_be/issues/22), diff --git a/inventory/group_vars/all.yml b/inventory/group_vars/all.yml index d0f49aa..ab64c70 100644 --- a/inventory/group_vars/all.yml +++ b/inventory/group_vars/all.yml @@ -172,6 +172,14 @@ app_catalog: web_service: web # FastAPI — no Django migrations. `true` keeps the django deploy path happy. migrate_cmd: "true" + # Same git repo as abc_worker, second container (voice join). Not the text worker. + abc_voice: + type: django + repo: "{{ git_base_url }}/GIS/abc_worker.git" + default_branch: Development + compose_file: docker-compose.voice.yml + web_service: web + migrate_cmd: "true" abc_fe: type: node-static repo: "{{ git_base_url }}/GIS/abc_fe.git" diff --git a/inventory/host_vars/adama.yml b/inventory/host_vars/adama.yml index 3e7877c..5fe1afe 100644 --- a/inventory/host_vars/adama.yml +++ b/inventory/host_vars/adama.yml @@ -31,5 +31,6 @@ host_apps: - { name: print_forge, env: beta, port: 8019, compose_profiles: [worker], enabled: false } - { name: abc_be, env: beta, port: 8017 } - { name: abc_worker, env: beta, port: 8018 } + - { name: abc_voice, env: beta, port: 8020 } - { name: abc_fe, env: beta, port: 8085 } - { name: livekit, env: beta, port: 7880 } diff --git a/inventory/host_vars/ai-server-4080.yml b/inventory/host_vars/ai-server-4080.yml index 451aaa6..46f9ea7 100644 --- a/inventory/host_vars/ai-server-4080.yml +++ b/inventory/host_vars/ai-server-4080.yml @@ -47,5 +47,6 @@ host_apps: - { name: print_forge, env: beta, port: 8019, enabled: false } - { name: abc_be, env: beta, port: 8017 } - { name: abc_worker, env: beta, port: 8018 } + - { name: abc_voice, env: beta, port: 8020 } - { name: abc_fe, env: beta, port: 8085 } - { name: livekit, env: beta, port: 7880 } \ No newline at end of file diff --git a/inventory/host_vars/apollo.yml b/inventory/host_vars/apollo.yml index a8375fd..02f121a 100644 --- a/inventory/host_vars/apollo.yml +++ b/inventory/host_vars/apollo.yml @@ -26,5 +26,6 @@ host_apps: - { name: print_forge, env: beta, port: 8019, enabled: false } - { name: abc_be, env: beta, port: 8017 } - { name: abc_worker, env: beta, port: 8018 } + - { name: abc_voice, env: beta, port: 8020 } - { name: abc_fe, env: beta, port: 8085 } - { name: livekit, env: beta, port: 7880 } diff --git a/inventory/host_vars/roslin.yml b/inventory/host_vars/roslin.yml index 99e3db3..3d74bbe 100644 --- a/inventory/host_vars/roslin.yml +++ b/inventory/host_vars/roslin.yml @@ -26,5 +26,6 @@ host_apps: - { name: print_forge, env: beta, port: 8019, enabled: false } - { name: abc_be, env: beta, port: 8017 } - { name: abc_worker, env: beta, port: 8018 } + - { name: abc_voice, env: beta, port: 8020 } - { name: abc_fe, env: beta, port: 8085 } - { name: livekit, env: beta, port: 7880 } diff --git a/inventory/host_vars/starbuck.yml b/inventory/host_vars/starbuck.yml index 8e1db29..c1ae80b 100644 --- a/inventory/host_vars/starbuck.yml +++ b/inventory/host_vars/starbuck.yml @@ -26,5 +26,6 @@ host_apps: - { name: print_forge, env: beta, port: 8019, enabled: false } - { name: abc_be, env: beta, port: 8017 } - { name: abc_worker, env: beta, port: 8018 } + - { name: abc_voice, env: beta, port: 8020 } - { name: abc_fe, env: beta, port: 8085 } - { name: livekit, env: beta, port: 7880 }