A CoreDesktop sibling project. install.sh and update.sh install libvirt and QEMU/KVM and set up the coreapp VM network (10.123.0.0/24, open mode, with a libvirt hook for NAT and firewall rules, and ufw rules for DHCP, DNS and forwarding). scripts/create-coreserver-vm.sh creates a CoreServer VM with root's SSH keys from cloud-init, at 10.123.0.10, with systemd-resolved masked so the Core's DNS server survives reboots. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
74 lines
4.0 KiB
Markdown
74 lines
4.0 KiB
Markdown
# Plan
|
|
|
|
coreapp-dev is a software development kit for building apps that run as
|
|
Docker containers on Federated Core. It is a CoreDesktop sibling project:
|
|
people install it with `sibling add <url>`, and CoreDesktop's `update` keeps
|
|
it current (format: `~/Projects/coredesktop/skills/sibling-project-format.md`).
|
|
Delete an item once it's done; git history keeps the record.
|
|
|
|
## Now: a working Core in a local VM
|
|
|
|
What we know about the CoreServer image (2026-12-02): it's Arch Linux, boots
|
|
with BIOS or UEFI, and needs a display device (it stalls at "Loading initial
|
|
ramdisk" with `--graphics none`). All passwords are locked; cloud-init
|
|
(NoCloud) installs root's SSH keys. `/` is a fixed 10 GiB btrfs partition;
|
|
the extra disk space goes to `/federated`, which the image's own
|
|
`grow-federated.service` grows on first boot.
|
|
|
|
The Core `dev.fedcom.net` was provisioned on 2026-12-03 in the VM
|
|
(10.123.0.10). It's reachable from the internet at 77.216.180.150
|
|
through corerelay, which also carries its outbound traffic.
|
|
|
|
What we learned provisioning (2026-12-02/03):
|
|
- Federated Core finds its public IP with `dig @resolver4.opendns.com
|
|
myip.opendns.com` and publishes it in DNS, so the Core's outbound traffic
|
|
must leave through the relay (first attempt published the home IP)
|
|
- The Core is the authoritative DNS server for its domain (ns1/ns2.<domain>
|
|
point at `ip`), so 53 tcp/udp must be forwarded, plus 25 143 465 587 993
|
|
4190 9980 besides 22 80 443
|
|
- The domain is picked round-robin (dev.federatedcomputer.cloud,
|
|
dev.federatedcomputer.net, dev.fedcom.net, ...)
|
|
- The progress stream from core-create is server-sent events; it takes 5+
|
|
minutes, a full install about 40
|
|
- Deleting a Core makes the platform SSH into its IP and tear it down, so
|
|
never put a new VM behind an IP whose old Core still exists. A failed Core
|
|
has no delete button; Federated has to remove it
|
|
- The Core's containers use 192.168.0.0/16 and send replies for any
|
|
192.168.x.x address onto their own bridge, so the VM network is
|
|
10.123.0.0/24 (moved there on 2026-12-03 from 192.168.123.0/24)
|
|
- libvirt's DHCP `<host>` reservations are ignored on this workstation:
|
|
libvirt writes the hosts file readable by root only and dnsmasq reads it as
|
|
`nobody`. The reservation is a `dnsmasq:option` in the network instead
|
|
- Before core-create on a fresh VM: `systemctl is-active docker`, opendns
|
|
sees the VPS IP, and the hairpin (`/dev/tcp/<vps-ip>/22` from the VM)
|
|
|
|
- [ ] The Core shows as Active in the dashboard
|
|
- [ ] Tell Federated (2026-12-03):
|
|
- On this image, disabling systemd-resolved isn't enough: networkd's
|
|
`systemd-networkd-resolve-hook.socket` starts it at boot, it takes
|
|
port 53 and pdns can't start after a reboot. coreapp-dev masks it
|
|
through cloud-init; the installer should mask it too
|
|
- `upgrade-federated.timer` has `Requires=upgrade-federated.service`, so
|
|
the upgrade runs at every boot, not just at 5:00. It fails there
|
|
(exit 2), and on the first reboot it removed the pdns container that
|
|
couldn't start
|
|
- `/federated/bin/upgrade` has an API token in it, readable by anyone
|
|
with the image
|
|
|
|
## SDK packaging
|
|
|
|
- [ ] `install.sh`: check when the system was last upgraded, as `sibling`
|
|
does (`upgrade_if_stale`), so running it by hand doesn't hit stale-mirror
|
|
404s
|
|
- [ ] Add coreapp-dev's `uninstall.sh`: the hook, the `coreapp` network,
|
|
the ufw rules
|
|
- [ ] Make the VM script a command in `~/.local/bin` with a `coreapp-` prefix
|
|
(e.g. `coreapp-vm create`). Never use CoreDesktop's names: configure,
|
|
update, refresh, sibling, version, audit, report, webapp
|
|
- [ ] Have that command download the CoreServer image into
|
|
`~/.local/share/coreapp-dev/images/` when it's missing. Image:
|
|
`https://nginx.core-x86builder.federatedcomputer.cloud/coreserver-enterprise-x86-26-05-12.qcow2`
|
|
(no published checksum; our download's SHA-256 is
|
|
`8c3a64e9be12121b71e1a3ad3dd7c6de686734b83ee77f3852d80cee1b6dd4a4`)
|
|
- [ ] Tag the first release once install and VM creation work end to end
|