• Prerequisite Software's and Services

  1. Java 1.8 and above
  1. Install Java from https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
  2. Add the Java_path in Environment variables

  2. nodeJs 6.10 and above
  1. Downloand and install from  https://nodejs.org/en/download/

  3. Cassandra 3.11 and above

It is Quite Tricky to Install Only Cassandra on Windows, Follow the below steps for easy installations

  1. Download the file from this link http://www.apache.org/dyn/closer.lua/cassandra/3.11.4/apache-cassandra-3.11.4-bin.tar.gz

  2. Second follow this Setup steps of Cassandra on Windows locally.docx document for proper installation of downloaded file .

NOTE: The latest cassandra version has installation glitch for now, it is better to go with 3.11.4.


  4. Python 2.7 and above
  1. Download Python from https://www.python.org/downloads/release/python-2716/

  2. Python is required to run Cassandra query shell(cqlsh).

  3. copy after installing python2.7 all files inside “bin” directory of cassandra-3.11.4.


 5.Postgreys 

  1. Download PostgreSQL windows installer from https://www.enterprisedb.com/downloads/postgres-postgresql-downloads

  2. follow this PostgreySQL installation.docx document for installation.


6.ActiveMQ 5 and above
  1. Download windows installer from  http://activemq.apache.org/components/classic/download/
  2. Once the extraction is done from the zip file, open the command prompt and navigate to "activemq_install_directory/bin" and enter command "activemq start" 
  3. One of the log entries mentions "Apache ActiveMQ started". This indicates that ActiveMQ is started.

7.Postman
  1. Download and install postman from  https://www.getpostman.com/downloads/

Make sure Cassandra, PostgreSQL and ActiveMQ  are running all the time.

  • RSA KeyPair

Steps to Generate and print RSA keys

Step 1. Clone the project fineract_cn_lang

> git clone https://github.com/apache/fineract-cn-lang.git

Step 2. Build and publish to maven local

execute the following commands in cmd

>cd fineract_cn_lang/

>sh gradlew publishToMavenLocal

Step 3. Generate application.-properties file

execute the following command under the cloned folder

>cd fineract_cn_lang/

>java -cp build/libs/lang-0.1.0-BUILD-SNAPSHOT.jar org.apache.fineract.cn.lang.security.RsaKeyPairFactory SPRING > application-dev.properties

Step 4. Verify the property file

File should contain details similar to this

--------- Public Key------------------
--system.publicKey.exponent=65537
--system.publicKey.timestamp=2019-07-05T08_19_55
--system.publicKey.modulus=20464695676860611XXX....
--------- Private Key------------------

--system.privateKey.modulus=204646956768606XXX...
--system.privateKey.exponent=411904421431356XXX....

  • Deployment of Microservices

Each Microservice which we wish to provision needs to be built, published to maven local and deployed.

Instructions for deploying the core functional set of Microservices is as follows, the procedure for deploying other Microservices would be similar

Apache Fineract-CN suite of projects will list you all the Projects under Fineract-CN

Fineract-CN is cloud native and requires a good hardware specification to run the application.

It takes around 20 min to build the Core Functional set of Services(listed below) on a machine of 8 GB RAM and  Octa core processor(x86-64)

Service 1Provisioner

Step 1. Clone the project fineract_cn_provisioner

> git clone https://github.com/apache/fineract-cn-provisioner.git
NOTE: This Service is required to run only for the first time of installation, not required while bringing the server up from next time onward.

Step 2. Build and publish to maven local

execute the following commands in cmd

>cd fineract-cn-provisioner/

>sh gradlew publishToMavenLocal

Step 3. command to run the service

java -jar service/build/libs/service-0.1.0-BUILD-SNAPSHOT-boot.jar -Drun.arguments= --cassandra.contactPoints=127.0.0.1:9042 --cassandra.clusterName=Datacenter1 --cassandra.cluster.user=cassandra --cassandra.cluster.pwd=cassandra --postgresql.host=localhost --postgresql.user=postgres --postgresql.password=postgres --server.port=2020 --system.publicKey.exponent=65537 --system.publicKey.timestamp=2019-07-05T08_19_55 --system.publicKey.modulus=20464695676860611XXX... --system.privateKey.modulus=204646956768606XXX... --system.privateKey.exponent=411904421431356XXX... --system.initialclientid=service-runner

configuration

> application.yaml file under "fineract-cn-provisioner\service\build\resources\main" location contains the default configuration properties like server port and database related credentials.

any properties which has to be changed, should be modified in application.yaml before executing step 3.

second option is to explicitly mention the changes on step 3 command, any properties on this command will override the default values in application.yaml

For example

1.if you have set a different password for postgres then we need to include "--postgresql.password=newpassword"

2.if you want to change the server port we need to include "--server.port=newport"


>system.XX properties values of step 3 will be available under application-dev.properties file (location - fineract-cn-lang\build\libs)

Service 2Identity

Step 1. Clone the project fineract_cn_identity

