-
Notifications
You must be signed in to change notification settings - Fork 19
Use latest client package in Dockerfiles and automatically build+publish client container #83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
57 commits
Select commit
Hold shift + click to select a range
4758da5
use new/latest config packages
bedroge 2a8639f
don't mount cvmfs-config repo in container
bedroge 2099b52
add multistage and multiarch Dockerfile
bedroge d3e90fc
script for getting/making CVMFS rpms
bedroge 28569c8
remove old arch-specific dockerfiles and push script
bedroge 3469c8a
update README for new container image
bedroge 012ac18
modify test-containers workflow for new dockerfile
bedroge 3aba5ad
don't use strategy matrix, build all in one go
bedroge 1e9a8bb
also run on PRs, but without pushing image
bedroge 6df928b
EESSI in tag should be lowercase
bedroge 628675f
only run workflow for PRs that change relevant files
bedroge 0cf8db7
dont make /cvmfs/cvmfs-config.eessi-hpc.org
bedroge b6e8540
don't run on changes in workflow, since that doesn't work
bedroge 6faaf2b
use variable for repo owner
bedroge c69dc1b
cache docker layers
bedroge 7d03bbd
add cache rotation step
bedroge f0b6813
add comments, trigger rebuild to test cache
bedroge 91c20b1
revert change, test cache
bedroge 24dd67d
install fuse-overlayfs
bedroge 4831662
add automake dependency
bedroge 97fc841
add gcc compiler as dep
bedroge 1a7e8ad
add make as dep
bedroge 804b8ad
also publish containers on local branch for now
bedroge 24ed582
undo latest change
bedroge e20cd98
use CVMFS_CLIENT_PROFILE
bedroge 428d38a
first attempt for debian Dockerfile
bedroge 15310cd
script for making/fetching .deb packages
bedroge b012e5d
rename Dockerfile so that they include the tag name
bedroge d802a43
use matrix, also build fuse-overlay images
bedroge b986164
small changes to workflow
bedroge 158ee10
fix matrix item name
bedroge 7fa6e17
use quotes around filename
bedroge 259a1d6
use bash to set name of Dockerfile without colons
bedroge c7fea4b
undo name change
bedroge 2ccb9d9
fix typo
bedroge ca9a550
fix if statement, install wget
bedroge b373a19
add an apt-get update command
bedroge ef47a13
add an apt-get update command
bedroge 0f26e9d
dont install fuse in final container, only fuse3
bedroge d029344
use dpkg --print-architecture instead of uname for deb packages
bedroge 40b7e0e
remove duplicate entry of config package
bedroge 7e68248
add cvmfs-config-default
bedroge d55222c
add some more packages (cvmfs deps)
bedroge 6dec944
remove redundant download, fix dir path to cvmfs
bedroge 70a6e4c
add lsb-release on archs where we build from source
bedroge 7d34375
add -y to apt-get
bedroge aa94aa0
debug missing lsb-release
bedroge e2688a0
add ppc64 arch
bedroge 0a43968
add ppc64el architecture to cvmfs control file
bedroge 1abb9f8
solve conflict
bedroge 415ba22
update README
bedroge ca0bed2
remove redundant lines
bedroge b34ca2f
build for all archs seperately, build manifest at end
bedroge 8b151ba
only push manifest when this is not a PR
bedroge d74fa2d
only create manifest when not running in PR
bedroge 29e365a
rename fuse-overlay-debian10 to build-node-debian10
bedroge 9abe227
renamed fuse-overlay container to build-node
bedroge File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,115 @@ | ||
| name: Build and publish EESSI container images | ||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - containers/Dockerfile.EESSI-* | ||
| - containers/build-or-download-cvmfs-*.sh | ||
|
|
||
| pull_request: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - containers/Dockerfile.EESSI-client* | ||
| - containers/build-or-download-cvmfs-rpm.sh | ||
|
|
||
| # also rebuild the containers for new releases of filesystem-layer: | ||
| # this often means that we have a new CVMFS configuration package | ||
| release: | ||
| types: [published] | ||
|
|
||
| jobs: | ||
| build_and_publish: | ||
| name: Build and publish image | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| packages: write | ||
| contents: read | ||
| strategy: | ||
| matrix: | ||
| tag: ['client-pilot:centos7', 'build-node:debian10'] | ||
| platform: [amd64, arm64, ppc64le] | ||
|
|
||
| steps: | ||
| - name: Check out the repo | ||
| uses: actions/checkout@v2 | ||
|
|
||
| - name: Set up QEMU | ||
| uses: docker/setup-qemu-action@v1 | ||
|
|
||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v1 | ||
|
|
||
| - name: Cache Docker layers | ||
| uses: actions/cache@v2 | ||
| with: | ||
| path: /tmp/.buildx-cache | ||
| key: ${{ runner.os }}-buildx-${{ matrix.platform }}-${{ matrix.tag }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-buildx-${{ matrix.platform }}-${{ matrix.tag }} | ||
|
|
||
| - name: Login to GitHub Container Registry | ||
| if: github.event_name != 'pull_request' | ||
| uses: docker/login-action@v1 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.repository_owner }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Convert and store repository owner in lowercase, replace colon in tag names by hyphen | ||
| run: | | ||
| echo REPOSITORY_OWNER=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV | ||
| tag=${{ matrix.tag }} | ||
| echo DOCKERFILE=Dockerfile.EESSI-${tag//:/-} >> $GITHUB_ENV | ||
|
|
||
| - name: Build and push to GitHub Packages | ||
| uses: docker/build-push-action@v2 | ||
| with: | ||
| tags: ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }}-${{ matrix.platform }} | ||
| file: containers/${{ env.DOCKERFILE }} | ||
| platforms: linux/${{ matrix.platform }} | ||
| push: ${{ github.event_name != 'pull_request' }} | ||
| cache-from: type=local,src=/tmp/.buildx-cache | ||
| cache-to: type=local,dest=/tmp/.buildx-cache-new | ||
|
|
||
| - name: Move cache | ||
| run: | | ||
| rm -rf /tmp/.buildx-cache | ||
| mv /tmp/.buildx-cache-new /tmp/.buildx-cache | ||
|
|
||
| create_manifest: | ||
| name: Create the Docker manifest | ||
| needs: build_and_publish | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| packages: write | ||
| contents: read | ||
| strategy: | ||
| matrix: | ||
| tag: ['client-pilot:centos7', 'build-node:debian10'] | ||
| steps: | ||
| - name: Login to GitHub Container Registry | ||
| if: github.event_name != 'pull_request' | ||
| uses: docker/login-action@v1 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.repository_owner }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Convert and store repository owner in lowercase | ||
| run: | | ||
| echo REPOSITORY_OWNER=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV | ||
|
|
||
| - name: Run docker manifest | ||
| if: github.event_name != 'pull_request' | ||
| run: | | ||
| docker manifest create \ | ||
| ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }} \ | ||
| --amend ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }}-amd64 \ | ||
| --amend ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }}-arm64 \ | ||
| --amend ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }}-ppc64le | ||
|
|
||
| - name: Push manifest | ||
| if: github.event_name != 'pull_request' | ||
| run: docker manifest push ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| ARG cvmfsversion=2.8.1 | ||
| ARG fuseoverlayfsversion=0.4.1 | ||
|
|
||
| FROM debian:10.6 AS prepare-deb | ||
| ARG cvmfsversion | ||
| COPY ./containers/build-or-download-cvmfs-debs.sh /build-or-download-cvmfs-debs.sh | ||
| RUN sh /build-or-download-cvmfs-debs.sh ${cvmfsversion} | ||
|
|
||
|
|
||
| FROM debian:10.6 | ||
| ARG cvmfsversion | ||
|
|
||
| COPY --from=prepare-deb /root/deb /root/deb | ||
|
|
||
| RUN apt-get update | ||
| RUN apt-get install -y sudo vim openssh-client gawk autofs curl attr uuid fuse3 libfuse2 psmisc gdb uuid-dev | ||
| RUN dpkg -i /root/deb/cvmfs_${cvmfsversion}~1+debian10_$(dpkg --print-architecture).deb \ | ||
| /root/deb/cvmfs-fuse3_${cvmfsversion}~1+debian10_$(dpkg --print-architecture).deb \ | ||
| /root/deb/cvmfs-config-default_latest_all.deb \ | ||
| /root/deb/cvmfs-config-eessi_latest_all.deb | ||
|
|
||
| RUN echo 'CVMFS_QUOTA_LIMIT=10000' > /etc/cvmfs/default.local \ | ||
| && echo 'CVMFS_CLIENT_PROFILE="single"' >> /etc/cvmfs/default.local | ||
|
|
||
| RUN mkdir -p /cvmfs/pilot.eessi-hpc.org | ||
|
|
||
| RUN useradd -ms /bin/bash eessi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| ARG cvmfsversion=2.8.1 | ||
| ARG fuseoverlayfsversion=0.4.1 | ||
|
|
||
| FROM centos:7 AS prepare-rpm | ||
| ARG cvmfsversion | ||
| COPY ./containers/build-or-download-cvmfs-rpms.sh /build-or-download-cvmfs-rpms.sh | ||
| RUN sh /build-or-download-cvmfs-rpms.sh ${cvmfsversion} | ||
|
|
||
|
|
||
| FROM centos:7 AS build-fuse-overlayfs | ||
| ARG fuseoverlayfsversion | ||
| RUN yum install -y wget fuse3-devel autoconf automake gcc make tar | ||
| RUN wget https://github.com/containers/fuse-overlayfs/archive/refs/tags/v${fuseoverlayfsversion}.tar.gz \ | ||
| && tar xzf v${fuseoverlayfsversion}.tar.gz \ | ||
| && cd fuse-overlayfs-${fuseoverlayfsversion} \ | ||
| && ./autogen.sh && ./configure && make && make install | ||
|
|
||
|
|
||
| FROM centos:7 | ||
| ARG cvmfsversion | ||
|
|
||
| COPY --from=prepare-rpm /root/rpmbuild/RPMS /root/rpmbuild/RPMS | ||
| COPY --from=build-fuse-overlayfs /usr/local/bin/fuse-overlayfs /usr/local/bin/fuse-overlayfs | ||
|
|
||
| RUN yum install -y sudo vim openssh-clients | ||
| RUN yum install -y /root/rpmbuild/RPMS/$(uname -m)/cvmfs-${cvmfsversion}-1.el7.$(uname -m).rpm \ | ||
| /root/rpmbuild/RPMS/$(uname -m)/cvmfs-fuse3-${cvmfsversion}-1.el7.$(uname -m).rpm \ | ||
| http://ecsft.cern.ch/dist/cvmfs/cvmfs-config/cvmfs-config-default-latest.noarch.rpm | ||
| RUN yum install -y https://github.com/EESSI/filesystem-layer/releases/download/latest/cvmfs-config-eessi-latest.noarch.rpm | ||
|
|
||
| RUN echo 'CVMFS_QUOTA_LIMIT=10000' > /etc/cvmfs/default.local \ | ||
| && echo 'CVMFS_CLIENT_PROFILE="single"' >> /etc/cvmfs/default.local | ||
|
|
||
| RUN mkdir -p /cvmfs/pilot.eessi-hpc.org | ||
|
|
||
| RUN useradd -ms /bin/bash eessi |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| cvmfsversion=$1 | ||
| arch=$(dpkg --print-architecture) | ||
|
|
||
| apt-get update | ||
| apt-get install -y wget | ||
| if [ "$arch" = "ppc64el" ] || [ "$arch" = "arm64" ] | ||
| then | ||
| apt-get install -y devscripts libfuse3-dev cmake cpio libcap-dev libssl-dev libfuse-dev pkg-config libattr1-dev python-dev python-setuptools uuid-dev valgrind libz-dev lsb-release | ||
| cd /tmp | ||
| wget https://github.com/cvmfs/cvmfs/archive/refs/tags/cvmfs-${cvmfsversion}.tar.gz | ||
| tar xzf cvmfs-${cvmfsversion}.tar.gz | ||
| cd cvmfs-cvmfs-${cvmfsversion}/ci/cvmfs | ||
| mkdir /root/deb | ||
| sed -i 's/Architecture: i386 amd64 armhf arm64/Architecture: i386 amd64 armhf arm64 ppc64el/' ../../packaging/debian/cvmfs/control.in | ||
| ./deb.sh /tmp/cvmfs-cvmfs-${cvmfsversion} /root/deb | ||
| else | ||
| mkdir -p /root/deb | ||
| cd /root/deb | ||
| wget https://ecsft.cern.ch/dist/cvmfs/cvmfs-${cvmfsversion}/cvmfs_${cvmfsversion}~1+debian10_${arch}.deb | ||
| wget https://ecsft.cern.ch/dist/cvmfs/cvmfs-${cvmfsversion}/cvmfs-fuse3_${cvmfsversion}~1+debian10_${arch}.deb | ||
| fi | ||
|
|
||
| cd /root/deb | ||
| wget https://ecsft.cern.ch/dist/cvmfs/cvmfs-config/cvmfs-config-default_latest_all.deb | ||
| wget https://github.com/EESSI/filesystem-layer/releases/download/latest/cvmfs-config-eessi_latest_all.deb | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| cvmfsversion=$1 | ||
| arch=$(uname -m) | ||
|
|
||
| yum install -y wget | ||
| if [ "$arch" = "ppc64le" ] | ||
| then | ||
| yum install -y epel-release | ||
| yum install -y rpm-build checkpolicy cmake fuse-devel fuse3-devel gcc gcc-c++ golang libattr-devel libcap-devel libuuid-devel openssl-devel python2-devel python2-setuptools selinux-policy-devel valgrind-devel hardlink selinux-policy-targeted | ||
| wget https://ecsft.cern.ch/dist/cvmfs/cvmfs-${cvmfsversion}/cvmfs-${cvmfsversion}-1.el7.src.rpm && rpmbuild --rebuild cvmfs-${cvmfsversion}-1.el7.src.rpm | ||
| else | ||
| mkdir -p /root/rpmbuild/RPMS/${arch} | ||
| cd /root/rpmbuild/RPMS/${arch} | ||
| wget https://ecsft.cern.ch/dist/cvmfs/cvmfs-${cvmfsversion}/cvmfs-${cvmfsversion}-1.el7.${arch}.rpm | ||
| wget https://ecsft.cern.ch/dist/cvmfs/cvmfs-${cvmfsversion}/cvmfs-fuse3-${cvmfsversion}-1.el7.${arch}.rpm | ||
| fi |
This file was deleted.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.