Change the Base URL in Federated Repositories

JFrog Artifactory Documentation

Products
JFrog Artifactory
Content Type
User Guide
ft:sourceType
Paligo

Starting with Artifactory version 7.55.1, administrators can change the base URL in an active Federated repository with remote members. Changing the base URL might be necessary, for example, if the network topology has changed.

Important

This feature is available only when all Federation members are using version 7.55.1 or above.

The steps required to complete the change are dependent on whether the Federation uses the base URL or a special Federated base URL (which was introduced in version 7.21.13).

If a Federated base URL has been defined, the JPD publishes this address to all Federation members, who then use this address to access the Federated repository on the JPD instead of the standard base URL.

change-base-URL_diagrams_with-FedBaseURL.png
change-base-URL_diagrams_without-FedBaseURL.png

To determine whether a Federated base URL has been defined, continue with Locate the Federated Base URL.

Important

As a fallback, it is possible to change the base URL more aggressively by canceling the Federation, changing the base URL, and then recreating the Federation. Please note this has a huge impact on the system since it requires recreating each Federated repository from scratch.

Locate the Federated Base URL

Use the Config Descriptor to determine whether a Federated base URL has been configured.

To check whether the Federated repository has a Federated base URL:

  1. In the Administration module, select Artifactory > Advanced > Config Descriptor.

    access-Config-Descriptor.png
  2. Search the configuration file for a Federation base URL entry:

    Fed_base_URL_config-descriptor_edit.png
  3. Continue with Possible Use Cases.

Note

The Config Descriptor can also be checked by sending a POST request using the relevant REST API. See Modifying Configuration Using the REST API.Global Configuration Descriptor

Possible Use Cases

When changing the base URL in Federated repositories, there are several possible use cases:

In all cases, it is highly recommended to test the functionality of the Federation after changing either the base URL or the Federated base URL, as described in After Changing the Base URL.

Change the Base URL

If the Federation uses Federated base URLs, and these URLs are not changing, all the Administrator needs to do is change the base URL directly from the JFrog platform UI, as described below.

Note

It is also possible to change the custom base URL using the Update Custom URL Base REST API.Update Custom URL Base

  1. In the Administration module, select General > Settings.

  2. Enter a new custom base URL.

  3. Click Save.

    custom-base-URL.png
  4. Continue with After Changing the Base URL.

Change the Federated Base URL

If the Federation uses Federated base URLs and the URLs need to change, the Administrator makes the change directly using the Config Descriptor. See Locate the Federated Base URL for details about accessing the URL.

Generate New Tokens

When the Federation members do not have Federated base URLs, or if the Federated base URLs have changed, the Administrator must generate a new pairing token and pair the source and target JPDs.

Make sure to perform this procedure on each remote Federation member.

  1. Generate a new token from the source JPD using the Create Pairing Token Platform REST API.Create Pairing Token

  2. Pair the target JPD to the source JPD using the new token with the Initiate Pairing Platform REST API.Initiate Pairing

  3. Replace the base URL (or Federated base URL) by executing the following POST request against the target JPD: api/federation/replaceUrl with the following body:

    {  
        "oldBaseUrl": "http:/<old base URL>/artifactory",  
        "newBaseUrl": "http://<new base URL>/artifactory"
    }
  4. Continue with After Changing the Base URL.