Portal 1.0 keeps everything in one file (portal_data) and has no NATS. gdo and kron dial it over dhd/1 from loopback, so the three share one network namespace, held by a container of its own: held by portal, a restart of portal cut the other two off. NATS stays behind a profile nothing turns on, for going back; the chat (cnats) is out. The deploy writes DHD_KEYS and the hash of LOAD_TOKEN, and no NATS or chat settings. gdo is built from uhhm/gdo at GDO_RELEASE, since the gdo that dials a site is not in the registry. move.sh reads the programs' keys and prints what the deploy wants. Run on kasse beside the live stack, on other ports, with made-up records: mail out, a payment settled, content loaded over /dhd/1/load, and both programs back after portal was restarted and made anew. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L5fbDjTQg4CJsNqEo7hhE7
The move to portal 1.0
Portal 0.19 keeps the vel's records on NATS. Portal 1.0 keeps them in one file of its own, and starts empty. This folder is what carries the records across, on kasse, and the order the whole switch goes in.
move.sh rehearse |
the whole middle of the move beside the running site, into a volume it removes again |
move.sh move |
the same for real: stops the 0.19 site first, and fills tomtervel_portal_data, the volume the 1.0 stack starts on |
compare.py |
holds a 1.0 store to the export: every record, its state, its fields, its files, and the sign-ups in the order they came |
sink.py |
takes what the site would have sent while the sign-ups are taken again, and lets it go |
Everything is run as root on kasse. The export holds names and addresses:
it stays in /srv/tomtervel/move-1.0 (root only) and nothing here prints
a name, an address or a text, only counts and the names of fields.
What move.sh does
- Export with portal 0.19.3 (
portal export), reading NATS only. - Rewrite for the 1.0 content with
flytting/fra-0.19.pyfrom tomtervel/questions: the committees becomegruppeon each record. - Import with portal 1.0 into the volume, after a dry run.
- A 1.0 site on the store that only kasse can reach (127.0.0.1:3997), with the stack's garage for the files and no sign-in.
- The sign-ups again, through their form
(
flytting/pameldinger.py), in the order they came. A sign-up cannot be imported: in 1.0 a seat is taken through the event's own count. - Compare, with every picture and document fetched as a visitor would. Anything that differs is counted and the run ends non-zero.
- Stop the site again.
No mail leaves
Taking a sign-up again makes the mail the form makes ("Dere har plass"), and what the site says in the chat's rooms. With no mail service beside it, the site does not drop them: they wait in the store, and go out the moment gdo dials it. A store filled on a preview and then started on in production would mail every sign-up on its first start.
So while the site of step 4 runs, its mail, rooms and answers
outboxes are posted to sink.py (DHD_HOOKS), which acknowledges each
row and delivers nothing. The run says how many mails it took, and fails
if that is not one per sign-up. payments is left alone: nothing the
move does asks for money.
The cost: nobody gets a new link to withdraw by, and the links in the mail 0.19 sent stop working at the move. Someone who cannot come tells the board, who takes them off on the event's page.
The switch, in order
Rehearsed on 2026-11-24 against the live site: 91 records and 15 sign-ups (25 guests) across, all 53 files fetched, 15 mails taken by the sink, nothing differing. The 1.0 stack was run the same day beside the live one, with made-up records: mail out, a payment settled, content loaded, and gdo and kron back after portal was restarted and made anew.
The site is down from step 4 until step 7 is done.
- Programs that dial a 1.0 site: kron's image
0.3.0, and a commit of uhhm/gdo with its NATS mode gone, which the stack builds gdo from. The chat does not come along: cnats speaks NATS only, and kino has no image. - Org secret
LOAD_TOKEN(openssl rand -hex 24,gt secret set LOAD_TOKEN -o tomtervel), and this repo's variablesGDO_RELEASE(that commit),KRON_RELEASE=0.3.0,COMPOSE_PROFILES=pay. - On kasse, the images the stack will run, so the move can read
their keys: from a checkout of this branch,
podman build -t localhost/tomtervel-gdo:<GDO_RELEASE> --build-arg GDO_RELEASE=<GDO_RELEASE> gdo, andpodman pull project.uhhm.no/uhhm/kron:0.3.0. And the newdeploy-tomtervelin/usr/local/bin(its first lines say how). move.sh rehearseonce more, thenmove.sh move, both withGDO_IMAGEandKRON_IMAGEnaming those images.movestops the 0.19 site, and ends withDHD_KEYSandPORTAL_DHD.- Those two as variables of this repo, and the org's
PORTAL_RELEASE=v1.0.2. - The content: questions#48 merged, so
mainis the 1.0 content. Its reload fails, since the site is down; the site readsmainas it starts. - The stack: this merged, which deploys it.
podman stop tomtervel-cnats-1afterwards;tomtervel-nats-1is left running. - Look:
/hva-skjersays 25 of 100 seats, a document opens, a sign-in lands on/styretwith its lists, the log says gdo and kron are beside the site, and a test invite arrives. - Rauthy's groups: from
komiteer_<id>_medlemand_lederto the group named as its page (questions' README has the names).
Going back
- Before step 5:
podman start tomtervel-portal-1, and removetomtervel_portal_data. Nothing else was touched. - After: the stack's merge and the content's reverted, the old
deploy-tomtervelinstalled, and the variables back to what they were (PORTAL_RELEASE=v0.19.2,GDO_RELEASE=v0.2.0,KRON_RELEASE=0.1.0,COMPOSE_PROFILES=chat,pay), then the deploy. NATS still holds everything 0.19 had as long astomtervel_nats_datais kept, so keep it for some weeks. What people did on 1.0 in between does not go back with it.
What does not come across
- Sign-ins. Everyone signs in again. Their accounts and groups are in Rauthy and are not touched.
- Invites nobody has answered yet stay valid in Rauthy, but the site's list of them starts empty.
- Each record's history. A record arrives with one event saying it was imported, and its date.
- The chat, and its history.
- Payments under way in kron. The new kron starts with none open: a pay link mailed before the move no longer settles. A household that owed its fee is marked paid by the treasurer when the money is seen, or signs up again for a new link.
- The site's backups are off until
PORTAL_BACKUP_TOis set (README.md, "Backups").