Skip to content

Test cluster

The setup under test/ starts four identical Cloud nodes against a shared YugabyteDB and a Valkey. This makes it possible to verify locally what a single process cannot show: shared sessions, competing background jobs, migration in a cluster.

┌── node1 :8481 ┐
YugabyteDB :5433 ────┼── node2 :8482 ┤ shared DNSE_ENCRYPTION_KEY,
(YSQL / PG wire) ├── node3 :8483 ┤ same DSN, shared Valkey
Valkey :6379 ─────┴── node4 :8484 ┘
  1. Create test/.env and set the encryption key:

    Terminal window
    cp test/.env.example test/.env
    sed -i '' "s/^DNSE_ENCRYPTION_KEY=.*/DNSE_ENCRYPTION_KEY=$(openssl rand -hex 32)/" test/.env
  2. test/gitlab_token.txt — a token for gitlab.techeve.de, needed only during the build step (private ORM++ module). One line, just the token:

    Terminal window
    printf 'protocol=https\nhost=gitlab.techeve.de\n' | git credential fill \
    | sed -n 's/^password=//p' > test/gitlab_token.txt

Both files are gitignored.

From the test/ directory:

Terminal window
docker compose -f docker-compose.test.yml up --build # start
docker compose -f docker-compose.test.yml logs -f node1 # logs of one node
docker compose -f docker-compose.test.yml down -v # stop + discard DB

Or via the Makefile one level up:

Terminal window
make test-cluster-up # build + start (detached)
make test-cluster-logs # follow node1
make test-cluster-down # stop, remove DB volume

By default the large demo dataset is created (DNSE_DEMO=on): around ten organisations across all plans and regions, ~39 users, plus per organisation projects, zones with record sets, sync groups, templates, sources, DynDNS targets, self-signed certificates, teams and a selection of provider accounts (only the demo provider responds; the others show the account list in the states auth error and unreachable).

Sign-ins: admin@<org>.example with demo-<org>-pw — organisations are acme, globex, initech, umbrella, hooli, piedpiper, wayne, stark, wonka, cyberdyne. For an empty cluster, set DNSE_DEMO=off in test/.env.

  • Identical configuration on all nodes via a YAML anchor; the encryption key is identical so that encrypted values are readable on every node.
  • YugabyteDB driver: DNSE_DB_DSN points to the YSQL endpoint, DNSE_DB_YB=on selects the matching driver.
  • Staggered startup: node1 waits for a healthy database and runs the migration; node2–4 wait until node1 is healthy.
  • Shared Valkey for sessions — a sign-in on one node is valid on all.
  • The setup demonstrates multi-node operation against the distributed database. Real multi-region partitioning is not enabled: the configured regions drive the System page and each organisation’s home region, but all data lives in the same cluster.
  • The image builds a fully static binary (CGO_ENABLED=0) with the embedded CE interface from DNS-Editor-CE/webui/dist. If the interface is outdated, build it first: cd ../../DNS-Editor-CE/ui && npm run build.
  • YugabyteDB runs with the default user and trust authentication — fine for a local test bench, not for production.