[FOLIO-1051] Refactor folio-ansible "data" roles to configure additional tenants to folio-snapshot Created: 02/Feb/18  Updated: 12/Nov/18  Resolved: 09/Apr/18

Status: Closed
Project: FOLIO
Components: None
Affects versions: None
Fix versions: None

Type: Task Priority: P2
Reporter: John Malconian Assignee: John Malconian
Resolution: Done Votes: 0
Labels: ci, sprint31, sprint32, sprint33, sprint34, sprint35, sprint36
Remaining Estimate: Not Specified
Time Spent: 1 week, 1 day
Original estimate: Not Specified

Issue links:
Relates
relates to FOLIO-1043 integrate ui-testing with PR Closed
relates to FOLIO-1154 folio-ansible gen_users perl script n... Closed
Sprint:

 Description   

The folio-ansible 'data' roles are primarily utilized to configure tenants, tenant modules, module permissions, and in some cases, load sample tenant data as part of the build process for a folio system. We can possibly re-use these roles in isolation to add new tenants to a running instance of FOLIO as part of the CI process. The roles were originally implemented with support for a single tenant - diku_admin. Therefore, some refactoring may be necessary to support multiple tenants.



 Comments   
Comment by John Malconian [ 21/Mar/18 ]

I've created folio-ansible branch folio-ansible-1051 that contains the following changes:

  • Modified the tenant-data role to be tenant agnostic with the default tenant set to 'diku'.
  • Added a new role called tenant-admin-permissions. This role checks to see which modules have been enabled for a tenant and assigns the permissions for those modules to the tenant admin user. This role is meant to replace the admin permission assignment tasks in each of the existing *-data roles.
  • Created new roles mod-users-data2, mod-inventory-storage-data, and mod-circulation-storage-data. These roles essentially perform the same tasks as mod-users-data, mod-metadata-data and mod-circulation-data minus the admin permission assignment bits. They have also been refactored to run on 'localhost' so that remote connection to the Okapi instance is not necessary. These roles are still being tested.

Ultimately, I think we want to end up with *-data roles for modules that only load reference and/or sample data or perform some specific configuration for that module.

A bunch of this is also dependent on rewriting the module deployment roles so that the Okapi install endpoint is used to deploy modules, but I've been ignoring that piece for now since I can utilize these new roles specifically for FOLIO-1043 Closed .

Comment by John Malconian [ 09/Apr/18 ]

folio-1051b has been merged to folio-ansible. Changes include:

  • most roles are now tenant agnostic although the default tenant is still 'diku'. This can be changed by setting 'tenant'. You will most likely also want to set the default tenant admin user ('user_admin') when doing this.
  • server-side modules are tenant enabled for non-Okapi dependency installs (non top-down) via a dedicated role called 'enable-tenant-modules'. This means that this eliminates the need to enable modules in the same way in the individual module-data roles.
  • deprecation of all *-data roles that did not load any reference or sample data or do any special kind of configuration.
  • mod-kb-ebsco-data and mod-codex-ekb-data have been renamed to mod-kb-ebsco-config and mod-codex-ekb-config respectively. The sole purpose of these roles is to configure RMAPI credentials.
  • mod-metadata-data has been renamed to mod-inventory-data.
  • mod-inventory-data now sets 'inv_storage_3' to 'true' by default.
  • mod-inventory-data add a new variable called 'do_mods_larger' which is set to 'false' by default. This variable loads the larger MODS sample when set to true.
  • some syntax/optimization changes.
  • group_vars/testing, group_vars/snapshot, and folio.yml have been updated accordingly.

I've largely left mod-auth-data alone for now although that could probably use some updating to potentially become more tenant agnostic. I did remove the tasks from that role associated with enabling modules.

Comment by John Malconian [ 09/Apr/18 ]

Done for now. New issues can be opened for additional refactoring.

Generated at Thu Feb 08 23:10:28 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.