Mojaloop Deployment
Last updated
Was this helpful?
Last updated
Was this helpful?
The document is intended for an audience with a stable technical knowledge that would like to setup an environment for development, testing and contributing to the Mojaloop project.
6. Overlay Services/3PPI
6.1 Configuring a deployment for Third Party API support
6.2 Validating and Testing the Third Party API
Versions numbers below are hard requirements, not just recommendations (more recent versions are known not to work).
A list of the pre-requisite tool set required for the deployment of Mojaloop:
Recommended Versions:
Mojaloop Helm Chart release v14.1.x supports Kubernetes v1.20 - v1.24.
Mojaloop Helm Chart release v14.0.x supports Kubernetes v1.20 - v1.21.
Mojaloop Helm Chart release v13.x supports Kubernetes v1.13 - v1.21.
Mojaloop Helm Chart release v12.x supports Kubernetes v1.13 - v1.20.
Mojaloop Helm Chart release v11.x supports Kubernetes v1.13 - v1.17.
For local guides on how to setup the pre-requisites on your laptop or desktop, refer to the appropriate link document below;
This provides environment resource recommendations with a view of the infrastructure architecture.
Resources Requirements:
Control Plane (i.e. Master Node)
3x Master Nodes for future node scaling and HA (High Availability)
ETCd Plane:
3x ETCd nodes for HA (High Availability)
Compute Plane (i.e. Worker Node):
TBC once load testing has been concluded. However the current general recommended size:
3x Worker nodes, each being:
4x vCPUs, 16GB of RAM, and 40gb storage
Note that this would also depend on your underlying infrastructure, and it does NOT include requirements for persistent volumes/storage.
This section will guide the reader through the deployment process to setup Kubernetes.
The following are Kubernetes concepts used within the project. An understanding of these concepts is imperative before attempting the deployment;
Deployment
Pod
ReplicaSets
Service
Ingress
StatefulSet
DaemonSet
Ingress Controller
ConfigMap
Secret
Install your preferred Ingress Controller for load-balancing and external access.
If you are using helm, this can be done as follows:
This is NOT necessary if you are installing Mojaloop v13.x or newer.
Kubernetes Dashboards
The official Kubernetes Web UI Admin interface.
If you have installed MicroK8s, enable the MicroK8s dashboard:
Remember to prefix all kubectl commands with microk8s if you opted not to create an alias.
k8sLens
A local desktop GUI based kubectl alternative which is easy to install and setup.
Add mojaloop repo to your Helm config:
If the repo already exists, substitute 'add' with 'apply' in the above command.
Update helm repositories:
Install Mojaloop:
1.1. Installing latest version:
Or if you require a customized configuration:
Note: The --create-namespace
flag is only necessary if the demo
namespace does not exist. You can alternatively create it using the following command: kubectl create namespace demo
.
1.2. Version specific installation:
1.3. List of Mojaloop releases:
Update your /etc/hosts for local deployment:
Windows the file can be updated in notepad - need to open with Administrative privileges. File location C:\Windows\System32\drivers\etc\hosts
.
Include the following lines (or alternatively combine them) to the host config.
The below required config is applicable to Helm release >= versions 6.2.2 for Mojaloop API Services;
Test system health in your browser after installation. This will only work if you have an active helm chart deployment running.
Validating Mojaloop using Helm
Or with logs printed to console
Use the following command to view the provisioning Collection logs:
Use the following command to view the Golden Path Collection logs:
Example of the finally summary being displayed from the Golden Path test collection log output:
Accessing the Mojaloop Testing Toolkit UI
One is able to manually load and execute the Testing Toolkit Collections using the UI which allows one to visually inspect the requests, responses and assertions in more detail. This is a great way to learn more about Mojaloop.
Hub Setup and Simulator Provisioning
Golden Path Tests
Pre-requisites:
Learn more about 3PPI:
3rd Party Use Cases:
Third Party API support is off by default on the Mojaloop deployment. You can enable it by editing your values.yaml
file with the following settings:
Once the helm upgrade has completed, you can verify that the third party services are up and running:
You can also add the following entries to your
/etc/hosts
file to make it easy to talk to the thirdparty services
Once you have deployed the Third Party services, you need to deploy some simulators that are capable of simulating the Third Party scenarios.
6.2.1 Deploying the Simulators
Once again, you can do this by modifying your values.yaml
file, this time under the mojaloop-simulator
entry:
The above entry will create 3 new sets of mojaloop simulators:
pisp
- a PISP
dfspa
- a DFSP that supports the Third Party API
dfspb
- a normal DFSP simulator that doesn't support the Third Party API, but can receive payments
6.2.2 Provisioning the Environment
Once the above simulators have been deployed and are up and running, it's time to configure the Mojaloop Hub and simulators so we can test the Third Party API.
6.2.3 Run the Third Party API Test Collection
Kubernetes An open-source system for automating deployment, scaling, and management of containerized applications. Find out more about .
Mojaloop Helm Chart release v10.x supports Kubernetes v1.13 - v1.15, it will fail on Kubernetes v1.16+ onwards due deprecated APIs ().
kubectl - Kubernetes CLI for Kubernetes Management is required. Find out more about :
,
microk8s - MicroK8s installs a barebones upstream Kubernetes for a single node deployment generally used for local development. We recommend this installation on Linux (ubuntu) OS. Find out more about and :
,
kubectx - Not required but useful. Find out more about ,
kubetail - Not required but useful. Bash script that enables you to aggregate (tail/follow) logs from multiple pods into one stream. Find out more about ,
Docker Provides containerized environment to host the application. Find out more about ,
Helm A package manager for Kubernetes. Find out more about , Recommended Versions: Helm v3.x ().
Postman Postman is a Google Chrome application for the interacting with HTTP API's. It presents you with a friendly GUI for the construction requests and reading responces. . Find out more about .
If you are new to Kubernetes it is strongly recommended to familiarize yourself with Kubernetes. is a good place to start and will provide an overview.
Insure kubectl is installed. A complete set of installation instruction are available .
Refer to the following documentation to install the Nginx-Ingress Controller used for this guide: . It is recommended that you install v0.47.0 of the Nginx-Ingress Controller due to recent changes being made to support Kubernetes v1.22.
NOTE: If you are installing Mojaloop v12.x with an Nginx-Ingress controller version newer than v0.22.0, ensure you create a custom with the following changes prior to install:
List of alternative Ingress Controllers: .
Visit the following link for installation instructions (not needed if MicroK8s is installed): .
IMPORTANT: Ensure (not needed if MicroK8s is installed) you configure RBAC roles and create an associated service account, refer to the following example on how to create a sample user for testing purposes only: .
Refer to the following link for more information: .
Visit the following link for more information: .
Please review to understand the relationships between the deployed Mojaloop helm charts.
Refer to the official documentation on how to install the latest version of Helm: .
Refer to the following document if are using Helm v2: .
Refer to the if you wish to migrate an existing Helm v2 deployment to v3.
Note: Download and customize the . Also ensure that you are using the value.yaml from the correct version which can be found via . You can confirm the installed version by using the following command: helm --namespace demo list
. Under the CHART column, you should see something similar to 'mojaloop-{version}' with {version} being the deployed version.
Note: This is only applicable for local deployments, and is not needed if custom DNS or ingress rules are configured in a customized .
Note: The examples below are only applicable to a local deployment. The entries should match the DNS values or ingress rules as configured in the or otherwise matching any custom ingress rules configured.
ml-api-adapter health test:
central-ledger health test:
The (TTK) is used for testing deployments, and has been integrated into Helm utilizing its CLI to easily test any Mojaloop deployment.
This will automatically execute the following using the (TTK) CLI:
.
.
Open the following link in a browser: .
Refer to the for more information and guides.
can be used as an alternative to the . Refer to the for more information.
The available are similar to the 's as follows:
and
The following postman environment file should be imported or customized as required when running the above listed Postman collections: .
Ensure you download the latest patch release version from the . For example if you install Mojaloop v12.0.X, ensure that you have the latest Postman collection patch version v12.0.Y.
As of of Mojaloop, Third Party API is supported and will be published with the official release of Mojaloop v13.1.0. which allows Third Party Payment Initiators (3PPIs) the ability to request an account link from a DFSP and initiate payments on behalf of users.
Mojaloop's
In addition, the Third Party API has a number of dependencies that must be deployed manually for the thirdparty services to run. contains details of these dependencies, and also provides example k8s config files that install these dependencies for you.
Use the from the mojaloop/testing-toolkit-test cases to provision the Third Party environment and the simulators you set up in the last step.
Once the provisioning steps are completed, you can run the to test that the Third Party services are deployed and configured correctly.