kling db
Every test, its own database.
A copy is a microVM born from a golden with Postgres already warm. Each one has its own password, known only to the host.
kling db golden -script scripts/db-golden.sh build -template crm-demo pg # the template, oncekling db up pg -name t1 # a ready copy, with its keykling db connect t1 -psql # psql from the hostkling db fork t1 -n 4 # 4 copies of t1 as it is right now; all or nothingkling db reset t1 # t1 comes out of the template againkling db rm t1Many at once
Section titled “Many at once”64 out of 64 kling db up at once in 4.6 s, ~14 MiB of memory per copy. Measured with the AuraCRM golden.
One copy per student
Section titled “One copy per student”kling db class -n 30 -prefix alumno crm-demo # alumno-01 … alumno-30kling db class reset -prefix alumno # next exercisekling db class rm -prefix alumnoKeys are not printed: -passwords FILE writes them to a 0600 file.
More engines
Section titled “More engines”| Engine | What works |
|---|---|
| Postgres 16/17 | everything |
| MariaDB | up, fork, connect, rotate, reset, rm, branch, doctor, audit |
| Redis, SQLite | up, fork, connect, reset, rm, doctor |