PoC for hosted development environment for FOLIO teams (FOLIO-2601)

[FOLIO-2661] bootstrap a superuser for a tenant Created: 29/Jun/20  Updated: 17/Jul/20  Resolved: 17/Jul/20

Status: Closed
Project: FOLIO
Components: None
Affects versions: None
Fix versions: None
Parent: PoC for hosted development environment for FOLIO teams

Type: New Feature Priority: P2
Reporter: Jakub Skoczen Assignee: Stanislav Miroshnichenko
Resolution: Done Votes: 0
Labels: devops-backlog
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Issue links:
Relates
relates to FOLIO-2669 SPIKE: Determine method of deploying ... Closed
Sprint: DevOps: sprint 92
Development Team: FOLIO DevOps
Epic Link: PoC for hosted development environment for FOLIO teams

 Description   

At the end of a Folio deployment in the Rancher reference environment where a DB, Kafka, Okapi, Stripes, back-end modules spun up, back-end modules added to Okapi's /proxy/modules and /proxy/discovery endpoints, tenant has been created, and all modules enabled for that tenant: The last step is to create a tenant admin user (superuser).

At Tamu, we essentially Dockerized the Perl script that Wayne Schneider created for folio-install, and launch it as a K8s Job in Rancher using a tenant-config secret that sets the username, password, Okapi URL, and tenant to run the job against.

This can be found here: https://github.com/folio-org/folio-install/tree/kube-rancher/alternative-install/kubernetes-rancher/TAMU/deploy-jobs/bootstrap-superuser

We need to automate this process in the Rancher deployment, either via a Helm chart when deploying an entire instance of Folio, and/or via Terraform deploying Folio. This should be done before securing Okapi (if that is desired) otherwise it should be the last step.



 Comments   
Comment by Wayne Schneider [ 01/Jul/20 ]

There is a role in folio-ansible that does this (tenant-admin-permissions). I know that Ian Hardy did some work building an "Ansible runner" container that can run playbooks – maybe this would be a way to reuse the roles in folio-ansible that essentially use the API to set up a tenant, rather than having to recode everything.

Comment by Wayne Schneider [ 02/Jul/20 ]

Updated bootstrap-superuser.pl script in folio-install branch okapi-3-admin-user:

https://github.com/folio-org/folio-install/commit/b2e75a058f6d821c4cc04f711aeb0d8dbab06f80

Comment by Stanislav Miroshnichenko [ 06/Jul/20 ]

Created script call in Terraform stack https://github.com/folio-org-priv/folio-infrastructure/blob/FOLIO-2618/CI/terraform_rancher/generator/templates/main.tf#L213

Script is called after creation of Stripes UI in every Project.

Comment by Jakub Skoczen [ 06/Jul/20 ]

Stanislav Miroshnichenko regarding the isssue with missing icons you reported, according to Wayne Schneider it is most likely due to missing UI module permissions (permissions that are provided by UI MDs).

Comment by Jakub Skoczen [ 08/Jul/20 ]

The issues regarding missing permissions have been resolved by Wayne Schneider and Stanislav Miroshnichenko

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