My One-Click Mojaloop Deployment: One Year Later

Lewis Daly
4 min readAug 17, 2020

--

A year or so ago, I wanted to learn more about Mojaloop, and hopefully help others get up and running with their own test environment.

A year on, I’ve come back again with the help of none other than my Dad to make it even easier. This time, we’re swapping Terraform and GKS for Vagrant, Virtualbox and Ubuntu to hopefully make life even easier.

So, without further delay, I present to you Mini-Loop.

Mini-Loop

Mini-loop is an opinionated, batteries-included installation of Mojaloop, designed for newcomers to the Mojaloop Community who want to get a working example of Mojaloop without worrying about Kubernetes, Helm and our Postman tests.

Motivation

We noticed that a lot of newcomers to the Mojaloop Community struggled to get a local installation working through the installation steps, and the many different options presented for an installation (which OS, which Kubernetes environment ad version, which Helm version to name a few) was sometimes hard to understand, especially for newcomers to Kubernetes and Helm.

So we set out to make Mini-Loop, which can be installed in a few steps:

git clone https://github.com/tdaly61/mini-loop.git
cd mini-loop/vbox-deploy
vagrant up

Well, it’s not quite that easy, there are a few prerequisites you may need to install, namely VirtualBox and Vagrant.

Should everything work as expected, you will have:

  1. An Ubuntu virtual machine, with MicroK8s and Helm3
  2. Mojaloop v10.1.0 installed on MicroK8s (yes, we know this is a little outdated — we’re working on it!)
  3. Seeded databases, with configuration for 2x simulated DFSPs
  4. Passing ‘Golden Path’ Mojaloop tests

Set Up

Hardware

In order to run Mini-Loop successfully, we recommend the following hardware requirements:

  • minimum 6GB ram available (8GB recommended)
  • minimum 32GB storage available
  • broadband internet connection (for downloading initial linux images in the form of vagrant boxes. if your internet connection is slow you may want to consider using the Google Cloud Version instead)

Software

Mini-loop uses Vagrant to manage the a Virtual Machine (VM), which in turn uses VirtualBox. Before proceeding, make sure you have installed:

You may also find the following links helpful to get up and running with Vagrant and Virtualbox
-
Getting Started with Virtualbox and Vagrant
- Installing VirtualBox and Vagrant on Windows 10

Installing Mojaloop

git clone https://github.com/tdaly61/mini-loop.git
cd mini-loop/deploy-vbox
vagrant up

vagrant up is where the magic happens. This step does the following:

  1. Downloads an Ubuntu image and runs a virtualbox Virtual Machine (VM)
  2. Boots and configures the VM
  3. Installs Kubernetes, Helm and Postman
  4. Downloads and installs the Mojaloop Helm Charts
  5. Downloads and runs the Mojaloop Golden Path tests

The first part should look something like the following:

And when you see something like:

That is the end of the golden path tests, and your Mini-loop environment is up and running.

Verifying Everything Works

As a part of vagrant up, the Mojaloop environment is configured, and the golden path tests are run. So should your vagrant up command succeed, then you can be pretty confident that everything is working as expected. Make sure to read the console output however, just to be sure.

Running an Example Transfer

We also provide some shell scripts so you can run your own example Mojaloop transfer:

# log into the vagrant box
vagrant ssh
# run an example transfer
/vagrant/scripts/_example_transfer.sh

Which will look something like the following:

$ /vagrant/scripts/_example_transfer.sh
Setting up environment
Creating the transfer (request from Payer -> Payee)
Created a transfer with TRANSFER_ID: 9b9bd5dc-7ca6-84a8-da71-44e6f8c4472e
fulfilling the transfer (request from Payee -> Payer)
Approved transfer: 9b9bd5dc-7ca6-84a8-da71-44e6f8c4472e
Get Payer Position
[{"currency":"USD","value":103.11,"changedDate":"2020-07-20T12:33:09.000Z"}]
Success
Get Payee Position
[{"currency":"USD","value":-203.11,"changedDate":"2020-07-20T12:33:09.000Z"}]
Success

If you run the _example_transfer.sh script more than once, you should see the DFSP positions gradually change more and more over time.

Troubleshooting

If you run into any problems getting Mini-Loop set up, or have any other questions, you can:

--

--