Skip to content

Commit bda3f7e

Browse files
committed
Pointed dnf repos back at ark for now + refactor
1 parent c433605 commit bda3f7e

File tree

9 files changed

+35
-25
lines changed

9 files changed

+35
-25
lines changed

ansible/adhoc/sync-pulp.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,3 @@
88
pulp_site_target_distribution: "rocky"
99
pulp_site_target_distribution_version: "9.4"
1010
pulp_site_target_distribution_version_major: "9"
11-
pulp_site_version_timestamps: "{{ appliances_repo_timestamps[pulp_site_target_distribution_version] }}"

ansible/fatimage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
tasks_from: sync.yml
2626
apply:
2727
delegate_to: localhost
28-
when: appliances_mode != 'configure' and appliances_sync_pulp_on_build
28+
when: appliances_mode != 'configure'
2929

3030
- hosts: dnf_repos
3131
become: yes

ansible/roles/dnf_repos/defaults/main.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,24 @@ dnf_repos_pulp_url: "{{ appliances_pulp_url }}"
22
dnf_repos_pulp_content_url: "{{ dnf_repos_pulp_url }}/pulp/content"
33
dnf_repos_rocky_prefix: "{{ ansible_distribution | lower }}/{{ ansible_distribution_version }}"
44
dnf_repos_epel_prefix: "epel/{{ ansible_distribution_major_version }}"
5-
dnf_repos_disable: true
6-
dnf_repos_version_timestamps: "{{ appliances_repo_timestamps[ansible_distribution_version] }}"
5+
dnf_repos_version_timestamps: "{{ appliances_repo_minor_timestamps[ansible_distribution_version] }}"
6+
dnf_repos_username: "{{ omit }}"
7+
dnf_repos_password: "{{ omit }}"
78

89
# epel installed separately
910
dnf_repos_repolist:
1011
- file: rocky
1112
name: baseos
12-
base_url: "{{ dnf_repos_pulp_content_url }}/{{ dnf_repos_rocky_prefix }}/baseos/{{ dnf_repos_version_timestamps.baseos }}"
13+
base_url: "{{ dnf_repos_pulp_content_url }}/{{ dnf_repos_rocky_prefix }}/BaseOS/{{ ansible_architecture }}/os/{{ appliances_repo_minor_timestamps[ansible_distribution_version].baseos }}"
1314
- file: rocky
1415
name: appstream
15-
base_url: "{{ dnf_repos_pulp_content_url }}/{{ dnf_repos_rocky_prefix }}/appstream/{{ dnf_repos_version_timestamps.appstream }}"
16+
base_url: "{{ dnf_repos_pulp_content_url }}/{{ dnf_repos_rocky_prefix }}/AppStream/{{ ansible_architecture }}/os/{{ appliances_repo_minor_timestamps[ansible_distribution_version].appstream }}"
1617
- file: rocky
1718
name: crb
18-
base_url: "{{ dnf_repos_pulp_content_url }}/{{ dnf_repos_rocky_prefix }}/crb/{{ dnf_repos_version_timestamps.crb }}"
19+
base_url: "{{ dnf_repos_pulp_content_url }}/{{ dnf_repos_rocky_prefix }}/CRB/{{ ansible_architecture }}/os/{{ appliances_repo_minor_timestamps[ansible_distribution_version].crb }}"
1920
- file: rocky-extras
2021
name: extras
21-
base_url: "{{ dnf_repos_pulp_content_url }}/{{ dnf_repos_rocky_prefix }}/extras/{{ dnf_repos_version_timestamps.extras }}"
22+
base_url: "{{ dnf_repos_pulp_content_url }}/{{ dnf_repos_rocky_prefix }}/extras/{{ ansible_architecture }}/os/{{ appliances_repo_minor_timestamps[ansible_distribution_version].extras }}"
2223

23-
dnf_repos_epel_baseurl: "{{ dnf_repos_pulp_content_url }}/epel/{{ ansible_distribution_version }}/{{ dnf_repos_version_timestamps.epel }}"
24+
dnf_repos_epel_baseurl: "{{ dnf_repos_pulp_content_url }}/epel/{{ ansible_distribution_major_version }}/Everything/{{ ansible_architecture }}/{{ appliances_repo_major_timestamps[ansible_distribution_major_version].epel }}"
2425
dnf_repos_epel_description: "epel"

ansible/roles/dnf_repos/tasks/set_repos.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
name: "{{ item.name }}"
77
baseurl: "{{ item.base_url }}"
88
description: "{{ item.name }}"
9+
username: "{{ dnf_repos_username }}"
10+
password: "{{ dnf_repos_password }}"
911
loop: "{{ dnf_repos_repolist }}"
1012

1113
- name: Install epel-release
@@ -20,3 +22,5 @@
2022
description: "{{ dnf_repos_epel_description }}"
2123
gpgcheck: false
2224
baseurl: "{{ dnf_repos_epel_baseurl }}"
25+
username: "{{ dnf_repos_username }}"
26+
password: "{{ dnf_repos_password }}"

ansible/roles/pulp_site/defaults/main.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ pulp_site_target_arch: "{{ pulp_site_target_facts['architecture'] }}"
1414
pulp_site_target_distribution: "{{ pulp_site_target_facts['distribution'] | lower }}"
1515
pulp_site_target_distribution_version: "{{ pulp_site_target_facts['distribution_version'] }}"
1616
pulp_site_target_distribution_version_major: "{{ pulp_site_target_facts['distribution_major_version'] }}"
17-
pulp_site_version_timestamps: "{{ appliances_repo_timestamps[pulp_site_target_distribution_version] }}"
17+
pulp_site_version_timestamps: "{{ appliances_repo_minor_timestamps[pulp_site_target_distribution_version] }}"
18+
pulp_site_major_version_timestamps: "{{ appliances_repo_major_timestamps[pulp_site_target_distribution_version_major] }}"
1819

