FINERACT-1724: Ability to run Fineract in Liquibase only mode for scaled environments

This commit is contained in:
Arnold Galovics
2023-02-17 16:31:16 +01:00
committed by Arnold Gálovics
parent f927dd4ff9
commit 6c86e15eb7
45 changed files with 288 additions and 71 deletions
@@ -48,4 +48,9 @@
|FINERACT_DEFAULT_TENANTDB_DESCRIPTION
|Default Demo Tenant
|TBD
|spring.liquibase.enabled
|FINERACT_LIQUIBASE_ENABLED
|true
|TBD
|===
@@ -1,3 +1,11 @@
= Kubernetes
TBD
In a scaled Kubernetes environment where multiple Fineract instances are deployed, doing the database migrations properly is essential.
Fineract provides a way to run only the Liquibase migrations instead of starting up the whole application server so that you can easily do the migrations before actually upgrading a Fineract instance.
The `FINERACT_LIQUIBASE_ENABLED` flag controls whether Liquibase is enabled or not. For regular read/write/batch manager/batch worker instances this should be disabled.
There's a special Spring profile that should be enabled for running Liquibase only. In can be done via `SPRING_PROFILES_ACTIVE` environment variable. The profile name is `liquibase-only`. At the end of the migration process, the application will exit.
For the instance running the Liquibase migrations, the profile should be activated.