Add second consortium

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:

image-20250723-095429.png

After performing these operations, the cluster will look like this:

image-20250723-100514.png

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:

image-20250723-093924.png

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

The following information is provided to understand how this deployment was accomplished:

Modify stripes.config.js

The stripes.config.js file needs to be modified so that two versions of the configuration exist—one for each consortium. An example modification is provided here . Required configuration changes are highlighted in the screen below:

image-20250723-111915.png

At the end of the setup, the following four modules should be added to the cluster.

image-20250723-112015.png

Ensure these are reflected in the package.json file, and include logic to add new modules as shown.

image-20250723-112148.png

 

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 deployApplication

This 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.yaml file to include the required consortia setup.

Useful links

Here are some helpful links to better understand and work with this functionality:

  1. Pull Request: Adding Functionality for Supporting a Second Consortium
    https://github.com/folio-org/eureka-setup/pull/53

    Details about the implementation of the functionality allowing multiple consortia.

  2. Eureka CLI Documentation
    https://github.com/folio-org/eureka-setup/tree/master/eureka-cli