> git clone https://github.com/apache/fineract-cn-identity.git

Step 2. Build and publish to maven local

execute the following commands in cmd

>cd fineract-cn-identity/

>sh gradlew publishToMavenLocal

Step 3. command to run the service

java -jar service/build/libs/service-0.1.0-BUILD-SNAPSHOT-boot.jar -Drun.arguments= --cassandra.contactPoints=127.0.0.1:9042 --cassandra.clustername=Datacenter1 --cassandra.cluster.user=cassandra --cassandra.cluster.pwd=cassandra --postgresql.host=localhost --postgresql.user=postgres --postgresql.password=postgres --server.port=2021 --system.publicKey.exponent=65537 --system.publicKey.timestamp=2019-07-05T08_19_55 --system.publicKey.modulus=20464695676860611XXX...

configuration

> application.yaml file under "fineract-cn-identity\service\build\resources\main" location contains the default configuration properties like server port and database related credentials.

any properties which has to be changed, should be modified in application.yaml before executing step 3.

second option is to explicitly mention the changes on step 3 command, any properties on this command will override the default values in application.yaml

For example

1.if you have set a different password for postgres then we need to include "--postgresql.password=newpassword"

2.if you want to change the server port we need to include "--server.port=newport"


>system.XX properties values of step 3 will be available under application-dev.properties file(location - fineract-cn-lang\build\libs)

Service 3Office

Step 1. Clone the project fineract_cn_office

> git clone https://github.com/apache/fineract-cn-office.git

Step 2. Build and publish to maven local

execute the following commands in cmd

>cd fineract-cn-office/

>sh gradlew publishToMavenLocal

Step 3. command to run the service

java -jar service/build/libs/service-0.1.0-BUILD-SNAPSHOT-boot.jar -Drun.arguments= --cassandra.contactPoints=127.0.0.1:9042 --cassandra.clustername=Datacenter1 --cassandra.cluster.user=cassandra --cassandra.cluster.pwd=cassandra --postgresql.host=localhost --postgresql.user=postgres --postgresql.password=sql --server.port=2023 --system.publicKey.exponent=65537 --system.publicKey.timestamp=2019-07-05T08_19_55 --system.publicKey.modulus=20464695676860611XXX...

configuration

> application.yaml file under "fineract-cn-office\service\build\resources\main" location contains the default configuration properties like server port and database related credentials.

any properties which has to be changed, should be modified in application.yaml before executing step 3.

second option is to explicitly mention the changes on step 3 command, any properties on this command will override the default values in application.yaml

For example

1.if you have set a different password for postgres then we need to include "--postgresql.password=newpassword"

2.if you want to change the server port we need to include "--server.port=newport"


>system.XX properties values of step 3 will be available under application-dev.properties file(location - fineract-cn-lang\build\libs)

Service 4Customer

Step 1. Clone the project fineract-cn-customer

> git clone https://github.com/apache/fineract-cn-customer.git

Step 2. Build and publish to maven local

execute the following commands in cmd

>cd fineract-cn-customer/

>sh gradlew publishToMavenLocal

Step 3. command to run the service

java -jar service/build/libs/service-0.1.0-BUILD-SNAPSHOT-boot.jar -Drun.arguments= --cassandra.contactPoints=127.0.0.1:9042 --cassandra.clustername=Datacenter1 --cassandra.cluster.user=cassandra --cassandra.cluster.pwd=cassandra --postgresql.host=localhost --postgresql.user=postgres --postgresql.password=sql --server.port=2024 --system.publicKey.exponent=65537 --system.publicKey.timestamp=2019-07-05T08_19_55 --system.publicKey.modulus=20464695676860611XXX...

configuration

> application.yaml file under "fineract-cn-customer\service\build\resources\main" location contains the default configuration properties like server port and database related credentials.

any properties which has to be changed, should be modified in application.yaml before executing step 3.

second option is to explicitly mention the changes on step 3 command, any properties on this command will override the default values in application.yaml

For example

1.if you have set a different password for postgres then we need to include "--postgresql.password=newpassword"

2.if you want to change the server port we need to include "--server.port=newport"


>system.XX properties values of step 3 will be available under application-dev.properties file(location - fineract-cn-lang\build\libs)

Service 5Deposit

Step 1. Clone the project fineract-cn-deposit-account-management

> git clone https://github.com/apache/fineract-cn-deposit-account-management.git

Step 2. Build and publish to maven local

execute the following commands in cmd

>cd fineract-cn-deposit-account-management/

>sh gradlew publishToMavenLocal

Step 3. command to run the service

java -jar service/build/libs/service-0.1.0-BUILD-SNAPSHOT-boot.jar -Drun.arguments= --cassandra.contactPoints=127.0.0.1:9042 --cassandra.clustername=Datacenter1 --cassandra.cluster.user=cassandra --cassandra.cluster.pwd=cassandra --postgresql.host=localhost --postgresql.user=postgres --postgresql.password=sql --server.port=2024 --system.publicKey.exponent=65537 --system.publicKey.timestamp=2019-07-05T08_19_55 --system.publicKey.modulus=20464695676860611XXX...

