This guide covers running Apache Airavata Custos locally for development and testing. For coding conventions, build commands, and contribution workflow, see CONTRIBUTING.md.
- Go 1.24+
- Docker and Docker Compose (for the local MariaDB and supporting services)
git
The server requires a MariaDB/MySQL database. The easiest way to get one is via the bundled Docker Compose stack.
cd dev-ops/compose
docker compose up -d dbThis starts MariaDB on localhost:3306 and runs dbinit/init-db.sh, which creates the custos database and the admin user (password admin).
To stop it later:
docker compose downUse docker compose down -v if you also want to wipe the database volume.
From the repository root:
export DATABASE_DSN='admin:admin@tcp(localhost:3306)/custos?parseTime=true&charset=utf8mb4&multiStatements=true'
go run ./cmd/serverOn startup, the server:
- Opens the database connection (
internal/db). - Runs the embedded migrations (
internal/db/migrations/). - Wires the event bus, service layer, and HTTP router.
- Listens on the port from
config/custos.yaml(core.api.port, default8080).
The schema is created by the server's migrations on first run. After that, apply the dev seed to populate sample identity data (org, users, roles, privileges):
docker exec -i custos_db mariadb -uadmin -padmin custos \
< dev-ops/compose/seeds/dev_users_and_roles.sqlThe seed uses INSERT IGNORE, so re-running is safe. See the seed file for
exactly what it inserts.
See .env.example for the template. Copy it to .env, fill in
the required values (DATABASE_DSN, OIDC_ISSUER_URL, OIDC_AUDIENCE), and
source it before running the server.
The Compose file also defines Adminer, Prometheus, Grafana, and Vault. Start them as needed, for example:
docker compose up -d adminer # DB UI at http://localhost:18080