Multi Tenancy in the App layer
What is Multi tenancy
From release 1.9Â
Collectionspace supports multiple tenancies. That means that you can have multiple instances of the collectionspace running alongside each other with completely separate data but they share underlying code and schemas
Collectionspace comes with 2 tenancies setup in the services, app and ui - core and lifesci.
This documentation explains their set up. If you wish to add a new tenancy the procedure is the same for the App and the UI. Service layer has separate documentation to maintain tenancies.
Where are the config files
Best practises of config overlay
unified collectionspace config#BestPractise
UI
UI files overlay
where your cspace-ui.war has been deployed you will see in the cspace-ui folder. At the root of the folder there's are two directories: defaults and tenants (tenants directory by default contains two directories called core and lifesci).
Whenever you want to create a new tenant you would need to create a new folder with the same tenant name as the one you chose earlier. This folder must retain the same file/directory structure as the one of the defaults folder. Whenever the implementor wants to override something in the file itself they would need to place a tenant specific file in the same location as the one in the defaults folder. If some directories are missing implementer would have to create them and place the file accordingly.
For example:
Tenant specific folders (such as core) already contain a directory called html. It corresponds/mirrors the html folder in the defaults. Within html folder you see one file called index.html this file will be used instead of the file called index.html in the default/html folder. Currently the only difference between those 2 files is the explanation text as to what you are login into.
You can overwrite any other file in default but simply creating the same named file in your tenant folder in the same folder structure as it was in default and the file in your tenant folder will be chosen over the file in defaults.
Therefore you should never edit the files in defaults and always overlay with a file in your tenant folder. This means that on upgrade your tenant changed files will not change but the files underlying in default will. This might mean that you may need to tweak you changed files in your tenant folder but they will never be overwritten.