kino in the stack: the vel's chat beside the 1.0 site
The chat left with NATS at the move to 1.0. uhhm/kino 0.1.2 has an image now, so it comes back as a service under the profile `chat`: it shares the site's network namespace like gdo and kron, dials the site over dhd/1, signs people in at Rauthy as the client `chat`, listens on 3070 (the host Caddy's samtaler.tomtervel.no block already points there) and keeps its history in kino_data. The deploy takes CHAT_HOST, KINO_RELEASE and the secret CHAT_OAUTH2_CLIENT_SECRET, refuses the profile without them, and writes kino.env; deploy-tomtervel puts that file in place. README.md, "The chat", has the four steps, the last being kino's key into DHD_KEYS. Nothing changes until COMPOSE_PROFILES has `chat`: the profile keeps the service out, and the new published port (3070) has nothing behind it. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L5fbDjRr9xfrtcDzcdJNr2
This commit is contained in:
4 files changed
+97
-7
No files matched your search
@@ -19,8 +19,8 @@ Nothing about the vel's members or records depends on anyone else's
|
||||
host: the login and the site are the vel's own.
|
||||
|
||||
The site ran portal 0.19 on NATS until the move to 1.0, which
|
||||
`move-1.0/` is. The chat (cnats) spoke to portal over NATS and went
|
||||
with it; the one that dials a 1.0 site (uhhm/kino) has no image yet.
|
||||
`move-1.0/` is. The chat it had (cnats) spoke to portal over NATS and went
|
||||
with it; uhhm/kino, which dials a 1.0 site, takes its place ("The chat").
|
||||
|
||||
## First start
|
||||
|
||||
@@ -47,6 +47,7 @@ it, and `host-caddy/tomtervel.no` is its file for them
|
||||
|
||||
- portal → `127.0.0.1:3050`
|
||||
- kron → `127.0.0.1:3080`
|
||||
- kino → `127.0.0.1:3070`
|
||||
- rauthy → `127.0.0.1:8090`
|
||||
|
||||
## Accounts and groups
|
||||
@@ -150,6 +151,8 @@ Run workflow**. Set them with `gt` (`gt variable set NAME --body ...`,
|
||||
| `RAUTHY_BOOTSTRAP_API_KEY`, `RAUTHY_BOOTSTRAP_API_KEY_SECRET` | secret | repo | optional, Rauthy's first start only: a short-lived key (base64 of `{"name","exp","access"}`, secret 64+ alphanumerics) that makes the OIDC clients through the API; read into an empty database, ignored after |
|
||||
| `RAUTHY_API_KEY`, `RAUTHY_LANGUAGE` | secret, variable | repo | portal makes accounts in Rauthy (`<name>$<secret>`, made in Rauthy's admin), in `nb` |
|
||||
| `VIPPS_LOGIN_CLIENT_ID`, `VIPPS_LOGIN_CLIENT_SECRET` | variable, secret | repo | Vipps Login (the login sales unit's keys from portal.vippsmobilepay.no): the deploy keeps Vipps as a sign-in provider in Rauthy with them (`rauthy-providers.sh`) |
|
||||
| `CHAT_HOST`, `KINO_RELEASE` | variable | repo | the chat: where it answers (`samtaler.tomtervel.no`, DNS in `dns/`, a kasse Caddy block) and which kino image (`0.1.2`). Needed once `COMPOSE_PROFILES` has `chat` |
|
||||
| `CHAT_OAUTH2_CLIENT_SECRET` | secret | repo | the secret of the Rauthy client `chat` ("Rauthy" below), which kino signs people in with |
|
||||
| `PAY_HOST` | variable | repo | where the money service answers: `betaling.tomtervel.no` (DNS in `dns/`, a kasse Caddy block) |
|
||||
| `VIPPS_MSN` | variable | repo | the Medlemskap sales unit's merchant serial number, `1192072` |
|
||||
| `VIPPS_CLIENT_ID`, `VIPPS_CLIENT_SECRET`, `VIPPS_SUBSCRIPTION_KEY` | secret | repo | the Medlemskap sales unit's ePayment keys (For developers, API keys, production), read by kron alone. With all four set kron asks the site for nothing |
|
||||
@@ -217,6 +220,36 @@ Going live, in order:
|
||||
Nothing here touches the Vippsnummer (500396): people may keep paying
|
||||
there, and the treasurer marks those by hand as before.
|
||||
|
||||
## The chat
|
||||
|
||||
The vel's conversations are uhhm/kino at `samtaler.tomtervel.no`: every
|
||||
group the content names is a room, and the site decides who gets in.
|
||||
kino signs people in at Rauthy as the client `chat`, dials the site
|
||||
over dhd/1 beside gdo and kron, and keeps what is said in a file of its
|
||||
own (`kino_data`). What was said in the old chat did not come along.
|
||||
|
||||
To turn it on:
|
||||
|
||||
1. Set the variables `CHAT_HOST` (`samtaler.tomtervel.no`) and
|
||||
`KINO_RELEASE` (`0.1.2`), and the secret `CHAT_OAUTH2_CLIENT_SECRET`:
|
||||
the Rauthy client `chat` exists from the old chat, with the redirect
|
||||
`https://samtaler.tomtervel.no/auth/callback`; its secret is in
|
||||
Rauthy's admin, under the client.
|
||||
2. Install the `deploy-tomtervel` from this repo on kasse (its first
|
||||
lines say how): the one before this does not put `kino.env` in
|
||||
place.
|
||||
3. Add `chat` to `COMPOSE_PROFILES` (`pay,chat`) and run the deploy.
|
||||
kino starts and says its key in its log (`podman logs
|
||||
infrastructure_kino_1`). The site does not know that key yet, so
|
||||
kino has no rooms to show until the next step.
|
||||
4. Add that key to the variable `DHD_KEYS` as `<key>=rooms,watch,may`,
|
||||
beside gdo's and kron's, and run the deploy again. Portal starts with
|
||||
the new key, and kino's next dial is taken.
|
||||
|
||||
`https://samtaler.tomtervel.no/` then asks for a sign-in, and a member
|
||||
of a group finds its room. The host Caddy's block and the DNS record
|
||||
are the old chat's, on the same port.
|
||||
|
||||
## Rauthy
|
||||
|
||||
[Rauthy](https://github.com/sebadob/rauthy) at `RAUTHY_HOST`
|
||||
|
||||
Reference in new issue
Block a user