This article describes in general terms how to proxy a EDB private repository. In particular, how to get the correct URL to add to the Sonatype Nexus third-party repository management solution, and how to use the Nexus Proxy repository to install software.
Let's suppose we would like to proxy the postgres_extended
CloudSmith repository.
-
Go to the Nexus repository manager web interface.
-
Navigate to the repositories section and click on
Create Repository
. -
Choose the
yum(proxy)
option. -
Fill in the required information:
- Name:
postgres-extended-proxy
- Remote storage URL:
https://downloads.enterprisedb.com/<CS_COMPANY_TOKEN>/postgres_extended/
- Replace
<CS_COMPANY_TOKEN with>
your CloudSmith company token.
-
Pic a Blob store for Storage.
-
Click
Save
to create the repository.
(Let's suppose we would like to proxy Ubuntu Jammy)
-
Go to the Nexus repository manager web interface.
-
Navigate to the repositories section and click on
Create Repository
. -
Choose the
apt(proxy)
option. -
Fill in the required information:
- Name:
postgres-extended-proxy-ubuntu
- Remote storage URL:
https://downloads.enterprisedb.com/<CS_COMPANY_TOKEN>/postgres_extended/deb/ubuntu
- Replace
<CS_COMPANY_TOKEN with>
your CloudSmith company token - Define the Distribution (e.g.,
jammy
)
-
Pic a Blob store for Storage.
-
Click Save to create the repository.
Once the repository is created, Nexus will start to proxy the postgres_extended
repository, and you can configure your VMs to access it as described in the following section.
To configure your VM to access the Nexus proxy Yum and Apt repositories, follow these steps:
- Retrieve the GPG key for the CloudSmith repository:
wget -O /etc/pki/rpm-gpg/RPM-GPG-KEY-postgres-extended https://downloads.enterprisedb.com/<CS_COMPANY_TOKEN>/postgres_extended/gpg.B283E3B654B42B8E.key
Replace <CS_COMPANY_TOKEN>
with your CloudSmith company token.
- Create a new
.repo
file under/etc/yum.repo.d/
with the below content:
# cat /etc/yum.repo.d/nexus-postgres-extended.repo
[postgres-extended-nexus]
name=PG Extended Nexus Repository
baseurl=https://<NEXUS_CREDENTIALS>@<NEXUS_HOST>/repository/postgres-extended-2/rpm/rocky/$releasever/$basearch/
enabled=1
gpgcheck=1
gpgkey=/etc/pki/rpm-gpg/RPM-GPG-KEY-postgres-extended
Replace <NEXUS_CREDENTIALS>
with your Nexus credentials in the format username:password
, and <NEXUS_HOST>
with the hostname of your Nexus server.
- Retrieve the GPG key for the CloudSmith repository:
curl -1sLf 'https://downloads.enterprisedb.com/<CS_COMPANY_TOKEN>/postgres_extended/gpg.B283E3B654B42B8E.key' | gpg --dearmor >> /usr/share/keyrings/postgres-extended-keyring.gpg
Replace <CS_COMPANY_TOKEN>
with your CloudSmith company token.
- Create a new
.list
file under/etc/apt/source.list.d/
with the following content:
# cat /etc/apt/sources.list.d/postgres-extended.list
deb [signed-by=/usr/share/keyrings/postgres-extended-keyring.gpg] https://<NEXUS_CREDENTIALS>@<NEXUS_HOST>/repository/postgres-extended-ubuntu jammy main
Replace <NEXUS_CREDENTIALS>
with your Nexus credentials in the format username:password
, and <NEXUS_HOST>
with the hostname of your Nexus server.