Canasta-CLI 2.0 adding wiki farm support #96
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.