-
Notifications
You must be signed in to change notification settings - Fork 249
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6061 from EnterpriseDB/DOCS-916-add-artifactory-a…
…nd-others-to-the-repos-integrat Repos Update: Draft guides for integration
- Loading branch information
Showing
2 changed files
with
138 additions
and
4 deletions.
There are no files selected for viewing
130 changes: 130 additions & 0 deletions
130
advocacy_docs/repos/working_with_repos/integrating/artifactory.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
--- | ||
title: Using Hosted Artifactory with EDB repositories | ||
navTitle: Hosted Artifactory | ||
description: How to use Hosted JFrog Artifactory with EDB repositories | ||
--- | ||
|
||
To set up Hosted JFrog Artifactory with EDB repositories, you need to create remote repositories in Artifactory. This article shows how to use Hosted JFrog Artifactory with EDB repositories. The process is different for on-premises Artifactory. | ||
|
||
## Get the base URLs | ||
|
||
The process is requires a base URLs to access the EDB repositories. | ||
|
||
1. From your EDB account, [get your token](../../getting_started/with_cli/get_your_token). | ||
|
||
1. Make a note of your token, for our examples, the token will be `xyz123`. | ||
|
||
1. Select the repository you want to access, for example, `standard`. : | ||
|
||
1. Your base URL will is then formed as: | ||
|
||
``` | ||
https://downloads.enterprisedb.com/<token>/<repository>/ | ||
``` | ||
|
||
For the `standard` with our token, the repository, the base URL will be: | ||
|
||
``` | ||
https://downloads.enterprisedb.com/xyz123/standard/ | ||
``` | ||
|
||
1. Append the appropriate path for the repository type. | ||
For example, for a Red Hat Enterprise Linux 9 on x86 architecture, append `rpm/el/9/x86_64/` and seperately append `rpm/el/9/noarch/` for the noarch packages, to create two base URLs. With our example, the base URLs will be: | ||
|
||
``` | ||
https://downloads.enterprisedb.com/xyz123/standard/rpm/el/9/x86_64/ | ||
https://downloads.enterprisedb.com/xyz123/standard/rpm/el/9/noarch/ | ||
``` | ||
|
||
## Setup Artifactory remote repositories | ||
|
||
With your base URLs, you can now create the remote repositories in Artifactory. | ||
|
||
Use the Artifactory UI to create the 2 repositories (`x86_64` and `noarch`), one for each base URL. The `x86_64` repository will contain the `rpm` packages specifically for the `x86_64` architecture, and the `noarch` repository will contain the `rpm` packages which are for any architecture. | ||
|
||
Starting with the `x86_64` base URL: | ||
|
||
1. Select **Create Repository** and choose **Remote**. | ||
1. Choose **rpm** as the repository type. | ||
1. Enter a unique name for the repository key, for example, `edb-x86_64`. | ||
1. Fill in the URL as `https://downloads.enterprisedb.com/xyz123/standard/rpm/el/9/x86_64/`. | ||
1. Select **Create Remote Repository**. | ||
|
||
At this point, a prompt to setup the `yum` client configuration appears. This client configuration is the configuration you use on your local server or VM to access the configured EDB repositories via Artifactory. | ||
|
||
6. On your local RHEL 9 server or VM create the yum repository file `/etc/yum.repos.d/artifactory-edb.repo`. | ||
|
||
7. Add the text generated by Artifactory to the `/etc/yum.repos.d/artifactory-edb.repo` file. The generated text should resemble: | ||
|
||
``` | ||
[Artifactory] | ||
name=Artifactory | ||
baseurl=https://username%40domain:{artifactory_token}@username.jfrog.io/artifactory/edb-x86_64/<PATH_TO_REPODATA_FOLDER> | ||
enabled=1 | ||
gpgcheck=0 | ||
``` | ||
|
||
Remove the `<PATH_TO_REPODATA_FOLDER>` from the baseurl. It's not needed. | ||
|
||
You should also edit the `Artifactory` name to be more descriptive and unique as there are multiple repositories to add. For example, append `-edb-x86_64` to the name to give: | ||
|
||
``` | ||
[Artifactory-edb-x86_64] | ||
name=Artifactory-edb-x86_64 | ||
baseurl=https://username%40domain:{artifactory_token}@username.jfrog.io/artifactory/edb-x86_64/ | ||
enabled=1 | ||
gpgcheck=0 | ||
``` | ||
|
||
Save the file. | ||
|
||
8. Repeat the process, steps 1-7, to create an Artifactory remote repository for the `noarch` repository. When you generate the **yum** configuration text, add that text to the `/etc/yum.repos.d/artifactory-edb.repo` file previously created. The file should now contain: | ||
|
||
``` | ||
[Artifactory-edb-x86_64] | ||
name=Artifactory-edb-x86_64 | ||
baseurl=username%40domain:{artifactry_token}@username.jfrog.io/artifactory/edb-x86_64/ | ||
enabled=1 | ||
gpgcheck=0 | ||
[Artifactory-edb-noarch] | ||
name=Artifactory-edb-noarch | ||
baseurl=username%40domain:{artifactry_token}@username.jfrog.io/artifactory/edb-noarch/ | ||
enabled=1 | ||
gpgcheck=0 | ||
``` | ||
|
||
## Check the configuration works | ||
|
||
On the local Linux server where the `/etc/yum.repos.d/artifactory-edb.repo` file resides, check that the repositories configuration is correct by running the following command: | ||
|
||
|
||
```bash | ||
dnf repolist | grep -i Art | ||
``` | ||
|
||
The output returned should be: | ||
|
||
``` | ||
Artifactory-edb-noarch Artifactory-edb-noarch | ||
Artifactory-edb-x86_64 Artifactory-edb-x86_64 | ||
``` | ||
|
||
As you can see the two repositories are now configured. | ||
|
||
You can now check for a specific package, such as `postgresextended` in the Artifactory repository, using the `dnf list` command. The package name for this example is `edb-postgresextended15-server` which is EDB Postgres Extended 15. To ensure that you don't get false positives from other repositories, disable all repositories using `--disable-repo=*` and then only enable the `Artifactory-` prefixed repositories using `--enablerepo=Artifactory-*`: | ||
|
||
```bash | ||
dnf list edb-postgresextended15-server --disablerepo=* --enablerepo=Artifactory-* | ||
``` | ||
|
||
If configured and working correctly the output should resemble: | ||
|
||
``` | ||
Updating Subscription Management repositories. | ||
Last metadata expiration check: 0:01:58 ago on Thu 04 Jul 2024 06:00:31 EDT. | ||
Available Packages | ||
edb-postgresextended15-server.x86_64 15.7-2.el9 Artifactory-edb-x86_64 | ||
``` | ||
|
||
The EDB package `edb-postgresextended15-server` is now available to install from the Artifactory repository. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters