Giter Site home page Giter Site logo

tutulvm / helm Goto Github PK

View Code? Open in Web Editor NEW

This project forked from suker200/helm

0.0 1.0 0.0 15.06 MB

CORE RELATED (Mojaloop):Helm Charts. Helm repo http://mojaloop.io/helm/repo

Home Page: http://mojaloop.io

Smarty 60.17% Shell 38.81% Dockerfile 1.02%

helm's Introduction

Mojaloop Helm Charts

Mojaloop published Helm Repo: http://mojaloop.io/helm/repo/

Refer to Helm docs for more information: https://docs.helm.sh/

Deployment from Repo

  1. Deploy specific chart
  • helm install --debug --namespace=<namespace> --name=<release-name> --repo=http://mojaloop.io/helm/repo <chart_name>

e.g. helm install --debug --namespace=mojaloop --name=dev --repo=http://mojaloop.io/helm/repo centralledger

  1. Deploy specific chart overriding values
  • helm install --debug --namespace=<namespace> --name=<release-name> --repo=http://mojaloop.io/helm/repo -f <values_file> <chart_name>

e.g. helm install --debug --namespace=mojaloop --name=dev --repo=http://mojaloop.io/helm/repo -f ./values.yaml centralledger

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

  1. Deploy Mojaloop componenets

Warning: This will deploy all charts.

  • helm install --debug --namespace=<namespace> --name=<release-name> --repo=http://mojaloop.io/helm/repo mojaloop

e.g. helm install --debug --namespace=mojaloop --name=dev --repo=http://mojaloop.io/helm/repo mojaloop

  1. Deploy Ingress
  • helm install --debug --namespace=<namespace> --name=<release-name> --repo=http://mojaloop.io/helm/repo ingress-nginx

e.g. helm install --debug --namespace=kube-public --name=<release-name> --repo=http://mojaloop.io/helm/repo ingress-nginx

Local installation with Minikube

This procedure assumes that you have VirtualBox, Minikube, kubectl and helm installed appropriately.

Clean install, in case you had another minikube before. Remember that Minikube is installed in the user's home.

  • minikube stop
  • minikube delete
  • rm -rf .kube/
  • rm -rf .minikube/
  • rm -rf .helm/

The memory should be in multiples of 1024

  • minikube start --memory 9216 --cpus 4

In case you are behind a proxy, pass the environment variables like this:

  • minikube start --docker-env http_proxy=$http_proxy --docker-env https_proxy=$http_proxy --docker-env HTTP_PROXY=$http_proxy --docker-env HTTPS_PROXY=$http_proxy --docker-env no_proxy=192.168.99.0/24 --docker-env NO_PROXY=192.168.99.0/24 --memory 9216 --cpus 4

To see the pods status, once they are created proceed with:

  • kubectl get po --all-namespaces

It's very likely that the dashboard will throw an error (at least on binaries from GNU/Linux), for that matter do:

  • kubectl create clusterrolebinding kube-system-cluster-admin --clusterrole=cluster-admin --serviceaccount=kube-system:default

Now we install Tiller

  • helm init

Generally the embedded ingress is disabled, better to leave it that way. In case is enable, disable it with:

  • minikube addons disable ingress

Finally we install the Mojaloop

  • helm install --debug --namespace=mojaloop --name=dev --repo=http://mojaloop.io/helm/repo mojaloop

Then we install the Ingress from the Mojaloop project with the rbac.create flag Here the release name I put "moja" arbitrarily, special attention on this with permissions below

  • helm install --debug --namespace=kube-public --name=moja --repo=http://mojaloop.io/helm/repo ingress-nginx --set rbac.create=true

Now some permissions in order to Ingress run successfully

  • kubectl -n kube-public create sa nginx-ingress-controller
  • kubectl apply -f https://gist.githubusercontent.com/bdfintechpy/c816077cefd7fa938e453d8d97afb65b/raw/8ef6d0623e9273aa93f22ab2b5d5cbb40502a5aa/nginx-ingress-controller-clusterrole.yaml
  • kubectl -n kube-public apply -f https://gist.githubusercontent.com/bdfintechpy/25793f9dd8fb7545d4a5a5bd268d8a7f/raw/421d2032e4a36577739b60c0e673e889c1d1c6e2/nginx-ingress-controller-role.yaml
  • kubectl -n kube-public create rolebinding nginx-ingress-controller --role=nginx-ingress-controller --serviceaccount=kube-public:nginx-ingress-controller
  • kubectl create clusterrolebinding nginx-ingress-controller --clusterrole=nginx-ingress-controller --serviceaccount=kube-public:nginx-ingress-controller
  • kubectl -n kube-public patch rc/moja-ingress-nginx-controller -p '{"spec": {"template": {"spec": {"serviceAccountName": "nginx-ingress-controller"}}}}'

