diff --git a/kubernetes/Dockerfile b/kubernetes/Dockerfile index df99e52ecfcfd050e4d7944f1c94cddc9aa95c2e..cef3c131f3e86155ae0b5cebd0c77631cfb3eb96 100644 --- a/kubernetes/Dockerfile +++ b/kubernetes/Dockerfile @@ -12,7 +12,7 @@ LABEL documentation="NA" LABEL license="NA" LABEL tags="Base" -# ARG cwltool_version=3.0.20200720165847 +# ARG cwltool_version=3.1.20211004060744 ENV DEBIAN_FRONTEND=noninteractive LANG=en_US.UTF-8 LC_ALL=C.UTF-8 LANGUAGE=en_US.UTF-8 @@ -30,7 +30,7 @@ RUN python3 -m pip install python-irodsclient --upgrade && \ apt-get update && \ wget -qO - https://packages.irods.org/irods-signing-key.asc | apt-key add - && \ echo "# /etc/apt/sources.list.d/renci-irods.list" | tee -a /etc/apt/sources.list.d/renci-irods.list && \ - echo "deb [arch=amd64] https://packages.irods.org/apt/ xenial main" | tee -a /etc/apt/sources.list.d/renci-irods.list && \ + echo "deb [arch=amd64] https://packages.irods.org/apt/ bionic main" | tee -a /etc/apt/sources.list.d/renci-irods.list && \ apt-get update && apt-get install --no-install-recommends --yes irods-icommands # Couple shell to bash @@ -87,6 +87,9 @@ RUN source /root/miniconda/bin/activate && \ # conda clean && \ rm /picrust2_env.yml /v2.4.1.tar.gz +## eggmapper +RUN pip install eggnog-mapper + ## HUMAnN meta-omics RUN python3 -m pip install humann --no-binary :all: && \ python3 -m pip install metaphlan --no-binary :all: && \ diff --git a/kubernetes/kube_instance/deploy.sh b/kubernetes/kube_instance/deploy.sh index 7f68cecbadcf78fb95ac5fbff471cddeb642c684..65799eed7bc7684e604b903e1560a85a0f49b190 100755 --- a/kubernetes/kube_instance/deploy.sh +++ b/kubernetes/kube_instance/deploy.sh @@ -1 +1,20 @@ -kubectl apply -f instance.yaml \ No newline at end of file +#!/bin/bash +#============================================================================ +#title :Instance creation for unlock nodes +#description :Creates an sleeping instance on each of the unlock nodes +#author :Jasper Koehorst & Bart Nijsse +#date :2021 +#version :0.0.2 +#============================================================================ +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +# Clean up finished sync pods +kubectl get pods --namespace='unlock' | grep munlock-instance | grep Completed | awk '{print "kubectl -n unlock delete pod "$1}' | sh +# Get all possible nodes +kubectl get nodes -l node-role.kubernetes.io/worker=true | grep -v "SchedulingDisabled" | awk '{print $1}' | grep -v NAME > $DIR/nodes.txt + +while read node; do + sed "s/HOSTNAME/$node/g" $DIR/template_instance.yaml > $DIR/$node\_instance.yaml + kubectl apply -f $DIR/$node\_instance.yaml + rm $DIR/$node\_instance.yaml +done < $DIR/nodes.txt \ No newline at end of file diff --git a/kubernetes/kube_instance/instance.yaml b/kubernetes/kube_instance/instance.yaml deleted file mode 100644 index 60e92483a4f2df0c315e7fa8bd3d7cfd47170e73..0000000000000000000000000000000000000000 --- a/kubernetes/kube_instance/instance.yaml +++ /dev/null @@ -1,80 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: munlock-instance - namespace: unlock - labels: - purpose: live-instance -spec: - containers: - - name: munlock-instance - image: docker-registry.wur.nl/unlock/docker:kubernetes - # Just spin & wait forever - command: [ "/bin/sh", "-c", "--" ] - args: [ "apt-get install -y screen; while true; do sleep 30; done;" ] - envFrom: - - configMapRef: - name: path - env: - - name: irodsHost - valueFrom: - secretKeyRef: - name: unlock-secret - key: irodsHost - - name: irodsPort - valueFrom: - secretKeyRef: - name: unlock-secret - key: irodsPort - - name: irodsUserName - valueFrom: - secretKeyRef: - name: unlock-secret - key: irodsUserName - - name: irodsZone - valueFrom: - secretKeyRef: - name: unlock-secret - key: irodsZone - - name: irodsAuthScheme - valueFrom: - secretKeyRef: - name: unlock-secret - key: irodsAuthScheme - - name: irodsHome - valueFrom: - secretKeyRef: - name: unlock-secret - key: irodsHome - - name: irodsCwd - valueFrom: - secretKeyRef: - name: unlock-secret - key: irodsCwd - - name: irodsPassword - valueFrom: - secretKeyRef: - name: unlock-secret - key: irodsPassword - - name: irodsSSL - valueFrom: - secretKeyRef: - name: unlock-secret - key: irodsSSL - resources: - limits: - cpu: '2' - memory: 20000Mi - requests: - cpu: '2' - memory: 20000Mi - volumeMounts: - - mountPath: /unlock - name: unlock - restartPolicy: OnFailure - volumes: - - name: unlock - persistentVolumeClaim: - claimName: unlock - nodeSelector: - kubernetes.io/hostname: ichibi \ No newline at end of file