Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

docker-compose up -d

cd ../..

Now wait for external tools (Postgre, Cassandra, ActiveMQ and Eureka to start). 

Verify external tools have started

Run Provisioner

Open fineract-cn-provisioner with IntelliJ IDEA and wait the project to be imported

...

After ~10sec you should get in terminal:
10:10:01.081 [main] INFO o.a.f.c.p.ProvisionerApplication - Started ProvisionerApplication in 11.642 seconds (JVM running for 13.988)

Verify Provisioner Micro Service started correctly

  • A new schema "seshat" is created to postgres database
  • A new keyspace "seshat" is created to cassandra database and following tables are there:
    • applications
    • clients
    • config
    • tenant_applications
    • tenants
    • users

Run Identity Micro Service

Repeat Now we repeat the same steps (create run configuration with same program arguments) with fineract-cn-identity

In Identity the class to run is called

...

.

Open fineract-cn-identity with IntelliJ IDEA and wait the project to be imported

Open IdentityServiceConfig class and  right click on class name and choose "Create ProvisionerApplication Run/Debug configuration"

To program arguments set:

--spring.config.location=../application-common.properties --eureka.instance.hostname=identity-ms

Click OK and then right click again on IdentityServiceConfig and select Run.

If you managed to do it correctly you should see in logs:

10:19:31.047 [main] INFO o.a.f.c.i.c.IdentityServiceConfig - Started IdentityServiceConfig in 7.874 seconds (JVM running for 9.701)
10:19:31.385 [DiscoveryClient-InstanceInfoReplicator-0] INFO c.netflix.discovery.DiscoveryClient - DiscoveryClient_IDENTITY-V1/192.168.1.116:identity-v1:2021 - registration status: 204

Verify Identity Micro Service has started

Open http://identity-ms:2021/ with your browser. You should get error 404.

Check if Identity has registered with Eureka

Wait a few minutes and open http://localhosteureka:8761/ and see if you see make sure "identity-v1" is there in the list.

Also hover Hover the link and make sure it points to identity-ms:2021/info 

→ What does it mean?

Fineract-CN micro services use client-side load balancing. This works like this:

  • If micro service starts up it registers its location with Eureka. Remember we told to identity that its hostname is "identity-ms"
  • If some micro service X wants to connect to Identity then it asks Eureka for a location of "identity-v1"
  • In development we only have one copy of the service but in production there could be many copies of the same service running and micro service X would choose randomly one.

Provision Identity micro service

...

  1. Start Postman and load both files into Postman by clicking Import and then selecting the file.
  2. You will see the collection "Fineract-Cn-Initial-Requests" in the left sidebar.
  3. Open the collection by clicking on it.
  4. Select the environment "Fineract-Cn-Initial-Setup-Environment" in the environment drop-down (top right corner in Postman).
  5. Execute the requests one by one by selecting them in the collection and then pressing "Send".

The first request (01. Log in root user) will retrieve a token. The response should look like this, with a different token:

{
    "token": "Bearer eyJhbGciOiJSUzUxMiJ9.eyJhdWQiOiJwcm92aXNpb25lci12MSIsInN1YiI6IndlcGVtbmVmcmV0IiwiL21pZm9zLmlvL3NpZ25hdHVyZVRpbWVzdGFtcCI6IjIwMTctMDQtMThUMDlfNDRfMjIiLCIvbWlmb3MuaW8vdG9rZW5Db250ZW50IjoiUk9MRV9BRE1JTiIsImlzcyI6InN5c3RlbSIsImlhdCI6MTUwMDA1NjgxNywiZXhwIjoxNTAwNDE2ODE3fQ.OfxTUTStJbKQc4rAPW5PLIQYNjCG_uqcNPR4up6pIQBWLDxkgEiU9EF1WrB5NQdzXBJIHqjDFQpaVywm5DersIh4LxPGD3MZj3TqZK5_LUcZvBDTa4Xgb41e3xXkWB4TkN6KqfmiK12Ngjrrj7qZGBdtypDmFmZwKQRZIOL6T3QbI7LpbPGpeWjpWZirFgtcn5B1Z_h3r9rirCzecUdVjlaplQufxDuVFJS0R3N67pyuGQENvCAC716ID5KbokTQtITXfjnCztFuQBbtCPcYLIzxsKv_eyJhdWQiOiJwcm92peWjpWZirFgcYLIzxsKv_-E5k6Gd0pv01OC0XpY3NSgfAolVVgvSXKoRnL3NwAMP2yuzX6i8hR_q82Q...",
    "accessTokenExpiration": "2019-07-18T22:26:57.784"
}

...

03.1 Create first tenant 'playground'

Now wait a bit and verify the following has happened:

  • In postgres database a new schema 'playground' is created


03.2 Assign identity-v1 for Tenant and obtain Tenant Admin (user antony) Password

...