An incus node
An incus node runs each service as an Incus application container, through
incus-compose. SHC needs Incus from the Zabbly repository, a storage pool
named default, a managed bridge named incusbr0, and incus-compose on
the path. Incus must listen on the network: SHC sets core.https_address
to the incusbr0 address on port 8443 at join when it is unset.
Add the Zabbly repository on inc01 and install Incus, as root.
$ install -m 0755 -d /etc/apt/keyrings$ curl -fsSL https://pkgs.zabbly.com/key.asc -o /etc/apt/keyrings/zabbly.ascEnabled: yesTypes: debURIs: https://pkgs.zabbly.com/incus/stableSuites: trixieComponents: mainArchitectures: amd64Signed-By: /etc/apt/keyrings/zabbly.asc$ apt-get update...$ apt-get install -y incus...$ incus --version...Set Incus up by hand: a directory pool, one bridge with an address
outside every range the cluster uses, and the default profile that puts
an instance’s root on the pool and its eth0 on the bridge.
$ incus storage create default dirIf this is your first time running Incus on this machine, you should also run: incus admin init
Storage pool default created$ incus network create incusbr0 ipv4.address=10.10.10.1/24 ipv4.nat=true ipv6.address=noneNetwork incusbr0 created$ incus profile device add default root disk path=/ pool=defaultDevice root added to default$ incus profile device add default eth0 nic network=incusbr0Device eth0 added to default$ incus storage list -f csvdefault,dir,,1,CREATED$ incus network list -f csv...incus-compose is not in the Debian archive, and SHC runs its up with
--no-dns and --network-driver, which the newest release, 1.3.4, does
not have and the develop branch does. Build it from that branch with
Go, at the commit SHC was tested against, and put it on the path.
That commit needs Go 1.27.1 or newer. Take Go 1.27.2 from the Go module proxy, which serves every Go release as a zip; go.dev’s own download answers some cloud networks with a 404.
$ apt-get install -y --no-install-recommends git unzip...$ curl -fsSL https://proxy.golang.org/golang.org/toolchain/@v/v0.0.1-go1.27.2.linux-amd64.zip -o ~/go.zip$ unzip -q ~/go.zip -d ~/go-release$ /usr/local/go/bin/go versiongo version go1.27.2 linux/amd64$ git clone -q https://github.com/lxc/incus-compose.git ~/incus-compose$ git -C ~/incus-compose checkout -q 13b1b7a445$ /usr/local/go/bin/go build -C ~/incus-compose -ldflags "-X github.com/lxc/incus-compose/cmd/incus-compose/version.Version=13b1b7a445" -o /usr/local/bin/incus-compose ./cmd/incus-compose...$ incus-compose versionincus-compose version 13b1b7a445...Install SHC on inc01, following Installation. With Incus already there the package brings no Docker, as on pod01. Then join inc01 as an incus node.
$ ssh home01 shc node token --fields token -o text | shc node join - --name inc01 --cloud learn --location home --runtime incus✔ joined cluster as node "inc01" at 188.245.4.253$ incus config get core.https_address10.10.10.1:8443$ shc node ls --verboseNAME ID HOST INTERNAL UNDERLAY RUNTIME CORES MEMORY FREE CORES FREE MEMORY OUTSIDE RESERVED STATE CONDITION AVAIL CLOUD LOCATION ROOM BUILD LEADER VOTERhome01 node-bc8245cec54c home01 10.192.0.1:4003 91.99.211.3 docker 2 7.6G 2.0 7.6G - - healthy ready active learn learn/home ok 0.1.3 yes yesinc01 node-c28ad897b4e6 inc01 10.192.0.3:4003 188.245.4.253 incus 2 7.6G 2.0 7.6G - - healthy ready active learn learn/home ok 0.1.3 no yespod01 node-06d806c654a2 pod01 10.192.0.2:4003 188.245.8.165 podman 2 7.6G 2.0 7.6G - - healthy ready active learn learn/home ok 0.1.3 no yesinc01 reads incus. With a third node the cluster makes pod01 a voter as
well, so pod01’s daemon restarts once and reads restarting for a moment
before ready. Once every condition reads ready, install the nginx
directory a third time, for the incus runtime.
$ shc install ~/learn/nginx -s incweb --runtime incus --expose 18082=nginx:80installing deployment "incweb"[incweb] Healthy 1/1✔ nginx healthy✔ installed deployment "incweb"exposure: lan$ shc ls...On inc01 the service is an Incus instance in a project named after the deployment, on a bridge incus-compose made for it.
$ incus list --all-projects -f csv -c np4s...$ curl -s http://localhost:18082/<!doctype html><title>hello</title><p>Hello from SHC.</p>$ shc node ls --verbose...$ shc ls...Three deployments of the same directory now run on three engines: web on
docker, podweb on podman and incweb on incus, and port 18080, 18081 and
18082 on any node reach each. Keep all three.
Next: An apple node.