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>
52 lines
2.0 KiB
Markdown
52 lines
2.0 KiB
Markdown
# coreapp-dev
|
|
|
|
A software development kit for building apps that run as Docker containers on
|
|
[Federated Core](https://documentation.federated.computer/self-hosted/cores/provisioning-a-core/).
|
|
It runs a real Core in a KVM virtual machine on your own computer, so you can
|
|
build and test apps against it.
|
|
|
|
It's a CoreDesktop sibling project: CoreDesktop installs it and keeps it up to
|
|
date.
|
|
|
|
## Install
|
|
|
|
On a CoreDesktop computer with hardware virtualization (VT-x/AMD-V) turned on:
|
|
|
|
```
|
|
sibling add https://gitea.federated.computer/Federated_Computer/coreapp-dev.git
|
|
```
|
|
|
|
This installs libvirt and QEMU/KVM, adds you to the `libvirt` group (log out
|
|
and back in afterwards), and sets up the `coreapp` VM network
|
|
(10.123.0.0/24). CoreDesktop's `update` keeps them current.
|
|
|
|
## A Core in a VM
|
|
|
|
1. Download the CoreServer image to
|
|
`~/.local/share/coreapp-dev/images/coreserver-enterprise-x86-26-05-12.qcow2`
|
|
(see [PLAN.md](PLAN.md) for the URL).
|
|
2. Put the SSH public key from Federated's dashboard (Cores) in
|
|
`~/.config/coreapp-dev/authorized_keys`, so the Provisioner can log in.
|
|
3. Create the VM:
|
|
```
|
|
scripts/create-coreserver-vm.sh
|
|
```
|
|
It gets 10.123.0.10. Log in with
|
|
`ssh -i ~/.local/share/coreapp-dev/ssh/id_ed25519 root@10.123.0.10`.
|
|
4. Federated's Provisioner has to reach the VM over SSH, and the Core must be
|
|
reachable from the internet. Behind a home router, use
|
|
[corerelay](https://gitea.federated.computer/Federated_Computer/corerelay)
|
|
to give it a VPS's public IP.
|
|
5. Provision the Core with `core-create`
|
|
([Provisioning a Core](https://documentation.federated.computer/self-hosted/cores/provisioning-a-core/)),
|
|
with the public IP as `ip`.
|
|
|
|
## Files
|
|
|
|
| Path | What it is |
|
|
|---|---|
|
|
| `install.sh`, `update.sh` | Run by CoreDesktop's `sibling add` and `update` |
|
|
| `libvirt/network-hook.sh` | NAT and firewall rules for the `coreapp` network |
|
|
| `scripts/create-coreserver-vm.sh` | Creates a CoreServer VM |
|
|
| [PLAN.md](PLAN.md), [TEST.md](TEST.md) | What's next, and how to test it |
|