Note: Before completing this guide, make sure you have completed the general onboarding guide in the base mojaloop repository.
- Prerequisites
- Service Overview
- Installing and Building
- Running Locally
- Running Inside Docker
- Testing
- Common Errors/FAQs
If you have followed the general onboarding guide, you should already have the following cli tools installed:
brew
(macOS), [todo: windows package manager]curl
,wget
docker
+docker-compose
node
,npm
and (optionally)nvm
The platform-configuration-bc BC consists of the following packages;
client-lib
Platform Configuration BC Client Library.
README
configuration-svc
Configuration Service.
README
domain-lib
Domain library types.
README
public-types-lib
Public shared types.
README
Firstly, clone your fork of the platform-configuration-bc
onto your local machine:
git clone https://github.com/<your_username>/platform-configuration-bc.git
Then cd
into the directory and install the node modules:
cd platform-configuration-bc
More information on how to install NVM: https://github.com/nvm-sh/nvm
nvm install
nvm use
npm install
npm run build
Create a directory and subdirectory in packages/configuration-svc/
cd packages/configuration-svc/
mkdir -p app/data
In this method, we will run all of the core dependencies inside of docker containers, while running the settlement-bc
server on your local machine.
Alternatively, you can run the
platform-configuration-bc
inside ofdocker-compose
with the rest of the dependencies to make the setup a little easier: Running Inside Docker.
Use https://github.com/mojaloop/platform-shared-tools/tree/main/packages/deployment/docker-compose-infra
To startup Kafka, MongoDB, Elasticsearch and Kibana, follow the steps below(executed in docker-compose-infra/):
- Create a sub-directory called
exec
inside thedocker-compose-infra
(this) directory, and navigate to that directory.
mkdir exec
cd exec
- Create the following directories as sub-directories of the
docker-compose/exec
directory:
certs
esdata01
kibanadata
logs
mkdir {certs,esdata01,kibanadata,logs}
- Copy the
.env.sample
to the exec dir:
cp ../.env.sample ./.env
-
Review the contents of the
.env
file -
Ensure
vm.max_map_count
is set to at least262144
: Example to apply property on live system:
sysctl -w vm.max_map_count=262144 # might require sudo
Start the docker containers using docker-compose up (in the exec dir)
docker-compose -f ../docker-compose-infra.yml --env-file ./.env up -d
To view the logs of the infrastructure containers, run:
docker-compose -f ../docker-compose-infra.yml --env-file ./.env logs -f
To stop the infrastructure containers, run:
docker-compose -f ../docker-compose-infra.yml --env-file ./.env stop
After running the docker-compose-infra we can start configuration-svc:
npm run start:configuration-svc
npm run start:platform-configuration-api-svc
We use npm
scripts as a common entrypoint for running the tests. Tests include unit, functional, and integration.
# unit tests:
npm run test:unit
# check test coverage
npm run test:coverage
# integration tests
npm run test:integration
Here you can find a complete Postman collection, in a json file, ready to be imported to Postman.
error:25066067:DSO support routines:dlfcn_load:could not load the shared library
Fix: https://github.com/mojaloop/security-bc.git export OPENSSL_CONF=/dev/null