Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set up helm release #912

Merged
merged 21 commits into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions .github/workflows/helm-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Release Helm Charts

defaults:
run:
working-directory: deployments/kubernetes/charts/clowder2

on:
push:
branches:
- 'main'

tags:
- 'v*'

pull_request:

release:
types:
- 'created'

env:
MAIN_REPO: clowder-framework/clowder2

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Get dependencies
run: |
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add ncsa https://opensource.ncsa.illinois.edu/charts
helm dep build

- name: Get release info
id: release_info
run: |
version="$(awk '/^version:/ { print $2} ' Chart.yaml)"
changelog="$(sed -e "1,/^### ${version}/d" -e "/^###/,\$d" -e '/^$/d' README.md)"
changelog="${changelog//'%'/'%25'}"
changelog="${changelog//$'\n'/'%0A'}"
changelog="${changelog//$'\r'/'%0D'}"
echo "version=${version}" >> $GITHUB_ENV
echo "changelog=${changelog}" >> $GITHUB_ENV
echo "version: ${version}"
echo "changelog: ${changelog}"

- name: Print Github Info
run: |
echo "github.event_name: ${{ github.event_name }}"
echo "github.repository: ${{ github.repository }}"
echo "github.ref: ${{ github.ref }}"

- name: run helm template
run: helm template .

- name: Publish to NCSA OpenSource
if: |
github.event_name != 'pull_request'
&& github.repository == env.MAIN_REPO
&& startsWith(github.ref, 'refs/tags/')
&& contains(github.ref, 'v2.0.0')
uses: bsord/[email protected]
with:
username: ${{ secrets.HELM_USERNAME }}
password: ${{ secrets.HELM_PASSWORD }}
registry-url: "https://opensource.ncsa.illinois.edu/charts"
chart-folder: "deployments/kubernetes/charts/clowder2"
force: true
4 changes: 2 additions & 2 deletions deployments/kubernetes/charts/clowder2/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ description: >
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.1
version: 1.9.0

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

# List of people that maintain this helm chart.
maintainers:
Expand Down
141 changes: 141 additions & 0 deletions deployments/kubernetes/charts/clowder2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
# Clowder v2 Helm Charts

Helm charts depend on some subcharts, make sure to have them installed if you plan on modifying the helm chart:

```bash
helm repo add bitnami https://charts.bitnami.com/bitnami
helm dep build
```

The chart has some common values; you can overwrite with your own values following below examples:

```yaml
# helm upgrade --namespace clowder2 --values clowder2-software-dev.yaml clowder2 clowder2

hostname: { your hostname. E.g. clowder2.software-dev.ncsa.illinois.edu }

frontend:
image:
repository: clowder/clowder2-frontend
tag: 2.0.0-beta.1
pullPolicy: Always

backend:
image:
repository: clowder/clowder2-backend
tag: 2.0.0-beta.1
pullPolicy: Always

geoserver:
enabled: true
username: { your geoserver username }
password: { your geoserver password }
persistence:
storageClass: { your storage class name }
size: { your geoserver storage size e.g. 8Gi }
ingress:
hostname: { your hostname }

minio:
auth:
rootUser: { your minio username }
rootPassword: { your minio password }
persistence:
storageClass: { your storage class name }
size: { your minio storage size e.g. 20Gi }
ingress:
hostname: { "minio."+ hostname }
apiIngress:
hostname: { "minio-api." + hostname }

rabbitmq:
# login
auth:
username: { your rabbitmq username }
password: { your rabbitmq password }
erlangCookie: { your rabbitmq cookie }
ingress:
hostname: { "rabbitmq." + hostname }
persistence:
storageClass: { your storage class name e.g.csi-cinder-sc-delete }
size: { your rabbitmq storage size e.g. 8Gi }

mongodb:
persistence:
storageClass: { your storage class name e.g. csi-cinder-sc-delete }
size: { your mongodb storage size e.g. 8Gi }

elasticsearch:
master:
persistence:
storageClass: { your storage class name e.g. csi-cinder-sc-delete }
size: { your elasticsearch storage size e.g. 8Gi }
data:
persistence:
storageClass: { your storage class name e.g. csi-cinder-sc-delete }
size: { your elasticsearch storage size e.g. 8Gi }

keycloak:
auth:
adminUser: { your keycloak admin username }
adminPassword: { your keycloak admin password }
ingress:
hostname: { hostname }
postgresql:
auth:
password: { your postgresql password }
postgresPassword: { your postgresql password }
primary:
persistence:
storageClass: { your storage class name e.g. csi-cinder-sc-delete }
size: { your postgresql storage size e.g. 8Gi }

message:
image:
repository: clowder/clowder2-messages
tag: main

heartbeat:
image:
repository: clowder/clowder2-heartbeat
tag: main
```

Now you can install (or upgrade) clowder using:

```bash
helm upgrade --install --namespace clowder2 --create-namespace --values local.yaml clowder2 .
```

## Ingress Controller

You will need an ingress controller. Traefik works well as ingress controller. You can install it with:

```bash
helm install --namespace traefik --create-namespace traefik traefik/traefik
```

If you want to enable the dashboard, you need the following file (dashboard.yaml):

```yaml
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: dashboard
spec:
entryPoints:
- web
routes:
- match: Host(`traefik.clowder2.ncsa.illinois.edu`)
kind: Rule
services:
- name: api@internal
kind: TraefikService
```

and apply it using:

```bash
kubectl -n traefik apply -f dashboard.yaml
```

21 changes: 11 additions & 10 deletions deployments/kubernetes/charts/clowder2/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ minio:
size: 20Gi

# where to store data, can be network storage
#storageClass: nfs-taiga
storageClass: nfs-taiga

service:
type: ClusterIP

Expand All @@ -143,10 +144,10 @@ mongodb:
# storage
persistence:
# storage size for database
#size: 8Gi
size: 8Gi

# pick fast non network storage
#storageClass: csi-cinder-sc-retain
storageClass: csi-cinder-sc-retain

# ----------------------------------------------------------------------
# RABBITMQ
Expand All @@ -171,7 +172,7 @@ rabbitmq:

persistence:
# pick fast storage
#storageClass: csi-cinder-sc-retain
storageClass: csi-cinder-sc-retain

# ----------------------------------------------------------------------
# DEFAULT EXTRACTOR SERVICES
Expand Down Expand Up @@ -220,12 +221,12 @@ elasticsearch:

master:
persistence:
# storageClass: csi-cinder-sc-retain
# size: 8Gi
storageClass: csi-cinder-sc-retain
size: 8Gi
data:
persistence:
# storageClass: csi-cinder-sc-retain
# size: 8Gi
storageClass: csi-cinder-sc-retain
size: 8Gi

# ----------------------------------------------------------------------
# KEYCLOAK
Expand Down Expand Up @@ -254,8 +255,8 @@ keycloak:

primary:
persistence:
# storageClass: csi-cinder-sc-retain
# size: 8Gi
storageClass: csi-cinder-sc-retain
size: 8Gi

# Mount configmap with theme and untar
initContainers:
Expand Down
Loading