Skip to content

Commit 533d7c5

Browse files
committed
integrated with refactor
2 parents 29a1579 + 17499e7 commit 533d7c5

File tree

9 files changed

+61
-38
lines changed

9 files changed

+61
-38
lines changed

.github/workflows/fatimage.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ jobs:
2626
source_image_name: Rocky-8-GenericCloud-Base-8.10-20240528.0.x86_64.qcow2
2727
inventory_groups: control,compute,login,update
2828
- image_name: openhpc-RL9
29-
source_image_name: rocky-latest-RL9
30-
inventory_groups: control,compute,login
29+
source_image_name: Rocky-9-GenericCloud-Base-9.4-20240523.0.x86_64.qcow2
30+
inventory_groups: control,compute,login,update
3131
env:
3232
ANSIBLE_FORCE_COLOR: True
3333
OS_CLOUD: openstack

ansible/filter_plugins/utils.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ def to_ood_regex(items):
4848
r = ['(%s)' % v for v in r]
4949
return '|'.join(r)
5050

51+
def appliances_repo_to_subpath(repo_entry):
52+
return repo_entry['path']+'/'+repo_entry['timestamp']
53+
5154
class FilterModule(object):
5255
''' Ansible core jinja2 filters '''
5356

@@ -63,4 +66,5 @@ def filters(self):
6366
'exists': exists,
6467
'warn': self.warn,
6568
'to_ood_regex': to_ood_regex,
69+
'appliances_repo_to_subpath': appliances_repo_to_subpath
6670
}

ansible/roles/dnf_repos/defaults/main.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
dnf_repos_pulp_content_url: "{{ appliances_pulp_url }}/pulp/content"
2-
dnf_repos_rocky_prefix: "{{ ansible_distribution | lower }}/{{ ansible_distribution_version }}"
3-
dnf_repos_epel_prefix: "epel/{{ ansible_distribution_major_version }}"
42
dnf_repos_username: "{{ omit }}"
53
dnf_repos_password: "{{ omit }}"
64

@@ -22,16 +20,16 @@ dnf_repos_version_filenames: "{{ dnf_repos_filenames[ansible_distribution_major_
2220
dnf_repos_repolist:
2321
- file: "{{ dnf_repos_version_filenames.baseos }}"
2422
name: baseos
25-
base_url: "{{ dnf_repos_pulp_content_url }}/{{ dnf_repos_rocky_prefix }}/BaseOS/{{ ansible_architecture }}/os/{{ appliances_repo_timestamps.baseos[ansible_distribution_version] }}"
23+
base_url: "{{ dnf_repos_pulp_content_url }}/{{ appliances_pulp_repos.baseos[ansible_distribution_version] | appliances_repo_to_subpath }}"
2624
- file: "{{ dnf_repos_version_filenames.appstream }}"
2725
name: appstream
28-
base_url: "{{ dnf_repos_pulp_content_url }}/{{ dnf_repos_rocky_prefix }}/AppStream/{{ ansible_architecture }}/os/{{ appliances_repo_timestamps.appstream[ansible_distribution_version] }}"
26+
base_url: "{{ dnf_repos_pulp_content_url }}/{{ appliances_pulp_repos.appstream[ansible_distribution_version] | appliances_repo_to_subpath }}"
2927
- file: "{{ dnf_repos_version_filenames.crb }}"
3028
name: "{{ 'powertools' if ansible_distribution_major_version == '8' else 'crb' }}"
31-
base_url: "{{ dnf_repos_pulp_content_url }}/{{ dnf_repos_rocky_prefix }}/{{ 'PowerTools' if ansible_distribution_major_version == '8' else 'CRB' }}/{{ ansible_architecture }}/os/{{ appliances_repo_timestamps.crb[ansible_distribution_version] }}"
29+
base_url: "{{ dnf_repos_pulp_content_url }}/{{ appliances_pulp_repos.crb[ansible_distribution_version] | appliances_repo_to_subpath }}"
3230
- file: "{{ dnf_repos_version_filenames.extras }}"
3331
name: extras
34-
base_url: "{{ dnf_repos_pulp_content_url }}/{{ dnf_repos_rocky_prefix }}/extras/{{ ansible_architecture }}/os/{{ appliances_repo_timestamps.extras[ansible_distribution_version] }}"
32+
base_url: "{{ dnf_repos_pulp_content_url }}/{{ appliances_pulp_repos.extras[ansible_distribution_version] | appliances_repo_to_subpath }}"
3533

36-
dnf_repos_epel_baseurl: "{{ dnf_repos_pulp_content_url }}/epel/{{ ansible_distribution_major_version }}/Everything/{{ ansible_architecture }}/{{ appliances_repo_timestamps.epel[ansible_distribution_major_version] }}"
34+
dnf_repos_epel_baseurl: "{{ dnf_repos_pulp_content_url }}/{{ appliances_pulp_repos.epel[ansible_distribution_major_version] | appliances_repo_to_subpath }}"
3735
dnf_repos_epel_description: "epel"

