Commit f14db240 authored by Tom McCauley's avatar Tom McCauley
Browse files

add c8-cvmfs dir and contents

parent 47a4e8ff
# A container where CernVM-FS is up and running for CMSSW
# Make the base image configurable:
#ARG BASEIMAGE=gitlab-registry.cern.ch/cms-cloud/cmssw-docker/cc7-cms:latest
ARG BASEIMAGE=cmscloud/c8-cms:latest
# Set up the SLC6 CMSSW base:
FROM ${BASEIMAGE}
LABEL maintainer="Clemens Lange <clemens.lange@cern.ch>"
# Build-time metadata as defined at http://label-schema.org
ARG BUILD_DATE
ARG VCS_REF
ARG VCS_URL
ARG VERSION
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.name="C8 CMSSW Docker images using CVMFS" \
org.label-schema.description="Provide lightweight images for running CMSSW." \
org.label-schema.url="http://cms-sw.github.io/" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vcs-url=$VCS_URL \
org.label-schema.vendor="CERN" \
org.label-schema.version=$VERSION \
org.label-schema.schema-version="1.0"
USER root
# install cvmfs repos
ADD etc-yum-cernvm.repo /etc/yum.repos.d/cernvm.repo
RUN yum install -y cvmfs cvmfs-config-default fuse && \
yum clean -y all
# afs does not work when building on Mac
# add kerberos and afs configs
# ADD krb5.conf /etc/krb5.conf
# ADD afs/etc /usr/vice/etc
# ADD openafs.ko /lib/modules/2.6.32-696.30.1.el6.x86_64/fs/openafs/openafs.ko
# RUN echo /lib/modules/2.6.32-696.30.1.el6.x86_64/fs/openafs/openafs.ko | openafs-modules --add-modules && \
# /sbin/chkconfig --add afs && \
# /sbin/service afs start
# add CVMFS mounting
RUN mkdir -p /cvmfs/cms.cern.ch && \
echo "cms.cern.ch /cvmfs/cms.cern.ch cvmfs defaults 0 0" >> /etc/fstab && \
mkdir -p /cvmfs/cms-opendata-conddb.cern.ch && \
echo "cms-opendata-conddb.cern.ch /cvmfs/cms-opendata-conddb.cern.ch cvmfs defaults 0 0" >> /etc/fstab
ADD etc-cvmfs-config.d-cms.cern.ch.local /etc/cvmfs/config.d/cms.cern.ch.local
ADD run-cvmfs.sh /etc/cvmfs/run-cvmfs.sh
RUN chmod uga+rx /etc/cvmfs/run-cvmfs.sh
ADD etc-cvmfs-default-local /etc/cvmfs/default.local
WORKDIR /home/cmsusr
USER cmsusr
ENV USER cmsusr
ENV HOME /home/cmsusr
ADD entrypoint.sh /opt/cms/entrypoint.sh
RUN sudo chmod 755 /opt/cms/entrypoint.sh && \
sudo chown -R cmsusr /home/cmsusr && \
chmod 755 /home/cmsusr
ENTRYPOINT ["/opt/cms/entrypoint.sh"]
CMD ["/bin/zsh"]
\ No newline at end of file
default: build
# Build Docker image
build: docker_build output
# Build and push Docker image
release: docker_build docker_push output
# Image can be overidden with env var.
DOCKER_IMAGE ?= cmscloud/c8-cvmfs
CERN_IMAGE ?= gitlab-registry.cern.ch/cms-cloud/cmssw-docker/c8-cvmfs
# Get the latest commit.
GIT_COMMIT = $(strip $(shell git rev-parse --short HEAD))
# Get the date as version number
CODE_VERSION = $(strip $(shell date +"%Y-%m-%d"))
# Find out if the working directory is clean
GIT_NOT_CLEAN_CHECK = $(shell git status --porcelain)
ifneq (x$(GIT_NOT_CLEAN_CHECK), x)
DOCKER_TAG_SUFFIX = "-dirty"
endif
# If we're releasing to Docker Hub, and we're going to mark it with the latest tag, it should exactly match a version release
ifeq ($(MAKECMDGOALS),release)
# Use the version number as the release tag.
DOCKER_TAG = $(CODE_VERSION)
# See what commit is tagged to match the version
VERSION_COMMIT = $(strip $(shell git rev-list $(CODE_VERSION) -n 1 | cut -c1-7))
ifneq ($(VERSION_COMMIT), $(GIT_COMMIT))
$(error echo You are trying to push a build based on commit $(GIT_COMMIT) but the tagged release version is $(VERSION_COMMIT))
endif
# Don't push to Docker Hub if this isn't a clean repo
ifneq (x$(GIT_NOT_CLEAN_CHECK), x)
$(error echo You are trying to release a build based on a dirty repo)
endif
else
# Add the commit ref for development builds. Mark as dirty if the working directory isn't clean
DOCKER_TAG = $(CODE_VERSION)-$(GIT_COMMIT)$(DOCKER_TAG_SUFFIX)
endif
docker_build:
# Build Docker image
docker build \
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
--build-arg VERSION=$(CODE_VERSION) \
--build-arg VCS_URL=`git config --get remote.origin.url` \
--build-arg VCS_REF=$(GIT_COMMIT) \
-t $(DOCKER_IMAGE):$(DOCKER_TAG) \
--compress --squash .
# Tag image as latest
docker tag $(DOCKER_IMAGE):$(DOCKER_TAG) $(DOCKER_IMAGE):latest
docker_push:
# Tag image also for CERN GitLab container registry
docker tag $(DOCKER_IMAGE):$(DOCKER_TAG) $(CERN_IMAGE):$(DOCKER_TAG)
docker tag $(DOCKER_IMAGE):$(DOCKER_TAG) $(CERN_IMAGE):latest
# Push to DockerHub
docker push $(DOCKER_IMAGE):$(DOCKER_TAG)
docker push $(DOCKER_IMAGE):latest
# Push to CERN GitLab container registry
docker push $(CERN_IMAGE):$(DOCKER_TAG)
docker push $(CERN_IMAGE):latest
output:
@echo Docker Image: $(DOCKER_IMAGE):$(DOCKER_TAG)
This diff is collapsed.
This diff is collapsed.
>hepix.org # HEPiX intersite cell
193.205.219.8 # afs01.hepix.org
>itep.ru # Institute for Theoretical and Experimental Physics, Moscow
193.124.227.48 #vxitep.itep.ru
>atlas.udo.edu #atlas physik.uni-dortmund.de
129.217.163.110 #top10.physik.uni-dortmund.de
>e4.physik.uni-dortmund.de #TU Dortmund, Physics E4
129.217.167.20 #afs.e4.physik.uni-dortmund.de
129.217.167.24 #afs2.e4.physik.uni-dortmund.de
/afs:/usr/vice/cache:524288
#!/bin/sh
#
# kill all processes using AFS with signal $1
# referenced from the OpenAFS init script
#
# http://www.tu-chemnitz.de/urz/afs/openafs/download/suse-7.2/SOURCES/openafs-killafs
# CERN/JI: extended to loop and log
if [ $# -eq 1 ]; then
SIGNAL=$1
else
SIGNAL=TERM
fi
LOGGER=/usr/bin/logger
if [ ! -x "$LOGGER" ]; then
LOGGER="echo "
else
LOGGER="/usr/bin/logger -s -t killafs -p user.warn -- "
fi
if [ ! -x /usr/sbin/lsof ]; then
$LOGGER "lsof not found - not killing any AFS processes"
exit
fi
PIDS=''
TRY=1
MAXTRY=10
$LOGGER "stopping all processes on AFS via $SIGNAL"
while [ "$TRY" -lt "$MAXTRY" ]; do
AFS_LSOF=`/usr/sbin/lsof -Fpnc /afs `
PIDS=`echo "$AFS_LSOF" | grep '^p[1-9]' | sed -e 's/^p//'`
if [ -z "$PIDS" ]; then
break
fi
AFS_COMMANDSFILES=`echo "$AFS_LSOF" | grep '^[cn]' | head -10 | sed -e 's/^c//' -e 's/^n/ /'`
AFS_PIDCOUNT=`echo "$PIDS" | wc -w`
if [ "$TRY" -gt 1 ]; then
$LOGGER "(${TRY}/${MAXTRY}): $AFS_PIDCOUNT programs on AFS, after signal:$SIGNAL [first 10]"
$LOGGER "$AFS_COMMANDSFILES"
fi
/bin/kill "-$SIGNAL" $PIDS >/dev/null 2>&1
sleep 5
let TRY++
done
#!/bin/sh
set -e
/etc/cvmfs/run-cvmfs.sh
echo "::: Setting up CMS environment..."
source /cvmfs/cms.cern.ch/cmsset_default.sh
echo "::: Setting up CMS environment... [done]"
exec "$@"
# See https://twiki.cern.ch/twiki/bin/view/CMSPublic/CernVMFS4cms
# Important setting for CMS, jobs will not work properly without!
# export CMS_LOCAL_SITE=<location of the SITECONF area of your site you like to use relative to the CVMFS SITECONF area>
export CMS_LOCAL_SITE=T3_CH_Volunteer
# This only needed if you did not configure Squids in /etc/default.[conf|local]
# CVMFS_HTTP_PROXY="http://<Squid1-url>:<port>|http://<Squid2-url>:<port>[|...]"
\ No newline at end of file
CVMFS_REPOSITORIES=cms.cern.ch,cms-opendata-conddb.cern.ch
#CVMFS_CACHE_BASE=/scratch/var/cache/cvmfs2
CVMFS_QUOTA_LIMIT=2000
# for inside CERN
#CVMFS_HTTP_PROXY="http://ca-proxy.cern.ch:3128"
# outside CERN or in general
CVMFS_HTTP_PROXY="DIRECT"
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQE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KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3pgrEIimdCPWG9cuhQ0d
ZWfYxvHRz5hL4HvQlmvikLIlHxs2EApnGyAWdaHAeQ4IiY+JXQnGsS8e5Gr2cZRb
Y6Ya19GrjMY1wv8fc+uU9kXp7TbHpl3mSQxERG4+wqosN3+IUaPHdnWGP11idOQB
I0HsJ7PTRk9quFjx1ppkVITZN07+OdGBIzLK6SyDjy49IfL6DVZUH/Oc99IiXg6E
NDN2UecnnjDEmcvQh2UjGSQ+0NHe36ttQKEnK58GvcSj2reUEaVKLRvPcrzT9o7c
ugxcbkBGB3VfqSgfun8urekGEHx+vTNwu8rufBkAbQYdYCPBD3AGqSg+Kgi7i/gX
cwIDAQAB
-----END PUBLIC KEY-----
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxKhc7s1HmmPWH4Cq1U3K
4FNFKcMQgZxUrgQEfvgkF97OZ8I8wzC9MWqmegX6tqlPmAzYWTM+Xi4nEBWYRhd+
hVN/prHyYGzb/kTyCSHa9EQtIk9SUyoPfQxkGRnx68pD5con8KJySNa8neplsXx+
2gypwjasBRQLzB3BrrGhrzZ5fL84+dsxNBBW6QfNO1BS5ATeWl3g1J27f0GoGtRO
YbPhaAd9D+B+qVo9pt3jKXvjTZQG0pE16xaX1elciFT9OhtZGaErDJyURskD7g3/
NotcpBL5K5v95zA/kh5u+TRrmeTxHyDOpyrGrkqRaT5p+/C1z0HDyKFQbptegCbn
GwIDAQAB
-----END PUBLIC KEY-----
Supports Markdown
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