Execute local repo playbook
The local repository feature helps create offline repositories on the OIM, which all the cluster nodes can access.
Configurations made by the playbook
A registry is created on the OIM at <OIM hostname>:5001.
If
repo_configinlocal_repo_config.ymlis set toalwaysorpartial, all images present in theinput/config/<cluster_os_type>/<cluster_os_version>folder will be downloaded to the OIM.
If the image is defined using a tag, the image will be tagged using <OIM hostname>:5001/<image_name>:<version> and pushed to the Omnia local registry.
If the image is defined using a digest, the image will be tagged using <OIM hostname>:5001/<image_name>:omnia and pushed to the Omnia local registry.repositories
When
repo_configinlocal_repo_config.ymlis set toalways, the OIM is set as the default registry mirror.When
repo_configinlocal_repo_configis set topartial, theuser_registry(if defined) and the OIM are set as default registry mirrors.
Create & Verify local repo
To create local repositories, execute the following command:
cd local_repo ansible-playbook local_repo.yml
Verify changes made by the playbook by executing
cat /etc/containerd/certs.d/_default/hosts.tomlon the compute nodes.
Note
View the status of packages for the current run of
local_repo.ymlin/opt/omnia/offline/download_package_status.csv. Packages which are already a part of Focal or Jammy repositories show up asSkipped.local_repo.ymlplaybook execution fails if any software package download fails. Packages that fail are marked with a “Failed” status. In such a scenario, the user needs to re-run thelocal_repo.ymlplaybook. For more information, click here.If
repo_configis set topartial, packages which are part of theuser_repo_urlor images which are part ofuser_registryhave aSkippedstatus in/opt/omnia/offline/download_package_status.csv.If any software packages fail to download during the execution of this script, other scripts that rely on the package (that is, scripts that install the software) may fail.
To fetch images from the
user_registryor the Omnia local registry, run the below commands:Images defined with versions:
nerdctl pull <global_registry>/<image_name>:<tag>Images defined with digests:
nerdctl pull <global_registry>/<image_name>:omnia
Note
After
local_repo.ymlhas run, the value ofrepo_configininput/software_config.jsoncannot be updated without running the oim_cleanup.yml script first.To configure additional local repositories after running
local_repo.yml, updatesoftware_config.jsonand re-runlocal_repo.yml.Images downloaded from
gcr.iointo the local registry are no longer accessible using digest values. These images are tagged with the ‘omnia’ tag. Choose one of the following methods when pushing these images to the cluster nodes:Append ‘omnia’ to the end of the image name while pushing images to the
user_registry. Update the image definition ininput/config/<cluster_os_type>/<cluster_os_version>/<software>.jsonto follow the same nomenclature.For “kserve” and “kubeflow” images sourced from
gcr.io, Omnia updates the digest tag toomnia-kserveandomnia-kubeflowwhile pushing the images touser_registry.If a different tag is provided, update the digest value in
input/config/<cluster_os_type>/<cluster_os_version>/<software>.jsonas per the image digest in theuser_directory. To get the updated digest from theuser_registry, use the below steps:Check the tag of image:
curl -k https://<user_registry>/v2/<image_name>/tags/listCheck the digest of the tag:
curl -H <headers> -k https://<user_registry>/v2/<image_name>/manifests/omnia
Update local repositories
After local repositories have been configured on a cluster, this playbook is used to update every local repository on that cluster.
To run the playbook:
cd utils
ansible-playbook update_user_repo.yml -i inventory
If you have any feedback about Omnia documentation, please reach out at omnia.readme@dell.com.