Skip to content

Commit b2077a5

Browse files
authored
Merge pull request #324 from Accenture/319-test-and-publish-helm-chart
319 - test and push helm charts to github pages
2 parents 2edb20f + 6d61417 commit b2077a5

File tree

27 files changed

+229
-66
lines changed

27 files changed

+229
-66
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Lint and Test Charts
2+
3+
on: pull_request
4+
5+
jobs:
6+
lint-test:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout
10+
uses: actions/checkout@v2
11+
12+
- name: Fetch history
13+
run: git fetch --prune --unshallow
14+
15+
- name: lint helm charts
16+
id: lint_helm
17+
uses: helm/[email protected]
18+
with:
19+
command: lint
20+
21+
- name: Create kind cluster
22+
uses: helm/[email protected]
23+
# Only build a kind cluster if there are chart changes to test.
24+
if: steps.lint_helm.outputs.changed == 'true'
25+
26+
- name: install and test helm charts
27+
uses: helm/[email protected]
28+
with:
29+
command: install
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Release Helm Charts
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v2
14+
with:
15+
fetch-depth: 0
16+
17+
- name: Configure Git
18+
run: |
19+
git config user.name "$GITHUB_ACTOR"
20+
git config user.email "[email protected]"
21+
- name: Run chart-releaser
22+
uses: helm/[email protected]
23+
env:
24+
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
25+
with:
26+
charts_dir: deployment/helm

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

ct.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# See https://github.com/helm/chart-testing#configuration
2+
remote: origin
3+
chart-dirs:
4+
- deployment/helm
5+
debug: true

deployment/README.md

Lines changed: 21 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +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 are stored in [./helm2](./helm2) and [./helm3](./helm3) directory, which 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 helm2
17-
# dry run to verify that everything is ok
18-
helm install --name=rig reactive-interaction-gateway --dry-run
19-
# install
20-
helm install --name=rig reactive-interaction-gateway
20+
kubectl apply -f kubectl/rig.yaml
2121
```
2222

23-
### Version 3
24-
25-
```bash
26-
cd helm3
27-
# dry run to verify that everything is ok
28-
helm install rig reactive-interaction-gateway --dry-run
29-
# install
30-
helm install rig reactive-interaction-gateway
31-
```
23+
## Some Additional information
3224

33-
## Communication
25+
### Communication
3426

3527
Both `kubectl` and `helm` deploy bunch of Kubernetes resources:
3628

@@ -41,26 +33,25 @@ Both `kubectl` and `helm` deploy bunch of Kubernetes resources:
4133
To allow external communication (outside of your cluster) do:
4234

4335
```bash
44-
# both helm versions
45-
helm upgrade --set service.type=LoadBalancer rig reactive-interaction-gateway
36+
helm upgrade --set service.type=LoadBalancer rig accenture/reactive-interaction-gateway
4637
# for kubectl update kubectl/rig.yaml to use a service of type LoadBalancer instead of ClusterIP
4738
```
4839

49-
## Scaling
40+
### Scaling
5041

5142
Scale the deployment and create multiple pods
5243

5344
```bash
54-
helm upgrade --set service.type=LoadBalancer --set replicaCount=<replicas> rig reactive-interaction-gateway
45+
helm upgrade --set replicaCount=<replicas> rig accenture/reactive-interaction-gateway
5546
# or
5647
kubectl scale deployment/<deployment_name> --replicas <replicas>
5748
```
5849

5950
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.
6051

61-
## Configuration
52+
### Configuration
6253

63-
### Node host
54+
#### Node host
6455

6556
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.
6657

@@ -73,13 +64,13 @@ We are using the pod IP with:
7364
fieldPath: status.podIP
7465
```
7566
76-
### Node cookie
67+
#### Node cookie
7768
7869
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`.
7970

80-
### Additional configuration
71+
#### Additional configuration
8172

82-
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).
73+
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).
8374

8475
## Cleanup
8576

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
apiVersion: v1
2+
name: reactive-interaction-gateway-helm-v2
3+
description: A Helm v2 chart for Kubernetes
4+
home: https://github.com/Accenture/reactive-interaction-gateway
5+
icon: https://github.com/Accenture/reactive-interaction-gateway/blob/master/logo/Reactive-Interaction-Gateway-logo-cropped.png
6+
7+
# This is the chart version. This version number should be incremented each time you make changes
8+
# to the chart and its templates, including the app version.
9+
version: 1.0.1
10+
11+
# This is the version number of the application being deployed. This version number should be
12+
# incremented each time you make changes to the application.
13+
appVersion: 3.0.0-alpha.1
14+
15+
maintainers:
16+
- name: kevinbader
17+
url: https://github.com/kevinbader
18+
- name: mmacai
19+
url: https://github.com/mmacai
20+
- 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 | `[]` | |

0 commit comments

Comments
 (0)