Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions ligo/60-osg.conf → 60-osg.conf
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# /etc/cvmfs/default.d/60-osg.conf
#
# DO NOT EDIT THIS FILE
# It will be replaced on upgrade. To override, edit:
# /etc/cvmfs/default.local
# It will be replaced on upgrade. To override, edit /etc/cvmfs/default.local
#
CVMFS_SEND_INFO_HEADER=yes
CVMFS_KEYS_DIR=/etc/cvmfs/keys/opensciencegrid.org
CVMFS_USE_GEOAPI=yes
CVMFS_CONFIG_REPOSITORY=config-osg.opensciencegrid.org
CVMFS_CONFIG_REPO_REQUIRED=yes
CVMFS_FALLBACK_PROXY="http://cvmfsbproxy.cern.ch:3126;http://cvmfsbproxy.fnal.gov:3126"
28 changes: 28 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/make -f

# This make file takes care of installing files

all: # nothing to build

# default install target is debian because that's the easist way to
# set up the 'rules' file.
install: install-debian

install-common:
mkdir -p $(DESTDIR)/etc/cvmfs/default.d \
$(DESTDIR)/etc/cvmfs/config.d \
$(DESTDIR)/etc/cvmfs/keys/opensciencegrid.org
install -D -m 444 60-osg.conf $(DESTDIR)/etc/cvmfs/default.d
install -D -m 444 config-osg.opensciencegrid.org.conf $(DESTDIR)/etc/cvmfs/config.d
install -D -m 444 opensciencegrid.org.pub $(DESTDIR)/etc/cvmfs/keys/opensciencegrid.org

install-debian: install-common
mkdir -p $(DESTDIR)/lib/systemd/system \
$(DESTDIR)/lib/systemd/system/autofs.service.wants \
$(DESTDIR)/usr/sbin
install -D -m 444 cvmfs-config-osg.service $(DESTDIR)/lib/systemd/system
ln -s ../cvmfs-config-osg.service $(DESTDIR)/lib/systemd/system/autofs.service.wants/cvmfs-config-osg.service
install -D -m 555 cvmfs-config-osgd $(DESTDIR)/usr/sbin

# assume DESTDIR=$RPM_BUILD_ROOT is passed in
install-redhat: install-common
53 changes: 35 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,37 @@
# cvmfs-config-osg

## CVMFS configuration files

Repository for configuration files used to setup experiment-specific CVMFS area within OSG.
Things to remember:
* keep this repository and existing `cvmfs-config-osg` RPM in sync, current stream at https://vdt.cs.wisc.edu/svn/native/redhat/trunk/cvmfs-config-osg/

### For LIGO

Please, refer to [`ligo directory`](ligo/) for config files. Useful documenation about site specific configuration:
> https://wiki.ligo.org/LVCcomputing/SiteConfiguration

### For OSG

This repository is meant for packaging CVMFS configuration; it is not meant for end-users.

End-user documentation can be found here:
https://twiki.grid.iu.edu/bin/view/Documentation/Release3/InstallCvmfs

## CVMFS configuration package for the Open Science Grid

This is the source for the CernVM File System (CVMFS) configuration
files for the Open Science Grid (OSG). It includes packaging for
Redhat and Debian.

### Redhat

