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

[WIP] Test GCS packaged in new GKM #35

Open
wants to merge 1 commit into
base: anvil
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion galaxykubeman/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ apiVersion: v1
appVersion: 21.09
description: A chart for deploying and managing a single Galaxy out-of-the-box instance on Managed Kubernetes clusters (GKE)
name: galaxykubeman
version: 1.2.0
version: 1.3.0
6 changes: 5 additions & 1 deletion galaxykubeman/requirements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,9 @@ dependencies:
version: 1.6.0
alias: cvmfs
- name: galaxy
repository: https://raw.githubusercontent.com/cloudve/helm-charts/anvil/
repository: https://raw.githubusercontent.com/almahmoud/helm-charts/anvil-gcs/
version: 4.8.0
- name: csi-gcs
repository: https://raw.githubusercontent.com/almahmoud/helm-charts/anvil-gcs/
version: 0.8.0
alias: gcs
7 changes: 7 additions & 0 deletions galaxykubeman/templates/_helpers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,10 @@ Get default value or max
{{- .default | int }}
{{- end }}
{{- end }}

{{/*
Get bucket name from gcs uri
*/}}
{{- define "galaxykubeman.getBucketName" -}}
{{ .Values.configs.WORKSPACE_BUCKET | replace "gs://" "" }}
{{- end }}
38 changes: 38 additions & 0 deletions galaxykubeman/templates/gcs-resources.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: {{ .Release.Name }}-csi-gcs-sc
provisioner: {{ .Values.gcs.driverName }}
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ .Release.Name }}-csi-gcs-pvc
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 5Gi
storageClassName: {{ .Release.Name }}-csi-gcs-sc
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: {{ .Release.Name }}-csi-gcs-pv
spec:
accessModes:
- ReadWriteMany
capacity:
storage: 5Gi
persistentVolumeReclaimPolicy: Retain
storageClassName: {{ .Release.Name }}-csi-gcs-sc
csi:
driver: {{ .Values.gcs.driverName }}
volumeHandle: csi-gcs
volumeAttributes:
gid: "101"
uid: "101"
bucket: '{{ include "galaxykubeman.getBucketName" . }}'
billingProject: "{{ .Values.configs.GOOGLE_PROJECT }}"
---
32 changes: 26 additions & 6 deletions galaxykubeman/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ configs: {}
secrets: {}
# db-password: changeme

gcs:
driverName: gcs.csi.ofek.dev

restore:
persistence:
nfs:
Expand Down Expand Up @@ -66,6 +69,14 @@ cvmfs:
enabled: false

galaxy:
extraVolumes:
- name: galaxy-remote-data
persistentVolumeClaim:
claimName: "{{ .Release.Name }}-csi-gcs-pvc"
extraVolumeMounts:
- mountPath: /galaxy/server/database/objects
name: galaxy-remote-data
subPath: galaxy-data/objects
jobs:
maxRequests:
cpu: 10
Expand Down Expand Up @@ -361,6 +372,7 @@ galaxy:
</toolbox>
galaxy.yml:
galaxy:
outputs_to_working_directory: true
job_config_file: "/galaxy/server/config/job_conf.yml"
enable_beta_gdpr: true
job_conf.yml:
Expand All @@ -376,19 +388,27 @@ galaxy:
k8s_pod_retries: "4"
k8s_walltime_limit: "604800"
k8s_galaxy_instance_id: "{{ .Release.Name }}"
k8s_persistent_volume_claims: |-
k8s_data_volume_claim: |-
{{ .Release.Name }}-csi-gcs-pvc/galaxy-data:{{ .Values.persistence.mountPath -}}
k8s_working_volume_claim: |-
{{ template "galaxy.pvcname" . -}}:{{ .Values.persistence.mountPath -}}
k8s_persistent_volume_claims: |-
{{ template "galaxy.pvcname" . -}}/cache:{{ .Values.persistence.mountPath -}}/cache,
{{- template "galaxy.pvcname" . -}}/config:{{ .Values.persistence.mountPath -}}/config,
{{- template "galaxy.pvcname" . -}}/deps:{{ .Values.persistence.mountPath -}}/deps,
{{- template "galaxy.pvcname" . -}}/object_store_cache:{{ .Values.persistence.mountPath -}}/object_store_cache,
{{- template "galaxy.pvcname" . -}}/tmp:{{ .Values.persistence.mountPath -}}/tmp,
{{- template "galaxy.pvcname" . -}}/tool-data:{{ .Values.persistence.mountPath -}}/tool-data,
{{- template "galaxy.pvcname" . -}}/tools:{{ .Values.persistence.mountPath -}}/tools,
{{- template "galaxy.pvcname" . -}}/tool_search_index:{{ .Values.persistence.mountPath -}}/tool_search_index
{{- if .Values.cvmfs.enabled -}}
{{- range $key, $entry := .Values.cvmfs.galaxyPersistentVolumeClaims -}}
,{{- template "galaxy.fullname" $ -}}-cvmfs-gxy-{{ $key }}-pvc:{{ $entry.mountPath -}}
,{{ template "galaxy.fullname" $ -}}-cvmfs-gxy-{{ $key }}-pvc:{{ $entry.mountPath -}}
{{- end -}}
{{- end -}}
{{- if .Values.initJob.downloadToolConfs.enabled -}}
,{{ template "galaxy.pvcname" . -}}/{{ .Values.initJob.downloadToolConfs.volume.subPath }}:{{ .Values.initJob.downloadToolConfs.volume.mountPath -}}
{{- end -}}
{{- if .Values.extraVolumes -}}
{{- template "galaxy.extra_pvc_mounts" . -}}
{{- end }}
{{- end d}}
#k8s_timeout_seconds_job_deletion: 30
k8s_run_as_user_id: "101"
k8s_run_as_group_id: "101"
Expand Down