# 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 1. **Export** with portal 0.19.3 (`portal export`), reading NATS only. 2. **Rewrite** for the 1.0 content with `flytting/fra-0.19.py` from tomtervel/questions: the committees become `gruppe` on each record. 3. **Import** with portal 1.0 into the volume, after a dry run. 4. **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. 5. **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. 6. **Compare**, with every picture and document fetched as a visitor would. Anything that differs is counted and the run ends non-zero. 7. **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. 1. **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. 2. **Org secret `LOAD_TOKEN`** (`openssl rand -hex 24`, `gt secret set LOAD_TOKEN -o tomtervel`), and this repo's variables `GDO_RELEASE` (that commit), `KRON_RELEASE=0.3.0`, `COMPOSE_PROFILES=pay`. 3. **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: --build-arg GDO_RELEASE= gdo`, and `podman pull project.uhhm.no/uhhm/kron:0.3.0`. And the new `deploy-tomtervel` in `/usr/local/bin` (its first lines say how). 4. **`move.sh rehearse`** once more, then **`move.sh move`**, both with `GDO_IMAGE` and `KRON_IMAGE` naming those images. `move` stops the 0.19 site, and ends with `DHD_KEYS` and `PORTAL_DHD`. 5. **Those two** as variables of this repo, and the org's `PORTAL_RELEASE=v1.0.2`. 6. **The content**: questions#48 merged, so `main` is the 1.0 content. Its reload fails, since the site is down; the site reads `main` as it starts. 7. **The stack**: this merged, which deploys it. `podman stop tomtervel-cnats-1` afterwards; `tomtervel-nats-1` is left running. 8. **Look**: `/hva-skjer` says 25 of 100 seats, a document opens, a sign-in lands on `/styret` with its lists, the log says gdo and kron are beside the site, and a test invite arrives. 9. **Rauthy's groups**: from `komiteer__medlem` and `_leder` to the group named as its page (questions' README has the names). ### Going back - **Before step 5**: `podman start tomtervel-portal-1`, and remove `tomtervel_portal_data`. Nothing else was touched. - **After**: the stack's merge and the content's reverted, the old `deploy-tomtervel` installed, 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 as `tomtervel_nats_data` is 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_TO` is set (README.md, "Backups").