ansible/roles/pulp_site/defaults/main.yml

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,25 @@ pulp_site_port: 8080
33
pulp_site_username: admin # shouldn't be changed
44
pulp_site_password: "{{ vault_pulp_admin_password }}"
55
pulp_site_upstream_content_url: https://ark.stackhpc.com/pulp/content
6-
_pulp_site_rocky_prefix: "{{ pulp_site_target_distribution }}/{{ pulp_site_target_distribution_version }}"
76
pulp_site_default_upstream_suffix: "{{ pulp_site_target_arch }}/os"
87
pulp_site_validate_certs: false
98
pulp_site_install_dir: '/home/rocky/pulp'
109
pulp_site_selinux_suffix: "{{ ':Z' if ansible_selinux.status == 'enabled' else '' }}"
1110
pulp_site_target_facts: "{{ hostvars[groups['builder'][0]]['ansible_facts'] }}"
12-
pulp_site_target_arch: "{{ pulp_site_target_facts['architecture'] }}"
13-
pulp_site_target_distribution: "{{ pulp_site_target_facts['distribution'] | lower }}"
1411
pulp_site_target_distribution_version: "{{ pulp_site_target_facts['distribution_version'] }}"
1512
pulp_site_target_distribution_version_major: "{{ pulp_site_target_facts['distribution_major_version'] }}"
1613

1714
pulp_site_rpm_info:
18-
- name: "baseos-{{ pulp_site_target_distribution_version }}-{{ appliances_repo_timestamps.baseos[pulp_site_target_distribution_version] }}"
19-
subpath: "{{ _pulp_site_rocky_prefix }}/BaseOS/{{ pulp_site_default_upstream_suffix }}/{{ appliances_repo_timestamps.baseos[pulp_site_target_distribution_version] }}"
20-
- name: "appstream-{{ pulp_site_target_distribution_version }}-{{ appliances_repo_timestamps.appstream[pulp_site_target_distribution_version] }}"
21-
subpath: "{{ _pulp_site_rocky_prefix }}/AppStream/{{ pulp_site_default_upstream_suffix }}/{{ appliances_repo_timestamps.appstream[pulp_site_target_distribution_version] }}"
22-
- name: "crb-{{ pulp_site_target_distribution_version }}-{{ appliances_repo_timestamps.crb[pulp_site_target_distribution_version] }}"
23-
subpath: "{{ _pulp_site_rocky_prefix }}/{{ 'PowerTools' if pulp_site_target_distribution_version_major == '8' else 'CRB' }}/{{ pulp_site_default_upstream_suffix }}/{{ appliances_repo_timestamps.crb[pulp_site_target_distribution_version] }}"
24-
- name: "extras-{{ pulp_site_target_distribution_version }}-{{ appliances_repo_timestamps.extras[pulp_site_target_distribution_version] }}"
25-
subpath: "{{ _pulp_site_rocky_prefix }}/extras/{{ pulp_site_default_upstream_suffix }}/{{ appliances_repo_timestamps.extras[pulp_site_target_distribution_version] }}"
26-
- name: "epel-{{ pulp_site_target_distribution_version_major }}-{{ appliances_repo_timestamps.epel[pulp_site_target_distribution_version_major] }}"
27-
subpath: "epel/{{ pulp_site_target_distribution_version_major }}/Everything/{{ pulp_site_target_arch }}/{{ appliances_repo_timestamps.epel[pulp_site_target_distribution_version_major] }}"
15+
- name: "baseos-{{ pulp_site_target_distribution_version }}-{{ appliances_pulp_repos.baseos[pulp_site_target_distribution_version].timestamp }}"
16+
subpath: "{{ appliances_pulp_repos.baseos[pulp_site_target_distribution_version] | appliances_repo_to_subpath }}"
17+
- name: "appstream-{{ pulp_site_target_distribution_version }}-{{ appliances_pulp_repos.appstream[pulp_site_target_distribution_version].timestamp }}"
18+
subpath: "{{ appliances_pulp_repos.appstream[pulp_site_target_distribution_version] | appliances_repo_to_subpath }}"
19+
- name: "crb-{{ pulp_site_target_distribution_version }}-{{ appliances_pulp_repos.crb[pulp_site_target_distribution_version].timestamp }}"
20+
subpath: "{{ appliances_pulp_repos.crb[pulp_site_target_distribution_version] | appliances_repo_to_subpath }}"
21+
- name: "extras-{{ pulp_site_target_distribution_version }}-{{ appliances_pulp_repos.extras[pulp_site_target_distribution_version].timestamp }}"
22+
subpath: "{{ appliances_pulp_repos.extras[pulp_site_target_distribution_version] | appliances_repo_to_subpath }}"
23+
- name: "epel-{{ pulp_site_target_distribution_version_major }}-{{ appliances_pulp_repos.epel[pulp_site_target_distribution_version_major].timestamp }}"
24+
subpath: "{{ appliances_pulp_repos.epel[pulp_site_target_distribution_version_major] | appliances_repo_to_subpath }}"
2825

2926
pulp_site_rpm_repo_defaults:
3027
remote_username: "{{ pulp_site_upstream_username }}"

docs/experimental/pulp.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Pulp Server
22

