...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
Description:
INTRODUCTION : - lOGGING, PROJECT DESCRIPTION, RUNNING MODULES
CREATE NEW SCRATCH ENV FOR TEAM
Build UI module from branch
Build backend module from branch
Registering modules in Okapi
Create Elasticsearch index snapshot
HOW TO ADD NEW MODULE FOR RANCHER
- HOW CONNECTION TO DATABASE
- HOW TO CREATE DUMP DATABASE USING RANCHER ( backUp)
- HOW TO CREATE RESTORE DUMP TO NEW ENV
1.INTRODUCTION
Each development team has access to a “developer scratch environment” to ensure that their changes are ready to be finalised.
...
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.
2. CREATE NEW SCRATCH ENV FOR TEAM
link: Manage Scratch Environment ver 1.2
...
teamName, Action, TenantName, Repo, Plan, Change, Register, branch, platform_image
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
...
deploymen
t.
Environment name | Status | Rancher permissions | Purpose | Update type (Automated/Manual) Operational time (h/d) | Platform-core branch | Env. re-creation ticket | Development team status (optional) | Feedback | Log4j vulnerability fixing | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
metadata |
| Spitfire | platform-complete/master |
|
| Done
| |||||||||||||||||||||||||||||||||||||||
bulk-edit (old concorde) |
| Firebird |
|
| Done
| ||||||||||||||||||||||||||||||||||||||||
core-functional |
| prokopovych/core-functional | platform-complete/prokopovych-rancher |
|
or
| Done
| |||||||||||||||||||||||||||||||||||||||
volaris |
| Volaris |
|
| Done
| ||||||||||||||||||||||||||||||||||||||||
volaris-2nd |
| Volaris | platform-core/volaris-rancher |
|
| Done
| |||||||||||||||||||||||||||||||||||||||
core-platform |
| Core Platform | platform-complete/core-platform-rancher |
|
|
| |||||||||||||||||||||||||||||||||||||||
falcon |
| Falcon | platform-core/falcon-rancher |
|
| Done
| |||||||||||||||||||||||||||||||||||||||
firebird |
| Firebird | platform-core/firebird-rancher Latest release based on snapshot |
|
| Done
| |||||||||||||||||||||||||||||||||||||||
folijet |
| Folijet |
|
| Done
| ||||||||||||||||||||||||||||||||||||||||
vega |
| Vega |
|
| Done
| ||||||||||||||||||||||||||||||||||||||||
spanish |
| Spanish | platform-complete/master |
|
or
| Done
| |||||||||||||||||||||||||||||||||||||||
spitfire |
| Spitfire | platform-core/spitfire-rancher platform-core/snapshot-spitfire |
Please refer RANCHER-125 to re-provision env |
| Done
| |||||||||||||||||||||||||||||||||||||||
thor |
|
| Oleksandr | ||||||||||||||||||||||||||||||||||||||||||
thunderjet |
| thunderjet | platform-core/thunderjet-rancher |
|
| Done
| |||||||||||||||||||||||||||||||||||||||
unam | Used for testing config. |
or
|
...
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/
...
In package.json
set --max-old-space-size=8192
to build options.
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).
...
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
- go to rancher → apps → launch
- search needs module
- add parameters for using module
- launch
8.HOW CONNECTION TO DATABASE
- go to rancher → apps → pgadmin4 http://bulk-edit-perf-pgadmin.ci.folio.org/
- (login as user ‘chart@example.local’ or ‘user@folio.org’ password ‘SuperSecret’)
- all parameters locate to resources → secrets → db-connect-modules
4. go to pgadmin4
9.HOW TO CREATE DUMP DATABASE USING RANCHER ( backup)
- need connection to database "pg-folio"
- apps → pgadmin4
...
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
...