Versions Compared

Key

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

...

Find hosts file (/etc/hosts in Unix/Mac or c:\Windows\System32\Drivers\etc\hosts in Windows) and add:

127.0.0.1 cassandra
127.0.0.1 activemq
127.0.0.1 eureka
127.0.0.1 postgres
127.0.0.1 provisioner-ms
127.0.0.1 identity-ms

...

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

You probably will get a flollowing warning that you can safely ignore: 'WARNING: Some services (activemq, cassandra, eureka) use the 'deploy' key, which will be ignored. Compose does not support 'deploy' configuration - use `docker stack deploy` to deploy to a swarm."

Verify external tools have started

...

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

...

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

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

...

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

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

...

Open http://identity-ms:2021/ with your browser. You should get error served by micro servicemicroservice:

HTTP ERROR: 404

Problem accessing /info. Reason:

...

→ What does it mean?

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

  • If micro service the microservice starts up it registers its location with Eureka. Remember we told to identity that its hostname is "identity-ms"
  • If some micro service microservice 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 microservice X would choose randomly one.

Provision Identity micro servicemicroservice

We provide a postman-request-collection as well as a postman-environment that defines variables that are used to hold values received in responses.
Both files are located under fineract-cn-docker-compose/postman-initial-requests folder:

...

If you don't get a token there is something wrong with your setup. The token is necessary for authentication in other requests thus be sure that this these steps workswork. Important: Be sure to execute the requests in the right order! The outcome is often stored in variables - check the Tests section of the requests.

Only execute the following steps (besides 01 that we already did)

Execute Postman step 02.01 Create an identity-v1 application

→ in Cassandra database seshat in table applications, there should now be a record about identity-v1

Execute Postman step 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
  • In Postgres database seshat table 'tenants" contains a record about playground
  • In Cassandra database, a new keyspace 'playground' is created with one empty table 'command_source'

...

→ Fineract forces every user to change their password on the first login. This is why we are changing the password and logging in again (in next step)

...

Execute Postman step03.5 LOGIN ANTONY (tenant SuperAdmin) with pwd 'antonyPassword'

... skip a bunch of steps...

Execute Postman step05.1 Create administrator role for tenant "playground"

...

Execute Postman step05.3 Log in with the initial password

Execute Postman step05.4 Change user 'operator' password to 'operatorPassword'

...

You have now set up Identity Micro service Microservice and provisioned it using Provisioner micro servicemicroservice.

You should have schemas 'seshat' and 'playground' in Cassandra and Postgres databases.

...