Skip to content

Commit

Permalink
[MOSIP-36541] Updated enable-new-port.md
Browse files Browse the repository at this point in the history
Signed-off-by: Mohan E <[email protected]>
  • Loading branch information
Mohanraj209 authored Oct 28, 2024
1 parent 46e7542 commit 94222ad
Showing 1 changed file with 50 additions and 44 deletions.
94 changes: 50 additions & 44 deletions docs/design/enable-new-port.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,49 +2,7 @@

### steps:

1. Update the configuration as given below within the `stream` block of the nginx.conf file of nginx node.
```
upstream <backend-group-name> {
server <server1-ip>:<nodeport>;
server <server2-ip>:<nodeport>;
server <server3-ip>:<nodeport>;
server <server4-ip>:<nodeport>;
server <server5-ip>:<nodeport>;
server <server6-ip>:<nodeport>;
server <server7-ip>:<nodeport>;
server <server8-ip>:<nodeport>;
}
Note: The upstream block is usually followed by a server block where the traffic from clients is forwarded to the backend upstream group.
server{
listen <cluster-nginx-internal-ip>:<port>;
proxy_pass <backend-group-name>;
}
```

2. Expose the port and nodePort from the AWS cloud and UFW firewall.
* < port >: needs to be exposed for the nginx node.
* < nodeport >: needs to be exposed for all the k8's cluster nodes.

3. Update the IstioOperator (IOP) configuration as given below by editing the IOP in the istio-system namespace.

```
$ kubectl -n istio-system edit istiooperator istio-operators-mosip
```

```
k8s:
service:
ports:
- name: <PortName>
nodePort: <nodeport>
port: <port>
protocol: TCP
targetPort: <port>
```

4. Add the Istio Gateway and Virtual service by deploying the istio-addons and update the configuration as given below.
1. Add the Istio Gateway and Virtual service by deploying the istio-addons and update the configuration as given below.

* Gateway:
```
Expand Down Expand Up @@ -74,4 +32,52 @@
host: <service-name>
port:
number: 5432 ## pod's service port
```
```

2. Update the IstioOperator (IOP) configuration as given below by editing the IOP in the istio-system namespace.

```
$ kubectl -n istio-system edit istiooperator istio-operators-mosip
```

```
k8s:
service:
ports:
- name: <PortName>
nodePort: <nodeport>
port: <port>
protocol: TCP
targetPort: <port>
```

3. Update the configuration as given below within the `stream` block of the nginx.conf file of nginx node.
```
upstream <backend-group-name> {
server <server1-ip>:<nodeport>;
server <server2-ip>:<nodeport>;
server <server3-ip>:<nodeport>;
server <server4-ip>:<nodeport>;
server <server5-ip>:<nodeport>;
server <server6-ip>:<nodeport>;
server <server7-ip>:<nodeport>;
server <server8-ip>:<nodeport>;
}
Note: The upstream block is usually followed by a server block where the traffic from clients is forwarded to the backend upstream group.
server{
listen <cluster-nginx-internal-ip>:<port>;
proxy_pass <backend-group-name>;
}
```

4. Restart the Nginx service.
```
sudo systemctl restart nginx
```

5. Expose the port and nodePort from the AWS cloud and UFW firewall.
* < port >: needs to be exposed for the nginx node.
* < nodeport >: needs to be exposed for all the k8's cluster nodes.

0 comments on commit 94222ad

Please sign in to comment.