Skip to content

Commit 64afb8d

Browse files
authored
set up helm release (#912)
* set up helm release * update GH * syntax * try again * update on part of the action * switch bitnami repo * add readme * use env to replace set output which will be deprecated soon * fix typos * more changes * debugging * enable default so helm template can build correctly on the GH action sever * more defaults * remove release to github part since we are manually release clowder for now * test release * experimenting current folder * point to working directory * hardcode * add condition back * switch to release published * Update helm-release.yaml only keep the release part
1 parent 962010a commit 64afb8d

File tree

4 files changed

+215
-12
lines changed

4 files changed

+215
-12
lines changed
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Release Helm Charts
2+
3+
defaults:
4+
run:
5+
working-directory: deployments/kubernetes/charts/clowder2
6+
7+
on:
8+
release:
9+
types: [published]
10+
11+
env:
12+
MAIN_REPO: clowder-framework/clowder2
13+
14+
jobs:
15+
release:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v2
20+
with:
21+
fetch-depth: 0
22+
23+
- name: Get dependencies
24+
run: |
25+
helm repo add bitnami https://charts.bitnami.com/bitnami
26+
helm repo add ncsa https://opensource.ncsa.illinois.edu/charts
27+
helm dep build
28+
29+
- name: Get release info
30+
id: release_info
31+
run: |
32+
version="$(awk '/^version:/ { print $2} ' Chart.yaml)"
33+
changelog="$(sed -e "1,/^### ${version}/d" -e "/^###/,\$d" -e '/^$/d' README.md)"
34+
changelog="${changelog//'%'/'%25'}"
35+
changelog="${changelog//$'\n'/'%0A'}"
36+
changelog="${changelog//$'\r'/'%0D'}"
37+
echo "version=${version}" >> $GITHUB_ENV
38+
echo "changelog=${changelog}" >> $GITHUB_ENV
39+
echo "version: ${version}"
40+
echo "changelog: ${changelog}"
41+
42+
- name: Print Github Info
43+
run: |
44+
echo "github.event_name: ${{ github.event_name }}"
45+
echo "github.repository: ${{ github.repository }}"
46+
echo "github.ref: ${{ github.ref }}"
47+
48+
- name: run helm template
49+
run: helm template .
50+
51+
- name: Publish to NCSA OpenSource
52+
if: |
53+
github.event_name != 'pull_request'
54+
&& github.repository == env.MAIN_REPO
55+
uses: bsord/[email protected]
56+
with:
57+
username: ${{ secrets.HELM_USERNAME }}
58+
password: ${{ secrets.HELM_PASSWORD }}
59+
registry-url: "https://opensource.ncsa.illinois.edu/charts"
60+
chart-folder: "deployments/kubernetes/charts/clowder2"
61+
force: true

deployments/kubernetes/charts/clowder2/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ description: >
1313
# This is the chart version. This version number should be incremented each time you make changes
1414
# to the chart and its templates, including the app version.
1515
# Versions are expected to follow Semantic Versioning (https://semver.org/)
16-
version: 0.1.1
16+
version: 1.9.0
1717

1818
# This is the version number of the application being deployed. This version number should be
1919
# incremented each time you make changes to the application. Versions are not expected to
2020
# follow Semantic Versioning. They should reflect the version the application is using.
2121
# It is recommended to use it with quotes.
22-
appVersion: "main"
22+
appVersion: "v2.0.0-beta.1"
2323

2424
# List of people that maintain this helm chart.
2525
maintainers:
Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
# Clowder v2 Helm Charts
2+
3+
Helm charts depend on some subcharts, make sure to have them installed if you plan on modifying the helm chart:
4+
5+
```bash
6+
helm repo add bitnami https://charts.bitnami.com/bitnami
7+
helm dep build
8+
```
9+
10+
The chart has some common values; you can overwrite with your own values following below examples:
11+
12+
```yaml
13+
# helm upgrade --namespace clowder2 --values clowder2-software-dev.yaml clowder2 clowder2
14+
15+
hostname: { your hostname. E.g. clowder2.software-dev.ncsa.illinois.edu }
16+
17+
frontend:
18+
image:
19+
repository: clowder/clowder2-frontend
20+
tag: 2.0.0-beta.1
21+
pullPolicy: Always
22+
23+
backend:
24+
image:
25+
repository: clowder/clowder2-backend
26+
tag: 2.0.0-beta.1
27+
pullPolicy: Always
28+
29+
geoserver:
30+
enabled: true
31+
username: { your geoserver username }
32+
password: { your geoserver password }
33+
persistence:
34+
storageClass: { your storage class name }
35+
size: { your geoserver storage size e.g. 8Gi }
36+
ingress:
37+
hostname: { your hostname }
38+
39+
minio:
40+
auth:
41+
rootUser: { your minio username }
42+
rootPassword: { your minio password }
43+
persistence:
44+
storageClass: { your storage class name }
45+
size: { your minio storage size e.g. 20Gi }
46+
ingress:
47+
hostname: { "minio."+ hostname }
48+
apiIngress:
49+
hostname: { "minio-api." + hostname }
50+
51+
rabbitmq:
52+
# login
53+
auth:
54+
username: { your rabbitmq username }
55+
password: { your rabbitmq password }
56+
erlangCookie: { your rabbitmq cookie }
57+
ingress:
58+
hostname: { "rabbitmq." + hostname }
59+
persistence:
60+
storageClass: { your storage class name e.g.csi-cinder-sc-delete }
61+
size: { your rabbitmq storage size e.g. 8Gi }
62+
63+
mongodb:
64+
persistence:
65+
storageClass: { your storage class name e.g. csi-cinder-sc-delete }
66+
size: { your mongodb storage size e.g. 8Gi }
67+
68+
elasticsearch:
69+
master:
70+
persistence:
71+
storageClass: { your storage class name e.g. csi-cinder-sc-delete }
72+
size: { your elasticsearch storage size e.g. 8Gi }
73+
data:
74+
persistence:
75+
storageClass: { your storage class name e.g. csi-cinder-sc-delete }
76+
size: { your elasticsearch storage size e.g. 8Gi }
77+
78+
keycloak:
79+
auth:
80+
adminUser: { your keycloak admin username }
81+
adminPassword: { your keycloak admin password }
82+
ingress:
83+
hostname: { hostname }
84+
postgresql:
85+
auth:
86+
password: { your postgresql password }
87+
postgresPassword: { your postgresql password }
88+
primary:
89+
persistence:
90+
storageClass: { your storage class name e.g. csi-cinder-sc-delete }
91+
size: { your postgresql storage size e.g. 8Gi }
92+
93+
message:
94+
image:
95+
repository: clowder/clowder2-messages
96+
tag: main
97+
98+
heartbeat:
99+
image:
100+
repository: clowder/clowder2-heartbeat
101+
tag: main
102+
```
103+
104+
Now you can install (or upgrade) clowder using:
105+
106+
```bash
107+
helm upgrade --install --namespace clowder2 --create-namespace --values local.yaml clowder2 .
108+
```
109+
110+
## Ingress Controller
111+
112+
You will need an ingress controller. Traefik works well as ingress controller. You can install it with:
113+
114+
```bash
115+
helm install --namespace traefik --create-namespace traefik traefik/traefik
116+
```
117+
118+
If you want to enable the dashboard, you need the following file (dashboard.yaml):
119+
120+
```yaml
121+
apiVersion: traefik.containo.us/v1alpha1
122+
kind: IngressRoute
123+
metadata:
124+
name: dashboard
125+
spec:
126+
entryPoints:
127+
- web
128+
routes:
129+
- match: Host(`traefik.clowder2.ncsa.illinois.edu`)
130+
kind: Rule
131+
services:
132+
- name: api@internal
133+
kind: TraefikService
134+
```
135+
136+
and apply it using:
137+
138+
```bash
139+
kubectl -n traefik apply -f dashboard.yaml
140+
```
141+

deployments/kubernetes/charts/clowder2/values.yaml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,8 @@ minio:
122122
size: 20Gi
123123

124124
# where to store data, can be network storage
125-
#storageClass: nfs-taiga
125+
storageClass: nfs-taiga
126+
126127
service:
127128
type: ClusterIP
128129

@@ -143,10 +144,10 @@ mongodb:
143144
# storage
144145
persistence:
145146
# storage size for database
146-
#size: 8Gi
147+
size: 8Gi
147148

148149
# pick fast non network storage
149-
#storageClass: csi-cinder-sc-retain
150+
storageClass: csi-cinder-sc-retain
150151

151152
# ----------------------------------------------------------------------
152153
# RABBITMQ
@@ -171,7 +172,7 @@ rabbitmq:
171172

172173
persistence:
173174
# pick fast storage
174-
#storageClass: csi-cinder-sc-retain
175+
storageClass: csi-cinder-sc-retain
175176

176177
# ----------------------------------------------------------------------
177178
# DEFAULT EXTRACTOR SERVICES
@@ -220,12 +221,12 @@ elasticsearch:
220221

221222
master:
222223
persistence:
223-
# storageClass: csi-cinder-sc-retain
224-
# size: 8Gi
224+
storageClass: csi-cinder-sc-retain
225+
size: 8Gi
225226
data:
226227
persistence:
227-
# storageClass: csi-cinder-sc-retain
228-
# size: 8Gi
228+
storageClass: csi-cinder-sc-retain
229+
size: 8Gi
229230

230231
# ----------------------------------------------------------------------
231232
# KEYCLOAK
@@ -254,8 +255,8 @@ keycloak:
254255

255256
primary:
256257
persistence:
257-
# storageClass: csi-cinder-sc-retain
258-
# size: 8Gi
258+
storageClass: csi-cinder-sc-retain
259+
size: 8Gi
259260

260261
# Mount configmap with theme and untar
261262
initContainers:

0 commit comments

Comments
 (0)