Skip to content

Commit 0b0153b

Browse files
authored
Merge pull request #5725 from meonkeys/improve-readme
FINERACT-2573: improve quick start instructions
2 parents a357323 + 9687114 commit 0b0153b

4 files changed

Lines changed: 58 additions & 50 deletions

File tree

README.md

Lines changed: 54 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Apache Fineract
22

33
<!-- TODO Reactivate when there is a working CI-CD instance: [![Swagger Validation](https://validator.swagger.io/validator?url=https://sandbox.mifos.community/fineract-provider/swagger-ui/fineract.yaml)](https://validator.swagger.io/validator/debug?url=https://sandbox.mifos.community/fineract-provider/swagger-ui/fineract.yaml) -->
4-
[![Build](https://github.com/apache/fineract/actions/workflows/build-mariadb.yml/badge.svg?branch=develop)](https://github.com/apache/fineract/actions/workflows/build-mariadb.yml)
4+
[![Build](https://github.com/apache/fineract/actions/workflows/build-postgresql.yml/badge.svg?branch=develop)](https://github.com/apache/fineract/actions/workflows/build-postgresql.yml)
55
[![Docker Hub](https://img.shields.io/docker/pulls/apache/fineract.svg?logo=Docker)](https://hub.docker.com/r/apache/fineract)
66
[![Docker Build](https://github.com/apache/fineract/actions/workflows/publish-dockerhub.yml/badge.svg)](https://github.com/apache/fineract/actions/workflows/publish-dockerhub.yml)
77
[![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=apache_fineract&metric=sqale_index)](https://sonarcloud.io/summary/new_code?id=apache_fineract)
@@ -29,11 +29,11 @@ In the moment you get started writing code, please consult our [CONTRIBUTING](CO
2929

3030
REQUIREMENTS
3131
============
32-
* min. 16GB RAM and 8 core CPU
33-
* `MariaDB >= 12.2` or `PostgreSQL >= 18.0`
34-
* `Java >= 21` (Azul Zulu JVM is tested by our CI on GitHub Actions)
32+
* 16GB RAM and 8 core CPU (minimum hardware for running Fineract -- development and testing may require more)
33+
* PostgreSQL >= 18.0 ([support for other backend databases is deprecated](https://cwiki.apache.org/confluence/display/FINERACT/FSIP-9%3A+Standardize+on+PostgreSQL))
34+
* Java >= 21 (Azul Zulu JVM is tested by our CI on GitHub Actions)
3535

36-
Tomcat (min. v10) is only required, if you wish to deploy the Fineract WAR to a separate external servlet container. You do not need to install Tomcat to run Fineract. We recommend the use of the self-contained JAR, which transparently embeds a servlet container using Spring Boot.
36+
Tomcat (min. v10) is only needed if you wish to deploy the Fineract WAR to a separate external servlet container. You do not need to install Tomcat to run Fineract. We recommend the use of the self-contained JAR, which transparently embeds a servlet container using Spring Boot.
3737

3838

3939
SECURITY
@@ -48,74 +48,73 @@ For details about security during development and deployment, see the documentat
4848
INSTRUCTIONS
4949
============
5050

51-
The following how-to's assume you have Java installed, you cloned the repository (or downloaded and extracted a [specific version](https://github.com/apache/fineract/releases)) and you have a [database server](#database-and-tables) (MariaDB or PostgreSQL) running.
52-
5351
Quick Start
5452
---
5553

56-
This section provides a simplified overview of the setup process. More detailed instructions are available below.
57-
58-
Follow these steps to quickly set up and run Apache Fineract locally:
54+
Follow these steps to quickly set up and run Apache Fineract locally.
5955

6056
### Prerequisites
61-
- Java 21 or higher
62-
- PostgreSQL running locally
6357

64-
### Clone the repository
58+
- Java 21 or higher (Azul Zulu is recommended)
59+
- PostgreSQL running locally, listening on port 5432 with proper permissions (see [below](#database-and-tables) for how to run PostgreSQL in Docker)
60+
6561
```bash
62+
# get code
6663
git clone https://github.com/apache/fineract.git
6764
cd fineract
68-
```
6965

70-
### Database setup (PostgreSQL)
71-
72-
```bash
66+
# create dbs
7367
./gradlew createPGDB -PdbName=fineract_tenants
7468
./gradlew createPGDB -PdbName=fineract_default
75-
```
7669

77-
> Note: This task requires PostgreSQL running on localhost:5432 with a user allowed to create databases (default in this project/CI: root / postgres)
78-
### Run the application
79-
```bash
70+
# local dev/test env settings
71+
export FINERACT_DEFAULT_TENANTDB_PORT=5432
72+
export FINERACT_HIKARI_DRIVER_SOURCE_CLASS_NAME=org.postgresql.Driver
73+
export FINERACT_HIKARI_JDBC_URL=jdbc:postgresql://localhost:$FINERACT_DEFAULT_TENANTDB_PORT/fineract_tenants
74+
export POSTGRES_PASSWORD=postgres
75+
export FINERACT_HIKARI_PASSWORD=$POSTGRES_PASSWORD
76+
export FINERACT_DEFAULT_TENANTDB_PWD=$POSTGRES_PASSWORD
77+
78+
# start backend
8079
./gradlew devRun
8180
```
8281

82+
After a minute or two, Fineract will be listening for API requests on port 8443 (by default).
83+
8384
### Verify the application is running
84-
```bash
85-
curl --insecure https://localhost:8443/fineract-provider/actuator/health
86-
```
8785

88-
How to run for local development
89-
---
86+
Confirm Fineract is ready with, for example:
9087

91-
Run the following commands in this order:
9288
```bash
93-
./gradlew createPGDB -PdbName=fineract_tenants
94-
./gradlew createPGDB -PdbName=fineract_default
95-
./gradlew devRun
89+
curl --insecure https://localhost:8443/fineract-provider/actuator/health
9690
```
9791

98-
This creates two databases and builds and runs Fineract, which will be listening for API requests on port 8443 (by default) now.
99-
100-
Confirm Fineract is ready with, for example:
92+
Expected response for fresh instance:
10193

102-
```bash
103-
curl --insecure https://localhost:8443/fineract-provider/actuator/health
94+
```json
95+
{"status":"UP","groups":["liveness","readiness"]}
10496
```
10597

10698
To test authenticated endpoints, include credentials in your request:
10799

108100
```bash
109-
curl --location \
101+
# basic auth header uses colon-delimited and base64-encoded default "mifos:password" login
102+
curl --location --insecure \
110103
https://localhost:8443/fineract-provider/api/v1/clients \
111104
--header 'Content-Type: application/json' \
112105
--header 'Fineract-Platform-TenantId: default' \
113106
--header 'Authorization: Basic bWlmb3M6cGFzc3dvcmQ='
114107
```
115108

109+
Expected response for fresh instance:
110+
111+
```json
112+
{"totalFilteredRecords":0,"pageItems":[]}
113+
```
114+
116115
How to run for production
117116
---
118-
Running Fineract to try it out is relatively easy. If you intend to use it in a production environment, be aware that a proper deployment can be complex, costly, and time-consuming. Considerations include: Security, privacy, compliance, performance, service availability, backups, and more. The Fineract project does not provide a comprehensive guide for deploying Fineract in production. You might need skills in enterprise Java applications and more. Alternatively, you could pay a vendor for Fineract deployment and maintenance. You will find tips and tricks for deploying and securing Fineract in our official documentation and in the community-maintained wiki.
117+
Running Fineract _just to try it out_ is relatively easy. If you intend to use it _in a production environment_, be aware that a proper deployment can be complex, costly, and time-consuming. Considerations include: Security, privacy, compliance, performance, service availability, backups, and more. **The Fineract project does not provide a comprehensive guide for deploying Fineract in production.** You might need skills in enterprise Java applications and more. Alternatively, you could pay a vendor for Fineract deployment and maintenance. You will find tips and tricks for [deploying](https://fineract.apache.org/docs/current/#_deployment) and [securing](https://fineract.apache.org/docs/current/#_securing_fineract) Fineract in our official documentation.
119118

120119

121120
How to build the JAR file
@@ -125,7 +124,7 @@ Build a modern, cloud native, fully self contained JAR file:
125124
./gradlew clean bootJar
126125
```
127126
The JAR will be created in the `fineract-provider/build/libs` directory.
128-
As we are not allowed to include a JDBC driver in the built JAR, download a JDBC driver of your choice. For example:
127+
If you use a MariaDB or MySQL (note: both are deprecated), you must download the appropriate JDBC driver since drivers for those databases use incompatible licenses. For example:
129128
```bash
130129
wget https://dlm.mariadb.com/4174416/Connectors/java/connector-java-3.5.2/mariadb-java-client-3.5.2.jar
131130
```
@@ -305,10 +304,10 @@ In case of a large deployment with millions of accounts, the Close of Business D
305304
JMS based messaging is disabled by default. In `docker-compose-postgresql-activemq.yml` an example is shown, where ActiveMQ is enabled. In that configuration one Spring Batch Manager instance and two Spring Batch Worker instances are created.
306305
Spring based events should be disabled and jms based event handling should be enabled. Furthermore, proper broker JMS URL should be configured.
307306

308-
```
309-
FINERACT_REMOTE_JOB_MESSAGE_HANDLER_JMS_ENABLED=true
310-
FINERACT_REMOTE_JOB_MESSAGE_HANDLER_SPRING_EVENTS_ENABLED=false
311-
FINERACT_REMOTE_JOB_MESSAGE_HANDLER_JMS_BROKER_URL=tcp://activemq:61616
307+
```bash
308+
FINERACT_REMOTE_JOB_MESSAGE_HANDLER_JMS_ENABLED=true
309+
FINERACT_REMOTE_JOB_MESSAGE_HANDLER_SPRING_EVENTS_ENABLED=false
310+
FINERACT_REMOTE_JOB_MESSAGE_HANDLER_JMS_BROKER_URL=tcp://activemq:61616
312311
```
313312

314313
For additional ActiveMQ related configuration please take a look to the `application.properties` where the supported configuration parameters are listed with their default values.
@@ -328,11 +327,21 @@ DATABASE AND TABLES
328327

329328
You can run the required version of the database server in a container, instead of having to install it, like this:
330329

331-
docker run --name mariadb-12.2 -p 3306:3306 -e MARIADB_ROOT_PASSWORD=mysql -d mariadb:12.2.2 --innodb-snapshot-isolation=OFF
330+
```bash
331+
# start postgresql in background
332+
docker run --name postgres -p 5432:5432 -e POSTGRES_USER=root -e POSTGRES_PASSWORD=postgres -u nobody:nogroup -d postgres:18.3
333+
# stop and destroy container
334+
docker rm -f postgres
335+
```
332336

333-
and stop and destroy it like this:
337+
Similarly, for one of the [deprecated](https://cwiki.apache.org/confluence/display/FINERACT/FSIP-9%3A+Standardize+on+PostgreSQL) database backends:
334338

335-
docker rm -f mariadb-12.2
339+
```bash
340+
# start mariadb in background
341+
docker run --name mariadb-12.2 -p 3306:3306 -e MARIADB_ROOT_PASSWORD=mysql -d mariadb:12.2.2 --innodb-snapshot-isolation=OFF
342+
# stop and destroy container
343+
docker rm -f mariadb-12.2
344+
```
336345

337346
Beware that this container database keeps its state inside the container and not on the host filesystem. It is lost when you destroy (rm) this container. This is typically fine for development. See [Caveats: Where to Store Data on the database container documentation](https://hub.docker.com/_/mariadb) regarding how to make it persistent instead of ephemeral.
338347

fineract-doc/src/docs/en/chapters/architecture/persistence.adoc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ TBD
44

55
== Database support
66

7-
Fineract supports multiple databases:
7+
Fineract officially supports PostgreSQL.
88

9-
* MySQL compatible databases (e.g. MariaDB)
10-
* PostgreSQL
9+
https://cwiki.apache.org/confluence/display/FINERACT/FSIP-9%3A+Standardize+on+PostgreSQL[MySQL and MariaDB support exists and is deprecated -- it will eventually be removed entirely].
1110

1211
The platform differentiates between these database types in certain cases when there's a need to use some database specific tooling. To do so, the platform examines the JDBC driver used for running the platform and tries to determine which database is being used.
1312

fineract-doc/src/docs/en/chapters/testing/cucumber.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Apache Fineract's E2E test suite provides comprehensive coverage of business fun
2424
=== Required Software
2525

2626
* *Java 21*: Apache Fineract requires Java 21 (Azul Zulu JDK recommended)
27-
* *Database*: MariaDB 12.2, PostgreSQL 17.4, or MySQL 9.1
27+
* *Database*: MariaDB 12.2, PostgreSQL 18.3, or MySQL 9.1
2828
* *Git*: For source code management
2929
* *Gradle 8.14.3*: Included via wrapper
3030

fineract-doc/src/docs/en/chapters/testing/integration.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Integration tests in Apache Fineract validate the complete API layer and busines
2626
=== Required Software
2727

2828
* *Java 21*: Apache Fineract requires Java 21 (Azul Zulu JDK recommended)
29-
* *Database*: MariaDB 12.2, PostgreSQL 17.4, or MySQL 9.1
29+
* *Database*: MariaDB 12.2, PostgreSQL 18.3, or MySQL 9.1
3030
* *Git*: For source code management
3131
* *Gradle 8.14.3*: Included via wrapper
3232
* *12GB RAM*: Recommended for test execution

0 commit comments

Comments
 (0)