From e27cf125be84eea68d2dcc8bc673cadd72f1b90c Mon Sep 17 00:00:00 2001 From: jmcarcell Date: Thu, 14 Dec 2023 14:49:39 +0100 Subject: [PATCH] Add new builds with cvmfs --- .github/workflows/image-creator.yml | 7 +++---- Docker/{ => alma9}/alma9-build/Dockerfile | 0 Docker/alma9/alma9-cvmfs/Dockerfile | 14 ++++++++++++++ Docker/alma9/alma9-cvmfs/mount.sh | 4 ++++ Docker/alma9/build.sh | 2 ++ Docker/centos7/build.sh | 2 ++ Docker/{ => centos7}/centos7-build/Dockerfile | 0 Docker/centos7/centos7-cvmfs/Dockerfile | 14 ++++++++++++++ Docker/ubuntu22/build.sh | 2 ++ .../{ => ubuntu22}/ubuntu22-build/Dockerfile | 0 Docker/ubuntu22/ubuntu22-cvmfs/Dockerfile | 19 +++++++++++++++++++ Docker/ubuntu22/ubuntu22-cvmfs/mount.sh | 4 ++++ 12 files changed, 64 insertions(+), 4 deletions(-) rename Docker/{ => alma9}/alma9-build/Dockerfile (100%) create mode 100644 Docker/alma9/alma9-cvmfs/Dockerfile create mode 100755 Docker/alma9/alma9-cvmfs/mount.sh create mode 100755 Docker/alma9/build.sh create mode 100755 Docker/centos7/build.sh rename Docker/{ => centos7}/centos7-build/Dockerfile (100%) create mode 100644 Docker/centos7/centos7-cvmfs/Dockerfile create mode 100755 Docker/ubuntu22/build.sh rename Docker/{ => ubuntu22}/ubuntu22-build/Dockerfile (100%) create mode 100644 Docker/ubuntu22/ubuntu22-cvmfs/Dockerfile create mode 100755 Docker/ubuntu22/ubuntu22-cvmfs/mount.sh diff --git a/.github/workflows/image-creator.yml b/.github/workflows/image-creator.yml index b3ff38a..d4516a6 100644 --- a/.github/workflows/image-creator.yml +++ b/.github/workflows/image-creator.yml @@ -8,9 +8,6 @@ name: Create images on: push: - schedule: - # every Sunday - - cron: '0 0 * * 0' workflow_dispatch: jobs: @@ -26,10 +23,11 @@ jobs: run: | echo $PWD ls -l - docker build -t ${{ matrix.image }} Docker/${{ matrix.image }}-build + Docker/${{ matrix.image }}/build.sh - name: tag run: | docker tag ${{ matrix.image }} ghcr.io/key4hep/key4hep-images/${{ matrix.image }}:latest + docker tag ${{ matrix.image }}-cvmfs ghcr.io/key4hep/key4hep-images/${{ matrix.image }}-cvmfs:latest - name: show run: docker images - name: login and push @@ -39,6 +37,7 @@ jobs: if [ ! -z ${deploy_secret} ]; then echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io --username ${{ github.actor }} --password-stdin; docker push ghcr.io/key4hep/key4hep-images/${{ matrix.image }}:latest; + docker push ghcr.io/key4hep/key4hep-images/${{ matrix.image }}-cvmfs:latest; else echo "Skipping deploy no secrets present"; fi diff --git a/Docker/alma9-build/Dockerfile b/Docker/alma9/alma9-build/Dockerfile similarity index 100% rename from Docker/alma9-build/Dockerfile rename to Docker/alma9/alma9-build/Dockerfile diff --git a/Docker/alma9/alma9-cvmfs/Dockerfile b/Docker/alma9/alma9-cvmfs/Dockerfile new file mode 100644 index 0000000..66757b3 --- /dev/null +++ b/Docker/alma9/alma9-cvmfs/Dockerfile @@ -0,0 +1,14 @@ +FROM alma9 + +RUN dnf install -y https://ecsft.cern.ch/dist/cvmfs/cvmfs-release/cvmfs-release-latest.noarch.rpm && \ + dnf install -y cvmfs && \ + mkdir /cvmfs/cvmfs-config.cern.ch /cvmfs/sw.hsf.org /cvmfs/sw-nightlies.hsf.org && \ + echo "CVMFS_CONFIG_REPOSITORY=cvmfs-config.cern.ch" > /etc/cvmfs/default.local && \ + echo "CVMFS_CLIENT_PROFILE=single" >> /etc/cvmfs/default.local && \ + echo "CVMFS_QUOTA_LIMIT='15000'" >> /etc/cvmfs/default.local && \ + echo "CVMFS_USE_CDN='yes'" >> /etc/cvmfs/default.local && \ + dnf clean all + +COPY mount.sh /mount.sh + +ENTRYPOINT ["/bin/bash"] \ No newline at end of file diff --git a/Docker/alma9/alma9-cvmfs/mount.sh b/Docker/alma9/alma9-cvmfs/mount.sh new file mode 100755 index 0000000..2ce1df5 --- /dev/null +++ b/Docker/alma9/alma9-cvmfs/mount.sh @@ -0,0 +1,4 @@ +set -e +mount -t cvmfs cvmfs-config.cern.ch /cvmfs/cvmfs-config.cern.ch +mount -t cvmfs sw.hsf.org /cvmfs/sw.hsf.org +mount -t cvmfs sw-nightlies.hsf.org /cvmfs/sw-nightlies.hsf.org diff --git a/Docker/alma9/build.sh b/Docker/alma9/build.sh new file mode 100755 index 0000000..47f098d --- /dev/null +++ b/Docker/alma9/build.sh @@ -0,0 +1,2 @@ +docker build -t alma9 alma9-build +docker build -t alma9-cvmfs alma9-cvmfs diff --git a/Docker/centos7/build.sh b/Docker/centos7/build.sh new file mode 100755 index 0000000..6a36cfb --- /dev/null +++ b/Docker/centos7/build.sh @@ -0,0 +1,2 @@ +docker build -t centos7 centos7-build +docker build -t centos7-cvmfs centos7-cvmfs diff --git a/Docker/centos7-build/Dockerfile b/Docker/centos7/centos7-build/Dockerfile similarity index 100% rename from Docker/centos7-build/Dockerfile rename to Docker/centos7/centos7-build/Dockerfile diff --git a/Docker/centos7/centos7-cvmfs/Dockerfile b/Docker/centos7/centos7-cvmfs/Dockerfile new file mode 100644 index 0000000..77c9c79 --- /dev/null +++ b/Docker/centos7/centos7-cvmfs/Dockerfile @@ -0,0 +1,14 @@ +FROM centos7 + +RUN yum install -y https://ecsft.cern.ch/dist/cvmfs/cvmfs-release/cvmfs-release-latest.noarch.rpm && \ + yum install -y cvmfs && \ + mkdir /cvmfs/cvmfs-config.cern.ch /cvmfs/sw.hsf.org /cvmfs/sw-nightlies.hsf.org && \ + echo "CVMFS_CONFIG_REPOSITORY=cvmfs-config.cern.ch" > /etc/cvmfs/default.local && \ + echo "CVMFS_CLIENT_PROFILE=single" >> /etc/cvmfs/default.local && \ + echo "CVMFS_QUOTA_LIMIT='15000'" >> /etc/cvmfs/default.local && \ + echo "CVMFS_USE_CDN='yes'" >> /etc/cvmfs/default.local && \ + yum clean all + +COPY mount.sh /mount.sh + +ENTRYPOINT ["/bin/bash"] \ No newline at end of file diff --git a/Docker/ubuntu22/build.sh b/Docker/ubuntu22/build.sh new file mode 100755 index 0000000..4c16825 --- /dev/null +++ b/Docker/ubuntu22/build.sh @@ -0,0 +1,2 @@ +docker build -t ubuntu22 ubuntu22-build +docker build -t ubuntu22-cvmfs ubuntu22-cvmfs diff --git a/Docker/ubuntu22-build/Dockerfile b/Docker/ubuntu22/ubuntu22-build/Dockerfile similarity index 100% rename from Docker/ubuntu22-build/Dockerfile rename to Docker/ubuntu22/ubuntu22-build/Dockerfile diff --git a/Docker/ubuntu22/ubuntu22-cvmfs/Dockerfile b/Docker/ubuntu22/ubuntu22-cvmfs/Dockerfile new file mode 100644 index 0000000..e6e5024 --- /dev/null +++ b/Docker/ubuntu22/ubuntu22-cvmfs/Dockerfile @@ -0,0 +1,19 @@ +FROM ubuntu22 + +RUN apt update && \ + apt install -y lsb-release && \ + wget https://ecsft.cern.ch/dist/cvmfs/cvmfs-release/cvmfs-release-latest_all.deb && \ + dpkg -i cvmfs-release-latest_all.deb && \ + rm -rf cvmfs-release-latest_all.deb && \ + apt update && \ + apt install -y cvmfs && \ + mkdir /cvmfs/cvmfs-config.cern.ch /cvmfs/sw.hsf.org /cvmfs/sw-nightlies.hsf.org && \ + echo "CVMFS_CLIENT_PROFILE=single" >> /etc/cvmfs/default.local && \ + echo "CVMFS_QUOTA_LIMIT='15000'" >> /etc/cvmfs/default.local && \ + echo "CVMFS_USE_CDN='yes'" >> /etc/cvmfs/default.local && \ + apt clean &&\ + rm -rf /var/lib/apt/lists/* + +COPY mount.sh /mount.sh + +CMD ["/bin/bash"] \ No newline at end of file diff --git a/Docker/ubuntu22/ubuntu22-cvmfs/mount.sh b/Docker/ubuntu22/ubuntu22-cvmfs/mount.sh new file mode 100755 index 0000000..2ce1df5 --- /dev/null +++ b/Docker/ubuntu22/ubuntu22-cvmfs/mount.sh @@ -0,0 +1,4 @@ +set -e +mount -t cvmfs cvmfs-config.cern.ch /cvmfs/cvmfs-config.cern.ch +mount -t cvmfs sw.hsf.org /cvmfs/sw.hsf.org +mount -t cvmfs sw-nightlies.hsf.org /cvmfs/sw-nightlies.hsf.org