Skip to content

Commit

Permalink
Update script paths to use /opt instead of /root
Browse files Browse the repository at this point in the history
  • Loading branch information
BrunoCoimbra authored and mambelli committed Nov 21, 2024
1 parent 2e49edc commit e86cee9
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 23 deletions.
8 changes: 4 additions & 4 deletions workspaces/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ Other useful commands:
```bash
podman ps -a
podman images
podman exec -it ce-workspace.glideinwms.org /root/scripts/startup.sh
podman exec -it factory-workspace.glideinwms.org /root/scripts/startup.sh
podman exec -it frontend-workspace.glideinwms.org /root/scripts/startup.sh
podman exec -it ce-workspace.glideinwms.org /opt/scripts/startup.sh
podman exec -it factory-workspace.glideinwms.org /opt/scripts/startup.sh
podman exec -it frontend-workspace.glideinwms.org /opt/scripts/startup.sh
# Remember to authenticate at the URL to validate the SciToken!
podman exec -it frontend-workspace.glideinwms.org /root/scripts/run-test.sh
podman exec -it frontend-workspace.glideinwms.org /opt/scripts/run-test.sh

podman exec -it ce-workspace.glideinwms.org /bin/bash
podman exec -it factory-workspace.glideinwms.org /bin/bash
Expand Down
6 changes: 3 additions & 3 deletions workspaces/ce-workspace/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ RUN dnf -y install htcondor-ce-condor
RUN rm -rf /var/cache/yum/* /var/cache/dnf/* /root/.cache/pip/*

# Deploy utility scripts
COPY ce-workspace/scripts /root/scripts
COPY shared/scripts/create-host-certificate.sh /root/scripts/
RUN ln -s /root/scripts/* /usr/local/bin
COPY ce-workspace/scripts /opt/scripts
COPY shared/scripts/create-host-certificate.sh /opt/scripts/
RUN ln -s /opt/scripts/* /usr/local/bin

# Deploy HTCondor-CE configuration
COPY ce-workspace/config/10-local.conf /etc/condor/config.d/10-local.conf
Expand Down
2 changes: 1 addition & 1 deletion workspaces/ce-workspace/scripts/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

GWMS_DIR=/opt/gwms

bash /root/scripts/create-host-certificate.sh -d "$GWMS_DIR"/secrets
bash /opt/scripts/create-host-certificate.sh -d "$GWMS_DIR"/secrets

systemctl start condor
systemctl start condor-ce
6 changes: 3 additions & 3 deletions workspaces/factory-workspace/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ RUN rm -f /etc/condor/config.d/00-minicondor
RUN rm -rf /var/cache/yum/* /var/cache/dnf/* /root/.cache/pip/*

# Deploy utility scripts
COPY shared/scripts /root/scripts
COPY factory-workspace/scripts/* /root/scripts
RUN ln -s /root/scripts/* /usr/local/bin
COPY shared/scripts /opt/scripts
COPY factory-workspace/scripts/* /opt/scripts
RUN ln -s /opt/scripts/* /usr/local/bin

# Download HTCondor tarballs
# HTCondor 10.6.0 to test a more recent version on Alma9
Expand Down
8 changes: 4 additions & 4 deletions workspaces/factory-workspace/scripts/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,18 @@ done
if $FULL_STARTUP; then
# Just the first time
[[ -n "$VERBOSE" ]] && echo "Full startup" || true
bash /root/scripts/create-host-certificate.sh -d "$GWMS_DIR"/secrets
bash /opt/scripts/create-host-certificate.sh -d "$GWMS_DIR"/secrets
# shellcheck disable=SC2086 # Options are unquoted to allow globbing
$DO_LINK_GIT && bash /root/scripts/link-git.sh -a -d "$GWMS_DIR" $GWMS_REPO $GWMS_REPO_REF || true
bash /root/scripts/create-idtokens.sh -a
$DO_LINK_GIT && bash /opt/scripts/link-git.sh -a -d "$GWMS_DIR" $GWMS_REPO $GWMS_REPO_REF || true
bash /opt/scripts/create-idtokens.sh -a
systemctl start httpd
systemctl start condor
else
# Stop before refresh
[[ -n "$VERBOSE" ]] && echo "Refresh only" || true
systemctl stop gwms-factory
# shellcheck disable=SC2086 # Options are unquoted to allow globbing
$DO_LINK_GIT && bash /root/scripts/link-git.sh -a -d "$GWMS_DIR" $GWMS_REPO $GWMS_REPO_REF || true
$DO_LINK_GIT && bash /opt/scripts/link-git.sh -a -d "$GWMS_DIR" $GWMS_REPO $GWMS_REPO_REF || true
systemctl restart condor # in case the configuration changes
fi
# All the times
Expand Down
6 changes: 3 additions & 3 deletions workspaces/frontend-workspace/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ RUN rm -f /etc/condor/config.d/00-minicondor
RUN rm -rf /var/cache/yum/* /var/cache/dnf/* /root/.cache/pip/*

# Deploy utility scripts
COPY shared/scripts /root/scripts
COPY frontend-workspace/scripts/* /root/scripts/
RUN ln -s /root/scripts/* /usr/local/bin
COPY shared/scripts /opt/scripts
COPY frontend-workspace/scripts/* /opt/scripts/
RUN ln -s /opt/scripts/* /usr/local/bin

# Deploy GlideinWMS Frontend and HTCondor configuration
COPY frontend-workspace/config/frontend.xml /etc/gwms-frontend/frontend.xml
Expand Down
10 changes: 5 additions & 5 deletions workspaces/frontend-workspace/scripts/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,22 +42,22 @@ done
if $FULL_STARTUP; then
# First time only
[[ -n "$VERBOSE" ]] && echo "Full startup" || true
bash /root/scripts/create-host-certificate.sh -d "$GWMS_DIR"/secrets
bash /opt/scripts/create-host-certificate.sh -d "$GWMS_DIR"/secrets
# shellcheck disable=SC2086 # Options are unquoted to allow globbing
$DO_LINK_GIT && bash /root/scripts/link-git.sh -r -d "$GWMS_DIR" $GWMS_REPO $GWMS_REPO_REF || true
bash /root/scripts/create-idtokens.sh -r
$DO_LINK_GIT && bash /opt/scripts/link-git.sh -r -d "$GWMS_DIR" $GWMS_REPO $GWMS_REPO_REF || true
bash /opt/scripts/create-idtokens.sh -r
systemctl start httpd
systemctl start condor
else
# Other times only (refresh)
[[ -n "$VERBOSE" ]] && echo "Refresh only" || true
systemctl stop gwms-frontend
# shellcheck disable=SC2086 # Options are unquoted to allow globbing
$DO_LINK_GIT && bash /root/scripts/link-git.sh -r -d "$GWMS_DIR" $GWMS_REPO $GWMS_REPO_REF || true
$DO_LINK_GIT && bash /opt/scripts/link-git.sh -r -d "$GWMS_DIR" $GWMS_REPO $GWMS_REPO_REF || true
systemctl restart condor # in case the configuration changes
fi
# All the times
# Always recreate the scitoken (expires quickly, OK to have a new one)
bash /root/scripts/create-scitoken.sh
bash /opt/scripts/create-scitoken.sh
gwms-frontend upgrade
systemctl start gwms-frontend

0 comments on commit e86cee9

Please sign in to comment.