Skip to content

Commit

Permalink
Try to make work BEARER token @ condor workers
Browse files Browse the repository at this point in the history
  • Loading branch information
oshadura committed Dec 15, 2022
1 parent 40463fe commit b5320e4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 3 additions & 1 deletion coffea_casa/coffea_casa.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
#DEFAULT_NANNY_PORT = 8001

# Security settings for Dask scheduler
# REMOVE ME (backward compatibity for now)
SECRETS_DIR = Path("/etc/cmsaf-secrets")
SECRETS_DIR_CHOWN = Path("/etc/cmsaf-secrets-chown")
# CEPH (Skyhook)
CEPH_DIR = Path("/opt/ceph")
CEPH_CONF = CEPH_DIR / "ceph.conf"
Expand All @@ -25,7 +27,7 @@
# XCache
# REMOVE ME (backward compatibity for now)
XCACHE_FILE = SECRETS_DIR / "xcache_token"
XCACHE_SCITOKEN_FILE = SECRETS_DIR / "access_token"
XCACHE_SCITOKEN_FILE = SECRETS_DIR_CHOWN / "access_token"
# pip
PIP_REQUIREMENTS = HOME_DIR / "requirements.txt"
# conda, with yml/yaml both supported
Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile.cc-analysis-ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ ARG NB_GID="11265"
ARG CERT_DIR="/etc/cmsaf-secrets"
# Hack for GH Actions
ARG GITHUB_ACTIONS="false"
ARG BEARER_TOKEN_FILE=$CERT_DIR"/xcache_token"
ARG BEARER_TOKEN_FILE

# Configure environment
ENV CERT_DIR=$CERT_DIR
ENV CERT_DIR $CERT_DIR
ENV BEARER_TOKEN_FILE $BEARER_TOKEN_FILE
ENV CONDA_DIR /opt/conda
ENV SHELL /bin/bash
Expand Down
3 changes: 0 additions & 3 deletions docker/prepare-env/prepare-env-cc-analysis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,7 @@ if [[ ! -v COFFEA_CASA_SIDECAR ]]; then
mkdir -p /home/$NB_USER/.condor/tokens.d/ && cp $_CONDOR_JOB_IWD/condor_token /home/$NB_USER/.condor/tokens.d/condor_token
fi

# REMOVE ME AFTER TEST:
# Bearer token (overwrite value preconfigured for k8s)
if [[ -f "$_CONDOR_JOB_IWD/access_token" ]]; then
chmod 600 $_CONDOR_JOB_IWD/access_token
export BEARER_TOKEN_FILE="$_CONDOR_JOB_IWD/access_token"
fi

Expand Down

0 comments on commit b5320e4

Please sign in to comment.