Skip to content

Commit

Permalink
docs: Add steps to configure ingress class and vNext hostname
Browse files Browse the repository at this point in the history
  • Loading branch information
Ratnesh2003 committed Jun 27, 2024
1 parent 9827778 commit f1920a4
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 5 deletions.
40 changes: 39 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,46 @@ kubectl get pods -n fineract-n #For testing fineract. n is a number of a finerac
Copyright © 2023 The Mifos Initiative
```

# Further Steps

## Ingress Class Setup
Create a file anywhere with name as `ingressclass.yaml` and paste the following lines inside it:
```yaml
apiVersion: networking.k8s.io/v1
kind: IngressClass
metadata:
name: nginx-ext
spec:
controller: k8s.io/ingress-nginx
```
Save the file and run the following command:
```
kubectl apply -f ingressclass.yaml
```
Now, we need to restart the ingress nginx controller, to do that hit the command:
```
kubectl rollout restart deploy/ingress-nginx-controller
```

# USING THE DEPLOYED APPS

## Determining the IP Address - Local
If you are using a local environment, then you need to run the following commands in order to fetch the IP address of the ingress cluster:
```
kubectl get ingress -n <namespace>
```
You'll get an output something similar to this:
```
NAME CLASS HOSTS ADDRESS PORTS AGE
greenbank-backend nginx-ext greenbank.local,greenbank-specapi.local 192.168.35.121 80 5h28m
...
```
In your host file, you need to add an entry for the address you receive here (Here, for example it is `192.168.35.121`) and add the hosts in this entry as mentioned below.

## Determining the IP Address - Remote
In case you are using a remote virtual instance to deploy the mojafos, you'll need to create the entry of the public IP address of your instance in the host file of your machine instead of the IP of the ingress cluster.


## Accessing Mojaloop
The Mojafos scripts add the required host names to the 127.0.0.1 entry in the /etc/hosts of the "install system" i.e. the system where mojafos is run. To access Mojaloop from beyond this system it is necessary to:-

Expand All @@ -90,7 +128,7 @@ ensure that http / port 80 is accessible on the install system. For instance if
add the hosts listed below to an entry for the external/public ip address of that install system in the /etc/hosts file of the laptop you are using.
For example if Mojaloop vNext is installed on a cloud VM with a public IP of 192.168.56.100 Then add an entry to your laptop's /etc/hosts similar to ...
```bash
192.168.56.100 vnextadmin.local elasticsearch.local kibana.local mongoexpress.local kafkaconsole.local fspiop.local bluebank.local greenbank.local
192.168.56.100 vnextadmin.local vnextadmin fspiop.local mongohost.local greenbank.local greenbank-specapi.local bluebank.local bluebank-specapi.local
```

You should now be able to browse or curl to Mojaloop vNext admin url using http://vnextadmin you can also access the deloyed instances of the Mojaloop testing toolkit at http://bluebank.local and http://greenbank.local or access the mongo and kafka consoles.
Expand Down
3 changes: 3 additions & 0 deletions index.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
apiVersion: v1
entries: {}
generated: "2024-06-27T10:31:52.401061355+05:30"
8 changes: 4 additions & 4 deletions src/mojafos/deployer/fin_values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ fineract:
preStopScript: 'echo -e "******Fineract is stopping********";'
ingress:
enabled: true
hostname: "2-fynams.sandbox.fynarfin.io"
hostname: "1-fynams.sandbox.fynarfin.io"
path: "/"
wildcardhostname: "*.sandbox.fynarfin.io"
annotations:
Expand All @@ -39,9 +39,9 @@ communityapp:
image: "openmf/community-app:latest"
ingress:
enabled: true
hostname: "2-communityapp.sandbox.fynarfin.io"
hostname: "1-communityapp.sandbox.fynarfin.io"
path: "/"
wildcardhostname: "2-communityapp.sandbox.fynarfin.io"
wildcardhostname: "1-communityapp.sandbox.fynarfin.io"
annotations:
kubernetes.io/ingress.class: "nginx"
resources:
Expand All @@ -57,7 +57,7 @@ webapp:
image: "fintecheando/web-app:master"
ingress:
enabled: true
hostname: "2-webapp.sandbox.fynarfin.io"
hostname: "1-webapp.sandbox.fynarfin.io"
path: "/web"
annotations:
kubernetes.io/ingress.class: "nginx"
Expand Down

0 comments on commit f1920a4

Please sign in to comment.