Skip to content

Commit 80ec3ba

Browse files
authored
Merge pull request #70 from bedroge/remove_config_repo
New client packages (also tar now) that don't use the config repo
2 parents 078698a + ebe44f1 commit 80ec3ba

10 files changed

+164
-129
lines changed

.github/workflows/build-test-release-client-packages.yml

+81-14
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,11 @@ on:
44
push:
55
branches:
66
- main
7-
- test_client_packages_ci
87
tags:
98
- 'v*'
109
pull_request:
1110
branches:
1211
- main
13-
- test_client_packages_ci
1412

1513
jobs:
1614

@@ -49,23 +47,32 @@ jobs:
4947
uses: bpicode/github-action-fpm@master
5048
with:
5149
fpm_args: "etc"
52-
fpm_opts: "--debug -n cvmfs-config-eessi -v ${{ steps.get_version.outputs.version }} -t rpm -a all -s dir -C ./package --description 'CVMFS config repository package for EESSI.'"
50+
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.'"
5351

5452
- name: Build Deb package
5553
id: build-deb
5654
uses: bpicode/github-action-fpm@master
5755
with:
5856
fpm_args: "etc"
59-
fpm_opts: "--debug -n cvmfs-config-eessi -v ${{ steps.get_version.outputs.version }} -t deb -a all -s dir -C ./package --description 'CVMFS config repository package for EESSI.'"
57+
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.'"
58+
59+
- name: Build tar package
60+
id: build-tar
61+
uses: bpicode/github-action-fpm@master
62+
with:
63+
fpm_args: "etc"
64+
fpm_opts: "--debug -n cvmfs-config-eessi -v ${{ steps.get_version.outputs.version }} -t tar -a all -s dir -C ./package --description 'CVMFS configuration package for EESSI.'"
6065

6166
- name: Find filenames of generated packages
6267
id: find_filenames
6368
shell: bash
6469
run: |
6570
rpmfile="$(ls -1 cvmfs-config-eessi*.rpm)"
6671
debfile="$(ls -1 cvmfs-config-eessi*.deb)"
72+
tarfile="$(ls -1 cvmfs-config-eessi*.tar)"
6773
echo ::set-output name=rpmfile::${rpmfile}
6874
echo ::set-output name=debfile::${debfile}
75+
echo ::set-output name=tarfile::${tarfile}
6976
7077
- name: Upload Deb package as artifact
7178
uses: actions/upload-artifact@v2
@@ -79,6 +86,12 @@ jobs:
7986
name: RPM package
8087
path: ${{ steps.find_filenames.outputs.rpmfile }}
8188

89+
- name: Upload tar package as artifact
90+
uses: actions/upload-artifact@v2
91+
with:
92+
name: Tar package
93+
path: ${{ steps.find_filenames.outputs.tarfile }}
94+
8295
build-macos-package:
8396
runs-on: macos-latest
8497
steps:
@@ -113,7 +126,7 @@ jobs:
113126
run: gem install --no-document fpm
114127

115128
- name: Build package
116-
run: "fpm --debug -n cvmfs-config-eessi -v ${{ steps.get_version.outputs.version }} -t osxpkg -a all -s dir -C ./package --description 'CVMFS config repository package for EESSI.' etc"
129+
run: "fpm --debug -n cvmfs-config-eessi -v ${{ steps.get_version.outputs.version }} -t osxpkg -a all -s dir -C ./package --description 'CVMFS configuration package for EESSI.' etc"
117130

118131
- name: Find filename of generated package
119132
id: find_filename
@@ -157,13 +170,13 @@ jobs:
157170
run: sudo dpkg -i ./${{ steps.find_filename.outputs.debfile }}
158171

159172
- name: Add local CVMFS configuration (/etc/cvmfs/default.local)
160-
run: echo "CVMFS_HTTP_PROXY=DIRECT" | sudo tee /etc/cvmfs/default.local
173+
run: echo "CVMFS_CLIENT_PROFILE=single" | sudo tee /etc/cvmfs/default.local
161174

162175
- name: Mount the repositories
163176
run: sudo cvmfs_config setup
164177

165178
- name: Test repository access
166-
run: ls /cvmfs/cvmfs-config.eessi-hpc.org/etc/cvmfs
179+
run: ls /cvmfs/pilot.eessi-hpc.org/
167180

168181
test-rpm-package:
169182
needs: build-linux-packages
@@ -195,14 +208,51 @@ jobs:
195208
run: rpm -i ./${{ steps.find_filename.outputs.rpmfile }}
196209

197210
- name: Add local CVMFS configuration (/etc/cvmfs/default.local)
198-
run: echo "CVMFS_HTTP_PROXY=DIRECT" | tee /etc/cvmfs/default.local
211+
run: echo "CVMFS_CLIENT_PROFILE=single" | tee /etc/cvmfs/default.local
199212

200213
- name: Mount the repositories
201214
#run: cvmfs_config setup
202-
run: mkdir -p /cvmfs/cvmfs-config.eessi-hpc.org && mount -t cvmfs cvmfs-config.eessi-hpc.org /cvmfs/cvmfs-config.eessi-hpc.org
215+
run: mkdir -p /cvmfs/pilot.eessi-hpc.org && mount -t cvmfs pilot.eessi-hpc.org /cvmfs/pilot.eessi-hpc.org
216+
217+
- name: Test repository access
218+
run: ls /cvmfs/pilot.eessi-hpc.org/
219+
220+
test-tar-package:
221+
needs: build-linux-packages
222+
runs-on: ubuntu-latest
223+
steps:
224+
- name: Install CVMFS dependencies
225+
run: sudo apt-get install lsb-release
226+
227+
- name: Download and install CVMFS client
228+
run: wget https://ecsft.cern.ch/dist/cvmfs/cvmfs-release/cvmfs-release-latest_all.deb && sudo dpkg -i cvmfs-release-latest_all.deb
229+
230+
- name: Install CVMFS client
231+
run: sudo apt-get update && sudo apt-get install cvmfs
232+
233+
- name: Download cvmfs-config-eessi package
234+
uses: actions/download-artifact@v2
235+
with:
236+
name: Tar package
237+
238+
- name: Find filename of package
239+
id: find_filename
240+
shell: bash
241+
run: |
242+
tarfile="$(ls -1 cvmfs-config-eessi*.tar)"
243+
echo ::set-output name=tarfile::${tarfile}
244+
245+
- name: Install package
246+
run: sudo tar -C / -xf ./${{ steps.find_filename.outputs.tarfile }}
247+
248+
- name: Add local CVMFS configuration (/etc/cvmfs/default.local)
249+
run: echo "CVMFS_CLIENT_PROFILE=single" | sudo tee /etc/cvmfs/default.local
250+
251+
- name: Mount the repositories
252+
run: sudo cvmfs_config setup
203253

204254
- name: Test repository access
205-
run: ls /cvmfs/cvmfs-config.eessi-hpc.org/etc/cvmfs
255+
run: ls /cvmfs/pilot.eessi-hpc.org/
206256

207257
test-macos-package:
208258
needs: build-macos-package
@@ -230,16 +280,16 @@ jobs:
230280
run: sudo installer -target / -pkg ./${{ steps.find_filename.outputs.pkgfile }}
231281

232282
- name: Add local CVMFS configuration (/etc/cvmfs/default.local)
233-
run: echo "CVMFS_HTTP_PROXY=DIRECT" | sudo tee /etc/cvmfs/default.local
283+
run: echo "CVMFS_CLIENT_PROFILE=single" | sudo tee /etc/cvmfs/default.local
234284

235285
- name: Mount the repositories
236-
run: sudo mkdir -p /Users/Shared/cvmfs/cvmfs-config.eessi-hpc.org && sudo mount -t cvmfs cvmfs-config.eessi-hpc.org /Users/Shared/cvmfs/cvmfs-config.eessi-hpc.org
286+
run: sudo mkdir -p /Users/Shared/cvmfs/pilot.eessi-hpc.org && sudo mount -t cvmfs pilot.eessi-hpc.org /Users/Shared/cvmfs/pilot.eessi-hpc.org
237287

238288
- name: Test repository access
239-
run: ls /Users/Shared/cvmfs/cvmfs-config.eessi-hpc.org/etc/cvmfs
289+
run: ls /Users/Shared/cvmfs/pilot.eessi-hpc.org/
240290

241291
release:
242-
needs: [build-linux-packages, build-macos-package, test-deb-package, test-rpm-package, test-macos-package]
292+
needs: [build-linux-packages, build-macos-package, test-deb-package, test-rpm-package, test-macos-package, test-tar-package]
243293
if: startsWith(github.ref, 'refs/tags/')
244294
runs-on: ubuntu-latest
245295
steps:
@@ -253,6 +303,11 @@ jobs:
253303
with:
254304
name: RPM package
255305

306+
- name: Download tar package
307+
uses: actions/download-artifact@v2
308+
with:
309+
name: Tar package
310+
256311
- name: Download macOS package
257312
uses: actions/download-artifact@v2
258313
with:
@@ -265,9 +320,11 @@ jobs:
265320
rpmfile="$(ls -1 cvmfs-config-eessi*.rpm)"
266321
debfile="$(ls -1 cvmfs-config-eessi*.deb)"
267322
pkgfile="$(ls -1 cvmfs-config-eessi*.pkg)"
323+
tarfile="$(ls -1 cvmfs-config-eessi*.tar)"
268324
echo ::set-output name=rpmfile::${rpmfile}
269325
echo ::set-output name=debfile::${debfile}
270326
echo ::set-output name=pkgfile::${pkgfile}
327+
echo ::set-output name=tarfile::${tarfile}
271328
272329
- name: Create Release
273330
id: create_release
@@ -309,3 +366,13 @@ jobs:
309366
asset_path: ${{ steps.find_filenames.outputs.pkgfile }}
310367
asset_name: ${{ steps.find_filenames.outputs.pkgfile }}
311368
asset_content_type: application/x-newton-compatible-pkg
369+
370+
- name: Upload Tar as release asset
371+
uses: actions/upload-release-asset@v1
372+
env:
373+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
374+
with:
375+
upload_url: ${{ steps.create_release.outputs.upload_url }}
376+
asset_path: ${{ steps.find_filenames.outputs.tarfile }}
377+
asset_name: ${{ steps.find_filenames.outputs.tarfile }}
378+
asset_content_type: application/x-tar

.github/workflows/test-playbook.sh

+4-2
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@ echo ' - 127.0.0.1' >> inventory/local_site_specific_vars.yml
1515
# Don't use the GEO API for the Stratum 1, since we do not have a key here.
1616
export CVMFS_GEO_DB_FILE=NONE
1717

18-
# Only test the cvmfs-config repo on the Stratum 1, as the other ones may be very large.
18+
# Only test CI suitable repos on the Stratum 1, as the other ones may be very large.
1919
if [ $playbook == "stratum1.yml" ]
2020
then
21-
echo 'cvmfs_repositories: "[{{ eessi_cvmfs_config_repo.repository }}]"' >> inventory/local_site_specific_vars.yml
21+
cat >> inventory/local_site_specific_vars.yml <<-EOF
22+
cvmfs_repositories: "{{ eessi_cvmfs_repositories | selectattr('use_for_ci', 'defined') | selectattr('use_for_ci', 'sameas', true) | list }}"
23+
EOF
2224
fi
2325

2426
# Install the Ansible dependencies.

.github/workflows/test-playbooks.yml

-3
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,5 @@ jobs:
3434
run: docker run -d --workdir /github/workspace --rm -e INPUT_PLAYBOOK -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v $HOME:"/github/home" -v "$HOME/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "$GITHUB_WORKSPACE":"/github/workspace" -v /sys/fs/cgroup:/sys/fs/cgroup --privileged --device /dev/fuse --mount type=bind,source=${GITHUB_WORKSPACE}/srv,target=/srv --mount type=bind,source=${GITHUB_WORKSPACE}/srv,target=/var/spool/cvmfs --name ${{ matrix.component }}-${{ matrix.os }} docker.pkg.github.com/$(echo $GITHUB_REPOSITORY | tr '[A-Z]' '[a-z]')/${{ matrix.os }}
3535
- name: Execute the playbook
3636
run: docker exec ${{ matrix.component }}-${{ matrix.os }} /test-playbook.sh ${{ matrix.component }}.yml
37-
- name: Execute additional playbook for Stratum 0
38-
run: docker exec ${{ matrix.component }}-${{ matrix.os }} /test-playbook.sh ${{ matrix.component }}-deploy-cvmfs-config.yml
39-
if: ${{ matrix.component == 'stratum0' }}
4037
- name: Stop the container
4138
run: docker kill ${{ matrix.component }}-${{ matrix.os }}

README.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,13 @@ Next, you need to make a file `/etc/cvmfs/default.local` manually; this file is
166166
contains, for instance, the URL to your local proxy and the size of the local cache. As an example, you can put
167167
the following in this file, which corresponds to not using a proxy and setting the local quota limit to 40000MB:
168168
```
169-
CVMFS_HTTP_PROXY=DIRECT
169+
CVMFS_CLIENT_PROFILE=single
170170
CVMFS_QUOTA_LIMIT=40000
171171
```
172+
If you do want to use your own proxy, replace the first line by:
173+
```
174+
CVMFS_HTTP_PROXY=<hostname of your proxy>:<port>
175+
```
172176
For more details about configuring your client, see https://cvmfs.readthedocs.io/en/stable/cpt-configure.html.
173177

174178
Finally, run `cvmfs_config setup` to set up CVMFS.

inventory/group_vars/all.yml

+38-28
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,23 @@
22
# vars file for eessi project
33

44
# Automatically configure EESSI CVMFS repos.
5-
eessi_cvmfs_repos_enabled: config-repo
5+
eessi_cvmfs_repos_enabled: true
66

7-
# Email address for the project, which will be put in the contact file on the config repo.
7+
# Email address for the project.
88
eessi_email: [email protected]
99

10-
# Defaults for eessi-hpc.org config repo, syntax for each key is the same as that of cvmfs_<key | pluralize>
11-
eessi_cvmfs_config_repo:
12-
domain: eessi-hpc.org
13-
key:
14-
path: /etc/cvmfs/keys/eessi-hpc.org/cvmfs-config.eessi-hpc.org.pub
10+
#
11+
# Defaults for eessi-hpc.org repos.
12+
#
13+
14+
# We do not use a config repo anymore.
15+
eessi_cvmfs_config_repo: {}
16+
17+
# Public keys for the repositories, which you can find on the Stratum 0 at:
18+
# /etc/cvmfs/keys/*.pub
19+
# Note: you first have to run the stratum0.yml playbook once to generate the repositories and keys.
20+
eessi_cvmfs_keys:
21+
- path: /etc/cvmfs/keys/eessi-hpc.org/cvmfs-config.eessi-hpc.org.pub
1522
key: |
1623
-----BEGIN PUBLIC KEY-----
1724
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqoTBc/Eksr9ECEOoCzHA
@@ -22,25 +29,6 @@ eessi_cvmfs_config_repo:
2229
+hCt494UsFs3tchmTebpK+x3pVRXybQ66Qm1mQiaz+2VbUJdQEov4RCC5PcOmOOk
2330
BwIDAQAB
2431
-----END PUBLIC KEY-----
25-
urls:
26-
- "http://cvmfs-s1-rug.eessi-hpc.org/cvmfs/@fqrn@"
27-
- "http://cvmfs-s1-bgo.eessi-hpc.org/cvmfs/@fqrn@"
28-
repository:
29-
repository: cvmfs-config.eessi-hpc.org
30-
stratum0: cvmfs-s0.eessi-hpc.org
31-
owner: "{{ cvmfs_repo_owner | default('root') }}"
32-
key_dir: /etc/cvmfs/keys/eessi-hpc.org
33-
server_options: []
34-
client_options: []
35-
36-
#
37-
# Defaults for eessi-hpc.org repos.
38-
#
39-
40-
# Public keys for the repositories, which you can find on the Stratum 0 at:
41-
# /etc/cvmfs/keys/*.pub
42-
# Note: you first have to run the stratum0.yml playbook once to generate the repositories and keys.
43-
eessi_cvmfs_keys:
4432
- path: /etc/cvmfs/keys/eessi-hpc.org/pilot.eessi-hpc.org.pub
4533
key: |
4634
-----BEGIN PUBLIC KEY-----
@@ -52,6 +40,19 @@ eessi_cvmfs_keys:
5240
HJN0HHOVdRIwNjjPkV2jIqhJoI85no89v8/V45SFPVo+A7N0Cj4QdQrQTezpnlby
5341
FQIDAQAB
5442
-----END PUBLIC KEY-----
43+
# The following (duplicate) key can be removed after this PR has been merged:
44+
# https://github.com/galaxyproject/ansible-cvmfs/pull/32
45+
- path: /etc/cvmfs/keys/eessi-hpc.org/ci.eessi-hpc.org.pub
46+
key: |
47+
-----BEGIN PUBLIC KEY-----
48+
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAommtaoqQ36Rb/cFnqUWg
49+
8FoYCOjJWVBMQ4sVZ87oFRWehOUbcfy/ah85D9055HQws7i/hLNGJJAa7Es3E2o8
50+
v8LtSlRdfR1A7b7LA6p3213HHz6dNU6I1riwtE2OP7/w4Q3+Agj1iRtW535GwzGo
51+
4ZbewL8T1kbyaEm4HyefoitHXJthoPyTlYAhvAegIil1VJPhJZW+q/NWxnsd9QGJ
52+
uAtbSICQg6mBJI50KiCBYmKHOAjH2W8qEnLWc7JoPoNvAHuMx1ya6YerBM5T9Esm
53+
HJN0HHOVdRIwNjjPkV2jIqhJoI85no89v8/V45SFPVo+A7N0Cj4QdQrQTezpnlby
54+
FQIDAQAB
55+
-----END PUBLIC KEY-----
5556
5657
# URLs for all the Stratum 1 servers.
5758
eessi_cvmfs_server_urls:
@@ -71,8 +72,17 @@ eessi_cvmfs_repositories:
7172
- CVMFS_AUTO_GC=false
7273
- CVMFS_AUTO_TAG_TIMESPAN="30 days ago"
7374
- CVMFS_GARBAGE_COLLECTION=true
74-
client_options:
75-
- CVMFS_NFILES=4096
75+
client_options: []
76+
use_for_ci: no
77+
- repository: ci.eessi-hpc.org
78+
stratum0: cvmfs-s0.eessi-hpc.org
79+
owner: "{{ cvmfs_repo_owner | default('root') }}"
80+
key_dir: /etc/cvmfs/keys/eessi-hpc.org
81+
server_options:
82+
- CVMFS_AUTO_GC=false
83+
- CVMFS_GARBAGE_COLLECTION=true
84+
client_options: []
85+
use_for_ci: yes
7686

7787
# Override all the Galaxy defaults by our EESSI defaults.
7888
# This is required, beucase the galaxy_* variables are used inside the Ansible tasks.

inventory/group_vars/cvmfsclients

-3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,3 @@
33
# List of proxies to be used for the clients.
44
# Override this setting in your local_site_specific_vars.yml file.
55
cvmfs_http_proxies: "{{ local_cvmfs_http_proxies | default(['DIRECT']) }}"
6-
7-
# Use the CVMFS configuration repository for the clients.
8-
eessi_cvmfs_repos_enabled: config-repo
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
---
22

3-
cvmfs_repositories: "{{ eessi_cvmfs_repositories + [eessi_cvmfs_config_repo.repository] }}"
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
---
22

3-
cvmfs_repositories: "{{ eessi_cvmfs_repositories + [eessi_cvmfs_config_repo.repository] }}"
4-
cvmfs_keys: "{{ eessi_cvmfs_keys + [eessi_cvmfs_config_repo.key] }}"
53
cvmfs_squid_conf_src: "{{ local_stratum1_cvmfs_squid_conf_src | default('eessi_stratum1_squid.conf.j2') }}"

0 commit comments

Comments
 (0)