Skip to content

feat: Add recipe for datum builds - #5

Merged
the-bokya merged 2 commits into
mainfrom
datum-recipe
Aug 13, 2026
Merged

feat: Add recipe for datum builds#5
the-bokya merged 2 commits into
mainfrom
datum-recipe

Conversation

@Aradhya-Tripathi

Copy link
Copy Markdown
Contributor

Add datum build configs with clickhouse setup and datum service setup.

Aradhya-Tripathi and others added 2 commits August 11, 2026 16:45
datum now ships a migration runner: it owns the database, both tables and both
ClickHouse users, and datum-api issues no DDL at all. Its lifespan pings the
store and refuses to start when the schema is missing, so migrations have to
run before the unit does.

- drop users.sql.j2; datum/migrations/000_acl.sql creates both users
- enable_access_management() keeps the users.d drop-in, since datum-migrate
  issues CREATE USER and a stock install disallows it
- run_migrations() renders a 0600 script, runs it, deletes it: pyinfra logs the
  command it runs, so the insights password goes in the file, not the argv
- build order puts run_migrations after write_env_file (the migration reads
  DATUM_CLICKHOUSE_PASSWORD from it to create the datum user) and before
  install_unit
- env file drops DATUM_CLICKHOUSE_DATABASE and DATUM_CLICKHOUSE_TABLE, which
  Settings no longer reads, and gains DATUM_TIMEOUT
- passwords are token_hex, not token_urlsafe: datum-migrate refuses a password
  containing `--`, which token_urlsafe emits about 0.8% of the time
- verify asserts both tables exist rather than crediting ensure_schema

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@the-bokya
the-bokya merged commit adc17a6 into main Aug 13, 2026
@the-bokya
the-bokya deleted the datum-recipe branch August 13, 2026 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants