This section explains how to configure and use Artifactory as a mirror for a Tanzu Hosted Registry (GAR), to manage both container images and Helm charts.
What to do first
Ensure:
- You have administrator access to a pre-existing installation of Artifactory, configured in line with your enterprise’s security and access control policies.
- If Artifactory is not installed, you can set it up by following the installation guide provided by JFrog or use Tanzu Application Catalog for installing necessary components.
To consume Tanzu Application Catalog images using a Private Artifactory Registry, follow the steps as explained in the sections below:
- Create a Remote Repository in Artifactory
- Get Docker Login and Token
- Pull a Container Image from Tanzu Application Catalog
- Pull Helm Charts
- Verify the Pull
Create a Remote Repository in Artifactory
- Log in to Artifactory with administrator credentials.
- Navigate to “Administration” > “Repositories”.
- Create a new remote repository and select OCI.
-
Configure the repository settings by entering information for the following fields:
- URL: https://us-east1-docker.pkg.dev
- Project ID (for Google Artifact Registry): vmw-app-catalog
- Username: _json_key
- Password/Token: Copy and paste the content of the JSON file downloaded from the Tanzu Application Catalog. For more information on how to create a token, see Obtaining registry credentials.
- OCI Settings: Enable Token Authentication
-
Test the connection and save the settings. s
Get Docker Login and Token
Click on “Set Me Up” to obtain the Docker login and token for using this repository. Example:
$ docker login -u <myemail> <ARTIFACTORY_URL>
Pull a Container Image from Tanzu Application Catalog using the Artifactory mirror
- Find a container image in the Tanzu Application Catalog.
- Use the URL in the format us-east1-docker.pkg.dev/vmw-app-catalog.
For example:
$ docker pull <ARTIFACTORY_URL>/gar/hosted-registry-<ID>/containers/photon-5/airflow:2.10.4-photon-5-r0
The image will be pulled and shown as:
Status: Downloaded newer image for <ARTIFACTORY_URL>/gar/hosted-registry<ID>/containers/photon-5/airflow:2.10.4-photon-5-r0
The URL for the container image is formed as:
<ARTIFACTORY_URL>/gar (Artifactory Registry name) + hosted-registry-<ID>/containers/photon-5/airflow:2.10.4-photon-5-r0 (container location).
Pull Helm Charts
-
For Helm charts, follow the instructions under ‘Set me up’ > ‘Helm OCI’:
$ helm registry login -u <USER_EMAIL> -p <TOKEN> <JFROG_DOMAIN>
-
Pull the Helm chart locally by composing the URL of the mirror and the location of the Helm chart:
$ helm pull oci://<ARTIFACTORY_URL>/gar/hosted-registry-<ID>/charts/photon-5/apache
Example output:
Pulled: <ARTIFACTORY_URL>/gar/hosted-registry-<ID>/charts/photon-5/apache:11.3.44
The mirror URL: oci://<ARTIFACTORY_URL>/gar/
The location of the Helm chart in Tanzu Application Catalog:
hosted-registry-<<ID>>/charts/photon-5/apache.
Verify the Pull
After pulling the Helm chart or container image, you can verify that the Artifactory repository is populated with the requested images by checking the ‘Artifacts’ view.
Content feedback and comments