[RANCHER-2] Automatic FOLIO set up in the Scratch dev environments. Created: 07/Sep/20  Updated: 25/Feb/22  Resolved: 25/Feb/22

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

Type: Story Priority: P3
Reporter: Taras Spashchenko Assignee: Unassigned
Resolution: Done Votes: 0
Labels: KT-ID
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: Not Specified Time Spent: Not Specified
Σ Original Estimate: Not Specified Original estimate: Not Specified

Issue links:
Duplicate
is duplicated by FOLIO-2759 Improve terraform scripts to allow to... Closed
is duplicated by FOLIO-2796 Create separate job on Rancher to run... Closed
is duplicated by FOLIO-2806 Automate "Crate Users" script in the ... Closed
Gantt End to Start
has to be done after RANCHER-8 Create pipeline that updates Scratch ... Closed
Relates
relates to RANCHER-190 Unified pipeline NG Closed
relates to MODORDERS-427 Spike : Run-in of a new process for w... Open
relates to RANCHER-10 Set up multi-tenancy for Folijet Closed
Sub-tasks:
Key
Summary
Type
Status
Assignee
RANCHER-10 Set up multi-tenancy for Folijet Sub-task Closed Drif Abdenour  
RANCHER-16 Create pipeline that builds backend m... Sub-task Closed Drif Abdenour  
RANCHER-17 Create pipeline that builds UI image Sub-task Closed Drif Abdenour  
Sprint:
Story Points: 21
Development Team: Kitfox

 Description   

It is required to automate FOLIO set up in the Scratch dev environments.
If a developer needs to deploy a features/story for testing in the Scratch dev environment he could run a dedicated Jenkins job and provide the following:

  1. A tenantId
  2. a complete list of back-end modules required to set up the platform with the new functionality. For every module in the list the developer must provide either:
    1. Docker image repository and version number (latest is the possible value for the sake of simplicity). It will be used to launch an application
    2. Git repository and branch name. It will be used to build a jar file and docker image, and launch an application.
  3. The branch to use for the platform-complete deployment

As a result, a completely separate FOLIO platform must be deployed in the team’s project in Rancher.

  1. For every back-end module, a separate application must be launched. It must be registered as a separate deployment in OKAPI and enabled for the tenant provided within params.
  2. A new platform-complete application must be deployed using the branch provided

Once testing has been completed and the deployed platform is not needed any more there should be a dedicated Jenkins job intended for clean up. The developer has to provide just tenantId for that and all the applications launched by the previous Jenkins job will be removed as well as the DB schemas created during modules’ enablement for the tenant.



 Comments   
Comment by Stanislav Miroshnichenko [ 10/Dec/20 ]

Pipeline to deploy backend modules and Stripes bundle

Basically, we have to create Jenkins pipeline with parameters:

  • 'projectName' - team project name (choice parameter)
  • 'modules' - text with JSON stucture (text, multi-line)
  • 'tenant' - tenant name (string)

Here is the 'modules' structure example:
[
{
"id": "mod-orders-storage-11.1.4",
"action": "enable",
"repository": "https://github.com/folio-org/mod-orders-storage.git",
"branch": "master",
"answers":

{ "image.repository": "docker.dev.folio.org/mod-orders-storage", "image.tag": "11.1.4" }

},
{
"id": "mod-calendar-1.1.4",
"action": "enable",
"repository": "",
"branch": "",
"answers":

{ "image.repository": "folioci/mod-calendar", "image.tag": "1.1.4" }

,
{
"id": "platform-complete-12",
"action": "enable",
"repository": "https://github.com/folio-org/platform-complete.git",
"branch": "dev_branch",
"answers":

{ "image.repository": "docker.dev.folio.org/platform-complete", "image.tag": "12" }

]

If 'repository' filed is not empty, Jenkins job must build docker container and push it to 'docker.dev.folio.org' repository.

Typical steps for Jenkins job:
1. Build modules images from parameter's JSON using Ansible playbook
2. Push built modules images to docker repository
3. Run Terraform stack to deploy all the modules with provided JSON
4. Trigger okapi registration Jenkins job

Comment by Vitaly Demchenko [ 25/Feb/22 ]

Mostly done. Multi-tenancy will be covered by unified pipeline

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