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.
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:
In the Administration module, select Artifactory > Advanced > Config Descriptor.
Search the configuration file for a Federation base URL entry:
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.
Possible Use Cases
When changing the base URL in Federated repositories, there are several possible use cases:
You want to change the base URL when no Federated base URLs have been defined. In this case, perform Change the Base URL followed by Generate New Tokens.
You want to change the base URL without changing the existing Federated base URLs. In this case, perform Change the Base URL. The tokens do not need to be regenerated.
You want to change the existing Federated base URL. In this case, perform Change the Federated Base URL followed by Generate New Tokens.
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.
In the Administration module, select General > Settings.
Enter a new custom base URL.
Click Save.
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.
Generate a new token from the source JPD using the Create Pairing Token Platform REST API.
Pair the target JPD to the source JPD using the new token with the Initiate Pairing Platform REST API.
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" }
Continue with After Changing the Base URL.