Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updated how-to to make it easier for developers to start Fineract CN

...

Info

Instructions for pulling the sources, building and starting Apache Fineract CN for the first time. This guide assumes that default OS is Debian/Ubuntu flavours of Linux although they can be easily adapted to other hostswith some adjustments for developers using MacOS.


Step 1 : What You Will Need

If you're not using a Mac, then Skip Adjustment for Mac developers below

Adjustment for Mac developersStep 1: Adjusted for a mac user 

  • Install Google Chrome 
  • Make sure you have Oracle Java SDK 8.  See this tutorial at mkyong.
    • verify you have the correct java with > java -version # should display 

      java version "1.8.0_192" or any 1.8.* 

  • Homebrew approach (not the only package manager but one that is preferred on mac) 
    • Install homebrew to make life easier See how to instructions. 

    • on older macs, you may first need to  >xcode-select --install

    • Homebrew has "kegs" for each of the various libraries and software pieces 

...

> brew services start cassandra # starts the cassandra service - noSQL database 


Step 2: Clone The Repositories

Feedback Note :  Ensure that you get BUILD SUCCESSFUL after iteration for EACH repository. Also ensure that artifacts show up in $USER_HOME/.m2/repository/org/apache/fineract/cn/


Step 3: Orchestrate Microservices Using The Demo-server

Tip: On average the build will take at least 30 - 40 mins to complete when building on 8 (x86-64) dedicated cores, >=16 GB of memory and an SSD drive demo-server

  • cd into `integration-tests/fineract-cn-demo-server/build/libs/`. You will use Use AOption A. OR B. below Option B below to build the demo-server jar.

    Option A. You could use run the demo-server using the microservice datastores such as fineract-cn-cassandra and fineract-cn-mariadb. Use the command  `java -jar -Ddemoserver.provision=true demo-server-0.1.0-BUILD-SNAPSHOT.jar`jar`

OR

           B. You could use run demo-server using your local data stores , i.e. locally-installed MySQL and Cassandra ( with the demoserver.persistent environment variables ) to build the demo-server. Note that your username and password for mysql and cassandra which you’ve installed on your machine will be useful at this point. Make .

Note that your username and password of your locally-installed datastores - mysql and cassandra - will have to conform to the specifications in demo-server to work. You'll have to ensure MySQL's `root` user has password `mysql` and Cassandra's `cassandra` user has password `password` .

Also, make sure Cassandra and MySQL services are started . Run the following command;using `service mysql start` and `service cassandra start`.

If you are running Fineract CN for the first time on your OSFirst run, use i.) to create MySQL and Cassandra local databases

i. `java ) `java -Ddemoserver.provision=true -Ddemoserver.persistent=true -Dcustom.cassandra.contactPoints=127.0.0.1:9042 -Dcassandra.cluster.user=cassandra -Dcassandra.cluster.pwd=password -Dcustom.mariadb.host=localhost -Dcustom.mariadb.user=root -Dcustom.mariadb.password=mysql -jar demo-server-0.1.0-BUILD-SNAPSHOT.jar`

Subsequent runs, use ii. to use the local databases created on i.. Feedback Note :  If the first run failed for any reason, delete any residual database 'seshat' and/or 'playground' in MySQL and Cassandra, and start over over i. until it goes through; then start using ii. going forward) until it succeeds.

After i.) runs to completion, You could verify that databases `playground` and `seshat` have indeed been created by logging into mysql's `root` user account and running `show databases;`

If you have used i.) to run demo-server before, then use ii.) HENCEFORTH which uses the local databases created in i.).

ii.) `java -Ddemoserver.persistent=true -Dcustom.cassandra.contactPoints=127.0.0.1:9042 -Dcassandra.cluster.user=cassandra -Dcassandra.cluster.pwd=password -Dcustom.mariadb.host=localhost -Dcustom.mariadb.user=root -Dcustom.mariadb.password=mysql -jar demo-server-0.1.0-BUILD-SNAPSHOT.jar`

Tip: On average the build will take at least 30 - 40 mins to when building on 8 (x86-64) dedicated cores32 GB of memory and an SSD driveBe Patient While This Runs. When Your Logs Show Up;

……

……

……

Tip: These endpoints below signifies the completion of the build. Only after this has occurred can you move to the next step

“INFO  o.e.jetty.server.AbstractConnector - StoppedServerConnector@1bdb0376{HTTP/1.1,[http/1.1]}

...

Notification Service: http://localhost:2033/notification/v1


Step 4: Test Run The Fims Web App

  • Open a new terminal And cd into ‘integration-tests/fineract-cn-fims-web-app'
  • Run ‘npm i

Feedback Note :  If there are packages like such as @angular-devkit or @rxjs which you aren’t installed, then do so manually at this point;

Run ’npm run dev

̂̂̂̂> fims@0.1.0 dev /home/ikamga/Documents/Three/Code/integration-tests/fims-web-app

...

Note that, if you are running the system from a remote server, then you will have to replace 'localhost' in 'http://localhost' in lines 3,10,17,etc with the IP address of your server in your proxy.conf.json file.

Feedback Note :  webpack: Compiled successfully.

    Tenant : playground

    Username : operator

    Password : init1@l 

Feedback Note : You should be on fims - backoffice at http://localhost:4200/quickAccess

Congratulations! You’ve Successfully Ran Apache Fineract CN


Tips for the next buildRelevant Tips For The Next Build

  1. Clean up your tmp folder after every build

...

  1. using  `sudo rm -fr /tmp/*`
  2. Ensure that all relevant ports are free

...

  1. by viewing them with `sudo netstat -plnt | grep port_number` and killing processing using them with `sudo kill -9 port_number`
    List Of Relevant ports: 3306, 4200, 61616, 2021, 2022, 2022, 2023, 2024, 2025, 2026, 2028, 2029, 2030, 2031, 2032, 2033

...

To view all ports: netstat -plnt

...

  1. Restart the system if necessary.

Related articles

Content by Label
showLabelsfalse
max5
spacesFINERACT
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel = "kb-how-to-article" and type = "page" and space = "FINERACT"
labelskb-how-to-article

...