1920
pulp_site_rpm_info:
2021
- name: "baseos-{{ pulp_site_target_distribution_version }}-{{ pulp_site_version_timestamps.baseos }}"
@@ -30,7 +31,7 @@ pulp_site_rpm_info:
3031
url: "{{ pulp_site_default_upstream_prefix }}/extras/{{ pulp_site_default_upstream_suffix }}/{{ pulp_site_version_timestamps.extras }}"
3132
base_path: "rocky/{{ pulp_site_target_distribution_version }}/extras/{{ pulp_site_version_timestamps.extras }}"
3233
- name: "epel-{{ pulp_site_target_distribution_version }}-{{ pulp_site_version_timestamps.epel }}"
33-
url: "https://ark.stackhpc.com/pulp/content/epel/{{ pulp_site_target_distribution_version_major }}/Everything/{{ pulp_site_target_arch }}/{{ pulp_site_version_timestamps.epel }}"
34+
url: "https://ark.stackhpc.com/pulp/content/epel/{{ pulp_site_target_distribution_version_major }}/Everything/{{ pulp_site_target_arch }}/{{ pulp_site_major_version_timestamps.epel }}"
3435
base_path: "epel/{{ pulp_site_target_distribution_version }}/{{ pulp_site_version_timestamps.epel }}"
3536

3637
pulp_site_rpm_repo_defaults:

docs/experimental/pulp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ An existing Pulp server can be used to host Ark repos by overriding `pulp_site_p
1414

1515
## Syncing Pulp content with Ark
1616

17-
By default, the appliance will sync repos for the targetted distribution during build (can be disabled by setting `appliances_sync_pulp_on_build` to `false`). You must supply your Ark credentials, either by overriding `pulp_site_upstream_password` or setting environment variable `ARK_PASSWORD`. Content can also be synced by running `ansible/adhoc/sync-pulp.yml`, optionally setting extravars for `pulp_site_target_arch`, `pulp_site_target_distribution`, `pulp_site_target_distribution_version` and `pulp_site_target_distribution_version`.
17+
If the `pulp` group is added to the Packer build groups, the local Pulp server will be synced with Ark on build. You must supply your Ark credentials, either by overriding `pulp_site_upstream_password` or setting environment variable `ARK_PASSWORD`. Content can also be synced by running `ansible/adhoc/sync-pulp.yml`, optionally setting extravars for `pulp_site_target_arch`, `pulp_site_target_distribution`, `pulp_site_target_distribution_version` and `pulp_site_target_distribution_version`.
Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
# update_enable: false # Can uncomment for speed debugging non-update related build issues
2-
pulp_server_config:
3-
LEAFCLOUD:
4-
url: http://192.168.10.157:8080
5-
password: lookup('env','LEAFCLOUD_PULP_PASSWORD')
6-
7-
appliances_pulp_url: "{{ pulp_server_config[lookup('env','CI_CLOUD')].url }}"
8-
pulp_site_password: "{{ pulp_server_config[lookup('env','CI_CLOUD')].password }}"
9-
appliances_sync_pulp_on_build: false
2+
3+
# Uncomment below to use CI pulp servers
4+
5+
# pulp_server_config:
6+
# LEAFCLOUD:
7+
# url: http://192.168.10.157:8080
8+
# password: lookup('env','LEAFCLOUD_PULP_PASSWORD')
9+
10+
# appliances_pulp_url: "{{ pulp_server_config[lookup('env','CI_CLOUD')].url }}"
11+
# pulp_site_password: "{{ pulp_server_config[lookup('env','CI_CLOUD')].password }}"
12+
13+
dnf_repos_username: slurm-app-ci
14+
dnf_repos_password: "{{ lookup('env','ARK_PASSWORD') }}"

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ appliances_environment_name: "{{ appliances_environment_root | basename | regex_
77
appliances_cockpit_state: absent # RHEL cockpit installed but not enabled in genericcloud images; appliance defaults to removing it
88
#appliances_state_dir: # define an absolute path here to use for persistent state: NB: This is defined as /var/lib/state in inventory by the default Terraform
99
appliances_mode: configure
10-
#appliances_pulp_url: #override required
10+
appliances_pulp_url: https://ark.stackhpc.com
1111

1212
# Address(ip/dns) for internal communication between services. This is
1313
# normally traffic you do no want to expose to users.
@@ -82,11 +82,13 @@ appliances_local_users: "{{ appliances_local_users_default + appliances_local_us
8282

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

85-
appliances_sync_pulp_on_build: true
86-
appliances_repo_timestamps:
85+
appliances_repo_minor_timestamps:
8786
'9.4':
8887
baseos: 20240816T002610
8988
appstream: 20240816T002610
9089
crb: 20240816T002610
9190
extras: 20240816T002610
91+
92+
appliances_repo_major_timestamps:
93+
'9':
9294
epel: 20240902T080424

environments/common/inventory/groups

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,7 @@ freeipa_client
147147

148148
[dnf_repos:children]
149149
# Hosts to replace system repos with Pulp repos
150-
cluster
151150
builder
152151

153152
[pulp:children]
154153
# Hosts used to run Pulp API commands
155-
builder

0 commit comments

Comments
 (0)