helm

Mojaloop Helm Charts

Git Commit Git Releases CircleCI

Pre-requisites

  1. Add Helm dependency repositories:
     helm repo add stable https://charts.helm.sh/stable
     helm repo add incubator https://charts.helm.sh/incubator
     helm repo add kiwigrid https://kiwigrid.github.io
     helm repo add kokuwa https://kokuwaio.github.io/helm-charts
     helm repo add elastic https://helm.elastic.co
     helm repo add bitnami https://charts.bitnami.com/bitnami
     helm repo add codecentric https://codecentric.github.io/helm-charts
    

Configure remote Mojaloop Helm repo on your Helm Client

  1. Add Mojaloop repo

helm repo add mojaloop http://mojaloop.io/helm/repo/

  1. Keep your local Mojaloop repo up to date

helm repo update

Deployment

  1. Deploy specific chart

e.g. helm --namespace moja install dev mojaloop/centralledger

Alternative directly from remote repo:

  1. Deploy specific chart overriding values

e.g. helm --namespace moja install dev mojaloop/centralledger -f ./values.yaml

Refer to the following default chart config file for values: http://mojaloop.io/helm//values.yaml

Alternatively one can set specific values via cli arguments based on the config file above:

  1. Deploy specific version for a chart

e.g. helm --namespace moja install dev mojaloop/centralledger --version v1.0.0

Refer to the following default chart config file for values: http://mojaloop.io/helm//values.yaml

  1. Deploy Mojaloop components

Warning: This will deploy all core Mojaloop charts.

e.g. helm --namespace moja install dev mojaloop/mojaloop

Deploying development versions

  1. To deploy the latest development version, use the --devel flag:

Upgrading Deployments from Repo

helm --namespace <namespace> upgrade <release-name> mojaloop/<chart_name>

e.g. helm --namespace moja upgrade dev mojaloop/centralenduserregistry

Deployment from Source for local repo deployments

Update Chart Dependencies for Source for local repo deployments (i.e. from the cloned github repository)

Run the following script sh ./update-charts-dep.sh in the helm root folder.

This script will ensure that all dependencies and child-dependencies are updated correctly. This is temporary until recursive updates is supported in future: https://github.com/kubernetes/helm/issues/2247.

Deployment

  1. Deploy specific chart

e.g. helm --namespace mojaloop install dev ./centralledger

  1. Deploy mojaloop componenets

Warning: This will deploy all core Mojaloop charts.

e.g. helm --namespace mojaloop install dev ./mojaloop

Upgrading Deployments from Source

e.g. helm --namespace mojaloop upgrade dev ./centralenduserregistry

Testing Deployments

Validation

Note: This is currently only supported by Helm v3.

  1. Ensure Tests are enabled

Ensure the following properties are set in your values file:

Or alternatively add --set for each of the above parameters on the install command:

helm install ... --set ml-ttk-test-setup.tests.enabled=true --set ml-ttk-test-validation.tests.enabled=true

  1. Run Tests

Run tests: helm test <RELEASE_NAME>

Run tests with logs:

helm test <RELEASE_NAME> --logs

Ingress

  1. Add the following to your hosts file and ensure you have installed Ingress Controller on your Kubernetes Cluster:

<ip-of-k8s-node-ingress> ml-api-adapter.local central-ledger.local account-lookup-service.local quoting-service.local central-settlement.local moja-simulator.local

  1. Curl Health End-points for ML-API-Adapter

Expected output:

{"status":"OK"}

  1. Curl Health End-points for Central Ledger

Expected output:

{"status":"OK"}

Removing Deployments

e.g. helm --namespace mojaloop del dev

Debugging Charts

  1. Execute a dry-run to display all the Kubernetes deployment files
  1. Enable debug to display raw configurations that will be injected into Helm templates
  1. Use Helm Linter to check for any issues

Helper scripts

# lint all parent charts and ensure they conform to Helm's standards
./lint-charts.sh


# Update all charts, and their respective dependencies (requirements).
./update-charts-dep.sh

# Package all charts, and created an index.yaml in ./repo directory
./package.sh

Monitoring Mojaloop

Refer to Monitoring Documentation