Skip to content

Commit

Permalink
Change vo from file name to directory path
Browse files Browse the repository at this point in the history
  • Loading branch information
gmatthews20 committed Feb 8, 2023
1 parent 32ec077 commit 9e11605
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions fts-cron/renew_fts_proxy_multi_vo.sh.j2
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,24 @@ chmod 400 /tmp/{{ vo }}/long.proxy
# Generate a proxy with the voms extension if requested
if [ $RUCIO_FTS_VOMS_{{ vo | upper }} ]
then
voms-proxy-init2 -valid 24:00 -cert /tmp/{{ vo }}/long.proxy -key /tmp/{{ vo }}/long.proxy -out /tmp/x509up_{{ vo }} -rfc -timeout 5 -voms $RUCIO_FTS_VOMS_{{ vo | upper }}
voms-proxy-init2 -valid 24:00 -cert /tmp/{{ vo }}/long.proxy -key /tmp/{{ vo }}/long.proxy -out /tmp/{{ vo }}/x509up -rfc -timeout 5 -voms $RUCIO_FTS_VOMS_{{ vo | upper }}
else
voms-proxy-init2 -valid 24:00 -cert /tmp/{{ vo }}/long.proxy -key /tmp/{{ vo }}/long.proxy -out /tmp/x509up_{{ vo }} -rfc -timeout 5
voms-proxy-init2 -valid 24:00 -cert /tmp/{{ vo }}/long.proxy -key /tmp/{{ vo }}/long.proxy -out /tmp/{{ vo }}/x509up -rfc -timeout 5
fi

# Delegate the proxy to the requested servers
{% if RUCIO_FTS_SERVERS is defined %}
{% set ftses = RUCIO_FTS_SERVERS.split(',') %}
{% for fts in ftses %}
fts-rest-delegate --hours=24 --force --key=/tmp/x509up_{{ vo }} --cert=/tmp/x509up_{{ vo }} -s {{ fts }}
fts-rest-delegate --hours=24 --force --key=/tmp/{{ vo }}/x509up --cert=/tmp/{{ vo }}/x509up -s {{ fts }}
{% endfor %}
{% endif %}

# Create the corresponding kubernetes secrets if asked
{% if RUCIO_FTS_SECRETS is defined %}
{% set secrets = RUCIO_FTS_SECRETS.split(',') %}
{% for secret in secrets %}
kubectl create secret generic {{ secret }}-{{ vo }} --from-file=/tmp/x509up_{{ vo }} --dry-run=client -o yaml | kubectl apply --validate=false -f -
kubectl create secret generic {{ secret }}-{{ vo }} --from-file=/tmp/{{ vo }}/x509up --dry-run=client -o yaml | kubectl apply --validate=false -f -
{% endfor %}
{% endif %}

Expand Down

0 comments on commit 9e11605

Please sign in to comment.