Skip to content

Commit 38db664

Browse files
committed
repo manager output fixes
Signed-off-by: Abhishek S A <abhishek.sa3@dell.com>
1 parent 650341d commit 38db664

4 files changed

Lines changed: 91 additions & 36 deletions

File tree

src/image_build_manager/image_build_manager.yml

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -127,15 +127,37 @@
127127

128128
- name: Build repo lists from repo_manager output
129129
ansible.builtin.set_fact:
130-
repo_manager_repos_x86_64: >-
131-
[{% for k, v in (rpm_repos.x86_64 | default({})).items() %}
132-
{"name": "{{ k }}", "base_url": "{{ v }}", "gpg": ""}{{ "," if not loop.last else "" }}
133-
{% endfor %}]
134-
repo_manager_repos_aarch64: >-
135-
[{% for k, v in (rpm_repos.aarch64 | default({})).items() %}
136-
{"name": "{{ k }}", "base_url": "{{ v }}", "gpg": ""}{{ "," if not loop.last else "" }}
137-
{% endfor %}]
130+
repo_manager_repos_x86_64: []
131+
repo_manager_repos_aarch64: []
138132
rpm_repos_aarch64: "{{ rpm_repos.aarch64 | default({}) }}"
133+
when:
134+
- repo_manager_output_path | default('') | length > 0
135+
- rpm_repos is defined
136+
137+
- name: Build x86_64 repo list
138+
ansible.builtin.set_fact:
139+
repo_manager_repos_x86_64: "{{ repo_manager_repos_x86_64 + [{'name': item.key, 'base_url': item.value, 'gpg': ''}] }}"
140+
loop: "{{ (rpm_repos.x86_64 | default({})) | dict2items }}"
141+
loop_control:
142+
loop_var: item
143+
when:
144+
- repo_manager_output_path | default('') | length > 0
145+
- rpm_repos is defined
146+
147+
- name: Build aarch64 repo list
148+
ansible.builtin.set_fact:
149+
repo_manager_repos_aarch64: "{{ repo_manager_repos_aarch64 + [{'name': item.key, 'base_url': item.value, 'gpg': ''}] }}"
150+
loop: "{{ (rpm_repos.aarch64 | default({})) | dict2items }}"
151+
loop_control:
152+
loop_var: item
153+
when:
154+
- repo_manager_output_path | default('') | length > 0
155+
- rpm_repos is defined
156+
157+
- name: Make repo lists cacheable
158+
ansible.builtin.set_fact:
159+
repo_manager_repos_x86_64: "{{ repo_manager_repos_x86_64 }}"
160+
repo_manager_repos_aarch64: "{{ repo_manager_repos_aarch64 }}"
139161
cacheable: true
140162
when:
141163
- repo_manager_output_path | default('') | length > 0

src/image_build_manager/playbooks/build_image_aarch64.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,25 @@
8181

8282
- name: Build repo lists from repo_manager output
8383
ansible.builtin.set_fact:
84-
repo_manager_repos_aarch64: >-
85-
[{% for k, v in (rpm_repos.aarch64 | default({})).items() %}
86-
{"name": "{{ k }}", "base_url": "{{ v }}", "gpg": ""}{{ "," if not loop.last else "" }}
87-
{% endfor %}]
84+
repo_manager_repos_aarch64: []
8885
rpm_repos_aarch64: "{{ rpm_repos.aarch64 | default({}) }}"
86+
when:
87+
- repo_manager_output_path | default('') | length > 0
88+
- rpm_repos is defined
89+
90+
- name: Build aarch64 repo list
91+
ansible.builtin.set_fact:
92+
repo_manager_repos_aarch64: "{{ repo_manager_repos_aarch64 + [{'name': item.key, 'base_url': item.value, 'gpg': ''}] }}"
93+
loop: "{{ (rpm_repos.aarch64 | default({})) | dict2items }}"
94+
loop_control:
95+
loop_var: item
96+
when:
97+
- repo_manager_output_path | default('') | length > 0
98+
- rpm_repos is defined
99+
100+
- name: Make repo list cacheable
101+
ansible.builtin.set_fact:
102+
repo_manager_repos_aarch64: "{{ repo_manager_repos_aarch64 }}"
89103
cacheable: true
90104
when:
91105
- repo_manager_output_path | default('') | length > 0

src/image_build_manager/playbooks/build_image_x86_64.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,24 @@
8181

8282
- name: Build repo lists from repo_manager output
8383
ansible.builtin.set_fact:
84-
repo_manager_repos_x86_64: >-
85-
[{% for k, v in (rpm_repos.x86_64 | default({})).items() %}
86-
{"name": "{{ k }}", "base_url": "{{ v }}", "gpg": ""}{{ "," if not loop.last else "" }}
87-
{% endfor %}]
84+
repo_manager_repos_x86_64: []
85+
when:
86+
- repo_manager_output_path | default('') | length > 0
87+
- rpm_repos is defined
88+
89+
- name: Build x86_64 repo list
90+
ansible.builtin.set_fact:
91+
repo_manager_repos_x86_64: "{{ repo_manager_repos_x86_64 + [{'name': item.key, 'base_url': item.value, 'gpg': ''}] }}"
92+
loop: "{{ (rpm_repos.x86_64 | default({})) | dict2items }}"
93+
loop_control:
94+
loop_var: item
95+
when:
96+
- repo_manager_output_path | default('') | length > 0
97+
- rpm_repos is defined
98+
99+
- name: Make repo list cacheable
100+
ansible.builtin.set_fact:
101+
repo_manager_repos_x86_64: "{{ repo_manager_repos_x86_64 }}"
88102
cacheable: true
89103
when:
90104
- repo_manager_output_path | default('') | length > 0

src/image_build_manager/samples/repo_status.yml

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@
3030
overall_status: "success"
3131

3232
# Base URLs for other content types
33-
tarball_base_url: "http://{{ admin_nic_ip }}:2225/pulp/content/tarballs/"
34-
manifest_base_url: "http://{{ admin_nic_ip }}:2225/pulp/content/manifests/"
35-
pip_base_url: "http://{{ admin_nic_ip }}:2225/pulp/content/pip/"
36-
git_base_url: "http://{{ admin_nic_ip }}:2225/pulp/content/git/"
33+
tarball_base_url: "https://{{ admin_nic_ip }}:2225/pulp/content/opt/omnia/offline_repo/cluster/tarballs/"
34+
manifest_base_url: "https://{{ admin_nic_ip }}:2225/pulp/content/opt/omnia/offline_repo/cluster/manifests/"
35+
pip_base_url: "https://{{ admin_nic_ip }}:2225/pulp/content/opt/omnia/offline_repo/cluster/pip/"
36+
git_base_url: "https://{{ admin_nic_ip }}:2225/pulp/content/opt/omnia/offline_repo/cluster/git/"
3737

