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 :5001. * If ``repo_config`` in ``input/software_config.json`` is set to ``always`` or ``partial``, all images present in the ``input/config//`` folder will be downloaded to the OIM. * If the image is defined using a tag, the image will be tagged using :5001/: and pushed to the Omnia local registry. * If the image is defined using a digest, the image will be tagged using :5001/:omnia and pushed to the Omnia local registry.repositories * When ``repo_config`` in ``input/software_config.json`` is set to ``always``, the OIM is set as the default registry mirror. * When ``repo_config`` in ``input/software_config.json`` is set to ``partial``, the ``user_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.toml`` on the compute nodes. .. note:: * View the status of packages for the current run of ``local_repo.yml`` in ``/opt/omnia/offline/download_package_status.csv``. Packages which are already a part of Focal or Jammy repositories show up as ``Skipped``. * ``local_repo.yml`` playbook 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 the ``local_repo.yml`` playbook. For more information, `click here <../../../Troubleshooting/FAQ/Common/LocalRepo.html>`_. * If ``repo_config`` is set to ``partial``, packages which are part of the ``user_repo_url`` or images which are part of ``user_registry`` have a ``Skipped`` status 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_registry`` or the Omnia local registry, run the below commands: * Images defined with versions: ``nerdctl pull /:`` * Images defined with digests: ``nerdctl pull /:omnia`` .. note:: * After ``local_repo.yml`` has run, the value of ``repo_config`` in ``input/software_config.json`` cannot be updated without running the `oim_cleanup.yml <../../Maintenance/cleanup.html>`_ script first. * To configure additional local repositories after running ``local_repo.yml``, update ``software_config.json`` and re-run ``local_repo.yml``. * Images downloaded from ``gcr.io`` into 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 in ``input/config///.json`` to follow the same nomenclature. * For "kserve" and "kubeflow" images sourced from ``gcr.io``, Omnia updates the digest tag to ``omnia-kserve`` and ``omnia-kubeflow`` while pushing the images to ``user_registry``. * If a different tag is provided, update the digest value in ``input/config///.json`` as per the image digest in the ``user_directory``. To get the updated digest from the ``user_registry``, use the below steps: * Check the tag of image: ``curl -k https:///v2//tags/list`` * Check the digest of the tag: ``curl -H -k https:///v2//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