Commit ec2f9433 authored by Thomas Downes's avatar Thomas Downes
Browse files

Migrate to LIGO-specific config using systemd automounts

parent b47413a5
......@@ -12,17 +12,19 @@ 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 -D -m 0644 60-osg.conf $(DESTDIR)/etc/cvmfs/default.d
install -D -m 0644 config-osg.opensciencegrid.org.conf $(DESTDIR)/etc/cvmfs/config.d
install -D -m 0644 opensciencegrid.org.pub $(DESTDIR)/etc/cvmfs/keys/opensciencegrid.org
install -D -m 0644 default.local $(DESTDIR)/etc/cvmfs
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
mkdir -p $(DESTDIR)/lib/systemd/system
install -D -m 0644 cvmfs-config\\x2dosg.opensciencegrid.org.automount $(DESTDIR)/lib/systemd/system
install -D -m 0644 cvmfs-config\\x2dosg.opensciencegrid.org.mount $(DESTDIR)/lib/systemd/system
install -D -m 0644 cvmfs-ligo.osgstorage.org.automount $(DESTDIR)/lib/systemd/system
install -D -m 0644 cvmfs-ligo.osgstorage.org.mount $(DESTDIR)/lib/systemd/system
install -D -m 0644 cvmfs-oasis.opensciencegrid.org.automount $(DESTDIR)/lib/systemd/system
install -D -m 0644 cvmfs-oasis.opensciencegrid.org.mount $(DESTDIR)/lib/systemd/system
# assume DESTDIR=$RPM_BUILD_ROOT is passed in
install-redhat: install-common
[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
#!/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
[Unit]
Description=Automount point for the configuration CVMFS repository
Documentation=https://cvmfs.readthedocs.io
Before=local-fs.target
[Automount]
Where=/cvmfs/config-osg.opensciencegrid.org
[Install]
WantedBy=multi-user.target
[Unit]
Description=Mount point for the configuration CVMFS repository.
Documentation=https://cvmfs.readthedocs.io
[Mount]
What=config-osg.opensciencegrid.org
Where=/cvmfs/config-osg.opensciencegrid.org
Type=cvmfs
Options=noauto
[Unit]
Description=Automount point for the LIGO frame files CVMFS repository.
Documentation=https://cvmfs.readthedocs.io
Before=local-fs.target
[Automount]
Where=/cvmfs/ligo.osgstorage.org
[Install]
WantedBy=multi-user.target
[Unit]
Description=Mount point for the LIGO frame files CVMFS repository.
Documentation=https://cvmfs.readthedocs.io
[Mount]
What=ligo.osgstorage.org
Where=/cvmfs/ligo.osgstorage.org
Type=cvmfs
Options=noauto
[Unit]
Description=Automount point for the OASIS CVMFS repository.
Documentation=https://cvmfs.readthedocs.io
Before=local-fs.target
[Automount]
Where=/cvmfs/oasis.opensciencegrid.org
[Install]
WantedBy=local-fs.target
[Unit]
Description=Mount point for the OASIS CVMFS repository.
Documentation=https://cvmfs.readthedocs.io
[Mount]
What=oasis.opensciencegrid.org
Where=/cvmfs/oasis.opensciencegrid.org
Type=cvmfs
Options=noauto
# /etc/cvmfs/default.local
#
# This is the CVMFS-wide configuration file. It is SAFE to edit
#
# The size limit, in MB, of the CVMFS local disk cache.
# 20GB is the recommended value; we strongly suggest setting this below 10GB.
CVMFS_QUOTA_LIMIT=20000
# This turns off the local HTTP proxy by default.
#
# This is appropriate for an individual laptop or workstation.
#
# THIS IS NOT AN APPROPRIATE SETTING FOR A CLUSTER.
#
# We strongly recommend finding a local HTTP caching proxy if you will use
# CVMFS across multiple hosts at your site.
#
CVMFS_HTTP_PROXY="DIRECT"
......@@ -6,7 +6,8 @@ set -e
# This script used for package creation and debugging
#
PKG=cvmfs-config-osg
PKG=cvmfs-config-ligo
RHPKG=cvmfs-config-osg
usage() {
echo "Sample script that builds the $PKG debian package from source"
......@@ -42,7 +43,7 @@ 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`"
upstream_version="`sed -n 's/^Version: //p' ../redhat/$RHPKG.spec`"
echo "done: $upstream_version"
echo "building..."
......
cvmfs-config-osg (0.1.0) stable; urgency=low
cvmfs-config-ligo (0.1.0) stable; urgency=low
* Place holder; this file is generated in build.sh
......
Source: cvmfs-config-osg
Source: cvmfs-config-ligo
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
Build-Depends: debhelper (>= 9), dh-systemd
Homepage: https://git.ligo.org/lvcomputing/cvmfs-config-ligo
Package: cvmfs-config-osg
Package: cvmfs-config-ligo
Architecture: all
Depends:
Description: CernVM File System configuration for OSG
Depends:
Provides: cvmfs-config
Description: CernVM File System configuration for LIGO
#!/bin/sh -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
mkdir -p /cvmfs/config-osg.opensciencegrid.org
mkdir -p /cvmfs/ligo.osgstorage.org
mkdir -p /cvmfs/oasis.opensciencegrid.org
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0
#!/usr/bin/make -f
%:
dh $@
dh $@ --with systemd
override_dh_installinit:
dh_installinit --name=cvmfs-config\x2dosg.opensciencegrid.org.automount
dh_installinit --name=cvmfs-ligo.osgstorage.org.automount
dh_installinit --name=cvmfs-oasis.opensciencegrid.org.automount
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment