Introduction
When configuring an RPM remote repository in Artifactory to proxy Amazon Linux 2023 packages, special consideration is needed due to the structure of the upstream repository. Specifically, Amazon Linux 2023 hosts the repodata and the actual RPM packages (referred to as the "blobstore") on separate paths. To ensure seamless proxying and package resolution through Artifactory, both the repository configuration and the YUM client setup must be aligned accordingly.
This article outlines the required configuration to successfully proxy Amazon Linux 2023 using an RPM remote repository in Artifactory and demonstrates a successful package installation using this setup.
Upstream Structure
In the Amazon Linux 2023 registry:
- Repodata is hosted at:
https://cdn.amazonlinux.com/al2023/core/guids/9cf1057036ef7d615de550a658447fad88617805da0cfc9b854ba0fb8a668466/x86_64/repodata/repomd.xml
- Packages (blobstore) are hosted at:
https://cdn.amazonlinux.com/al2023/blobstore
To validate the path of the repodata folder, you can check directly on the registry website by clicking on a specific package. Under the Download section, you'll be able to identify both the repodata location and the path to the blobstore folder. As shown in the example screenshot below:
To allow Artifactory to handle both locations from a single remote repository, configure the RPM remote repository with the base URL (Amazon Linux 2023 base URL):
https://cdn.amazonlinux.com/al2023/
This ensures Artifactory is able to resolve both metadata and package content correctly.
Yum Client Configuration
The Yum client must be configured to target the path where the repodata is hosted. Below is an example repository configuration for the Yum client:
[Artifactory]
name=Artifactory
baseurl=https://admin:<Token>@<ARTIFACTORY_URL>/artifactory/<REPO_NAME>/core/guids/9cf1057036ef7d615de550a658447fad88617805da0cfc9b854ba0fb8a668466/x86_64/
enabled=1
gpgcheck=0
Replace <ARTIFACTORY_URL> and <REPO_NAME> with your actual Artifactory domain and repository name.
Validation
After configuring both Artifactory and the Yum client, you can verify the setup by attempting to install a package. For example:
yum update
yum install FastInfoset
If everything is correctly configured, the package should be downloaded successfully from the Amazon upstream, cached in Artifactory, and served to the client.
For more information on RPM repositories in Artifactory, you may refer to this documentation.