diff --git a/.github/workflows/packaging.yml b/.github/workflows/packaging.yml index 7436a068..9fe495e6 100644 --- a/.github/workflows/packaging.yml +++ b/.github/workflows/packaging.yml @@ -20,7 +20,7 @@ jobs: name: Package and push from PR runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: persist-credentials: false - uses: cloudve/helm-ci@master @@ -36,7 +36,7 @@ jobs: name: Package and push manual invocation runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: persist-credentials: false - uses: cloudve/helm-ci@master @@ -51,13 +51,20 @@ jobs: needs: [ package-from-pr, package-from-manual ] name: Create a tag and GitHub release for this version. runs-on: ubuntu-latest + env: + GH_TOKEN: ${{ github.token }} if: | always() && contains(needs.*.result, 'success') && !contains(needs.*.result, 'failure') steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.ref }} - name: Tag and release run: | + git config user.name "GitHub Actions Bot" + git config user.email "<>" version=v$(cat galaxy/Chart.yaml | grep ^version: | awk '{print $2}') git tag -a $version -m "Automatic release of $version" git push origin $version diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index bbde0299..db7f47f9 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -34,7 +34,7 @@ jobs: - name: Start k8s locally uses: jupyterhub/action-k3s-helm@v3 with: - k3s-version: v1.25.15+k3s2 # releases: https://github.com/k3s-io/k3s/tags + k3s-version: v1.28.7+k3s1 # releases: https://github.com/k3s-io/k3s/tags metrics-enabled: false traefik-enabled: false - name: Verify function of k8s, kubectl, and helm @@ -64,3 +64,17 @@ jobs: - name: Print workflow handler log run: bash -c "kubectl logs -n galaxy $(kubectl -n galaxy get pods | grep -o '[^ ]*galaxy-workflow[^ ]*')" if: always() + - name: Check appVersion + if: always() + run: | + kubectl get svc -n galaxy + kubectl describe svc -n galaxy galaxy-nginx + appVersion=$(cat galaxy/Chart.yaml | grep ^appVersion: | awk '{print $2}' | tr -d '"') + address=$(kubectl get svc -n galaxy galaxy-nginx -o jsonpath="http://{.spec.clusterIP}:{.spec.ports[0].port}/galaxy/api/version") + echo "Address is $address" + apiVersion=$(curl $address | jq -r '"\(.version_major).\(.version_minor)"') + echo "appVersion: $appVersion" + echo "apiVersion: $apiVersion" + if [ "$appVersion" != "$apiVersion" ]; then + exit 1 + fi diff --git a/README.md b/README.md index f7684f85..fc7d6871 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Galaxy Helm Chart (v4) +# Galaxy Helm Chart (v5) [Galaxy](https://galaxyproject.org/) is a data analysis platform focusing on accessibility, reproducibility, and transparency of primarily bioinformatics @@ -8,7 +8,7 @@ updates, upgrades, and rollbacks. ## Supported software versions -- Kubernetes 1.22+ +- Kubernetes 1.27+ - Helm 3.5+ ## Kubernetes cluster @@ -272,6 +272,8 @@ jobHandlers: failureThreshhold: 3 ``` +# Additional Configurations + ## Extra File Mappings The `extraFileMappings` field can be used to inject files to arbitrary paths in the `nginx` deployment, as well as any of the `job`, `web`, or `workflow` handlers, and the `init` jobs. @@ -393,6 +395,9 @@ wildcard DNS mapping to `*.its.`. To make Interactive Tools work on localhost, you can use `dnsmasq` or similar to handle wildcard DNS mappings for `*.localhost`. +For linux: +Follow the instructions here to configure dnsmasq on Linux: https://superuser.com/a/1718296 + For mac: ```bash $ brew install dnsmasq @@ -420,28 +425,76 @@ The Galaxy application can be horizontally scaled for the web, job, or workflow by setting the desired values of the `webHandlers.replicaCount`, `jobHandlers.replicaCount`, and `workflowHandlers.replicaCount` configuration options. -## Galaxy versions +## Cron jobs + +Two Cron jobs are defined by default. One to clean up Galaxy's database and one to clean up the `tmp` directory. By default, these +jobs run at 02:05 (the database maintenance script) and 02:15 (`tmp` directyory cleanup). Users can +change the times the cron jobs are run by changing the `schedule` field in the `values.yaml` file: + +```yaml +cronJobs: + maintenance: + schedule: "30 6 * * *" # Execute the cron job at 6:30 UTC +``` +or by specifying the `schedule` on the command line when instaling Galaxy: +```bash +# Schedule the maintenance job to run at 06:30 on the first day of each month +helm install galaxy -n galaxy galaxy/galaxy --set cronJobs.maintenance.schedule="30 6 1 * *" +``` +To disable a cron job after Galaxy has been deployed simply set the enabled flag for that job to false: + + +```bash +helm upgrade galaxy -n galaxy galaxy/galaxy --reuse-values --set cronJobs.maintenance.enabled=false +``` -Some changes introduced in the chart sometimes rely on changes in the Galaxy -container image, especially in relation to the Kubernetes runner. This table -keeps track of recommended Chart versions for particular Galaxy versions as -breaking changes are introduced. Otherwise, the Galaxy image and chart should be -independently upgrade-able. In other words, upgrading the Galaxy image from -`21.05` to `21.09` should be a matter of `helm upgrade my-galaxy cloudve/galaxy ---reuse-values --set image.tag=21.09`. +### Run a CronJob manually + +Cron jobs can be invoked manually with tools such as [OpenLens](https://github.com/MuhammedKalkan/OpenLens) +or from the command line with `kubectl` +```bash +kubectl create job --namespace --from cronjob/galaxy-cron-maintenance +``` +This will run the cron job regardless of the `schedule` that has been set. + +**Note:** the name of the cron job will be `{{ .Release.Name }}-cron-` where the `` +is the name (key) used in the `values.yaml` file. + +### CronJob configuration + +The following fields can be specified when defining cron jobs. + +| Name | Definition | Required | +|---|-------------------------------------------------------------------------------------------------------------------------------------------|----------| +| enabled | `true` or `false`. If `false` the cron job will not be run. Default is `true` | **Yes** | +| schedule | When the job will be run. Use tools such as [crontab.guru](https://crontab.guru) for assistance determining the proper schedule string | **Yes** | +| defaultEnv | `true` or `false`. See the `galaxy.podEnvVars` macro in `_helpers.tpl` for the list of variables that will be defined. Default is `false` | No | +| extraEnv | Define extra environment variables that will be available to the job | No | +| securityContext | Specifies a `securityContext` for the job. Typically used to set `runAsUser` | No | +| image | Specify the Docker container used to run the job | No | +| command | The command to run | **Yes** | +| args | Any command line arguments that should be passed to the `command` | No | +| extraFileMappings | Allow arbitrary files to be mounted from config maps | No | + +### Notes + +If specifying the Docker `image` both the `resposity` and `tag` MUST be specified. +```yaml + image: + repository: quay.io/my-organization/my-image + tag: "1.0" +``` +The `extraFileMappings` block is similar to the global `extraFileMappings` except the file will only be mounted for that cron job. +The following fields can be specified for each file. -| Chart version | Galaxy version | Description | -| :------------------ | :--------------- | :-------------- | -| `5.0` | `22.05` | Needs at least container image 22.05 as Galaxy switched from uwsgi to gunicorn | -| `4.0` | `21.05` | Needs [Galaxy PR#11899](https://github.com/galaxyproject/galaxy/pull/11899) for eliminating the CVMFS. If running chart 4.0+ with Galaxy image `21.01` or below, use the CVMFS instead with `--set setupJob.downloadToolConfs.enabled=false --set cvmfs.repositories.cvmfs-gxy-cloud=cloud.galaxyproject.org --set cvmfs.galaxyPersistentVolumeClaims.cloud.storage=1Gi --set cvmfs.galaxyPersistentVolumeClaims.cloud.storageClassName=cvmfs-gxy-cloud --set cvmfs.galaxyPersistentVolumeClaims.cloud.mountPath=/cvmfs/cloud.galaxyproject.org` | +| Name | Definition | Required | +|---|---|----------| +| mode | The file mode (permissions) assigned to the file | No | +| tpl | If set to `true` the file contents will be run through Helm's templating engine. Defaults to `false` | No | +| content | The contents of the file | **Yes** | -## Funding -- _Version 3+_: Galaxy Project, Genomics Virtual Laboratory (GVL) +See the `example` cron job included in the `values.yaml` file for a full example. -- _Version 2_: Genomics Virtual Laboratory (GVL), Galaxy Project, and European - Commission (EC) H2020 Project PhenoMeNal, grant agreement number 654241. -- _Version 1_: European Commission (EC) H2020 Project PhenoMeNal, grant - agreement number 654241. diff --git a/galaxy/Chart.yaml b/galaxy/Chart.yaml index 870874b4..4c9252f5 100644 --- a/galaxy/Chart.yaml +++ b/galaxy/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v2 name: galaxy type: application -version: 5.9.0-anvil.1 -appVersion: "24.0" +version: 5.15.0-anvil.0 +appVersion: "24.1.1" description: Chart for Galaxy, an open, web-based platform for accessible, reproducible, and transparent computational biomedical research. icon: https://galaxyproject.org/images/galaxy-logos/galaxy_project_logo_square.png dependencies: @@ -22,7 +22,7 @@ dependencies: - deploy-s3csi - name: galaxy-cvmfs-csi repository: https://raw.githubusercontent.com/cloudve/helm-charts/master/ - version: 2.2.0 + version: 2.4.0 condition: cvmfs.deploy alias: cvmfs tags: diff --git a/galaxy/disabled/configmap-galaxy.yaml b/galaxy/disabled/configmap-galaxy.yaml new file mode 100644 index 00000000..6f49a14c --- /dev/null +++ b/galaxy/disabled/configmap-galaxy.yaml @@ -0,0 +1,9 @@ +apiVersion: v1 +metadata: + name: {{ .Release.Name }}-galaxy-config + labels: + {{- include "galaxy.labels" $ | nindent 4 }} +kind: ConfigMap +data: + galaxy.yml: | + {{- .Values.galaxy | toYaml | nindent 4 }} diff --git a/galaxy/files/configs/tool_conf.xml b/galaxy/files/configs/tool_conf.xml index 6870427f..381ab817 100644 --- a/galaxy/files/configs/tool_conf.xml +++ b/galaxy/files/configs/tool_conf.xml @@ -38,6 +38,10 @@ +
+ + +