configuration

> application.yaml file under "fineract-cn-deposit-account-management\service\build\resources\main" location contains the default configuration properties like server port and database related credentials.

any properties which has to be changed, should be modified in application.yaml before executing step 3.

second option is to explicitly mention the changes on step 3 command, any properties on this command will override the default values in application.yaml

For example

1.if you have set a different password for postgres then we need to include "--postgresql.password=newpassword"

2.if you want to change the server port we need to include "--server.port=newport"


>system.XX properties values of step 3 will be available under application-dev.properties file(location - fineract-cn-lang\build\libs)

Service 6Accounting

Step 1. Clone the project fineract-cn-accounting

> git clone https://github.com/apache/fineract-cn-accounting.git

Step 2. Build and publish to maven local

execute the following commands in cmd

>cd fineract-cn-accounting/

>sh gradlew publishToMavenLocal

Step 3. command to run the service

java -jar service/build/libs/service-0.1.0-BUILD-SNAPSHOT-boot.jar -Drun.arguments= --cassandra.contactPoints=127.0.0.1:9042 --cassandra.clustername=Datacenter1 --cassandra.cluster.user=cassandra --cassandra.cluster.pwd=cassandra --postgresql.host=localhost --postgresql.user=postgres --postgresql.password=sql --server.port=2024 --system.publicKey.exponent=65537 --system.publicKey.timestamp=2019-07-05T08_19_55 --system.publicKey.modulus=20464695676860611XXX...

configuration

> application.yaml file under "fineract-cn-accounting\service\build\resources\main" location contains the default configuration properties like server port and database related credentials.

any properties which has to be changed, should be modified in application.yaml before executing step 3.

second option is to explicitly mention the changes on step 3 command, any properties on this command will override the default values in application.yaml

For example

1.if you have set a different password for postgres then we need to include "--postgresql.password=newpassword"

2.if you want to change the server port we need to include "--server.port=newport"


>system.XX properties values of step 3 will be available under application-dev.properties file(location - fineract-cn-lang\build\libs)

  • Application Initialization

In this step we will be creating the initial tenant, provision services for the same and will be creating a login user for the tenant.

Step 1. Provisioning the Microservices

postman-initial-requests folder: contains postman-request-collection and postman-environment that defines the variables which will be holding values received from the responses.

location

ProvisioningFineractCN/Fineract-Initial-Setup-Environment.postman_environment.json
ProvisioningFineractCN/Fineract-Initial-Requests.postman_collection.json

Start Postman and load both files into Postman using the Import option

Step 2.  "Fineract-Initial-Requests" API collection will appear on the left sidebar on successful import, once you open the collection, you will see the list of API's as in the image below.

Step 3. Select the environment "Fineract-Initial-Setup-Environment" in the environment drop-down (top right corner in Postman)

  

Step 4. The "Eye" icon on the top right corner(next to environment drop-down) will list all the Default values and Current values on the variables, user can edit the current values depending on their requirement

(example: if port number is of provisioner is changed from 2020 to 2200, then current value of Variable "provisionerUrl" must be changed to "localhost:2200")

Step 5. Execute the requests one by one by selecting them in the collection and then pressing "Send".

First API should return the response like below, you may have to verify each step from first properly if you don't get the response token.

It is Important to get this step right, in order to proceed further for successful setup as this token will be used in other API requests.

{
"token": "Bearer fyJhbadfgdfgIiwifdgfdgdfgdfgfhgfnbxvsdfsvxvsdsdsdiIsImlzcyI6InN5c3RlbSIsImlhdCI6MTUwMDA1NjgxNywiZXhwE5k6Gd0pv01OC0XpY3NSgfAolVVgvSXKoRnL3NwAMP2yuzX6i8hR_q82M",
"accessTokenExpiration": "2020-02-13T22:26:57.784"
}

Important notes

  1. Execute each API in a sequential order
  2. It is better to avoid executing the same step twice(except for note 3)
  3. If any API fails in the mid way due to token expiry, you can generate the new token by execute the 1st step again
  4. If any thing goes wrong in the middle, you can always reset the following databases and restart the execution from first API again

On Cassandra

drop keyspace playground;
drop keyspace seshat;


On Postgreys

drop database playground;
drop database seshat;

  • Sign-in using fims-web-app

Prerequisites:
Fineract-CN has been successfully provisioned by following the instructions in the previous sections User mifos is created in the the last two requests (user creation and role assignment) in the postman request-list.
This user has admin rights and is able to manage offices,customers and thier deposits.

Setup fineract-cn-fims-web-app , Navigate to http://localhost:4200 in your browser and enter the credentials of the user you want to sign in with.

The following user-profile is available in fims-web-app after above setup was completed successfully:

Credentials:

tenant: playground
user: mifos
password: password




  • No labels