From 0f8bd095a8e320b84dc9ede3330c5afea98b1caa Mon Sep 17 00:00:00 2001 From: Keith Suderman Date: Wed, 28 Feb 2024 14:49:22 -0600 Subject: [PATCH 1/6] Remove nfs provisioner and add Galaxy chart. --- galaxykubeman/Chart.yaml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/galaxykubeman/Chart.yaml b/galaxykubeman/Chart.yaml index 961d5a6..0d68d56 100644 --- a/galaxykubeman/Chart.yaml +++ b/galaxykubeman/Chart.yaml @@ -6,10 +6,10 @@ name: galaxykubeman version: 2.9.0 icon: https://galaxyproject.org/images/galaxy-logos/galaxy_project_logo_square.png dependencies: - - name: nfs-server-provisioner - repository: https://kubernetes-sigs.github.io/nfs-ganesha-server-and-external-provisioner/ - version: 1.5.0 - alias: nfs +# - name: nfs-server-provisioner +# repository: https://kubernetes-sigs.github.io/nfs-ganesha-server-and-external-provisioner/ +# version: 1.5.0 +# alias: nfs - name: galaxy-cvmfs-csi repository: https://raw.githubusercontent.com/cloudve/helm-charts/master/ version: 2.2.0 @@ -24,3 +24,6 @@ dependencies: alias: rabbitmq tags: - deploy-rabbitmq + - name: galaxy + repository: https://raw.githubusercontent.com/cloudve/helm-charts/anvil/ + version: 5.7.6-anvil.1 From 5cd3174f150de2e30b530c7fd3ec62cc526fa978 Mon Sep 17 00:00:00 2001 From: Keith Suderman Date: Thu, 4 Apr 2024 08:49:13 -0400 Subject: [PATCH 2/6] Add job_resource_params_conf.xml --- galaxykubeman/Chart.yaml | 8 +++--- galaxykubeman/values.yaml | 60 ++++++++++++++++++++++++++++++++++----- 2 files changed, 57 insertions(+), 11 deletions(-) diff --git a/galaxykubeman/Chart.yaml b/galaxykubeman/Chart.yaml index 0d68d56..1c4d6ca 100644 --- a/galaxykubeman/Chart.yaml +++ b/galaxykubeman/Chart.yaml @@ -6,10 +6,10 @@ name: galaxykubeman version: 2.9.0 icon: https://galaxyproject.org/images/galaxy-logos/galaxy_project_logo_square.png dependencies: -# - name: nfs-server-provisioner -# repository: https://kubernetes-sigs.github.io/nfs-ganesha-server-and-external-provisioner/ -# version: 1.5.0 -# alias: nfs + - name: nfs-server-provisioner + repository: https://kubernetes-sigs.github.io/nfs-ganesha-server-and-external-provisioner/ + version: 1.5.0 + alias: nfs - name: galaxy-cvmfs-csi repository: https://raw.githubusercontent.com/cloudve/helm-charts/master/ version: 2.2.0 diff --git a/galaxykubeman/values.yaml b/galaxykubeman/values.yaml index d26cf31..8b30163 100644 --- a/galaxykubeman/values.yaml +++ b/galaxykubeman/values.yaml @@ -7,6 +7,14 @@ configs: {} secrets: {} # db-password: changeme +# The following values are used to configure the resources that can be allocated +# to tools. These values should be passed in by Leo. +# https://github.com/DataBiosphere/leonardo/blob/60fb6ba708a40200b3d33ea9cec7e75e1e81f328/http/src/main/scala/org/broadinstitute/dsde/workbench/leonardo/util/BuildHelmChartValues.scala#L97 +resources: + cores: 28 + mem: 100 + walltime: 744 + restore: persistence: nfs: @@ -72,6 +80,19 @@ galaxy: chart: repository: https://raw.githubusercontent.com/cloudve/helm-charts/anvil/ jobs: + rules: + tpv_rules_local.yml: + tools: + default: + rules: + - id: resource_params_defined + if: | + param_dict = job.get_param_values(app) + param_dict.get('__job_resource', {}).get('__job_resource__select') == 'yes' + cores: int(job.get_param_values(app)['__job_resource']['processors']) + mem: int(job.get_param_values(app)['__job_resource']['mem']) + params: + walltime: "{int(job.get_param_values(app)['__job_resource']['time'])}" priorityClass: existingClass: "{{ .Release.Namespace }}-priority-class" maxRequests: @@ -275,14 +296,25 @@ galaxy: logo_src: /static/images/galaxy_project_logo_white_square.png # The custom brand image source logo_src_secondary: /static/images/anvilwhite.png + # Enable resource parameter configuration + job_resource_params_file: "/galaxy/server/config/job_resource_params_conf.xml" job_conf.yml: - execution: - environments: - tpv_dispatcher: - tpv_config_files: - - https://raw.githubusercontent.com/galaxyproject/tpv-shared-database/main/tools.yml - - lib/galaxy/jobs/rules/tpv_rules_local.yml - - https://raw.githubusercontent.com/galaxyproject/galaxykubeman-helm/anvil/tool-configs.yaml + resources: + default: default + groups: + default: [ processors, mem, time ] + tools: + - class: local + resources: default + - class: requires_galaxy + resources: default + execution: + environments: + tpv_dispatcher: + tpv_config_files: + - https://raw.githubusercontent.com/galaxyproject/tpv-shared-database/main/tools.yml + - lib/galaxy/jobs/rules/tpv_rules_local.yml + - https://raw.githubusercontent.com/galaxyproject/galaxykubeman-helm/anvil/tool-configs.yaml file_sources_conf.yml: - doc: "{{ .Values.terra.launch.workspace }}" id: "{{ .Values.terra.launch.workspace }}" @@ -399,6 +431,20 @@ galaxy: memory: 8G ephemeral-storage: 20Gi extraFileMappings: + /galaxy/server/config/job_resource_params_conf.xml: + useSecret: false + applyToJob: true + applyToWeb: true + applyToSetupJob: false + applyToWorkflow: true + applyToNginx: false + tpl: true + content: | + + + + + /galaxy/server/static/welcome.html: applyToWeb: true applyToNginx: true From 7102bf31060743a7b68f5e23d2e3ee11cf9ab65a Mon Sep 17 00:00:00 2001 From: Keith Suderman Date: Tue, 16 Apr 2024 12:26:38 -0400 Subject: [PATCH 3/6] Add a config map for the job_resource_params_conf.xml file --- .../config-job-resource-params-conf.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 galaxykubeman/templates/config-job-resource-params-conf.yaml diff --git a/galaxykubeman/templates/config-job-resource-params-conf.yaml b/galaxykubeman/templates/config-job-resource-params-conf.yaml new file mode 100644 index 0000000..9f63a8e --- /dev/null +++ b/galaxykubeman/templates/config-job-resource-params-conf.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ .Release.Name }}-galaxy-resource-params-conf + labels: + app.kubernetes.io/name: {{ include "galaxykubeman.name" . }} + helm.sh/chart: {{ include "galaxykubeman.chart" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: {{ .Release.Service }} +data: + job_resource_params_conf.xml: | + + + + + \ No newline at end of file From 09680268dc47ef7aec01f615b47fc48a7c8b037a Mon Sep 17 00:00:00 2001 From: Keith Suderman Date: Tue, 16 Apr 2024 12:27:13 -0400 Subject: [PATCH 4/6] Mount the config map using extraVolumes and extraVolumeMounts from the Galaxy chart --- galaxykubeman/values.yaml | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/galaxykubeman/values.yaml b/galaxykubeman/values.yaml index 8b30163..18f2bcb 100644 --- a/galaxykubeman/values.yaml +++ b/galaxykubeman/values.yaml @@ -10,7 +10,7 @@ secrets: {} # The following values are used to configure the resources that can be allocated # to tools. These values should be passed in by Leo. # https://github.com/DataBiosphere/leonardo/blob/60fb6ba708a40200b3d33ea9cec7e75e1e81f328/http/src/main/scala/org/broadinstitute/dsde/workbench/leonardo/util/BuildHelmChartValues.scala#L97 -resources: +limits: cores: 28 mem: 100 walltime: 744 @@ -430,21 +430,15 @@ galaxy: cpu: 2 memory: 8G ephemeral-storage: 20Gi + extraVolumes: + - name: job-resource-params-conf + configMap: + name: "{{ .Release.Name }}-resource-params-conf" + extraVolumeMounts: + - name: job-resource-params-conf + mountPath: /galaxy/server/config/job_resource_params_conf.xml + subPath: job_resource_params_conf.xml extraFileMappings: - /galaxy/server/config/job_resource_params_conf.xml: - useSecret: false - applyToJob: true - applyToWeb: true - applyToSetupJob: false - applyToWorkflow: true - applyToNginx: false - tpl: true - content: | - - - - - /galaxy/server/static/welcome.html: applyToWeb: true applyToNginx: true From 3ee3658c0f112d36027881aa6ee761dfe8eae771 Mon Sep 17 00:00:00 2001 From: Keith Suderman Date: Tue, 16 Apr 2024 15:22:35 -0400 Subject: [PATCH 5/6] Update galaxykubeman/values.yaml Use the shortened URL for the TPV databaes. Co-authored-by: Nuwan Goonasekera <2070605+nuwang@users.noreply.github.com> --- galaxykubeman/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/galaxykubeman/values.yaml b/galaxykubeman/values.yaml index 18f2bcb..b74f2fb 100644 --- a/galaxykubeman/values.yaml +++ b/galaxykubeman/values.yaml @@ -312,7 +312,7 @@ galaxy: environments: tpv_dispatcher: tpv_config_files: - - https://raw.githubusercontent.com/galaxyproject/tpv-shared-database/main/tools.yml + - https://gxy.io/tpv/db.yml - lib/galaxy/jobs/rules/tpv_rules_local.yml - https://raw.githubusercontent.com/galaxyproject/galaxykubeman-helm/anvil/tool-configs.yaml file_sources_conf.yml: From cf21fb3754f608a6ac4550ce8270b9875f1ac085 Mon Sep 17 00:00:00 2001 From: Keith Suderman Date: Tue, 16 Apr 2024 15:28:24 -0400 Subject: [PATCH 6/6] Remove galaxy dependency --- galaxykubeman/Chart.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/galaxykubeman/Chart.yaml b/galaxykubeman/Chart.yaml index 1c4d6ca..961d5a6 100644 --- a/galaxykubeman/Chart.yaml +++ b/galaxykubeman/Chart.yaml @@ -24,6 +24,3 @@ dependencies: alias: rabbitmq tags: - deploy-rabbitmq - - name: galaxy - repository: https://raw.githubusercontent.com/cloudve/helm-charts/anvil/ - version: 5.7.6-anvil.1