Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
podman run --rm --device /dev/fuse --network host \
-e S3_ACCESS={{ s3_access }} -e S3_SECRET={{ s3_secret }} \
{{ aws_checksum_env }} --user 0 --privileged \
-v {{ pulp_cert_host_path }}:/etc/pki/ca-trust/source/anchors/pulp_webserver.crt:z \
-v {{ pulp_cert_host_path }}:/usr/local/share/ca-certificates/pulp_webserver.crt:z \
-v {{ openchami_work_dir }}/images/rhel-{{ item.key }}{{ compute_image_suffix }}-{{ rhel_tag }}.yaml:/home/builder/config.yaml:z \
{{ ochami_aarch64_image | join(' ') }} \
{{ ochami_base_command | join(' ') }} \
Expand Down
6 changes: 3 additions & 3 deletions build_image_aarch64/roles/image_creation/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ job_async: "7200"
openchami_work_dir: "{{ oim_shared_path }}/omnia/openchami/workdir"
ochami_mounts:
- --user 0 --privileged
- -v {{ oim_shared_path }}/omnia/pulp/settings/certs/pulp_webserver.crt:/etc/pki/ca-trust/source/anchors/pulp_webserver.crt:z
- -v {{ oim_shared_path }}/omnia/pulp/settings/certs/pulp_webserver.crt:/usr/local/share/ca-certificates/pulp_webserver.crt:z
- -v {{ openchami_work_dir }}/images/{{ rhel_aarch64_base_image_name }}-{{ rhel_tag }}.yaml:/home/builder/config.yaml:z
ochami_compute_mounts:
- --user 0 --privileged
- -v {{ oim_shared_path }}/omnia/pulp/settings/certs/pulp_webserver.crt:/etc/pki/ca-trust/source/anchors/pulp_webserver.crt:z
- -v {{ oim_shared_path }}/omnia/pulp/settings/certs/pulp_webserver.crt:/usr/local/share/ca-certificates/pulp_webserver.crt:z
- -v {{ openchami_work_dir }}/images/{{ rhel_base_compute_image_name }}-{{ rhel_tag }}.yaml:/home/builder/config.yaml:z
ochami_aarch64_image:
- --entrypoint /bin/bash
- "localhost/{{ aarch64_local_tag }}"
ochami_base_command:
- -c 'update-ca-trust extract && image-build --config /home/builder/config.yaml --log-level DEBUG'
- -c 'update-ca-certificates && image-build --config /home/builder/config.yaml --log-level DEBUG'


# Usage: build_base_image.yml
Expand Down
2 changes: 1 addition & 1 deletion build_image_aarch64/roles/prepare_arm_node/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

# input files
input_project_dir: "{{ hostvars['localhost']['input_project_dir'] }}"
pulp_aarch64_image_name: "dellhpcomniaaisolution/image-build-aarch64:1.1"
pulp_aarch64_image_name: "dellhpcomniaaisolution/image-build-wolfi-aarch64:1.1"
aarch64_local_tag: "aarch64-image-builder/ochami"
pull_image_retries: "5"
pull_image_delay: "10"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
- name: Set x86_64_base_image_packages
ansible.builtin.set_fact:
x86_64_base_image_packages: "{{ base_image_output.base_image_packages }}"
x86_64_ubuntu_base_image_packages: "{{ base_image_output.base_image_packages }}"

- name: Debug package x86_64_base_image_packages
ansible.builtin.debug:
Expand Down
61 changes: 61 additions & 0 deletions build_image_x86_64/roles/fetch_packages/tasks/fetch_pulp_repos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,64 @@
ansible.builtin.debug:
msg: "{{ rhel_x86_64_repos | to_nice_yaml(indent=2) }}"
verbosity: 2

- name: Fetch pulp deb endpoints for ubuntu x86_64
ansible.builtin.command: >
pulp deb distribution list --field name,base_url
register: pulp_deb_endpoints
changed_when: false
failed_when: false

- name: Filter only x86_64 ubuntu deb distributions
ansible.builtin.set_fact:
pulp_x86_64_deb_distributions: >-
{{ (pulp_deb_endpoints.stdout | default('[]') | from_json)
| selectattr('name', 'match', '^x86_64')
| list }}
when: pulp_deb_endpoints.rc == 0 and pulp_deb_endpoints.stdout | default('') | length > 0

- name: Fetch pulp deb remotes with distribution info
ansible.builtin.command: >
pulp deb remote list --field name,distributions,components
register: pulp_deb_remotes
changed_when: false
failed_when: false

- name: Build apt distribution map from pulp deb remotes
ansible.builtin.set_fact:
pulp_deb_remote_map: >-
{{ (pulp_deb_remotes.stdout | default('[]') | from_json)
| items2dict(key_name='name', value_name='distributions') }}
pulp_deb_comp_map: >-
{{ (pulp_deb_remotes.stdout | default('[]') | from_json)
| items2dict(key_name='name', value_name='components') }}
when: pulp_deb_remotes.rc == 0 and pulp_deb_remotes.stdout | default('') | length > 0

- name: Initialize ubuntu_x86_64_repos list
ansible.builtin.set_fact:
ubuntu_x86_64_repos: []

- name: Build ubuntu_x86_64_repos list with apt distribution info
ansible.builtin.set_fact:
ubuntu_x86_64_repos: >-
{{ ubuntu_x86_64_repos + [
item | combine({
'gpg': '',
'apt_dist': (pulp_deb_remote_map | default({}))[item.name] | default('') | regex_replace('^/$', 'flat-repo'),
'apt_comp': ((pulp_deb_comp_map | default({}))[item.name] | default('') | string)
| regex_replace('^None$', 'flat-repo-component')
| regex_replace('^$', 'flat-repo-component')
})
] }}
loop: "{{ pulp_x86_64_deb_distributions | default([]) }}"
loop_control:
loop_var: item

- name: Filter out repos with no apt_dist (no remote mapping)
ansible.builtin.set_fact:
ubuntu_x86_64_repos: "{{ ubuntu_x86_64_repos | selectattr('apt_dist', 'ne', '') | list }}"

- name: Debug ubuntu_x86_64_repos
ansible.builtin.debug:
msg: "{{ ubuntu_x86_64_repos | to_nice_yaml(indent=2) }}"
verbosity: 2
Loading