Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

Table of Contents


1.INTRODUCTION

Each development team has access to a “developer scratch environment” to ensure that their changes are ready to be finalised.

...

For general assistance use the Slack channel #scratch-environments and help via your team-specific channel.To raise Jira tickets related to scratch environments, refer to the FAQ.

The Kitfox DevOps team wiki page has further resources regarding Rancher scratch environments.

...

All Projects installed FOLIO Helm repository (Catalog in Rancher) which contains all backend modules, UI, pgadmin. By default the backend modules are pulled from DockerHub/folioci repository with a ‘latest’ tag. UI module is pulled from docker.dev.folio.org repository with own project latest tag <project>-latest. All modules can be managed in the App menu in Rancher, where new modules can be added or existing ones can be upgraded.

Building Backend modules

You can build your own module, and automatically deploy it with Rancher pipeline and Helm. To get started, create your own branch and modify .rancher-pipeline.yml to your needs (for example as in this pipeline).

Go to Workloads -> Pipelines, run pipeline for that branch, and then Rancher will deploy the new version of that module.

Building Frontend

Modify sample pipeline and start build.

Here is default answers for Frontend Bundle Application deployment:

    resources.limits.cpu = 200m
    resources.limits.memory = 500Mi
    image.tag = <project_name>-latest
    ingress.enabled = true
    ingress.hosts[0].host = <project_name>.ci.folio.org
    ingress.hosts[0].paths[0] = /

In package.json set --max-old-space-size=8192 to build options.

CREATE NEW SCRATCH ENV FOR TEAM

link: Manage Scratch Environment ver 1.2

General properties

Listed properties cannot be modified without full recreation of related resource.

Postgre DB versionManage Scratch Environment ver 1.2
DB Size

Build with parameter

Available parameters:

teamName, Action, TenantName, Repo, Plan, Change, Register, branch, platform_image

Image Removed

...

Update type (Automated/Manual)

Operational time (h/d)

...

Status
colourGreen
titleChecked
Available to use.

...



...

2. CREATE NEW SCRATCH ENV FOR TEAM


link: Manage Scratch Environment ver 1.2

General properties

Listed properties cannot be modified without full recreation of related resource.

Postgre DB versionManage Scratch Environment ver 1.2
DB Size

Build with parameter

Available parameters:

teamName, Action, TenantName, Repo, Plan, Change, Register, branch, platform_image

Image Added


Parameter teamName:

Specifies the name of environment and access parameters in Rancher. For most values admin and members of github teamName team have access to Rancher to configure module deployment.


key,summary,type,created,updated,due,assignee,reporter,priority,status,resolution

Environment nameStatusRancher permissionsPurpose



Update type (Automated/Manual)

Operational time (h/d)

Platform-core branchEnv. re-creation ticketDevelopment team status (optional)FeedbackLog4j vulnerability fixing
metadata

Status
colourGreen
titleChecked
Available to use.

Spitfire

platform-complete/master

Jira Legacy
serverSystem JIRA
columnIdsissuekey,summary,issuetype,created,updated,duedate,assignee,reporter,priority,status,resolution
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId01505d01-b853-3c2e-90f1-ee9b165564fc
keyRANCHER-31

Status
colourGreen
titleKeep it


Done

Jira Legacy
serverSystem JIRA
serverId01505d01-b853-3c2e-90f1-ee9b165564fc
keyRANCHER-101

bulk-edit

(old concorde)

Status
colourGreen
titleChecked
Available to use.

Firebird

platform-core/firebird-rancher

Jira Legacy
serverSystem JIRA
serverId01505d01-b853-3c2e-90f1-ee9b165564fc
keyRANCHER-70

Status
colourGreen
titleKeep it



Done

Jira Legacy
serverSystem JIRA
serverId01505d01-b853-3c2e-90f1-ee9b165564fc
keyRANCHER-150

core-functional

Status
colourYellow
titleIn review

prokopovych/core-functional

platform-complete/prokopovych-rancher

Jira Legacy
serverSystem JIRA
serverId01505d01-b853-3c2e-90f1-ee9b165564fc
keyRANCHER-3154

