SDK Scheme Adapter and Local K8S cluster testing
Last updated
Was this helpful?
Last updated
Was this helpful?
A detailed documentation for dfsps who want to test the mojaloop cluster deployment with scheme adapter and a mock backend service.
A working mojaloop k8s cluster (Local / Cloud deployment)
DFSP mock backend service
sdk-scheme-adapter > 8.6.0
Please follow the below link to deploy your own cluster on local system. https://mojaloop.io/documentation/deployment-guide/
A Linux based operating system is recommended and at least 16GB RAM and 4 core processor is required.
After installation please complete the OSS-New-Deployment-FSP-Setup.postman_collection
collection available at https://github.com/mojaloop/postman
Then make sure the oracles & endpoints are configured correctly and that the "Golden Path Collection" can be run successfully.
The SDK scheme adapter version should be greater than 8.6.0 The next step starts the scheme adapter from docker-compose file automatically.
Please download the following repository https://github.com/mojaloop/sdk-mock-dfsp-backend
Edit the docker-compose.yml file and verify the following lines.
Edit the backend.env file and change the OUTBOUND_ENDPOINT value
Edit scheme-adapter.env and change the following lines Please replace the endpoint values with the appropriate hostnames provided in /etc/hosts file.
Point the following hostnames to your local machine IP by adding the below line in /etc/hosts file
Make sure to change 192.168.5.101 to your real external IP.
Add extra_hosts configuration to scheme-adapter2 config in the docker-compose.yml file, so that the scheme-adapter2 container can resolve dns of account-lookup-service.local, quoting-service.local and ml-api-adapter.local. For example the config could be:
The 172.17.0.1 is a default docker0 network interface on linux, however please make sure it's valid in your configuration and change it if needed.
Start the backend and scheme adapter using the following command.
Download the following files:
Mojaloop-Local.postman_environment_modified.json - modified environment variables that point to your local setup
OSS-Custom-FSP-Onboaring-SchemeAdapter-Setup.postman_collection.json - steps that will setup new FSP
The SCHEME_ADAPTER_ENDPOINT in the environment file should point to your local scheme-adapter deployment. For mac this is configured already to be http://host.docker.internal:4000. If you're running on Linux, please edit the environment file, so that SCHEME_ADAPTER_ENDPOINT points to your docker0 interface (usually 172.17.0.1 - see remarks in previous step).
In postman, select the environment file and run the custom collection in the postman to provision a new FSP called "safsp". The endpoints for safsp will be set to the URL of the scheme adapter which is configured in environment file.
Try to send funds from "safsp" (Mock DFSP) to a MSISDN which is in "payeedfsp" (Simulator in K8S) through scheme adapter. Run the following curl command to issue command to Mock DFSP service.
You should get a response with COMPLETED currentState.