Closed chl178 closed 1 year ago
@yaronkoren @jeffw16
docker build -t canastafarm .
to build imagesudo go run canasta.go [cammands]
Note: For create and import commands add the -t flagsudo go run canasta.go create
to create the old version canasta, then use add or restart to test the migrating functionality.
AddWiki Farm Support in Canasta
Related Issue: #57
Related PR: #295
Overview
One big feature Canasta lacks is the ability to support running multiple wikis, i.e. a wiki family or wiki farm, within the same container. Such wikis would be differentiated by either:
a different directory (e.g. example.com/a, example.com/b) a different subdomain (e.g. a.example.com, b.example.com) or different domains for each wiki (example1.com, example2.com).
We added wiki farm support for canasta.
Test
We deployed the Canasta2.0 on the AWS. Now it have three wikis running in one container. https://canasta2.com https://canasta2.com/a https://subdomain.canasta2.com They are all publicly accessible and everyone is welcome to test them.
New Features and Improvements
Table of Contents
Enhancements
create
Description: Creates a Canasta installation. Enhanced to support wiki farm setup with the
-f
flag.Usage: sudo go run canasta.go create [flags]
-p, --path
: Canasta directory.-o, --orchestrator
: Orchestrator to use for installation (default: "docker-compose").-i, --id
: Canasta instance ID.-w, --wiki
: Name of the wiki.-n, --domain-name
: Domain name (default: "localhost").-a, --WikiSysop
: Initial wiki admin username.-s, --password
: Initial wiki admin password.-f, --yamlfile
: Initial wiki yaml file for wiki farm setup.-k, --keep-config
: Keep the config files on installation failure.YAML Format for Wiki Farm: To create a wiki farm, you need to provide a YAML file with the following format:
sudo go run canasta.go create -f [yamlfile] # Example: "wikis.yaml
extension
Description: Manage Canasta extensions. Enhanced to target a specific wiki within the farm using the
-w
flag.Subcommands:
list
: Lists all the installed Canasta extensions.enable
: Enables specified extensions.disable
: Disables specified extensions.Usage: sudo go run canasta.go extension [subcommand] [flags] Flags:
-i, --id
: Specifies the Canasta instance ID.-p, --path
: Specifies the Canasta installation directory.-w, --wiki
: Specifies the ID of a specific wiki within the Canasta farm.-v, --verbose
: Enables verbose output.New Commands
add
Description: Adds a new wiki to a Canasta instance.
Usage: sudo go run canasta.go add [flags] Flags:
-w, --wiki
: ID of the new wiki.-u, --url
: URL of the new wiki.-s, --site-name
: Name of the new wiki site.-p, --path
: Path to the new wiki.-i, --id
: Canasta instance ID.-o, --orchestrator
: Orchestrator to use for installation (default: "docker-compose").-d, --database
: Path to the existing database dump.remove
Description: Removes a wiki from a Canasta instance.
Usage: sudo go run canasta.go remove [flags] Flags:
-w, --wiki
: ID of the wiki to be removed.-p, --path
: Path to the wiki.-i, --id
: Canasta instance ID.