Skip to content

Commit

Permalink
Move PyCBC venvs to new IGWN CVMFS server (gwastro#4412)
Browse files Browse the repository at this point in the history
* First part of moving venv build to igwn

* TESTING HACK. REVERT ME BEFORE MERGING!!!

* Try this

* Testing

* Revert "Testing"

This reverts commit c0b9ea0.

* Add new CVMFS commands

* Remove rsync filter which isn't working

* Add error wrap abort handler

* Update tools/venv_transfer_commands.sh

Co-authored-by: Duncan Macleod <duncan.macleod@ligo.org>

* Fix Ian's idiocy (attempt to) and HostChecking

* Set to abort for one last test

* One final publish test

* Add a chmod on the root CVMFS directory

* Prepare for merging

* Fix mistake

---------

Co-authored-by: Duncan Macleod <duncan.macleod@ligo.org>
  • Loading branch information
2 people authored and titodalcanton committed Jan 16, 2024
1 parent 82e5a8e commit 6a1e8ae
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tools/docker_build_dist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,11 @@ EOF
echo -e "\\n>> [`date`] Deploying release ${SOURCE_TAG} to CVMFS"
# remove lalsuite source and deploy on cvmfs
rm -rf ${VENV_PATH}/src/lalsuite
ssh ouser.ligo@oasis-login.opensciencegrid.org "mkdir -p /home/login/ouser.ligo/ligo/deploy/sw/pycbc/${ENV_OS}/virtualenv/pycbc-${SOURCE_TAG}"
rsync --rsh=ssh $RSYNC_OPTIONS -qraz ${VENV_PATH}/ ouser.ligo@oasis-login.opensciencegrid.org:/home/login/ouser.ligo/ligo/deploy/sw/pycbc/${ENV_OS}/virtualenv/pycbc-${SOURCE_TAG}/
ssh ouser.ligo@oasis-login.opensciencegrid.org osg-oasis-update
export RSYNC_OPTIONS VENV_PATH ENV_OS SOURCE_TAG
if ! bash /pycbc/tools/venv_transfer_commands.sh; then
ssh cvmfs.pycbc@cvmfs-software.ligo.caltech.edu "sudo -u repo.software cvmfs_server abort -f"
exit 1
fi
fi
echo -e "\\n>> [`date`] virtualenv deployment complete"
fi
Expand Down
1 change: 1 addition & 0 deletions tools/docker_build_prepssh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ echo -e "Host sugwg-test1.phy.syr.edu\n\tStrictHostKeyChecking no\n" >> ~/.ssh/c
echo -e "Host sugwg-condor.phy.syr.edu\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config ;
echo -e "Host oasis-login.opensciencegrid.org\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config ;
echo -e "Host code.pycbc.phy.syr.edu\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config ;
echo -e "@cert-authority * ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHa03AZF3CvJ1C4Po15swSaMYI4kPszyBH/uOKHQYvu+EpehSfMZMaX5D7pUpc5cAXvMEEFzlZJQH4pOioIlqyE= IGWN_CIT_SSH_CERT_AUTHORITY" >> ~/.ssh/known_hosts
chmod 600 ~/.ssh/id_rsa ~/.ssh/config ~/.ssh/ldg_user ~/.ssh/ldg_token
12 changes: 12 additions & 0 deletions tools/venv_transfer_commands.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

set -e

# Please don't try and run this script directly!
ssh cvmfs.pycbc@cvmfs-software.ligo.caltech.edu <<EOF
sudo -u repo.software cvmfs_server transaction -t 300 software.igwn.org
sudo -u repo.software chmod go+rx /cvmfs/software.igwn.org/
mkdir -p /cvmfs/software.igwn.org/pycbc/${ENV_OS}/virtualenv/pycbc-${SOURCE_TAG}
EOF
rsync --rsh="ssh" $RSYNC_OPTIONS --filter='Pp .cvmfscatalog' --filter='Pp .cvmfsautocatalog' -qraz ${VENV_PATH}/ cvmfs.pycbc@cvmfs-software.ligo.caltech.edu:/cvmfs/software.igwn.org/pycbc/${ENV_OS}/virtualenv/pycbc-${SOURCE_TAG}/
ssh cvmfs.pycbc@cvmfs-software.ligo.caltech.edu "sudo -u repo.software cvmfs_server publish"

0 comments on commit 6a1e8ae

Please sign in to comment.