canasta add

From Canasta Wiki

canasta > add

canasta add

Add a new wiki to a Canasta instance

Synopsis

Add a new wiki to an existing Canasta instance, creating a wiki farm. The new wiki is registered in wikis.yaml, the Caddyfile is regenerated, and the MediaWiki installer runs for the new wiki. You can also import an existing database dump instead of running the installer, or pass --skip-install to connect to an external database that already holds the new wiki's schema.

With --database, dumps that canasta export writes beside the main one for the wiki's extra databases (<stem>.<database>.sql or .sql.gz, where <stem> is the main dump's path without its .sql/.sql.gz extension) are imported too, and each database is declared for the new wiki (see canasta backup databases). A file whose database name is not valid, is a MariaDB system database, or is a database another wiki in the instance uses is reported and skipped.

A Kubernetes instance managed through gitops is not redeployed: Argo CD deploys it from its gitops repo. Add creates the new wiki's database and stages its configuration there, and you deploy it with canasta gitops push, then canasta gitops sync. The web pods run update.php for the new wiki when the sync restarts them.

canasta add [flags]

Examples

canasta add -w docs -u localhost/docs

Flags

Flag Shorthand Description Default Required Orchestrator
--url -u Domain/path for the wiki (e.g. localhost/docs) ✓ Both
--wiki -w ID of the wiki ✓ Both
--admin -a Initial wiki admin username Both
--database -d Path on the controller (the machine running canasta) to an existing database dump (.sql or .sql.gz). Extra-database dumps beside it (<stem>.<database>.sql or .sql.gz) are imported and declared for the new wiki. Both
--id -i Canasta instance ID * Both
--images -I Path on the controller (the machine running canasta) to a tar (.tar or .tar.gz) of the new wiki's images directory at the hash-directory level (0/, 1/, archive/, ...). Its files are copied into the wiki's uploads (images/<wiki>/) as www-data — a placement restore, not importImages. Pairs with --database, which supplies the File: page rows; a leading images/ parent is elided. Both
--password -s Initial wiki admin password Both
--site-name -t Display name of the wiki Both
--skip-install Skip the MediaWiki installer (install.php) and connect to a database that already has the new wiki's schema. Requires the instance to use USE_EXTERNAL_DB=true and cannot be combined with --database. Both
--wiki-settings -l Path on the controller (the machine running canasta) to a per-wiki Settings.php Both

* Defaults to the Canasta instance matching the current directory, if any.

Global flags

Flag Shorthand Description Default Required Orchestrator
--help -h Show help message and exit Both
--verbose -v Enable verbose output Both