Status
colourGreen
titleKeep it

or

Status
colourRed
titleShut down


Done

Jira Legacy
serverSystem JiraJIRA
serverId01505d01-b853-3c2e-90f1-ee9b165564fc
keyRANCHER-101141

bulk-edit

(old concorde)

volaris

Status
colourGreen
titleChecked
Available to use.

FirebirdVolaris

platform-core/firebirdvolaris-rancher

Jira Legacy
serverSystem Jira
serverSystem JIRA
columnIdsissuekey,summary,issuetype,created,updated,duedate,assignee,reporter,priority,status,resolution
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId01505d01-b853-3c2e-90f1-ee9b165564fc
keyRANCHER-7075

Status
colourGreen
titleKeep it


Done

Jira Legacy
serverSystem JiraJIRA
serverId01505d01-b853-3c2e-90f1-ee9b165564fc
keyRANCHER-150127

corevolaris-functional2nd

Status
colourYellow
titleIn review

prokopovych/core-functional

Available to use.

Volaris

platform-completecore/prokopovychvolaris-rancher

Jira Legacy
serverSystem JiraJIRA
columnIdsissuekey,summary,issuetype,created,updated,duedate,assignee,reporter,priority,status,resolution
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId01505d01-b853-3c2e-90f1-ee9b165564fc
keyRANCHER-5478

Status
colourGreen
titleKeep it

or

status
colourRed
titleShut down


Done

Jira Legacy
serverSystem JiraJIRA
serverId01505d01-b853-3c2e-90f1-ee9b165564fc
keyRANCHER-141127

volariscore-platform

Status
colourGreen
titleChecked
Available to use.

VolarisCore Platform

platform-complete/core/volaris-platform-rancher

Jira Legacy
serverSystem Jira
columnIdsissuekey,summary,issuetype,created,updated,duedate,assignee,reporter,priority,status,resolution
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
JIRA
serverId01505d01-b853-3c2e-90f1-ee9b165564fc
keyRANCHER-7553

Status
colourGreenRed
titleKeep itShut down


Done

Jira Legacy
serverSystem JiraJIRA
serverId01505d01-b853-3c2e-90f1-ee9b165564fc
keyRANCHER-127188

volaris-2ndfalcon

Status
colour
Yellow
Green
title
In review
Checked
Available to use.

VolarisFalcon

platform-core/volarisfalcon-rancher

Jira Legacy
serverSystem JiraJIRA
columnIdsissuekey,summary,issuetype,created,updated,duedate,assignee,reporter,priority,status,resolution
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId01505d01-b853-3c2e-90f1-ee9b165564fc
keyRANCHER-7856

Status
colourGreen
titleKeep it


Done

Jira Legacy
serverSystem JiraJIRA
serverId01505d01-b853-3c2e-90f1-ee9b165564fc
keyRANCHER-127120

core-platformfirebird

Status
colourGreen
titleChecked
Available to use.

Core PlatformFirebird

platform-

complete

core/

core-platform

firebird-rancher

Latest release based on snapshot

Jira Legacy
serverSystem JiraJIRA
serverId01505d01-b853-3c2e-90f1-ee9b165564fc
keyRANCHER-5349

Status
colourRed
titleShut down
colourGreen
titleKeep it



Done

Jira Legacy
serverSystem JIRA
serverId01505d01-b853-3c2e-90f1-ee9b165564fc
keyRANCHER-122

Jira Legacy
serverSystem JiraJIRA
serverId01505d01-b853-3c2e-90f1-ee9b165564fc
keyRANCHER-188149

falconfolijet

Status
colourGreen
titleChecked
Available to use.

FalconFolijet

platform-core/

falcon

folijet-rancher

Jira Legacy
serverSystem JiraJIRA
columnIdsissuekey,summary,issuetype,created,updated,duedate,assignee,reporter,priority,status,resolution
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId01505d01-b853-3c2e-90f1-ee9b165564fc
keyRANCHER-5647

Status
colourGreen
titleKeep it


Done

Jira Legacy
serverSystem JiraJIRA
serverId01505d01-b853-3c2e-90f1-ee9b165564fc
keyRANCHER-120130