We re-create the ingress pod

  • kubectl -n kube-public delete po -l app=moja-ingress-nginx-controller

Wait a while, and everything should be running

  • kubectl get po --all-namespaces

You might want to have access to the interop-switch, you can go through ingress or directly to the interop-switch changing his type ClusterIP to NodePort, with:

  • kubectl edit svc dev-interop-switch --namespace=mojaloop

Show the port assigned to the service

  • minikube service list

Upgrading Deployments from Repo

helm upgrade --debug <release-name> --repo=http://mojaloop.io/helm/repo <chart_name>

e.g. helm upgrade --debug dev --repo=http://mojaloop.io/helm/repo centralenduserregistry

Update Chart Dependencies for Source

Note: Please ensure that you update the Chart dependencies in the order show below.

  • helm dep up centralkms
  • helm dep up forensicloggingsidecar
  • helm dep up centralledger
  • helm dep up centralhub
  • helm dep up mockpathfinder
  • helm dep up centralenduserregistry
  • helm dep up centraldirectory
  • helm dep up centralsettlement
  • helm dep up central
  • helm dep up ml-api-adapter
  • helm dep up interop-switch
  • helm dep up mojaloop

We are quitely waiting on recursive updates: helm/helm#2247

Alternatively please use the helper script sh ./update-charts-dep.sh.

This script will ensure the correct order is maintained.

Deployment from Source

  1. Deploy specific chart
  • helm install --debug --namespace=<namespace> --name=<release-name> <chart_directory>

e.g. helm install --debug --namespace=mojaloop --name=dev ./centralledger

  1. Deploy mojaloop componenets

Warning: This will deploy all charts.

  • helm install --debug --namespace=<namespace> --name=<release-name> ./mojaloop

e.g. helm install --debug --namespace=mojaloop --name=dev ./mojaloop

  1. Deploy Ingress
  • helm install --debug --namespace=<namespace> --name=<release-name> ./kube-public/ingress-nginx

e.g. helm install --debug --namespace=kube-public --name=<release-name> ./kube-public/ingress-nginx

Upgrading Deployments from Source

helm upgrade --debug <release-name> <chart_directory>

e.g. helm upgrade --debug dev ./centralenduserregistry/

Testing Deployments

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

<ip-of-k8s-node-ingress> interop-switch.local central-kms.local forensic-logging-sidecar.local central-ledger.local central-end-user-registry.local central-directory.local central-hub.local central-settlement.local ml-api-adapter.local

If your running Minikube, you can use the following cmd to discover your <ip-of-k8s-node-ingress>:

minikube ip

  1. Curl Health End-points for Central Ledger http://central-ledger.local/admin/accounts

curl http://central-ledger.local/health

curl http://central-ledger.local/admin/health

Expected output:

{"status":"OK"}

  1. Confirm Central Ledger DB Connectivity

curl http://central-ledger.local/admin/accounts

Expected output:

[{"name":"LedgerName","id":"central-ledger.local/accounts/LedgerName","created":"2017-12-06T20:57:05.760Z","is_disabled":false,"_links":{"self":"central-ledger.local/accounts/LedgerName"}}]

  1. Open the Central Management Hub in your browser

http://central-hub.local/members

Check to see that an account name "LedgerName" is displayed

Removing Deployments

helm del --purge <release-name>

e.g. helm del --purge dev

Debugging Charts

  1. Execute a dry-run to display all the Kubernetes deployment files

helm install --dry-run --debug --namespace=<namespace> --name=<release-name> <chart_directory>

  1. Use Helm Linter to check for any issues

helm lint --strict <chart_directory>

Helper scripts

Ingress

1.) Deploy Ingress

This will deploy a new Ingress Nginx Controller with TCP and HTTP Ingress

sh deploy-ingress.sh -r lb -e -o ./config-ingress.yaml

2.) Undeploy Ingress

sh clean.sh -r lb -e

Central

1.) Deploy Central

This will deploy a new Ingress Nginx Controller with TCP and HTTP Ingress

sh deploy-central.sh -r dev -e -o ./config-central.yaml

2.) Undeploy Central

sh clean.sh -r dev -e

Package

1.) Package charts

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

sh package.sh

helm's People

Contributors

mdebarros avatar tutulvm avatar ksatya77 avatar rmothilal avatar suker200 avatar bdfintechpy avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.