lightscale/lab
2026-02-13 17:08:38 +09:00
..
driver-controlplane Initialize superproject with client/server submodules 2026-02-13 17:08:38 +09:00
driver-controlplane-ha Initialize superproject with client/server submodules 2026-02-13 17:08:38 +09:00
driver-dns Initialize superproject with client/server submodules 2026-02-13 17:08:38 +09:00
driver-fast Initialize superproject with client/server submodules 2026-02-13 17:08:38 +09:00
driver-firewall Initialize superproject with client/server submodules 2026-02-13 17:08:38 +09:00
driver-full Initialize superproject with client/server submodules 2026-02-13 17:08:38 +09:00
driver-ipv6 Initialize superproject with client/server submodules 2026-02-13 17:08:38 +09:00
driver-keys Initialize superproject with client/server submodules 2026-02-13 17:08:38 +09:00
driver-multi Initialize superproject with client/server submodules 2026-02-13 17:08:38 +09:00
driver-nat Initialize superproject with client/server submodules 2026-02-13 17:08:38 +09:00
driver-negative Initialize superproject with client/server submodules 2026-02-13 17:08:38 +09:00
driver-relay-failover Initialize superproject with client/server submodules 2026-02-13 17:08:38 +09:00
driver-restart Initialize superproject with client/server submodules 2026-02-13 17:08:38 +09:00
driver-scale Initialize superproject with client/server submodules 2026-02-13 17:08:38 +09:00
driver-userspace Initialize superproject with client/server submodules 2026-02-13 17:08:38 +09:00
README.md Initialize superproject with client/server submodules 2026-02-13 17:08:38 +09:00
result-fast Initialize superproject with client/server submodules 2026-02-13 17:08:38 +09:00
run.sh Initialize superproject with client/server submodules 2026-02-13 17:08:38 +09:00
test-controlplane-ha.nix Initialize superproject with client/server submodules 2026-02-13 17:08:38 +09:00
test-controlplane-restart.nix Initialize superproject with client/server submodules 2026-02-13 17:08:38 +09:00
test-dns.nix Initialize superproject with client/server submodules 2026-02-13 17:08:38 +09:00
test-fast.nix Initialize superproject with client/server submodules 2026-02-13 17:08:38 +09:00
test-firewall.nix Initialize superproject with client/server submodules 2026-02-13 17:08:38 +09:00
test-ipv6.nix Initialize superproject with client/server submodules 2026-02-13 17:08:38 +09:00
test-keys.nix Initialize superproject with client/server submodules 2026-02-13 17:08:38 +09:00
test-multi.nix Initialize superproject with client/server submodules 2026-02-13 17:08:38 +09:00
test-nat.nix Initialize superproject with client/server submodules 2026-02-13 17:08:38 +09:00
test-negative.nix Initialize superproject with client/server submodules 2026-02-13 17:08:38 +09:00
test-relay-failover.nix Initialize superproject with client/server submodules 2026-02-13 17:08:38 +09:00
test-restart.nix Initialize superproject with client/server submodules 2026-02-13 17:08:38 +09:00
test-scale.nix Initialize superproject with client/server submodules 2026-02-13 17:08:38 +09:00
test-userspace.nix Initialize superproject with client/server submodules 2026-02-13 17:08:38 +09:00
test.nix Initialize superproject with client/server submodules 2026-02-13 17:08:38 +09:00

lightscale lab (NixOS VMs)

This folder contains NixOS tests that boot QEMU VMs, register them against the lightscale control plane, bring up WireGuard interfaces, and verify ping across overlay IPs.

Run the lab test

Fast (2 nodes) test to avoid long builds:

cd /home/centra/dev/lightscale
nix build .#nixosTests.lightscale-lab
./result/bin/nixos-test-driver

Or use the helper script (prebuilds client/server first):

cd /home/centra/dev/lightscale
./lab/run.sh

To watch logs interactively (recommended when debugging hangs):

cd /home/centra/dev/lightscale
./lab/run.sh --interactive --keep

In the Python prompt, run:

node1.execute("tail -f /tmp/lightscale-server.log")

Full (5 nodes) test:

cd /home/centra/dev/lightscale
nix build .#nixosTests.lightscale-lab-5
./result/bin/nixos-test-driver

Helper script:

cd /home/centra/dev/lightscale
./lab/run.sh full

Firewall (UDP blocked, stream relay fallback):

cd /home/centra/dev/lightscale
./lab/run.sh firewall

Control plane restart/outage resilience:

cd /home/centra/dev/lightscale
./lab/run.sh controlplane

Control plane HA (shared DB + client failover across control URLs):

cd /home/centra/dev/lightscale
./lab/run.sh controlplane-ha

Stream relay failover (multi relay servers, first down):

cd /home/centra/dev/lightscale
./lab/run.sh relay-failover

The tests will:

  • start node1 as the control server
  • register clients
  • run agent on each node (endpoint rotation + stream relay fallback phases)
  • ping full-mesh between overlay IPv4 addresses in both phases
  • for the firewall test, block UDP/51820 between nodes and verify stream relay fallback