Skip to content

Commit

Permalink
Merge pull request #18 from djw8605/taburaad-add_stashcp2
Browse files Browse the repository at this point in the history
Add Stashcp implementaiton 2.0
  • Loading branch information
djw8605 authored Dec 5, 2016
2 parents 121a7f4 + f3971b0 commit 8e4bd17
Show file tree
Hide file tree
Showing 12 changed files with 911 additions and 432 deletions.
31 changes: 31 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
sudo: required
env:
matrix:
- OS_TYPE=centos OS_VERSION=6
- OS_TYPE=centos OS_VERSION=7
- OS_TYPE=centos OS_VERSION=6 XRD_CACHE="root://stash.osgconnect.net"
- OS_TYPE=centos OS_VERSION=6 XRD_CACHE="root://xrd-cache-1.t2.ucsd.edu"
- OS_TYPE=centos OS_VERSION=6 XRD_CACHE="root://mwt2-stashcache.campuscluster.illinois.edu"
- OS_TYPE=centos OS_VERSION=6 XRD_CACHE="root://hcc-stash.unl.edu"
- OS_TYPE=centos OS_VERSION=6 XRD_CACHE="root://osgxroot.usatlas.bnl.gov"
- OS_TYPE=centos OS_VERSION=7 XRD_CACHE="root://stash.osgconnect.net"
- OS_TYPE=centos OS_VERSION=7 XRD_CACHE="root://xrd-cache-1.t2.ucsd.edu"
- OS_TYPE=centos OS_VERSION=7 XRD_CACHE="root://mwt2-stashcache.campuscluster.illinois.edu"
- OS_TYPE=centos OS_VERSION=7 XRD_CACHE="root://hcc-stash.unl.edu"
- OS_TYPE=centos OS_VERSION=7 XRD_CACHE="root://osgxroot.usatlas.bnl.gov"


services:
- docker

before_install:
- sudo apt-get update
- echo 'DOCKER_OPTS="-H tcp://127.0.0.1:2375 -H unix:///var/run/docker.sock -s devicemapper"' | sudo tee /etc/default/docker > /dev/null
- sudo service docker restart
- sleep 5
- sudo docker pull centos:centos${OS_VERSION}


script:
# Run tests in Container
- bin/stashcp2/tests/setup_tests.sh ${OS_VERSION}
27 changes: 21 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@
StashCache
==========
# StashCache

[![Build Status](https://travis-ci.org/djw8605/StashCache-1.svg?branch=master)](https://travis-ci.org/djw8605/StashCache-1)

This repo holds json file with addresses, statuses and geographical coordinates of all of the StashCache caches.
Status is given as a number: 1 - Active, 0 - Not Active.

Doing:
source ./setStashCache.(c)sh will determine what is the closest StashCache to the user and export a variable STASHPREFIX containing the address of the closest StashCache.
## Using Stashcp

XrootD client is required to be installed in order to use stashcp. You can use it with:

./bin/stashcp <source> <destination>

See the help message for full usage of the command.

## Operation of stashcp

Stashcp uses geo located nearby caches in order to copy from the OSG Connect's stash storage service
to a job's workspace on a cluster.

Stashcp uses an ordered list of methods to access the file:

After that a user can access the file in the following way:
1. Copy the file from CVMFS, under the directory /cvmfs/stash.osgstorage.org/...
2. Copy the file with `xrdcp` from the nearest cache.
3. Copy the file with `xrdcp` from the source, stash.osgconnect.net.

xrdcp $STASHPREFIX/user/ivukotic/xAOD_mc.pool.root xAOD_mc.pool.root
While using `xrdcp`, it uses XrootD's internal timers to act as a strict watchdog.
4 changes: 2 additions & 2 deletions bin/caches.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[
{"name":"root://student02.ci-connect.net/", "status":0, "longitude":-87.603, "latitude":41.78},
{"name":"root://stash.osgconnect.net/", "status":1, "longitude":-87.603, "latitude":41.78},
{"name":"root://student02.ci-connect.net", "status":0, "longitude":-87.603, "latitude":41.78},
{"name":"root://stash.osgconnect.net", "status":1, "longitude":-87.603, "latitude":41.78},
{"name":"root://cm3.bu.edu", "status":0, "longitude":-72.6167, "latitude":42.2042},
{"name":"root://xrd-cache-1.t2.ucsd.edu", "status":1, "longitude":-117.2359, "latitude":32.8807},
{"name":"root://mwt2-stashcache.campuscluster.illinois.edu", "status":1, "longitude":-88.23, "latitude":40.107487},
Expand Down
Loading

0 comments on commit 8e4bd17

Please sign in to comment.