Add Dynamo support #1296
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test Helm | |
| on: | |
| pull_request: | |
| paths: | |
| - charts/** | |
| - .github/workflows/test.yaml | |
| jobs: | |
| verify-docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Verify Helm docs are up to date | |
| run: make verify-docs | |
| test-helm-lint: | |
| runs-on: ubuntu-latest | |
| name: Lint Helm Charts | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Helm | |
| uses: azure/setup-helm@v4 | |
| with: | |
| version: v4.1.1 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: 3.9 | |
| - name: Set up chart-testing | |
| uses: helm/chart-testing-action@v2.6.1 | |
| - name: Helm login | |
| run: | | |
| echo -n '${{ secrets.OSC_REGISTRY_ROBOT_OSC_READ_TOKEN }}' | helm registry login docker-registry.osc.edu -u '${{ secrets.OSC_REGISTRY_ROBOT_OSC_READ_USERNAME }}' --password-stdin | |
| - name: Run chart-testing (lint) | |
| run: ct lint --config .github/config/cf.yaml --chart-dirs charts | |
| - name: Run Helm lint | |
| run: | | |
| for chart in $(ct list-changed --config .github/config/cf.yaml); do | |
| echo "Processing $chart..." | |
| helm lint $chart | |
| done | |
| test-helm: | |
| needs: [test-helm-lint] | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| chart: | |
| - osc-common | |
| - database | |
| - webservice | |
| - prometheus | |
| - kubernetes-dashboard-proxy | |
| - kyverno-policies | |
| - paas | |
| - osc-open-webui | |
| - cryosparc | |
| name: Test Helm Chart ${{ matrix.chart }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Helm | |
| uses: azure/setup-helm@v4 | |
| with: | |
| version: v4.1.1 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: 3.9 | |
| - name: Set up chart-testing | |
| uses: helm/chart-testing-action@v2.8.0 | |
| - name: Free Disk Space (Ubuntu) | |
| if: matrix.chart == 'cryosparc' | |
| uses: jlumbroso/free-disk-space@v1.3.1 | |
| with: | |
| tool-cache: false | |
| android: true | |
| dotnet: true | |
| haskell: true | |
| large-packages: true | |
| docker-images: true | |
| swap-storage: true | |
| - name: Create kind cluster | |
| uses: helm/kind-action@v1 | |
| with: | |
| version: v0.31.0 | |
| cluster_name: kind | |
| node_image: kindest/node:v1.31.14@sha256:6f86cf509dbb42767b6e79debc3f2c32e4ee01386f0489b3b2be24b0a55aac2b | |
| config: .github/config/kind.yaml | |
| - name: Login to OSC registry | |
| if: matrix.chart == 'cryosparc' | |
| uses: docker/login-action@v4 | |
| with: | |
| registry: docker-registry.osc.edu | |
| username: ${{ secrets.OSC_REGISTRY_ROBOT_OSC_READ_USERNAME }} | |
| password: ${{ secrets.OSC_REGISTRY_ROBOT_OSC_READ_TOKEN }} | |
| - name: Helm login | |
| run: | | |
| echo -n '${{ secrets.OSC_REGISTRY_ROBOT_OSC_READ_TOKEN }}' | helm registry login docker-registry.osc.edu -u '${{ secrets.OSC_REGISTRY_ROBOT_OSC_READ_USERNAME }}' --password-stdin | |
| - name: Build and Load images | |
| if: matrix.chart == 'database' || matrix.chart == 'webservice' | |
| run: | | |
| make -f docker-images/mariadb/Makefile build | |
| make -f docker-images/mariadb/Makefile kind-load | |
| make -f docker-images/postgresql/Makefile build | |
| make -f docker-images/postgresql/Makefile kind-load | |
| - name: Build and Load images | |
| if: matrix.chart == 'prometheus' | |
| run: | | |
| make -f docker-images/dcgm-exporter/Makefile build | |
| make -f docker-images/dcgm-exporter/Makefile kind-load | |
| - name: Build and Load images | |
| if: matrix.chart == 'cryosparc' | |
| env: | |
| LICENSE_ID: ${{ secrets.CRYOSPARC_LICENSE_ID }} | |
| run: | | |
| make -f docker-images/cryosparc/Makefile build | |
| make -f docker-images/cryosparc/Makefile kind-load | |
| - name: Label kind nodes | |
| run: | | |
| kubectl label node kind-control-plane node-role.kubernetes.io/test='' | |
| kubectl label node kind-control-plane node-role.kubernetes.io/webservices='' | |
| kubectl label node kind-control-plane node-role.kubernetes.io/infrastructure='' | |
| - name: Set image pull secret | |
| run: | | |
| sed -i 's|OSC-IMAGE-PULL-PASSWORD|${{ secrets.OSC_REGISTRY_ROBOT_READ_TOKEN}}|g' charts/*/ci/*.yaml | |
| sed -i 's|IMAGE-PULL-PASSWORD|${{ secrets.OSC_REGISTRY_ROBOT_WEBSERVICES_READ_TOKEN}}|g' charts/*/ci/*.yaml | |
| - name: Set cryosparc license | |
| if: matrix.chart == 'cryosparc' | |
| run: | | |
| sed -i 's|CRYOSPARC_LICENSE_ID|${{ secrets.CRYOSPARC_LICENSE_ID }}|g' charts/cryosparc/ci/*.yaml | |
| - name: Prometheus Operator crds | |
| run: | | |
| helm install prometheus-operator-crds oci://ghcr.io/prometheus-community/charts/prometheus-operator-crds -n prometheus-operator-crds --create-namespace --version 28.0.1 \ | |
| --wait --timeout 300s | |
| - name: Install Keycloak | |
| run: | | |
| helm repo add bitnami https://charts.bitnami.com/bitnami | |
| helm install keycloak bitnami/keycloak -n keycloak --create-namespace --version 21.2.0 \ | |
| -f .github/config/keycloak-values.yaml \ | |
| --wait --timeout 300s | |
| - name: Install Kyverno | |
| run: | | |
| helm repo add kyverno https://kyverno.github.io/kyverno/ | |
| helm install kyverno kyverno/kyverno -n kyverno --create-namespace -f .github/config/kyverno-values.yaml --version 3.5.3 | |
| timeout 240 /bin/bash -c 'until kubectl get pods -n kyverno -l app.kubernetes.io/component=admission-controller -o jsonpath="{.items[0].status.phase}" | grep Running ; do echo "Waiting for Kyverno" ; sleep 10 ; done' || exit 0 | |
| sleep 60 | |
| - name: Install cert-manager | |
| run: | | |
| helm repo add jetstack https://charts.jetstack.io | |
| helm install cert-manager jetstack/cert-manager -n cert-manager --create-namespace --version v1.18.1 \ | |
| --set crds.enabled=true --wait --timeout 300s | |
| - name: Install keycloak-cr-operator | |
| run: | | |
| helm repo add keycloak-cr-operator https://osc.github.io/keycloak-cr-operator/ | |
| helm install keycloak-cr-operator keycloak-cr-operator/keycloak-cr-operator -n keycloak-cr-operator --create-namespace \ | |
| -f .github/config/keycloak-cr-operator-values.yaml --version v0.0.4 --wait --timeout 300s | |
| - name: Setup Environment | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y munge | |
| sudo -u munge mungekey --verbose --force | |
| sudo systemctl start munge | |
| sudo mkdir -p /etc/slurm | |
| sudo mkdir -p /var/lib/sss/pipes /etc/sssd | |
| sudo mkdir -p /fs/ess | |
| sudo install -d -o 65534 -g 65534 -m 0750 /fs/ess/PAS0710 | |
| sudo mkdir -p /fs/scratch | |
| sudo install -d -o 65534 -g 65534 -m 0750 /fs/scratch/PAS0710 | |
| sudo mkdir -p /users/PAS0710 | |
| sudo install -d -o 65534 -g 65534 -m 0700 /users/PAS0710/cryosciapps | |
| - name: Add namespaces | |
| run: kubectl create namespace ${{ matrix.chart }} | |
| - name: Run chart-testing (install) | |
| run: | | |
| ct install --config .github/config/cf.yaml --charts charts/${{ matrix.chart }} --namespace ${{ matrix.chart }} | |
| - name: Debug failure | |
| if: failure() | |
| run: | | |
| set +e | |
| kubectl describe pod -A | |
| kubectl describe service -A | |
| kubectl describe daemonset -A | |
| - name: Get logs | |
| if: failure() | |
| run: | | |
| set +e | |
| kubectl logs -n kyverno -l app.kubernetes.io/component=admission-controller | |
| kubectl logs -n keycloak -l app.kubernetes.io/instance=keycloak --tail=200 |