Skip to content

Commit 91bc2b1

Browse files
committed
improve helm documentation
1 parent 40b8f48 commit 91bc2b1

File tree

10 files changed

+132
-41
lines changed

10 files changed

+132
-41
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2323
- Change above affects also `"response_from": "kafka"` proxy functionality. RIG will forward to clients only Kafka body, no headers. This means, when using binary mode, clients receive only the data part, no CloudEvents context attributes.
2424
- Changed `response_from` handler to expect a message in binary format, **NOT** a cloud event (`kafka` and `http_async`). [#321](https://github.com/Accenture/reactive-interaction-gateway/pull/321)
2525
- Updated Helm v2 template, kubectl yaml file and instructions in the `deployment` folder [#288](https://github.com/Accenture/reactive-interaction-gateway/issues/288)
26+
- Publish Helm Chart to Github pages. With this change, we can simply install the chart using
27+
28+
```shell
29+
helm repo add accenture https://accenture.github.io/reactive-interaction-gateway
30+
helm install rig accenture/reactive-interaction-gateway
31+
```
32+
33+
More information, follow the [deployment Readme](./deployment/README.md). [#319](https://github.com/Accenture/reactive-interaction-gateway/issues/319)
2634

2735
### Fixed
2836

deployment/README.md

Lines changed: 22 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,28 @@
11
# Running RIG on Kubernetes
22

3-
## Kubectl
3+
The easiest way to deploy RIG is using Helm:
44

5-
```bash
6-
kubectl apply -f kubectl/rig.yaml
5+
```shell
6+
helm repo add accenture https://accenture.github.io/reactive-interaction-gateway
7+
# Helm v3
8+
helm install rig accenture/reactive-interaction-gateway
9+
# Helm v2
10+
helm install --name=rig accenture/reactive-interaction-gateway-helm-v2
711
```
812

9-
## Helm
13+
Check out the [Helm v2 README](helm/reactive-interaction-gateway-helm-v2/README.md) or [Helm v3 README](./helm/reactive-interaction-gateway/README.md) and [Operator's Guide](https://accenture.github.io/reactive-interaction-gateway/docs/rig-ops-guide.html) for more information on configuring RIG.
1014

11-
The Helm Charts in [./helm/reactive-interaction-gateway-helm-v2](./helm/reactive-interaction-gateway-helm-v2) and [./helm/reactive-interaction-gateway](./helm/reactive-interaction-gateway) are essentially the same but only use a different `apiVersion` in the `Chart.yaml`.
15+
## Deploy with kubectl
1216

13-
### Version 2
17+
> This deployment is not recommended as lots of configurations is hard coded
1418
1519
```bash
16-
cd helm
17-
# install
18-
helm install --name=rig reactive-interaction-gateway-helm-v2
20+
kubectl apply -f kubectl/rig.yaml
1921
```
2022

21-
### Version 3
23+
## Some Additional information
2224

23-
```bash
24-
cd helm
25-
# dry run to verify that everything is ok
26-
helm install rig reactive-interaction-gateway --dry-run
27-
# install
28-
helm install rig reactive-interaction-gateway
29-
```
30-
31-
## Communication
25+
### Communication
3226

3327
Both `kubectl` and `helm` deploy bunch of Kubernetes resources:
3428

@@ -40,25 +34,26 @@ To allow external communication (outside of your cluster) do:
4034

4135
```bash
4236
# both helm versions
43-
helm upgrade --set service.type=LoadBalancer rig reactive-interaction-gateway
37+
helm upgrade --set service.type=LoadBalancer rig accenture/reactive-interaction-gateway
4438
# for kubectl update kubectl/rig.yaml to use a service of type LoadBalancer instead of ClusterIP
4539
```
4640

47-
## Scaling
41+
### Scaling
4842

4943
Scale the deployment and create multiple pods
5044

5145
```bash
52-
helm upgrade --set service.type=LoadBalancer --set replicaCount=<replicas> rig reactive-interaction-gateway
46+
# both helm versions
47+
helm upgrade --set service.type=LoadBalancer --set replicaCount=<replicas> rig accenture/reactive-interaction-gateway
5348
# or
5449
kubectl scale deployment/<deployment_name> --replicas <replicas>
5550
```
5651

5752
You can also inspect the logs of the pods with `kubectl logs <pod_name>` to see how they automatically re-balance Kafka consumers (if you are using Kafka) and adapt Proxy APIs from other nodes.
5853

59-
## Configuration
54+
### Configuration
6055

61-
### Node host
56+
#### Node host
6257

6358
Every node in cluster needs to be discoverable by other nodes. For that Elixir/Erlang uses so called `long name` or `short name`. We are using `long name` which is formed in the following way `app_name@node_host`. `app_name` is in our case set to `rig` and `node_host` is taken from environment variable `NODE_HOST`. This can be either IP or container alias or whatever that is routable in network by other nodes.
6459

@@ -71,13 +66,13 @@ We are using the pod IP with:
7166
fieldPath: status.podIP
7267
```
7368
74-
### Node cookie
69+
#### Node cookie
7570
7671
Nodes in Erlang cluster use cookies as a form of authorization/authentication between them. Only nodes with the same cookie can communicate together. Ideally, it is some generated hash, that's why we recommend adapting `NODE_COOKIE` environment variable in the `values.yaml`.
7772

78-
### Additional configuration
73+
#### Additional configuration
7974

80-
You can configure bunch of environment variables, please check the [Operator's Guide](https://accenture.github.io/reactive-interaction-gateway/docs/rig-ops-guide.html).
75+
You can configure bunch of environment variables, please check the [Helm v2 README](helm/reactive-interaction-gateway-helm-v2/README.md) or [Helm v3 README](./helm/reactive-interaction-gateway/README.md) and [Operator's Guide](https://accenture.github.io/reactive-interaction-gateway/docs/rig-ops-guide.html).
8176

8277
## Cleanup
8378

deployment/helm/reactive-interaction-gateway-helm-v2/Chart.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v1
2-
name: reactive-interaction-gateway
3-
description: A Helm chart for Kubernetes
2+
name: reactive-interaction-gateway-helm-v2
3+
description: A Helm v2 chart for Kubernetes
44
home: https://github.com/Accenture/reactive-interaction-gateway
55
icon: https://github.com/Accenture/reactive-interaction-gateway/blob/master/logo/Reactive-Interaction-Gateway-logo-cropped.png
66

@@ -14,5 +14,8 @@ appVersion: 3.0.0-alpha.1
1414

1515
maintainers:
1616
- name: kevinbader
17+
url: https://github.com/kevinbader
1718
- name: mmacai
19+
url: https://github.com/mmacai
1820
- name: Knappek
21+
url: https://github.com/Knappek
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# reactive-interaction-gateway-helm-v2
2+
3+
![Version: 1.0.1](https://img.shields.io/badge/Version-1.0.1-informational?style=flat-square) ![AppVersion: 3.0.0-alpha.1](https://img.shields.io/badge/AppVersion-3.0.0-alpha.1-informational?style=flat-square)
4+
5+
A Helm v2 chart for Kubernetes
6+
7+
**Homepage:** <https://github.com/Accenture/reactive-interaction-gateway>
8+
9+
## Maintainers
10+
11+
| Name | Email | Url |
12+
| ---- | ------ | --- |
13+
| kevinbader | | https://github.com/kevinbader |
14+
| mmacai | | https://github.com/mmacai |
15+
| Knappek | | https://github.com/Knappek |
16+
17+
## Values
18+
19+
| Key | Type | Default | Description |
20+
|-----|------|---------|-------------|
21+
| affinity | object | `{}` | |
22+
| deployment.env.API_HTTPS_PORT | int | `4011` | See docs/rig-ops-guide.md |
23+
| deployment.env.API_HTTP_PORT | int | `4010` | See docs/rig-ops-guide.md |
24+
| deployment.env.DISCOVERY_TYPE | string | `"dns"` | See docs/rig-ops-guide.md |
25+
| deployment.env.INBOUND_HTTPS_PORT | int | `4001` | See docs/rig-ops-guide.md |
26+
| deployment.env.INBOUND_PORT | int | `4000` | See docs/rig-ops-guide.md |
27+
| deployment.env.LOG_LEVEL | string | `"warn"` | See docs/rig-ops-guide.md |
28+
| deployment.env.NODE_COOKIE | string | `"magiccookie"` | See docs/rig-ops-guide.md |
29+
| image.pullPolicy | string | `"IfNotPresent"` | |
30+
| image.repository | string | `"accenture/reactive-interaction-gateway"` | |
31+
| nodeSelector | object | `{}` | |
32+
| replicaCount | int | `1` | |
33+
| resources | object | `{}` | |
34+
| service.type | string | `"ClusterIP"` | |
35+
| tolerations | list | `[]` | |

deployment/helm/reactive-interaction-gateway-helm-v2/values.yaml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,14 @@ service:
1616

1717
deployment:
1818
env:
19-
## Proxy ports
19+
# Proxy ports
20+
# deployment.env.INBOUND_PORT -- See docs/rig-ops-guide.md
2021
INBOUND_PORT: 4000
22+
# deployment.env.INBOUND_HTTPS_PORT -- See docs/rig-ops-guide.md
2123
INBOUND_HTTPS_PORT: 4001
22-
## Internal HTTP API ports
24+
# deployment.env.API_HTTP_PORT -- See docs/rig-ops-guide.md
2325
API_HTTP_PORT: 4010
26+
# deployment.env.API_HTTPS_PORT -- See docs/rig-ops-guide.md
2427
API_HTTPS_PORT: 4011
2528

2629
## Hostname for HTTP endpoints
@@ -35,10 +38,11 @@ deployment:
3538
# CORS: *
3639

3740
## Discovery
41+
# deployment.env.DISCOVERY_TYPE -- See docs/rig-ops-guide.md
3842
DISCOVERY_TYPE: dns
3943
## DNS_NAME is set dynamically
4044
## NODE_HOST is set dynamically to PodIP in "templates/deployment.yaml"
41-
## Change magiccookie to some individual hash
45+
# deployment.env.NODE_COOKIE -- See docs/rig-ops-guide.md
4246
NODE_COOKIE: magiccookie
4347

4448

@@ -101,7 +105,8 @@ deployment:
101105
# JWT_SESSION_FIELD: /userId
102106

103107
## Logging
104-
# REQUEST_LOG: console,kafka
108+
## REQUEST_LOG: console,kafka
109+
# deployment.env.LOG_LEVEL -- See docs/rig-ops-guide.md
105110
LOG_LEVEL: warn
106111

107112
## SSE, WS

deployment/helm/reactive-interaction-gateway/Chart.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,8 @@ appVersion: 2.4.0
1414

1515
maintainers:
1616
- name: kevinbader
17+
url: https://github.com/kevinbader
1718
- name: mmacai
19+
url: https://github.com/mmacai
1820
- name: Knappek
21+
url: https://github.com/Knappek
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# reactive-interaction-gateway
2+
3+
![Version: 1.0.1](https://img.shields.io/badge/Version-1.0.1-informational?style=flat-square) ![AppVersion: 2.4.0](https://img.shields.io/badge/AppVersion-2.4.0-informational?style=flat-square)
4+
5+
A Helm chart for Kubernetes
6+
7+
**Homepage:** <https://github.com/Accenture/reactive-interaction-gateway>
8+
9+
## Maintainers
10+
11+
| Name | Email | Url |
12+
| ---- | ------ | --- |
13+
| kevinbader | | https://github.com/kevinbader |
14+
| mmacai | | https://github.com/mmacai |
15+
| Knappek | | https://github.com/Knappek |
16+
17+
## Values
18+
19+
| Key | Type | Default | Description |
20+
|-----|------|---------|-------------|
21+
| affinity | object | `{}` | |
22+
| deployment.env.API_HTTPS_PORT | int | `4011` | See docs/rig-ops-guide.md |
23+
| deployment.env.API_HTTP_PORT | int | `4010` | See docs/rig-ops-guide.md |
24+
| deployment.env.DISCOVERY_TYPE | string | `"dns"` | See docs/rig-ops-guide.md |
25+
| deployment.env.INBOUND_HTTPS_PORT | int | `4001` | See docs/rig-ops-guide.md |
26+
| deployment.env.INBOUND_PORT | int | `4000` | See docs/rig-ops-guide.md |
27+
| deployment.env.LOG_LEVEL | string | `"warn"` | See docs/rig-ops-guide.md |
28+
| deployment.env.NODE_COOKIE | string | `"magiccookie"` | See docs/rig-ops-guide.md |
29+
| image.pullPolicy | string | `"IfNotPresent"` | |
30+
| image.repository | string | `"accenture/reactive-interaction-gateway"` | |
31+
| nodeSelector | object | `{}` | |
32+
| replicaCount | int | `1` | |
33+
| resources | object | `{}` | |
34+
| service.type | string | `"ClusterIP"` | |
35+
| tolerations | list | `[]` | |

deployment/helm/reactive-interaction-gateway/values.yaml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,14 @@ service:
1616

1717
deployment:
1818
env:
19-
## Proxy ports
19+
# Proxy ports
20+
# deployment.env.INBOUND_PORT -- See docs/rig-ops-guide.md
2021
INBOUND_PORT: 4000
22+
# deployment.env.INBOUND_HTTPS_PORT -- See docs/rig-ops-guide.md
2123
INBOUND_HTTPS_PORT: 4001
22-
## Internal HTTP API ports
24+
# deployment.env.API_HTTP_PORT -- See docs/rig-ops-guide.md
2325
API_HTTP_PORT: 4010
26+
# deployment.env.API_HTTPS_PORT -- See docs/rig-ops-guide.md
2427
API_HTTPS_PORT: 4011
2528

2629
## Hostname for HTTP endpoints
@@ -35,10 +38,11 @@ deployment:
3538
# CORS: *
3639

3740
## Discovery
41+
# deployment.env.DISCOVERY_TYPE -- See docs/rig-ops-guide.md
3842
DISCOVERY_TYPE: dns
3943
## DNS_NAME is set dynamically
4044
## NODE_HOST is set dynamically to PodIP in "templates/deployment.yaml"
41-
## Change magiccookie to some individual hash
45+
# deployment.env.NODE_COOKIE -- See docs/rig-ops-guide.md
4246
NODE_COOKIE: magiccookie
4347

4448

@@ -101,7 +105,8 @@ deployment:
101105
# JWT_SESSION_FIELD: /userId
102106

103107
## Logging
104-
# REQUEST_LOG: console,kafka
108+
## REQUEST_LOG: console,kafka
109+
# deployment.env.LOG_LEVEL -- See docs/rig-ops-guide.md
105110
LOG_LEVEL: warn
106111

107112
## SSE, WS

docs/rig-dev-guide.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ To have the project use a newer Elixir version, make sure to change the followin
4444

4545
- Increment `rig` version in the [version](../version) file
4646
- Increment `appVersion` in the [Helm v2 Chart.yaml](../deployment/helm2/reactive-interaction-gateway/Chart.yaml) and [Helm v3 Chart.yaml](../deployment/helm3/reactive-interaction-gateway/Chart.yaml) files
47+
- Update Helm chart README files: install [helm-docs](https://github.com/norwoodj/helm-docs) and run `helm-docs` in the root directory
4748
- Increment image tag in the [Kubernetes rig.yaml](../deployment/kubectl/rig.yaml) file
4849
- In [CHANGELOG.md](../CHANGELOG.md), rename `[Unreleased]` and add a corresponding link to the bottom of the file
4950
- Create a signed Git tag either using `git -s` or by creating a release using the Github UI

docs/scaling.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ Even though it's possible to run RIG anywhere, we recommend to use Kubernetes.
2020
kubectl scale deployment/reactive-interaction-gateway --replicas 3
2121

2222
# Start right away with 3 nodes using Helm template -- (assuming you are in the deployment directory)
23-
# v2
24-
helm install --set replicaCount=3 --name=rig helm2/reactive-interaction-gateway
25-
# v3
26-
helm install --set replicaCount=3 rig helm3/reactive-interaction-gateway
23+
helm repo add accenture https://accenture.github.io/reactive-interaction-gateway
24+
# Helm v3
25+
helm install --set replicaCount=3 rig accenture/reactive-interaction-gateway
26+
# Helm v2
27+
helm install --set replicaCount=3 --name=rig accenture/reactive-interaction-gateway
2728
```

0 commit comments

Comments
 (0)