Skip to content

Commit

Permalink
Merge pull request #1 from trz42/create_nessi_cfg_packages
Browse files Browse the repository at this point in the history
prepare cfg for NESSI
  • Loading branch information
trz42 authored Jun 27, 2023
2 parents 3101cd6 + 76a3e75 commit 8717461
Show file tree
Hide file tree
Showing 7 changed files with 122 additions and 114 deletions.
52 changes: 31 additions & 21 deletions .github/workflows/build-test-release-client-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ jobs:
build-linux-packages:
runs-on: ubuntu-latest
steps:
- name: Install Ansible
run: |
sudo apt update --yes
sudo apt install --yes software-properties-common
sudo add-apt-repository --yes --update ppa:ansible/ansible
sudo apt install --yes ansible
- name: Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0

Expand All @@ -36,11 +43,13 @@ jobs:
- name: Make symlink to group_vars
run: ln -s inventory/group_vars

# uses: roles-ansible/check-ansible-debian-stable-action@bc4b37806481d66df213c1a8d5c59495ed7801f0
- name: Prepare package source
uses: roles-ansible/check-ansible-debian-stable-action@bc4b37806481d66df213c1a8d5c59495ed7801f0
uses: dawidd6/action-ansible-playbook@5d970176ea4bfd99a3f5004d48e293fe0994eda1 # v2.6.1
with:
targets: "./prepare-client-packages.yml"
hosts: "localhost"
playbook: "./prepare-client-packages.yml"
# options: |
# --inventory "localhost"

# We probably should loop over the set {rpm,deb,osxpkg} to create packages, but
# it will make debugging more annoying.
Expand All @@ -49,25 +58,25 @@ jobs:
uses: bpicode/github-action-fpm@e76c0e2166030f4691d641a700b16958c7d12f5d # v0.9.2
with:
fpm_args: "etc"
fpm_opts: "--debug -n cvmfs-config-eessi -v ${{ steps.get_version.outputs.version }} -t rpm -a all -s dir -C ./package --description 'CVMFS configuration package for EESSI.'"
fpm_opts: "--debug -n cvmfs-config-nessi -v ${{ steps.get_version.outputs.version }} -t rpm -a all -s dir -C ./package --description 'CVMFS configuration package for NESSI.'"

- name: Build Deb package
uses: bpicode/github-action-fpm@e76c0e2166030f4691d641a700b16958c7d12f5d # v0.9.2
with:
fpm_args: "etc"
fpm_opts: "--debug -n cvmfs-config-eessi -v ${{ steps.get_version.outputs.version }} -t deb -a all -s dir -C ./package --description 'CVMFS configuration package for EESSI.'"
fpm_opts: "--debug -n cvmfs-config-nessi -v ${{ steps.get_version.outputs.version }} -t deb -a all -s dir -C ./package --description 'CVMFS configuration package for NESSI.'"

- name: Build tar package
uses: bpicode/github-action-fpm@e76c0e2166030f4691d641a700b16958c7d12f5d # v0.9.2
with:
fpm_args: "etc"
fpm_opts: "--debug -n cvmfs-config-eessi-${{ steps.get_version.outputs.version }} -t tar -a all -s dir -C ./package --description 'CVMFS configuration package for EESSI.'"
fpm_opts: "--debug -n cvmfs-config-nessi-${{ steps.get_version.outputs.version }} -t tar -a all -s dir -C ./package --description 'CVMFS configuration package for NESSI.'"

- name: Upload packages as build artifacts
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
with:
name: linux_packages
path: cvmfs-config-eessi*
path: cvmfs-config-nessi*

# build-macos-package:
# runs-on: macos-latest
Expand Down Expand Up @@ -131,7 +140,7 @@ jobs:
- name: Install CVMFS client
run: sudo apt-get update && sudo apt-get install cvmfs

- name: Download cvmfs-config-eessi package
- name: Download cvmfs-config-nessi package
uses: actions/download-artifact@9782bd6a9848b53b110e712e20e42d89988822b7 # v3.0.1
with:
name: linux_packages
Expand All @@ -140,7 +149,7 @@ jobs:
id: find_filename
shell: bash
run: |
debfile="$(find . -name cvmfs-config-eessi*.deb)"
debfile="$(find . -name cvmfs-config-nessi*.deb)"
echo ::set-output name=debfile::${debfile}
- name: Install package
Expand All @@ -153,7 +162,7 @@ jobs:
run: sudo cvmfs_config setup

- name: Test repository access
run: ls /cvmfs/pilot.eessi-hpc.org/
run: ls /cvmfs/pilot.nessi.no/

test-rpm-package:
needs: build-linux-packages
Expand All @@ -169,7 +178,7 @@ jobs:
- name: Install CVMFS client
run: yum install -y cvmfs

- name: Download cvmfs-config-eessi package
- name: Download cvmfs-config-nessi package
uses: actions/download-artifact@9782bd6a9848b53b110e712e20e42d89988822b7 # v3.0.1
with:
name: linux_packages
Expand All @@ -178,7 +187,7 @@ jobs:
id: find_filename
shell: bash
run: |
rpmfile="$(find . -name cvmfs-config-eessi*.rpm)"
rpmfile="$(find . -name cvmfs-config-nessi*.rpm)"
echo ::set-output name=rpmfile::${rpmfile}
- name: Install package
Expand All @@ -189,10 +198,10 @@ jobs:

- name: Mount the repositories
#run: cvmfs_config setup
run: mkdir -p /cvmfs/pilot.eessi-hpc.org && mount -t cvmfs pilot.eessi-hpc.org /cvmfs/pilot.eessi-hpc.org
run: mkdir -p /cvmfs/pilot.nessi.no && mount -t cvmfs pilot.nessi.no /cvmfs/pilot.nessi.no

- name: Test repository access
run: ls /cvmfs/pilot.eessi-hpc.org/
run: ls /cvmfs/pilot.nessi.no/

test-tar-package:
needs: build-linux-packages
Expand All @@ -207,7 +216,7 @@ jobs:
- name: Install CVMFS client
run: sudo apt-get update && sudo apt-get install cvmfs

- name: Download cvmfs-config-eessi package
- name: Download cvmfs-config-nessi package
uses: actions/download-artifact@9782bd6a9848b53b110e712e20e42d89988822b7 # v3.0.1
with:
name: linux_packages
Expand All @@ -216,7 +225,7 @@ jobs:
id: find_filename
shell: bash
run: |
tarfile="$(find . -name cvmfs-config-eessi*.tar)"
tarfile="$(find . -name cvmfs-config-nessi*.tar)"
echo ::set-output name=tarfile::${tarfile}
- name: Install package
Expand All @@ -229,7 +238,7 @@ jobs:
run: sudo cvmfs_config setup

- name: Test repository access
run: ls /cvmfs/pilot.eessi-hpc.org/
run: ls /cvmfs/pilot.nessi.no/

# test-macos-package:
# needs: build-macos-package
Expand Down Expand Up @@ -267,6 +276,7 @@ jobs:

release:
#needs: [build-linux-packages, build-macos-package, test-deb-package, test-rpm-package, test-macos-package, test-tar-package]
#needs: [build-linux-packages, test-deb-package, test-tar-package]
needs: [build-linux-packages, test-deb-package, test-rpm-package, test-tar-package]
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
Expand All @@ -290,7 +300,7 @@ jobs:
shell: bash
run: |
ls -1 -R .
echo ::set-output name=package_filenames::$(find ./build_artifacts -name cvmfs-config-eessi*)
echo ::set-output name=package_filenames::$(find ./build_artifacts -name cvmfs-config-nessi*)
- uses: meeDamian/github-release@7ae19492500104f636b3fee4d8103af0fed36c8e # v2.0.3
with:
Expand Down Expand Up @@ -326,9 +336,9 @@ jobs:
shell: bash
run: |
sudo apt-get install rename
rename "s/([0-9]+.[0-9]+.[0-9]+)(-[0-9]+)?/latest/g" $(find ./build_artifacts -name cvmfs-config-eessi*)
rename "s/([0-9]+.[0-9]+.[0-9]+)(-[0-9]+)?/latest/g" $(find ./build_artifacts -name cvmfs-config-nessi*)
ls -1 -R ./build_artifacts
echo ::set-output name=package_filenames::$(find ./build_artifacts -name cvmfs-config-eessi*latest*)
echo ::set-output name=package_filenames::$(find ./build_artifacts -name cvmfs-config-nessi*latest*)
- name: Delete any previous tag/release named "latest"
uses: dev-drprasad/delete-tag-and-release@085c6969f18bad0de1b9f3fe6692a3cd01f64fe5 # v0.2.0
Expand All @@ -346,6 +356,6 @@ jobs:
body: |
Filesystem Layer release ${{ steps.find_version.outputs.version }} (see: https://github.com/${{github.repository}}/releases/tag/${{ steps.find_version.outputs.version }})
This `latest` tag is a moving tag that is updated automatically for each release, and provides easy access to the latest `cvmfs-config-eessi` packages.
This `latest` tag is a moving tag that is updated automatically for each release, and provides easy access to the latest `cvmfs-config-nessi` packages.
files: ${{ steps.find_filenames.outputs.package_filenames }}
gzip: false
16 changes: 8 additions & 8 deletions .github/workflows/check-stratum-servers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ jobs:
echo 'EOF' >> $GITHUB_ENV
exit $EC
- name: send Slack message if there was an error
uses: rtCamp/action-slack-notify@12e36fc18b0689399306c2e0b3e0f2978b7f1ee7 # v2.2.0
if: steps.check.outcome != 'success' && github.event_name != 'pull_request'
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_MESSAGE: ${{ env.STRATUM_ERRORS }}
SLACK_COLOR: 'danger'
SLACK_FOOTER:
# - name: send Slack message if there was an error
# uses: rtCamp/action-slack-notify@12e36fc18b0689399306c2e0b3e0f2978b7f1ee7 # v2.2.0
# if: steps.check.outcome != 'success' && github.event_name != 'pull_request'
# env:
# SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
# SLACK_MESSAGE: ${{ env.STRATUM_ERRORS }}
# SLACK_COLOR: 'danger'
# SLACK_FOOTER:
5 changes: 3 additions & 2 deletions containers/Dockerfile.EESSI-build-node-debian11
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,14 @@ RUN echo 'CVMFS_QUOTA_LIMIT=10000' > /etc/cvmfs/default.local \
&& echo 'CVMFS_CLIENT_PROFILE="single"' >> /etc/cvmfs/default.local \
&& echo 'CVMFS_HIDE_MAGIC_XATTRS=yes' >> /etc/cvmfs/default.local

RUN mkdir -p /cvmfs/pilot.eessi-hpc.org
RUN mkdir -p /cvmfs/pilot.nessi.no

RUN useradd -ms /bin/bash eessi

# stick to awscli v1.x, 2.x is not available through PyPI (see https://github.com/aws/aws-cli/issues/4947)
RUN pip3 install archspec awscli==${awscliversion}

RUN curl -OL https://raw.githubusercontent.com/EESSI/infrastructure/main/eessi-upload-to-staging \
RUN curl -OL
https://raw.githubusercontent.com/NorESSI/eessi-bot-software-layer/main/scripts/eessi-upload-to-staging \
&& mv eessi-upload-to-staging /usr/bin \
&& chmod a+x /usr/bin/eessi-upload-to-staging
4 changes: 2 additions & 2 deletions containers/Dockerfile.EESSI-client-pilot-centos7
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ RUN yum install -y sudo vim openssh-clients lsof
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 yum install -y https://github.com/NorESSI/filesystem-layer/releases/download/latest/cvmfs-config-eessi-latest.noarch.rpm

# download binary for specific version of fuse-overlayfs
#RUN curl -L -o /usr/local/bin/fuse-overlayfs https://github.com/containers/fuse-overlayfs/releases/download/v${fuseoverlayfsversion}/fuse-overlayfs-$(uname -m) \
Expand All @@ -38,6 +38,6 @@ RUN echo 'CVMFS_QUOTA_LIMIT=10000' > /etc/cvmfs/default.local \
&& echo 'CVMFS_CLIENT_PROFILE="single"' >> /etc/cvmfs/default.local \
&& echo 'CVMFS_HIDE_MAGIC_XATTRS=yes' >> /etc/cvmfs/default.local

RUN mkdir -p /cvmfs/pilot.eessi-hpc.org
RUN mkdir -p /cvmfs/pilot.nessi.no

RUN useradd -ms /bin/bash eessi
2 changes: 1 addition & 1 deletion containers/build-or-download-cvmfs-debs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ 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
wget https://github.com/NorESSI/filesystem-layer/releases/download/latest/cvmfs-config-eessi_latest_all.deb
Loading

0 comments on commit 8717461

Please sign in to comment.