3838
repo_manager:
3939
port: 2225
@@ -46,28 +46,33 @@ repo_manager:
4646
rpm_repos:
4747
x86_64:
4848
# Base RHEL Repositories
49-
baseos: "http://{{ admin_nic_ip }}:2225/pulp/content/rhel/baseos/x86_64/"
50-
appstream: "http://{{ admin_nic_ip }}:2225/pulp/content/rhel/appstream/x86_64/"
51-
codeready_builder: "http://{{ admin_nic_ip }}:2225/pulp/content/rhel/codeready-builder/x86_64/"
49+
baseos: "https://{{ admin_nic_ip }}:2225/pulp/content/opt/omnia/offline_repo/cluster/x86_64/rhel/10.0/rpms/x86_64_rhel_10.0_baseos/"
50+
appstream: "https://{{ admin_nic_ip }}:2225/pulp/content/opt/omnia/offline_repo/cluster/x86_64/rhel/10.0/rpms/x86_64_rhel_10.0_appstream/"
51+
codeready_builder: "https://{{ admin_nic_ip }}:2225/pulp/content/opt/omnia/offline_repo/cluster/x86_64/rhel/10.0/rpms/x86_64_rhel_10.0_codeready-builder/"
5252
# Additional Repositories
53-
epel: "http://{{ admin_nic_ip }}:2225/pulp/content/epel/x86_64/"
54-
slurm_custom: "http://{{ admin_nic_ip }}:2225/pulp/content/slurm_custom/x86_64/"
55-
doca: "http://{{ admin_nic_ip }}:2225/pulp/content/doca/x86_64/"
53+
epel: "https://{{ admin_nic_ip }}:2225/pulp/content/opt/omnia/offline_repo/cluster/x86_64/rhel/10.0/rpms/x86_64_rhel_10.0_epel/"
54+
doca: "https://{{ admin_nic_ip }}:2225/pulp/content/opt/omnia/offline_repo/cluster/x86_64/rhel/10.0/rpms/x86_64_rhel_10.0_doca/"
55+
# Additional repos from production
56+
omnia-additional: "https://{{ admin_nic_ip }}:2225/pulp/content/opt/omnia/offline_repo/cluster/x86_64/rhel/10.0/rpms/x86_64_rhel_10.0_omnia-additional/"
57+
nvidia-hpc-sdk: "https://{{ admin_nic_ip }}:2225/pulp/content/opt/omnia/offline_repo/cluster/x86_64/rhel/10.0/rpms/x86_64_rhel_10.0_nvidia-hpc-sdk/"
58+
cuda: "https://{{ admin_nic_ip }}:2225/pulp/content/opt/omnia/offline_repo/cluster/x86_64/rhel/10.0/rpms/x86_64_rhel_10.0_cuda/"
59+
cri-o-v1-35: "https://{{ admin_nic_ip }}:2225/pulp/content/opt/omnia/offline_repo/cluster/x86_64/rhel/10.0/rpms/x86_64_rhel_10.0_cri-o-v1-35/"
60+
kubernetes-v1-35: "https://{{ admin_nic_ip }}:2225/pulp/content/opt/omnia/offline_repo/cluster/x86_64/rhel/10.0/rpms/x86_64_rhel_10.0_kubernetes-v1-35/"
61+
docker-ce: "https://{{ admin_nic_ip }}:2225/pulp/content/opt/omnia/offline_repo/cluster/x86_64/rhel/10.0/rpms/x86_64_rhel_10.0_docker-ce/"
62+
cri-o: "https://{{ admin_nic_ip }}:2225/pulp/content/opt/omnia/offline_repo/cluster/x86_64/rhel/10.0/rpms/x86_64_rhel_10.0_cri-o/"
63+
kubernetes: "https://{{ admin_nic_ip }}:2225/pulp/content/opt/omnia/offline_repo/cluster/x86_64/rhel/10.0/rpms/x86_64_rhel_10.0_kubernetes/"
5664
aarch64:
5765
# Base RHEL Repositories
58-
baseos: "http://{{ admin_nic_ip }}:2225/pulp/content/rhel/baseos/aarch64/"
59-
appstream: "http://{{ admin_nic_ip }}:2225/pulp/content/rhel/appstream/aarch64/"
60-
codeready_builder: "http://{{ admin_nic_ip }}:2225/pulp/content/rhel/codeready-builder/aarch64/"
66+
baseos: "https://{{ admin_nic_ip }}:2225/pulp/content/opt/omnia/offline_repo/cluster/aarch64/rhel/10.0/rpms/aarch64_rhel_10.0_baseos/"
67+
appstream: "https://{{ admin_nic_ip }}:2225/pulp/content/opt/omnia/offline_repo/cluster/aarch64/rhel/10.0/rpms/aarch64_rhel_10.0_appstream/"
68+
codeready_builder: "https://{{ admin_nic_ip }}:2225/pulp/content/opt/omnia/offline_repo/cluster/aarch64/rhel/10.0/rpms/aarch64_rhel_10.0_codeready-builder/"
6169
# Additional Repositories
62-
epel: "http://{{ admin_nic_ip }}:2225/pulp/content/epel/aarch64/"
63-
slurm_custom: "http://{{ admin_nic_ip }}:2225/pulp/content/slurm_custom/aarch64/"
64-
doca: "http://{{ admin_nic_ip }}:2225/pulp/content/doca/aarch64/"
70+
epel: "https://{{ admin_nic_ip }}:2225/pulp/content/opt/omnia/offline_repo/cluster/aarch64/rhel/10.0/rpms/aarch64_rhel_10.0_epel/"
71+
doca: "https://{{ admin_nic_ip }}:2225/pulp/content/opt/omnia/offline_repo/cluster/aarch64/rhel/10.0/rpms/aarch64_rhel_10.0_doca/"
6572

6673
# User-Defined Repositories (from local_repo_config.yml)
6774
user_repos:
6875
x86_64:
69-
custom_repo_1: "http://{{ admin_nic_ip }}:2225/pulp/content/custom_repo_1/x86_64/"
70-
custom_repo_2: "http://{{ admin_nic_ip }}:2225/pulp/content/custom_repo_2/x86_64/"
76+
slurm_custom: "https://{{ admin_nic_ip }}:2225/pulp/content/opt/omnia/offline_repo/cluster/x86_64/rhel/10.0/rpms/x86_64_rhel_10.0_slurm_custom/"
7177
aarch64:
72-
custom_repo_1: "http://{{ admin_nic_ip }}:2225/pulp/content/custom_repo_1/aarch64/"
73-
custom_repo_2: "http://{{ admin_nic_ip }}:2225/pulp/content/custom_repo_2/aarch64/"
78+
slurm_custom: "https://{{ admin_nic_ip }}:2225/pulp/content/opt/omnia/offline_repo/cluster/aarch64/rhel/10.0/rpms/aarch64_rhel_10.0_slurm_custom/"

0 commit comments

Comments
 (0)