3-
In order to ensure reproducible builds, the appliance can build images using repository mirrors from StackHPC's "Ark" Pulp server. The appliance can sync relevant repositories to a local Pulp server which will then be used instead of Ark. Using a local Pulp can be enabled by adding `pulp` to the build groups and overriding `appliances_pulp_url` to point at the local Pulp's URL.
3+
In order to ensure reproducible builds, the appliance can build images using repository mirrors from StackHPC's "Ark" Pulp server. The appliance can sync relevant repositories to a local Pulp server which will then be used instead of Ark.
44

55
## Deploying/configuring Pulp Server
66

77
### Deploying a Pulp server
8-
A playbook is provided to install and configure a Pulp server on a given host. Admin credentials for this server are automatically generated through the `ansible/adhoc/generate-passwords.yml' playbook. This can be run with
8+
A playbook is provided to install and configure a Pulp server on a given host. Admin credentials for this server are automatically generated through the `ansible/adhoc/generate-passwords.yml` playbook. This can be run with
99
`ansible-playbook ansible/adhoc/deploy-pulp.yml -e "pulp_server=<target_host>"`
1010
where `target_host` is any resolvable host. This will print a Pulp URL which can be copied to your environments as appropriate. Ensure that the server is accessible on the specified port. Note access to this server's content isn't authenticated so assumes the server is deployed behind a secure network.
1111

environments/.stackhpc/LEAFCLOUD.pkrvars.hcl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,7 @@ networks = ["909e49e8-6911-473a-bf88-0495ca63853c"] # slurmapp-ci
44
ssh_keypair_name = "slurm-app-ci"
55
ssh_private_key_file = "~/.ssh/id_rsa"
66
security_groups = ["default", "SSH"]
7-
floating_ip_network = "external"
7+
# see environments/.stackhpc/inventory/group_vars/all/bastion.yml:
8+
ssh_bastion_username = "slurm-app-ci"
9+
ssh_bastion_host = "195.114.30.222"
10+
ssh_bastion_private_key_file = "~/.ssh/id_rsa"

environments/.stackhpc/SMS.pkrvars.hcl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ flavor = "general.v1.small"
22
networks = ["e2b9e59f-43da-4e1c-b558-dc9da4c0d738"] # stackhpc-ipv4-geneve
33
ssh_keypair_name = "slurm-app-ci"
44
ssh_private_key_file = "~/.ssh/id_rsa"
5+
# see environments/.stackhpc/inventory/group_vars/all/bastion.yml:
56
ssh_bastion_username = "slurm-app-ci"
67
ssh_bastion_host = "185.45.78.150"
7-
ssh_bastion_private_key_file = "~/.ssh/id_rsa"
8+
ssh_bastion_private_key_file = "~/.ssh/id_rsa"

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

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -82,19 +82,39 @@ appliances_local_users: "{{ appliances_local_users_default + appliances_local_us
8282

8383
###########################################################################################
8484

85-
appliances_repo_timestamps:
85+
appliances_pulp_repos:
8686
baseos:
87-
'9.4': 20240816T002610
88-
'8.10': 20241217T123729
87+
'9.4':
88+
timestamp: 20241115T011711
89+
path: rocky/9.4/BaseOS/x86_64/os
90+
'8.10':
91+
timestamp: 20241217T123729
92+
path: rocky/8.10/BaseOS/x86_64/os
8993
appstream:
90-
'9.4': 20240816T002610
91-
'8.10': 20241217T123729
94+
'9.4':
95+
timestamp: 20241112T003151
96+
path: rocky/9.4/AppStream/x86_64/os
97+
'8.10':
98+
timestamp: 20241217T123729
99+
path: rocky/8.10/AppStream/x86_64/os
92100
crb:
93-
'9.4': 20240816T002610
94-
'8.10': 20241217T123729
101+
'9.4':
102+
timestamp: 20241115T003133
103+
path: rocky/9.4/CRB/x86_64/os
104+
'8.10':
105+
timestamp: 20241217T123729
106+
path: rocky/8.10/PowerTools/x86_64/os
95107
extras:
96-
'9.4': 20240816T002610
97-
'8.10': 20241217T123729
108+
'9.4':
109+
timestamp: 20241118T002802
110+
path: rocky/9.4/extras/x86_64/os
111+
'8.10':
112+
timestamp: 20241217T123729
113+
path: rocky/8.10/extras/x86_64/os
98114
epel:
99-
'9': 20240902T080424
100-
'8': 20241216T235733
115+
'9':
116+
timestamp: 20241213T010218
117+
path: epel/9/Everything/x86_64
118+
'8':
119+
timestamp: 20241216T235733
120+
path: epel/8/Everything/x86_64

requirements.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ roles:
33
- src: stackhpc.nfs
44
version: v23.12.1 # Tolerate state nfs file handles
55
- src: https://github.com/stackhpc/ansible-role-openhpc.git
6-
version: v0.26.0 # https://github.com/stackhpc/ansible-role-openhpc/pull/168
6+
version: v0.27.0
77
name: stackhpc.openhpc
88
- src: https://github.com/stackhpc/ansible-node-exporter.git
99
version: stackhpc

0 commit comments

Comments
 (0)