Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
d819ef9
rec dodas client with token
dciangot Aug 12, 2021
40d085f
fix IAM_TOKEN null
dciangot Aug 12, 2021
91eec92
new docker image + daskssh
Sep 15, 2021
c03970c
ssh forwarder namespace in env
Sep 15, 2021
516e910
chart verstion
Sep 15, 2021
dd515aa
fix wrong value names
Sep 15, 2021
e28bb64
fix ssh
Sep 15, 2021
f66ba53
jhub permissions
Sep 16, 2021
0d4425f
jhub root
Sep 16, 2021
18d4ca5
update jhub user
Sep 16, 2021
7d1c4f5
jhub root
Sep 16, 2021
766607f
fix user permissions
Sep 16, 2021
85a6a79
revert permissions
Sep 16, 2021
561eff5
update htcondor
Sep 20, 2021
1061030
patch hostaliases
Sep 20, 2021
fcc0f29
update jlab image and
Sep 21, 2021
3d728b3
update docker
Sep 21, 2021
220ab98
update image
Sep 21, 2021
895d35f
htcondor install
Sep 21, 2021
1faa42e
keep base condor_config
Sep 21, 2021
3791e38
htcondor demo
Sep 21, 2021
11d6683
update htcondor chart
Sep 21, 2021
08e1d52
fermi in test
Sep 21, 2021
56411dd
update defualt htcondor values schedd
Sep 21, 2021
e843caa
dask image
Sep 23, 2021
93e28b1
fix spawn
Sep 23, 2021
750e5ae
fix dask dockerfile
Sep 23, 2021
8692b4d
fix dask image name
Sep 23, 2021
ddf0c0d
chmod +x dask exec
Sep 23, 2021
a81a3f3
separate dask cvmfs from jupyterlab
Sep 23, 2021
46afa29
PYTHONPATH dask
Sep 23, 2021
5a3e801
correct path and dask
Sep 23, 2021
2aa8cd4
correct path for jlab
Sep 23, 2021
bbb7b16
import correct root ld path
Sep 23, 2021
29ac383
start jupyterlab
Sep 23, 2021
229cf89
dask packages
Sep 23, 2021
f5d7991
fix install packages
Sep 23, 2021
36ee214
root ipython folder
Sep 23, 2021
2de3777
fix dask dockerfile
Sep 23, 2021
0c5f6fa
mkdir ipython
Sep 23, 2021
5e2abf2
import only root
Sep 23, 2021
939ca1b
root overwrite jupyterPATH
Sep 23, 2021
f423b88
working extension
Sep 24, 2021
94a7a52
npm dask run build
Sep 24, 2021
da3d2ce
separate ops dask
Sep 24, 2021
e339b75
dask npm immage
Sep 24, 2021
e627444
last try dask
Sep 24, 2021
e078e91
actual
Sep 24, 2021
2b57fc2
Fix dask labextension installation
MircoT Sep 24, 2021
2d6d657
4.14 dask-remote-jobqueue
Sep 24, 2021
82775fc
4.15 dask
Sep 24, 2021
d5446db
daskjobqueue 0.4.18
Sep 24, 2021
a405399
dask 19
Sep 24, 2021
9b160f4
LD_LIBRARYPATH
Sep 24, 2021
0ff0a71
install root
Sep 27, 2021
7e7c6fe
fix share root dir creation dask
Sep 27, 2021
3fbf402
fix plugin conf
Sep 27, 2021
68f4a9e
fix workdir
Sep 27, 2021
99a6ff0
python exe
Sep 28, 2021
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
10 changes: 10 additions & 0 deletions .github/workflows/docker-jhub-nb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,16 @@ jobs:
file: ./stable/jhub-aas/docker/Dockerfile.base-htc
platforms: linux/amd64
build-args: "NOTEBOOK_VERSION=${{ env.RELEASE_VERSION }}"
- name: Build container base+HTC+DASK image
uses: docker/build-push-action@v2
with:
context: ./stable/jhub-aas/docker/
outputs: "type=registry,push=true"
tags: |
ghcr.io/${{ steps.get_repo_owner.outputs.repo_owner }}/notebook:${{ env.RELEASE_VERSION }}-dask
file: ./stable/jhub-aas/docker/Dockerfile.dask
platforms: linux/amd64
build-args: "NOTEBOOK_VERSION=${{ env.RELEASE_VERSION }}"
- name: Build container base+htc+ROOT image
uses: docker/build-push-action@v2
with:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions stable/cachingondemand/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ annotations:
apiVersion: v1
appVersion: "4.11"
description: A Helm chart for the deployment of a XCache cluster
name: cachingondemand
version: 1.0.6
name: XCache-aaS
version: 1.0.7
icon: https://xrootd.slac.stanford.edu/images/xrootd-logo.png
maintainers:
- name: dciangot
Expand Down
4 changes: 2 additions & 2 deletions stable/fermi/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
annotations:
category: stable
category: test
apiVersion: v1
name: Fermi-experiment
version: 1.0.4
version: 1.0.5
appVersion: 8.9.9
description: HTCondor pool for Fermi experiment
keywords:
Expand Down
2 changes: 1 addition & 1 deletion stable/htcondor-aas/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: v1
appVersion: 8.9.9
description: A Helm chart for the deployment of HTCondor cluster
name: htcondor
version: 2.1.11
version: 2.1.13
icon: https://research.cs.wisc.edu/htcondor/images/HTCondor_wiki_logo_small.png
maintainers:
- name: ttedesch
Expand Down
4 changes: 4 additions & 0 deletions stable/htcondor-aas/templates/deployment_schedd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ spec:
values:
- schedd
topologyKey: kubernetes.io/hostname
hostAliases:
- hostnames:
- {{ .Values.schedd.hostname }}
ip: {{ .Values.master.publicIP }}
containers:
- name: schedd
resources:
Expand Down
5 changes: 3 additions & 2 deletions stable/htcondor-aas/templates/deployment_wn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,9 @@ spec:
livenessProbe:
exec:
command:
- ls
- /cvmfs/*
- bash
- -c
- "ls /cvmfs/*"
initialDelaySeconds: 30
periodSeconds: 30
{{- end }}
Expand Down
5 changes: 3 additions & 2 deletions stable/htcondor-aas/templates/external_apps/cvmfs-pod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,9 @@ spec:
livenessProbe:
exec:
command:
- ls
- /cvmfs/*
- bash
- -c
- "ls /cvmfs/*"
initialDelaySeconds: 30
periodSeconds: 600
image: "{{ .Values.cvmfs.image }}:{{ .Values.cvmfs.tag }}"
Expand Down
2 changes: 1 addition & 1 deletion stable/jhub-aas/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ annotations:
category: stable
apiVersion: v1
name: JHUBaaS
version: 1.0.0
version: 3.0.3
appVersion: 1.3.0
description: JHUBaaS Hub umbrella chart
keywords:
Expand Down
5 changes: 1 addition & 4 deletions stable/jhub-aas/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/dodas-ts/dodas-iam-client-rec:v0.0.5 as REGISTRATION
FROM ghcr.io/dodas-ts/dodas-iam-client-rec:v0.0.6-pre3 as REGISTRATION

FROM jupyterhub/k8s-hub:0.11.1

Expand All @@ -17,11 +17,8 @@ RUN echo "jovyan ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
rm /bin/sh && \
ln -s /bin/bash /bin/sh

USER $NB_UID

RUN mkdir -p .init

COPY --from=REGISTRATION /usr/local/bin/dodas-IAMClientRec /srv/.init/dodas-IAMClientRec


CMD ["/usr/bin/start.sh", "jupyterhub"]
41 changes: 37 additions & 4 deletions stable/jhub-aas/docker/Dockerfile.base
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,43 @@ RUN chmod +x /usr/local/bin/jupyterhub-singleuser && chmod +x /root/.init/spawn.
RUN apt-get update \
&& apt-get install -y gnupg2 software-properties-common

RUN apt-key adv --keyserver hkp://pgp.surfnet.nl --recv-keys ACDFB08FDC962044D87FF00B512839863D487A87 \
&& add-apt-repository "deb http://repo.data.kit.edu/ubuntu/bionic ./"

RUN apt-get install -y oidc-agent
#RUN apt-key adv --keyserver hkp://pgp.surfnet.nl --recv-keys ACDFB08FDC962044D87FF00B512839863D487A87 \
# && add-apt-repository "deb http://repo.data.kit.edu/ubuntu/bionic ./"

RUN apt-get update && apt-get install -y \
software-properties-common \
help2man \
check \
devscripts \
make \
sudo \
ca-certificates \
libcurl4-openssl-dev \
libsodium-dev \
libseccomp-dev \
libmicrohttpd-dev \
libsecret-1-dev \
python3 \
python3-pip \
wget \
fuse \
git \
build-essential \
debhelper \
pkg-config \
perl \
sed \
libqrencode-dev \
fakeroot


RUN cd /opt/ && git clone https://github.com/indigo-dc/oidc-agent \
&& cd oidc-agent \
&& make \
&& make install_lib \
&& make install

#RUN apt-get install -y oidc-agent

COPY ./ca.crt /ca.crt

Expand Down
18 changes: 7 additions & 11 deletions stable/jhub-aas/docker/Dockerfile.base-htc
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,13 @@ USER root

WORKDIR /tmp

RUN wget https://research.cs.wisc.edu/htcondor/tarball/8.9/8.9.9/release/condor-8.9.9-x86_64_Ubuntu20-stripped.tar.gz && \
tar -xzvf condor-8.9.9-x86_64_Ubuntu20-stripped.tar.gz && \
sudo mv condor-8.9.9-x86_64_Ubuntu20-stripped/bin/* /usr/bin/ && \
sudo mkdir /usr/lib/condor && \
sudo mv condor-8.9.9-x86_64_Ubuntu20-stripped/lib/condor/* /usr/lib/condor/ && \
sudo mv condor-8.9.9-x86_64_Ubuntu20-stripped/lib/python3/* /usr/lib/python3/ && \
sudo rm -r condor-8.9.9-x86_64_Ubuntu20-stripped/lib/condor condor-8.9.9-x86_64_Ubuntu20-stripped/lib/python3 && \
sudo mv condor-8.9.9-x86_64_Ubuntu20-stripped/lib/* /usr/lib/ && \
sudo mkdir -p /usr/libexec/ && sudo mv condor-8.9.9-x86_64_Ubuntu20-stripped/libexec/* /usr/libexec/ && \
sudo mkdir /etc/condor
RUN apt-get install -y curl

COPY ./condor_config /etc/condor/condor_config
RUN curl -fsSL https://research.cs.wisc.edu/htcondor/repo/keys/HTCondor-Release.gpg.key | apt-key add - \
&& echo -e "deb [arch=amd64] https://research.cs.wisc.edu/htcondor/repo/ubuntu/8.9 focal main\ndeb-src https://research.cs.wisc.edu/htcondor/repo/ubuntu/8.9 focal main" > /etc/apt/sources.list.d/htcondor.list

RUN apt update && apt-get install -y htcondor

COPY ./condor_config /etc/condor/condor_config
COPY ./htc-demo /opt/workspace/htc-example
WORKDIR /opt/workspace
70 changes: 70 additions & 0 deletions stable/jhub-aas/docker/Dockerfile.dask
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
ARG NOTEBOOK_VERSION
FROM ghcr.io/dodas-ts/notebook:${NOTEBOOK_VERSION}-htc
USER root

RUN apt-get install -y dpkg-dev cmake g++ gcc binutils libx11-dev libxpm-dev \
libxft-dev libxext-dev python libssl-dev \
gfortran libpcre3-dev \
xlibmesa-glu-dev libglew1.5-dev libftgl-dev \
libmysqlclient-dev libfftw3-dev libcfitsio-dev \
graphviz-dev libavahi-compat-libdnssd-dev \
libldap2-dev python-dev libxml2-dev libkrb5-dev \
libgsl0-dev

WORKDIR /usr/local/share/
RUN mkdir root6build root6
RUN git clone --branch distrdf-dask https://github.com/vepadulano/root.git root6source

WORKDIR /usr/local/share/root6source

WORKDIR /usr/local/share/root6build
RUN cmake \
-DCMAKE_INSTALL_PREFIX=/usr/local/share/root6 \
-DPython3_EXECUTABLE=/opt/conda/bin/python \
/usr/local/share/root6source

RUN cmake --build . --target install -- -j4

# Dask and jupyterhub
RUN python3 -m pip install --upgrade pip
RUN python3 -m pip install --upgrade setuptools
RUN python3 -m pip install dask \
dask_jobqueue \
click==7.1.2 \
numpy \
bokeh \
ipython \
jupyterhub \
jupyterlab \
notebook \
jupyter-server-proxy \
ipywidgets
RUN python3 -m pip install "dask[dataframe]"

# Install DASK jobqueue
RUN pip install dask-remote-jobqueue==0.4.19

WORKDIR /opt/workspace
# Old approach
# RUN python3 -m pip install dask-labextension "dask[dataframe]"
# COPY labextension.yaml /usr/local/lib/python3.6/site-packages/dask_labextension/labextension.yaml
RUN curl -fsSL https://deb.nodesource.com/setup_14.x | bash -
RUN DEBIAN_FRONTEND=noninteractive apt install -y nodejs
RUN npm install npm@latest -g
RUN npm install -g typescript yarn

RUN python -m pip install jupyter-packaging \
&& git clone --branch custom_clusters https://github.com/DODAS-TS/dask-labextension.git

WORKDIR /opt/workspace/dask-labextension
RUN jlpm
RUN npm run build && npm install
RUN jupyter labextension install .

RUN mkdir -p /root/.ipython

COPY labextension.yaml /opt/conda/lib/python3.9/site-packages/dask_labextension/labextension.yaml

COPY ./jupyterhub-singleuser.sh /usr/local/bin/jupyterhub-singleuser.sh
RUN chmod +x /usr/local/bin/jupyterhub-singleuser.sh
WORKDIR /opt/workspace
4 changes: 4 additions & 0 deletions stable/jhub-aas/docker/htc-demo/simple
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

sleep 100
echo $HOSTNAME
7 changes: 7 additions & 0 deletions stable/jhub-aas/docker/htc-demo/sub
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
universe = vanilla
executable = simple
log = simple.log
output = simple.out
error = simple.error
+OWNER = "condor"
queue
2 changes: 1 addition & 1 deletion stable/jhub-aas/docker/jupyterhub-singleuser
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import re
import sys
import time
from jupyterhub.singleuser import main
from jupyterlab.labhubapp import main
from subprocess import Popen, DEVNULL

if __name__ == '__main__':
Expand Down
14 changes: 14 additions & 0 deletions stable/jhub-aas/docker/jupyterhub-singleuser.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

#source /cvmfs/cms.dodas.infn.it/miniconda3/etc/profile.d/conda.sh
#conda activate cms-dodas

#export PYTHONPATH=/opt/conda/lib/python3.9/site-packages/:$PYTHONPATH

source /usr/local/share/root6/bin/thisroot.sh

#export LD_LIBRARY_PATH=/cvmfs/cms.dodas.infn.it/miniconda3/envs/cms-dodas/lib:$LD_LIBRARY_PATH
#export JUPYTER_PATH=/opt/conda/etc/jupyter
#export JUPYTER_CONFIG_DIR=/opt/conda/etc/jupyter

python /usr/local/bin/jupyterhub-singleuser "$@"
14 changes: 14 additions & 0 deletions stable/jhub-aas/docker/labextension.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
labextension:
factory:
module: 'dask_remote_jobqueue'
class: 'RemoteHTCondor'
args: []
kwargs: {}
default:
workers: null
adapt:
null
# minimum: 0
# maximum: 10
initial:
[]
11 changes: 10 additions & 1 deletion stable/jhub-aas/docker/spawn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,17 @@ oidc-gen dodas --issuer $IAM_SERVER \
--client-secret $IAM_CLIENT_SECRET \
--rt $REFRESH_TOKEN \
--confirm-yes \
--scope "openid profile email" \
--scope "openid profile email wlcg wlcg.groups" \
--redirect-uri http://localhost:8843 \
--pw-cmd "echo \"DUMMY PWD\""

while true; do oidc-token dodas --time 1200 > /tmp/token; sleep 600; done &

if [[ -f "cvmfs/cms.dodas.infn.it/miniconda3/etc/profile.d/conda.sh" ]]; then
source /cvmfs/cms.dodas.infn.it/miniconda3/etc/profile.d/conda.sh
conda activate cms-dodas
export PYTHONPATH=/opt/conda/lib/python3.9/site-packages/:$PYTHONPATH
source /cvmfs/cms.dodas.infn.it/miniconda3/envs/cms-dodas/bin/thisroot.sh
export JUPYTER_PATH=/opt/conda/etc/jupyter
export JUPYTER_CONFIG_DIR=/opt/conda/etc/jupyter
fi
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{{- if .Values.sshForwarder.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: ssh-fwd
labels:
app.kubernetes.io/name: ssh-fwd
spec:
template:
metadata:
labels:
app.kubernetes.io/name: ssh-fwd
spec:
priorityClassName: system-node-critical
containers:
- name: redis
resources:
requests:
memory: {{ .Values.sshForwarder.redis.requests.memory }}
cpu: {{ .Values.sshForwarder.redis.requests.cpu }}
limits:
memory: {{ .Values.sshForwarder.redis.limits.memory }}
cpu: {{ .Values.sshForwarder.redis.limits.cpu }}
imagePullPolicy: {{ .Values.sshForwarder.redis.image.pullPolicy }}
image: "{{ .Values.sshForwarder.redis.image.name }}:{{ .Values.sshForwarder.redis.image.tag }}"
volumeMounts: []
- name: ssh-fwd
resources:
requests:
memory: {{ .Values.sshForwarder.sshFWD.requests.memory }}
cpu: {{ .Values.sshForwarder.sshFWD.requests.cpu }}
limits:
memory: {{ .Values.sshForwarder.sshFWD.limits.memory }}
cpu: {{ .Values.sshForwarder.sshFWD.limits.cpu }}
imagePullPolicy: {{ .Values.sshForwarder.sshFWD.image.pullPolicy }}
image: "{{ .Values.sshForwarder.sshFWD.image.name }}:{{ .Values.sshForwarder.sshFWD.image.tag | default .Chart.AppVersion }}"
- name: listener
resources:
requests:
memory: {{ .Values.sshForwarder.sshListener.requests.memory }}
cpu: {{ .Values.sshForwarder.sshListener.requests.cpu }}
limits:
memory: {{ .Values.sshForwarder.sshListener.limits.memory }}
cpu: {{ .Values.sshForwarder.sshListener.limits.cpu }}
imagePullPolicy: {{ .Values.sshForwarder.sshListener.image.pullPolicy }}
image: "{{ .Values.sshForwarder.sshListener.image.name }}:{{ .Values.sshForwarder.sshListener.image.tag | default .Chart.AppVersion }}"
volumes:
selector:
matchLabels:
app.kubernetes.io/name: ssh-fwd


replicas: 1
strategy:
type: Recreate
{{- end }}
Loading