Add second consortium
General structure
Create 5 tenants on the cluster
To set up both consortia, create the necessary tenants. For example, the following five tenants will be divided between the two consortia:
ecs
university
college
ecs2
university2
Create 2 consortia
Use the standard procedure for creating consortia by utilizing the headers x-okapi-tenant=ecs and x-okapi-tenant=ecs2. Consortia creation must be performed sequentially, one after the other. Details regarding the procedure for adding consortia are described in the: Steps to setup Consortia env . The relevant code for creating consortia can be found at the linked location here . The number of consortia and how many tenants are included in each is specified declaratively in the configuration file config.ecs.yaml as shown below:
After performing these operations, the cluster will look like this:
Configure ES indexes
In ECS, mod-search creates indexes only for the central tenant to manage entities including the following:
instance
authority
contributor
instance_call_number
instance_classification
instance_subject
location
insitution
campus
library
linked_data_instance
For this setup, indexes will exist only on the central tenants for both consortia. No indexes are expected on member tenants.
The diagram below demonstrates that indexes exist only on central tenants:
To achieve this behavior, the centralTenantId attribute must be added to the installation parameters when enabling the module. This attribute can be added not only for mod-search but for all other modules by default. This ensures that the centralTenantId is used by other modules as required—such as mod-fqm, which also requires the centralTenantId parameter. An example of setting this parameter can be found: Link
Deploy UI
Based on this default configuration, we will have two consortia deployed on the same cluster with two different ports for UI:
The second UI should be opened in Incognito mode to avoid issues with shared cookies.
The logic for deploying the UI for both consortia is already implemented in the command:
eureka-cli -p ecs deployUi
Additional details
How to run
To deploy the application and create a new cluster with multiple consortia and UIs available, use the following command:
eureka-cli -p ecs deployApplicationThis command will deploy all required components, resulting in a cluster with multiple consortia along with their respective UIs.
Modifying the ECS Profile Locally
The ecs profile, found in the repository, can be modified to streamline the setup for local deployments. For example:
You can configure the profile to have only one consortium to save resources during local testing.
If needed, you can reconfigure the profile at any time to support two consortia by modifying the
config.ecs.yamlfile to include the required consortia setup.
Useful links
Here are some helpful links to better understand and work with this functionality:
Pull Request: Adding Functionality for Supporting a Second Consortium
https://github.com/folio-org/eureka-setup/pull/53Details about the implementation of the functionality allowing multiple consortia.
Eureka CLI Documentation
https://github.com/folio-org/eureka-setup/tree/master/eureka-cli