End-user documentation for Redhat systems can be found
[here](https://twiki.grid.iu.edu/bin/view/Documentation/Release3/InstallCvmfs).

### Debian

For Debian, the End-user instructions are to install cvmfs from
[the cvmfs download page](https://cernvm.cern.ch/portal/filesystem/downloads)
and this package from
[github](https://github.com/opensciencegrid/cvmfs-config-osg/releases).
Then if you want to enable autofs, add the following contents
into /etc/auto.master.d/cvmfs.autofs:
```
/cvmfs /etc/auto.cvmfs
```
and restart autofs with
```
systemctl restart autofs
```
and also enable and start the cvmfs-config-osg service with:
```
systemctl enable cvmfs-config-osg
systemctl start cvmfs-config-osg
```
That service will start a daemon to make sure that the configuration
repository /cvmfs/config-osg.opensciencegrid.org stays mounted,
which is necessary to work around a Debian bug that causes autofs to
hang if a recursive automount is attempted.
1 change: 1 addition & 0 deletions config-osg.opensciencegrid.org.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CVMFS_SERVER_URL="http://cvmfs-s1bnl.opensciencegrid.org:8000/cvmfs/@fqrn@;http://cvmfs-s1fnal.opensciencegrid.org:8000/cvmfs/@fqrn@;http://cvmfs-s1goc.opensciencegrid.org:8000/cvmfs/@fqrn@"
11 changes: 11 additions & 0 deletions cvmfs-config-osg.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[Unit]
Description=daemon to keep /cvmfs/config-osg.opensciencegrid.org mounted
Requires=autofs.service
After=autofs.service

[Service]
Type=simple
ExecStart=/usr/sbin/cvmfs-config-osgd /cvmfs/config-osg.opensciencegrid.org/etc

[Install]
WantedBy=multi-user.target
18 changes: 18 additions & 0 deletions cvmfs-config-osgd
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash
# This is intended to be run as a daemon in order to keep a CVMFS
# configuration repository mounted indefinitely on Debian.
# It is to work around the fact that Debian's autofs does not allow
# recursive mounts.
ME="`basename $0`"
usage()
{
echo "Usage: $ME directory_to_mount" >&2
exit 1
}

if [ $# != 1 ]; then
usage
fi
set -e
cd "$1"
exec -a $ME sleep infinity
26 changes: 0 additions & 26 deletions ligo/README.md

This file was deleted.

9 changes: 0 additions & 9 deletions ligo/config-osg.opensciencegrid.org.conf

This file was deleted.

8 changes: 0 additions & 8 deletions ligo/cvmfs-config\x2dosg.opensciencegrid.org.automount

This file was deleted.

10 changes: 0 additions & 10 deletions ligo/cvmfs-config\x2dosg.opensciencegrid.org.mount

This file was deleted.

12 changes: 0 additions & 12 deletions ligo/cvmfs-ligo.osgstorage.org.automount

This file was deleted.

10 changes: 0 additions & 10 deletions ligo/cvmfs-ligo.osgstorage.org.mount

This file was deleted.

12 changes: 0 additions & 12 deletions ligo/cvmfs-oasis.opensciencegrid.org.automount

This file was deleted.

10 changes: 0 additions & 10 deletions ligo/cvmfs-oasis.opensciencegrid.org.mount

This file was deleted.

20 changes: 0 additions & 20 deletions ligo/default.local

This file was deleted.

10 changes: 10 additions & 0 deletions opensciencegrid.org.pub
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqQGYXTp9cRcMbGeDoijB
gKNTCEpIWB7XcqIHVXJjfxEkycQXMyZkB7O0CvV3UmmY2K7CQqTnd9ddcApn7BqQ
/7QGP0H1jfXLfqVdwnhyjIHxmV2x8GIHRHFA0wE+DadQwoi1G0k0SNxOVS5qbdeV
yiyKsoU4JSqy5l2tK3K/RJE4htSruPCrRCK3xcN5nBeZK5gZd+/ufPIG+hd78kjQ
Dy3YQXwmEPm7kAZwIsEbMa0PNkp85IDkdR1GpvRvDMCRmUaRHrQUPBwPIjs0akL+
qoTxJs9k6quV0g3Wd8z65s/k5mEZ+AnHHI0+0CL3y80wnuLSBYmw05YBtKyoa1Fb
FQIDAQAB
-----END PUBLIC KEY-----

55 changes: 55 additions & 0 deletions packaging/debian/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#!/bin/sh

set -e

#
# This script used for package creation and debugging
#

PKG=cvmfs-config-osg

usage() {
echo "Sample script that builds the $PKG debian package from source"
echo "Usage: $0"
exit 1
}

if [ $# -ne 0 ]; then
usage
fi

workdir=/tmp/build-$PKG
srctree=$(readlink --canonicalize ../..)

if [ "$(ls -A $workdir 2>/dev/null)" != "" ]; then
echo "$workdir must be empty"
exit 2
fi

echo -n "creating workspace in $workdir... "
mkdir -p ${workdir}/tmp ${workdir}/src ${workdir}/result
echo "done"

echo -n "copying source tree to $workdir/tmp... "
cp -R $srctree/* ${workdir}/tmp
echo "done"

echo -n "initializing build environment... "
mkdir ${workdir}/src/$PKG
cp -R $srctree/* ${workdir}/src/$PKG
mkdir ${workdir}/src/$PKG/debian
cp -R ${workdir}/tmp/packaging/debian/* ${workdir}/src/$PKG/debian
echo "done"

echo -n "figuring out version number from rpm packaging... "
upstream_version="`sed -n 's/^Version: //p' ../redhat/$PKG.spec`"
echo "done: $upstream_version"

echo "building..."
cd ${workdir}/src/$PKG
dch -v $upstream_version -M "bumped upstream version number"

cd debian
pdebuild --buildresult ${workdir}/result -- --save-after-exec --debug

echo "Results are in ${workdir}/result"
5 changes: 5 additions & 0 deletions packaging/debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
cvmfs-config-osg (0.1.0) stable; urgency=low

* Place holder; this file is generated in build.sh

-- Dave Dykstra <dwd@fnal.gov> Fri, 24 Feb 2017 18:00:00 +0000
1 change: 1 addition & 0 deletions packaging/debian/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9
12 changes: 12 additions & 0 deletions packaging/debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Source: cvmfs-config-osg
Maintainer: Dave Dykstra <dwd@fnal.gov>
Section: config
Priority: extra
Standards-Version: 3.9.3.1
Build-Depends: debhelper (>= 9)
Homepage: http://github.conf/opensciencegrid/cvmfs-config-osg

Package: cvmfs-config-osg
Architecture: all
Depends:
Description: CernVM File System configuration for OSG
17 changes: 17 additions & 0 deletions packaging/debian/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

Copyright:

Copyright (c) 2017, Fermi National Accelerator Laboratory

License:

Distributed unter the BSD License.

The Debian packaging is:

Copyright (C) 2017 Dave Dykstra <dwd@fnal.gov>

You are free to distribute this software under the terms of
the BSD License.
On Debian systems, the complete text of the BSD License can be
found in the file `/usr/share/common-licenses/BSD'.
33 changes: 33 additions & 0 deletions packaging/debian/postrm
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/sh
# postrm script for cvmfs-config-osg
#
# see: dh_installdeb(1)

set -e

# summary of how this script can be called:
# * <postrm> `remove'
# * <postrm> `purge'
# * <old-postrm> `upgrade' <new-version>
# * <new-postrm> `failed-upgrade' <old-version>
# * <new-postrm> `abort-install'
# * <new-postrm> `abort-install' <old-version>
# * <new-postrm> `abort-upgrade' <old-version>
# * <disappearer's-postrm> `disappear' <overwriter>
# <overwriter-version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package


case "$1" in
purge|remove)
:
;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#

exit 0
Loading