Skip to content

Set up MariaDB as app database on montage-beta alongside SQLite #514

@lgelauff

Description

@lgelauff

Currently montage-beta uses SQLite as its app database. Since beta runs on Toolforge it has access to ToolsDB (MariaDB) and the wikireplica — the same stack as production. Setting up MariaDB on beta would allow:

  • Testing MariaDB-specific query behaviour before it hits prod
  • Validating the production deployment docs end-to-end (including migrate_prod_db.sql)
  • Testing labs.py query performance against commonswiki_p with a realistic app database

Approach:

  • Set up from scratch (not a copy of prod) to validate reproducibility and the deployment docs
  • Keep the existing SQLite setup intact — this is a config switch, not a destructive change
  • OAuth credentials and cookie secret can be reused from the existing beta config

Steps (high level):

  1. Create a new ToolsDB database for montage-beta
  2. Run create_schema.py against it
  3. Run migrate_prod_db.sql to apply the Migrate image/oldimage queries to file/filerevision/filetypes #505 migration
  4. Update beta config to point db_url at ToolsDB
  5. Restart webservice and verify via /meta
  6. Import a large category and test query performance

This should ideally be done before #505 merges to prod, so that migrate_prod_db.sql and the query performance of the new schema can be verified against a real MariaDB instance first.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions