Skip to content

Commit fe98b91

Browse files
committed
use ark repos for cernvm-fs and fixup defaults approach
1 parent ed065bc commit fe98b91

File tree

7 files changed

+100
-85
lines changed

7 files changed

+100
-85
lines changed

ansible/roles/cvmfs_server/README.md

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,24 @@ This feature is enabled by adding a node to the `cvmfs_server` group. The
1414
defaults provided are sufficent to implement the above configuration.
1515

1616
This role wraps the [EESSI ansible-cvmfs](https://github.com/EESSI/ansible-cvmfs)
17-
role which provides additional functionality. Because of the intended use of
18-
this role by default it:
19-
- Uses https URLs for both dnf repositories and for the EESSI repository replication.
20-
- Uses the `aws-eu-west-s1-sync` EESSI server (which is the only one providing
17+
role, which provides additional functionality. The defaults here:
18+
- Use https URLs for both dnf repositories and for the EESSI repository replication.
19+
- Use the `aws-eu-west-s1-sync` EESSI server (which is the only one providing
2120
https replication).
22-
- Does not configure a squid proxy in front of the Stratum 1 server.
23-
- Does not configure a firewall (OpenStack security groups are expected to be
21+
- Do not configure a squid proxy in front of the Stratum 1 server.
22+
- Do not configure a firewall (OpenStack security groups are expected to be
2423
sufficent).
25-
- Does not configure the Geo API service.
24+
- Do not configure the Geo API service.
2625

2726
Guidance on configuring a private Stratum 1 server for EESSI is provided [here](https://www.eessi.io/docs/filesystem_layer/stratum1/#requirements-for-a-stratum-1).
2827

2928
**NB**: The initial replication will take a considerable amount of time. If
3029
this fails due to e.g. a network glitch you can recover it by sshing to the
31-
server node and running:
30+
`cvmfs_server` node and running:
3231

3332
sudo cvmfs_server snapshot software.eessi.io
3433

35-
# Requirements
36-
37-
See also the example configuration below.
34+
## Requirements
3835

3936
1. See the [EESSI Stratum 1 requirements](https://www.eessi.io/docs/filesystem_layer/stratum1/#requirements-for-a-stratum-1)
4037
for the server specification.
@@ -51,14 +48,14 @@ See also the example configuration below.
5148
Note the former will also require setting `dnf_repos_allow_insecure_creds: true`
5249
to allow Ark credentials to be templated into repofiles - this also requires 3.
5350
to avoid exposing these to cluster users.
54-
51+
52+
See also the example configuration below.
53+
5554
## Role variables
5655

5756
Any variables from the [EESSI ansible-cvmfs role](https://github.com/EESSI/ansible-cvmfs)
58-
may be used. Due to wrapping that role, this role's defaults are mostly in
59-
`environments/common/inventory/group_vars/all/cvmfs_server.yml`. The only
60-
override likely to be be needed is to set `cvmfs_srv_device` if CVMFS data
61-
should be be stored on a specific block device (e.g. a mounted volume).
57+
may set. Generally only `cvmfs_srv_device` is likely to be required, if CVMFS
58+
data should be be stored on a specific block device (e.g. a mounted volume).
6259

6360
## Example configuration
6461

@@ -94,8 +91,8 @@ Configure the role to use the volume for CVMFS data:
9491
cvmfs_srv_device: /dev/vdb
9592
```
9693

97-
**NB:** Hardcoding the path is only safe if a single volume is attached, else
98-
the ordering of devices is not guaranteed after reboots etc.
94+
**NB:** Hardcoding the device path is only safe if a single volume is attached,
95+
else the ordering of devices is not guaranteed after reboots etc.
9996

10097
Note Ark credentials or a local Pulp server must also be configured as referenced
10198
above.
Lines changed: 54 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,55 @@
1-
# NB: Most defaults are set in
2-
# environments/common/inventory/group_vars/all/cvmfs_server.yml
3-
# as the wrapped role does not pick up defaults from here
1+
# NB: Most eessi.cvmfs variables cannot be set here, because they are not
2+
# applied when this role calls it via import_role.
3+
# Instead they are set in environments/common/inventory/group_vars/all/cvmfs_server.yml
4+
45
cvmfs_role: stratum1
6+
7+
# Vars from eessi.cvmfs:vars/redhat.yml - required because *this* role does
8+
# not run eessi.cvmfs:tasks/main.yml which loads those vars. These therefore
9+
# *can* be set here, as they are not otherwise set at all.
10+
11+
cvmfs_apache_service_name: httpd
12+
cvmfs_apache_conf_file: /etc/httpd/conf/httpd.conf
13+
cvmfs_dnf_repos: [] # provided by dnf_repos instead
14+
15+
cvmfs_dnf_repo_key:
16+
content: |
17+
-----BEGIN PGP PUBLIC KEY BLOCK-----
18+
Version: GnuPG v2.0.14 (GNU/Linux)
19+
20+
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gh9O5YITC+et/g47NLfZdiAGP
36+
LEjvJFRi7Ju+8ywO32dSVBPJQDktr5BC950DKZHA9n+sJ63iF3lP/aCTECpxxUqX
37+
VVqioobwg5ytl60hw9I9sfwBP6z9PR90RcyT1l4giiBz9LV+KpcAAwUIAKeAxArG
38+
aJxzWziKs7D8TTuE50Nw+S3RGhVzwSKy7183Z11iOEMqbm2/zwp65wFkntCKmLKD
39+
nGsTgFNpstIyFwJmj34Axp7N3KGqXnTI+SIQd6VmzQ1phxfCOw8IGueOR6YI7S1G
40+
YWt7DoseZKz4EWdvXCOkQAhbxq/HT2c3ihxsuxrErxz7QtNaYOFXiuLj3mYH9XaM
41+
eEe8Pkl+yyRTvyUNlMIu/i79qf+QUlsi10nCUm88cSXQiKWOJ4GiUoT+jD7pN4oh
42+
dALRVl0tl/EyPTw+asG3lQhPZ+solvJXp+i7KF7nwnyXDB63WNH15S1pQLMnqCuG
43+
CFyegf6jnOJU0AqITwQYEQIADwIbDAUCT18MOQUJBboAEQAKCRAjDTidiuRc53P2
44+
AJ9e1y70yIKwx6YmpDnwqWSE07Q6lACdEnem0DbLg9t+gkX/98driCP9Ifg=
45+
=S7Dt
46+
-----END PGP PUBLIC KEY BLOCK-----
47+
dest: /etc/pki/rpm-gpg/RPM-GPG-KEY-CernVM
48+
49+
cvmfs_packages:
50+
stratum1-disk:
51+
- httpd
52+
- "{{ 'mod_wsgi' if ansible_distribution_major_version is version('8', '<') else 'python3-mod_wsgi' }}"
53+
- "{{ 'squid' if cvmfs_stratum1_squid else omit }}"
54+
- cvmfs-server
55+
- cvmfs-config-default
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
11
- ansible.builtin.import_role:
22
name: eessi.cvmfs
33
tasks_from: "{{ cvmfs_role }}.yml"
4-
vars:
5-
# from ansible-cvmfs/vars/redhat.yml
6-
cvmfs_apache_service_name: httpd
7-
cvmfs_apache_conf_file: /etc/httpd/conf/httpd.conf

ansible/roles/dnf_repos/defaults/main.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ dnf_repos_filenames:
1919
dnf_repos_version_filenames: "{{ dnf_repos_filenames[ansible_distribution_major_version] }}"
2020

2121
# epel installed separately
22+
# NB: 'name' cannot have spaces
2223
dnf_repos_default_repolist:
2324
- file: "{{ dnf_repos_version_filenames.baseos }}"
2425
name: baseos
@@ -38,6 +39,12 @@ dnf_repos_default_repolist:
3839
- file: "{{ dnf_repos_version_filenames.grafana }}"
3940
name: grafana
4041
base_url: "{{ dnf_repos_pulp_content_url }}/{{ appliances_pulp_repos.grafana[ansible_distribution_major_version] | appliances_repo_to_subpath }}"
42+
- file: cernvm
43+
name: cernvmfs_pkgs
44+
base_url: "{{ dnf_repos_pulp_content_url }}/{{ appliances_pulp_repos.cernvmfs_pkgs[ansible_distribution_major_version] | appliances_repo_to_subpath }}"
45+
- file: cernvm
46+
name: cernvmfs_cfg
47+
base_url: "{{ dnf_repos_pulp_content_url }}/{{ appliances_pulp_repos.cernvmfs_cfg[ansible_distribution_major_version] | appliances_repo_to_subpath }}"
4148

4249
dnf_repos_openhpc_repolist:
4350
- name: OpenHPC

ansible/roles/pulp_site/defaults/main.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ pulp_site_rpm_info:
3030
subpath: "{{ appliances_pulp_repos.ceph[pulp_site_target_distribution_version_major] | appliances_repo_to_subpath }}"
3131
- name: "grafana-{{ pulp_site_target_distribution_version_major }}-{{ appliances_pulp_repos.grafana[pulp_site_target_distribution_version_major].timestamp }}"
3232
subpath: "{{ appliances_pulp_repos.grafana[pulp_site_target_distribution_version_major] | appliances_repo_to_subpath }}"
33+
- name: "cernvmfs_pkgs-{{ pulp_site_target_distribution_version_major }}-{{ appliances_pulp_repos.cernvmfs_pkgs.timestamp[pulp_site_target_distribution_version_major].timestamp }}
34+
subpath: "{{ appliances_pulp_repos.cernvmfs_pkgs[pulp_site_target_distribution_version_major] | appliances_repo_to_subpath }}"
35+
- name: "cernvmfs_cfg-{{ pulp_site_target_distribution_version_major }}-{{ appliances_pulp_repos.cernvmfs_pkgs.timestamp[pulp_site_target_distribution_version_major].timestamp }}
36+
subpath: "{{ appliances_pulp_repos.cernvmfs_cfg[pulp_site_target_distribution_version_major] | appliances_repo_to_subpath }}"
37+
3338

3439
pulp_site_rpm_repo_defaults:
3540
remote_username: "{{ pulp_site_upstream_username }}"

environments/common/inventory/group_vars/all/cvmfs_server.yml

Lines changed: 1 addition & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,9 @@
22

33
# cvmfs_srv_device: # block device to use for CVMFS data. /srv/cvmfs is used if not set.
44

5-
cvmfs_dnf_repo_protocol: https
6-
7-
cvmfs_dnf_repos:
8-
- name: cernvm
9-
file: cernvm
10-
baseurl: "{{ cvmfs_dnf_repo_protocol }}://cvmrepo.web.cern.ch/cvmrepo/yum/cvmfs/EL/$releasever/$basearch/"
11-
description: CernVM packages
12-
- name: cernvm-config
13-
file: cernvm
14-
baseurl: "{{ cvmfs_dnf_repo_protocol }}://cvmrepo.web.cern.ch/cvmrepo/yum/cvmfs-config/EL/$releasever/$basearch/"
15-
description: CernVM-FS extra config packages
16-
175
cvmfs_keys:
18-
- path: /etc/cvmfs/keys/eessi.io/eessi.io.pub
196
# from /cvmfs/cvmfs-config.cern.ch/etc/cvmfs/keys/eessi.io/eessi.io.pub on client
7+
- path: /etc/cvmfs/keys/eessi.io/eessi.io.pub
208
key: |
219
-----BEGIN PUBLIC KEY-----
2210
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyau1UFUcoiqpE5U9StON
@@ -38,48 +26,3 @@ cvmfs_repositories:
3826
repository: software.eessi.io
3927
key_dir: /etc/cvmfs/keys/eessi.io
4028
owner: root
41-
42-
43-
# Below taken from ansible-cvmfs/vars/redhat.yml and are needed because the
44-
# cvmfs_server role does not run ansible-cvmfs/tasks/main.yml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JRc956Ot0q4qmlcUEGi5zefSIoJZR5jyR7rZS+1PNJYI05xY2+Eah1
65-
u9UxrlzBH5DCsvUqTNK12WrPIibmLo8u+yIDJjwgh9O5YITC+et/g47NLfZdiAGP
66-
LEjvJFRi7Ju+8ywO32dSVBPJQDktr5BC950DKZHA9n+sJ63iF3lP/aCTECpxxUqX
67-
VVqioobwg5ytl60hw9I9sfwBP6z9PR90RcyT1l4giiBz9LV+KpcAAwUIAKeAxArG
68-
aJxzWziKs7D8TTuE50Nw+S3RGhVzwSKy7183Z11iOEMqbm2/zwp65wFkntCKmLKD
69-
nGsTgFNpstIyFwJmj34Axp7N3KGqXnTI+SIQd6VmzQ1phxfCOw8IGueOR6YI7S1G
70-
YWt7DoseZKz4EWdvXCOkQAhbxq/HT2c3ihxsuxrErxz7QtNaYOFXiuLj3mYH9XaM
71-
eEe8Pkl+yyRTvyUNlMIu/i79qf+QUlsi10nCUm88cSXQiKWOJ4GiUoT+jD7pN4oh
72-
dALRVl0tl/EyPTw+asG3lQhPZ+solvJXp+i7KF7nwnyXDB63WNH15S1pQLMnqCuG
73-
CFyegf6jnOJU0AqITwQYEQIADwIbDAUCT18MOQUJBboAEQAKCRAjDTidiuRc53P2
74-
AJ9e1y70yIKwx6YmpDnwqWSE07Q6lACdEnem0DbLg9t+gkX/98driCP9Ifg=
75-
=S7Dt
76-
-----END PGP PUBLIC KEY BLOCK-----
77-
dest: /etc/pki/rpm-gpg/RPM-GPG-KEY-CernVM
78-
79-
cvmfs_packages:
80-
stratum1-disk:
81-
- httpd
82-
- "{{ 'mod_wsgi' if ansible_distribution_major_version is version('8', '<') else 'python3-mod_wsgi' }}"
83-
- "{{ 'squid' if cvmfs_stratum1_squid else omit }}"
84-
- cvmfs-server
85-
- cvmfs-config-default

environments/common/inventory/group_vars/all/timestamps.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@
66
# WITHOUT the trailing slash
77
# - timestamp is the the Ark timestamp to use
88

9-
# See also ansible/roles/pulp_site/defaults/main.yml
9+
# See also:
10+
# - ansible/roles/dnf_repos/defaults/main.yml
11+
# - ansible/roles/pulp_site/defaults/main.yml
1012

1113
# Note that with Ark creds in the active environment all timestamps can be
12-
# updated to the latest avaialble using
14+
# updated to the latest available using
1315
# ansible-playbook ansible/ci/update_timestamps.yml
1416
# but it doesn't check they are functional!
1517

@@ -89,3 +91,17 @@ appliances_pulp_repos:
8991
'9':
9092
path: OpenHPC/3/updates/EL_9
9193
timestamp: 20250510T003301
94+
cernvmfs_pkgs:
95+
'8':
96+
path: cvmfs/EL/8/x86_64
97+
timestamp: 20250806T121654
98+
'9':
99+
path: cvmfs/EL/9/x86_64
100+
timestamp: 20250806T121654
101+
cernvmfs_cfg:
102+
'8':
103+
path: cvmfs-config/EL/8/x86_64
104+
timestamp: 20250805T130249
105+
'9':
106+
path: cvmfs-config/EL/9/x86_64
107+
timestamp: 20250805T130249

0 commit comments

Comments
 (0)