Skip to content

Commit

Permalink
Temparary copy access_token in home directory
Browse files Browse the repository at this point in the history
  • Loading branch information
oshadura committed Feb 10, 2023
1 parent e3ae536 commit ed8a345
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion coffea_casa/coffea_casa.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def _modify_job_kwargs(cls,
{"should_transfer_files": "YES"},
{"Stream_Output": "False"},
{"Stream_Error": "False"},
{"environment": "BEARER_TOKEN_FILE=$_CONDOR_JOB_IWD/access_token"},
#{"environment": "BEARER_TOKEN_FILE=$_CONDOR_JOB_IWD/access_token"},
{"+DaskSchedulerAddress": external_ip_string},
job_kwargs.get(
"job_extra", dask.config.get(f"jobqueue.{cls.config_name}.job-extra")
Expand Down
3 changes: 3 additions & 0 deletions docker/Dockerfile.cc-analysis-ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@ ARG NB_GID="11265"
ARG CERT_DIR="/etc/cmsaf-secrets"
# Hack for GH Actions
ARG GITHUB_ACTIONS="false"
# FIX ME AFTER TEST:
ARG BEARER_TOKEN_FILE="/home/$NB_USER/.xcache/access_token"

# For now bearer token location on worker is hardcoded
# in coffea_casa module as environment"$_CONDOR_JOB_IWD/xcache_token"

# Configure environment
ENV CERT_DIR $CERT_DIR
ENV BEARER_TOKEN_FILE $BEARER_TOKEN_FILE
ENV CONDA_DIR /opt/conda
ENV SHELL /bin/bash
ENV NB_USER $NB_USER
Expand Down
4 changes: 4 additions & 0 deletions docker/prepare-env/prepare-env-cc-analysis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ if [[ ! -v COFFEA_CASA_SIDECAR ]]; then
cp $_CONDOR_JOB_IWD/ceph.conf ${CEPH_DIR}
fi

if [[ -f "$_CONDOR_JOB_IWD/access_token" ]]; then
mkdir -p /home/$NB_USER/.xcache && cp $_CONDOR_JOB_IWD/access_token /home/$NB_USER/.xcache/access_token
fi

if [[ -f "$_CONDOR_JOB_IWD/keyring" ]]; then
cp $_CONDOR_JOB_IWD/keyring ${CEPH_DIR}
fi
Expand Down

0 comments on commit ed8a345

Please sign in to comment.