firebirdvega

Status
colourGreen
titleChecked
Available to use.

FirebirdVega

platform-core/firebirdvega-rancher

Latest release based on snapshot

Jira Legacy
serverSystem Jira

Jira Legacy
serverSystem JIRA
columnIdsissuekey,summary,issuetype,created,updated,duedate,assignee,reporter,priority,status,resolution
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId01505d01-b853-3c2e-90f1-ee9b165564fc
keyRANCHER-4955

Status
colourGreen
titleKeep it


Done

Jira Legacy
serverSystem JiraJIRA
serverId01505d01-b853-3c2e-90f1-ee9b165564fc
keyRANCHER-122157

Jira Legacy
serverSystem Jira
serverId01505d01-b853-3c2e-90f1-ee9b165564fc
keyRANCHER-149

folijet
spanish

Status
colourGreen
titleChecked
Available to use.

Folijet

platform-core/folijet-rancher

Jira Legacy
serverSystem Jira
columnIdsissuekey,summary,issuetype,created,updated,duedate,assignee,reporter,priority,status,resolution
columnsSpanish

platform-complete/master

Jira Legacy
serverSystem JIRA
serverId01505d01-b853-3c2e-90f1-ee9b165564fc
keyRANCHERFOLIO-473320

Status
colourGreen
titleKeep it

or

Status
colourRed
titleShut down


Done

Jira Legacy
serverSystem JiraJIRA
serverId01505d01-b853-3c2e-90f1-ee9b165564fc
keyRANCHER-130153

vegaspitfire

Status
colourGreen
title
Checked
CHECKED
Available to use.

VegaSpitfire

platform-core/vegaspitfire-rancher

platform-core/snapshot-spitfire

Jira Legacy
serverSystem JiraJIRA
columnIdsissuekey,summary,issuetype,created,updated,duedate,assignee,reporter,priority,status,resolution
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId01505d01-b853-3c2e-90f1-ee9b165564fc
keyRANCHER-5548

Please refer RANCHER-125 to re-provision env

Status
colourGreen
titleKeep it


Done

Jira Legacy
serverSystem JiraJIRA
serverId01505d01-b853-3c2e-90f1-ee9b165564fc
keyRANCHER-157125

spanishthor

Status
colourGreen
title
Checked
CHECKED
Available to use.

Spanish

platform-complete/master

Jira Legacy
serverSystem Jira
serverId01505d01-b853-3c2e-90f1-ee9b165564fc
keyFOLIO-3320






spitfire

Status
colourGreen
titleKeep it

or

Status
colourRed
titleShut down

Done

Jira Legacy
serverSystem Jira
serverId01505d01-b853-3c2e-90f1-ee9b165564fc
keyRANCHER-153

colourGreen
titleKeep it


Done
thunderjet

Status
colourGreen
titleCHECKED
Available to use.

Spitfirethunderjet

platform-core/spitfirethunderjet-rancher

platform-core/snapshot-spitfire

key,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
Jira Legacy
serverSystem Jira
columnIdsissuekey,summary,issuetype,created,updated,duedate,assignee,reporter,priority,status,resolution
columns
serverSystem JIRA
serverId01505d01-b853-3c2e-90f1-ee9b165564fc
keyRANCHER-48
Please refer RANCHER-125 to re-provision env
52

Status
colourGreen
titleKeep it


Done

Jira Legacy
serverSystem JiraJIRA
serverId01505d01-b853-3c2e-90f1-ee9b165564fc
keyRANCHER-125

thor

status
134

unamUsed for testing config.




Status
colourGreen
title

Initial

Keep it

or

Status
colourYellowRed
titleUpgrade

Oleksandrthunderjet

Status
colourGreen
titleCHECKED
Available to use.

thunderjetplatform-core/thunderjet-rancher

Jira Legacy
serverSystem Jira
serverId01505d01-b853-3c2e-90f1-ee9b165564fc
keyRANCHER-52

Status
colourGreen
titleKeep it

Done

Jira Legacy
serverSystem Jira
serverId01505d01-b853-3c2e-90f1-ee9b165564fc
keyRANCHER-134

unamUsed for testing config.

Status
colourGreen
titleKeep it

or

Status
colourRed
titleShut down

Parameter Action:

Specifies what action will be performed.

...

Update enviroment with new list of modules. 
Can be used for creation – NOT  RECOMMENDED

...

Parameter TenantName:

Default value: diku

This parameter specifies tenantID for enviroment. Okapi will contain 2 tenants supertenant and TenantName. All modules will be registered and deployed within tenant TenantName

!!! NOTE !!! Module platform-complete is configured to address a specific tenant, which is determined during BUILD-UI.

Parameter Repo and branch:

Files okapi-install.json & stripes-install.json are used to create/update environment. They can be specified with repo and branch. 

Repo value stands for platform-core or platform-complete.

There is separated list of branches for each value of repo.

...

There are created branches in platform-core (e.g. folijet-rancher). These branches contain a list of modules required for a particular team.

Parameter platform_image:

Specified image will be used for module platform-complete. Available values are formed by BUILD-UI.

Build UI module from branch

To build UI from a specific branch, use this Jenkins pipeline:
https://jenkins-aws.indexdata.com/job/scratch_environment/job/BUILD-UI/

  • Ensure that you are logged in to Jenkins
  • Select “Build with Parameters”
  • Choose your team name
  • Choose the branch that you want to build from
  • Then select “Build”

choose branch to build fromImage Removed

The tag for the image is: docker.dev.folio.org/platform-complete:team_name-build number  

for example :  docker.dev.folio.org/platform-complete:core-platform-530

How to use UI

  1. go to rancher →choose your environment → apps → platform-complete

Image Removed

2. upgrate  module need find "answers" option →  change image 

Image Removed

...

Shut down




Parameter Action:

Specifies what action will be performed.

ValueDescription
createCreate environment with specified parameters.
update

Update enviroment with new list of modules. 
Can be used for creation – NOT  RECOMMENDED

deleteDelete enviroment. DB data will be erased.

Parameter TenantName:

Default value: diku

This parameter specifies tenantID for enviroment. Okapi will contain 2 tenants supertenant and TenantName. All modules will be registered and deployed within tenant TenantName

!!! NOTE !!! Module platform-complete is configured to address a specific tenant, which is determined during BUILD-UI.

Parameter Repo and branch:

Files okapi-install.json & stripes-install.json are used to create/update environment. They can be specified with repo and branch. 

Repo value stands for platform-core or platform-complete.

There is separated list of branches for each value of repo.

!!! NOTE !!! If selected branch does not contain okapi-install.json & stripes-install.json,pipeline will fail.

There are created branches in platform-core (e.g. folijet-rancher). These branches contain a list of modules required for a particular team.

Parameter platform_image:

Specified image will be used for module platform-complete. Available values are formed by BUILD-UI.


3. Build UI module from branch


To build UI from a specific branch, use this Jenkins pipeline:
https://jenkins-aws.indexdata.com/job/scratch_environment/job/BUILD-UI/

  • Ensure that you are logged in to Jenkins
  • Select “Build with Parameters”
  • Choose your team name
  • Choose the branch that you want to build from
  • Then select “Build”

choose branch to build fromImage Added

The tag for the image is: docker.dev.folio.org/platform-complete:team_name-build number  

for example :  docker.dev.folio.org/platform-complete:core-platform-530


How to use UI

  1. go to rancher →choose your environment → apps → platform-complete

Image Added




2. upgrate  module need find "answers" option →  change image 


Here is default answers for Frontend Bundle Application deployment:

    resources.limits.cpu = 200m
    resources.limits.memory = 500Mi
    image.tag = <project_name>-latest
    ingress.enabled = true
    ingress.hosts[0].host = <project_name>.ci.folio.org
    ingress.hosts[0].paths[0] = /

In package.json set --max-old-space-size=8192 to build options.

Image Added




4. Build backend module from branch


Building Backend modules

You can build your own module, and automatically deploy it with Rancher pipeline and Helm. To get started, create your own branch and modify .rancher-pipeline.yml to your needs (for example as in this pipeline).

Go to Workloads -> Pipelines, run pipeline for that branch, and then Rancher will deploy the new version of that module.


Any backend module can be built from a specific branch. Use this Jenkins pipeline:
https://jenkins-aws.indexdata.com/job/scratch_environment/job/BUILD-BACKEND/

...

  • In the “Answers” section, add the following:

add answers variables


  • Select “Upgrade”


Building Frontend

Modify sample pipeline and start build.

...

In package.json set --max-old-space-size=8192 to build options.

5.Registering modules in Okapi

Module registration runs automatically after the install or upgrade procedure. Helm uses post-install and post-upgrade hooks to run the module registration job for each module. Helm gets ModuleDescriptors from the FOLIO Registry (https://folio-registry.dev.folio.org) – it gets the latest snapshot descriptor.

...

  • Registering a particular module (backend or UI module)
    docker run --rm -e TENANT_ID=diku -e OKAPI_URL=https://<project name>-okapi.ci.folio.org -e MODULE_NAME=<module name> docker.dev.folio.org/folio-okapi-registration
    
  • Registering all modules (backend and UI from ‘platform-complete’ list)
    docker run --rm -e TENANT_ID=diku -e OKAPI_URL=https://<project name>-okapi.ci.folio.org -e MODULE_NAME='' docker.dev.folio.org/folio-okapi-registration
    
  • Registering all UI modules only
    docker run --rm -e TENANT_ID=diku -e OKAPI_URL=https://<project name>-okapi.ci.folio.org -e MODULE_NAME='platform-complete' docker.dev.folio.org/folio-okapi-registration

    for example:
    docker run --rm -e TENANT_ID=diku -e OKAPI_URL=https://core-platform-okapi.ci.folio.org -e MODULE_VERSION=24.0.0-SNAPSHOT.999 -e MODULE_NAME=mod-inventory-storage docker.dev.folio.org/folio-okapi-registration

Apply module permissions

The last step after modules registration is to apply permissions for modules to the admin user.

...

   http://folio-folijet.s3.amazonaws.com/README.md


6.Create Elasticsearch index snapshot

To create Elasticsearch index snapshot for Rancher performance testing cluster, go to your Rancher environment, choose your performance testing cluster (perf-ekes-team_name):

...

curl -XPOST 'ELASTICSEARCH_HOST/_snapshot/repository-name/snapshot-name/_restore' -d '{"indices": "my-index"}' -H 'Content-Type: application/json' -u ELASTICSEARCH_USERNAME:ELASTICSEARCH_PASSWORD


7.HOW TO ADD NEW MODULE FOR RANCHER


  1. go to rancher → apps → launch 
  2. search needs module 
  3. choose namespase for modules ( by default name of module) , should be choose your team name
  4. add parameters for using module
  5. launch

Image Added





8.HOW CONNECTION TO DATABASE

  1. go to rancher → apps → pgadmin4   http://bulk-edit-perf-pgadmin.ci.folio.org/
  2.  (login as user ‘chart@example.local’ or ‘user@folio.org’ password ‘SuperSecret’)
  3. all parameters locate to resources → secrets → db-connect-modules

4. go to pgadmin4





9.HOW TO CREATE DUMP DATABASE USING RANCHER  ( backup)

  1. need connection to database "pg-folio"
  2. apps → pgadmin4 

...

password:         (don't forget enter to password ( db_password))  --→ how to find db_password ( resourses → secrets → db_connetcion_modules → DB_PASSWORD ) 



4. after dump was created, should be create a copy to your local machine  ( usecase:  copy to  env which to use for restore dump) 

...

5. rancher cluster
6. rancher cluster kubeconfig  c-479xv  (your using cluster id)
7. rancher cluster kubeconfig  c-479xv > /home/.kube/config  (add your path to .kube if you need use kubectl)



10.HOW TO CREATE RESTORE DUMP TO NEW ENV 

if we have new env & empty database  

...

9.  modules not active now → should be do manipulate for registration modules, check  table " discovery modules", anable enable modules for okapi 

using for help https://dev.folio.org/reference/api/
 

...