Geo-Synchronized Topology

Connect Artifactory instances behind a GeoDNS with a dedicated Federated Repository URL.

The geo-synchronized topology is an extension of the full mesh topology whereby several Artifactory instances are connected to a GeoDNS. In this use case, the desired outcome is to have the exact same configuration (repository names, users, groups, permission targets) in all instances connected to the routing server.

You can deploy and resolve from the same repositories without needing to change the configuration in your build tool based on the server you're routed to. Everything happens behind the scenes, and you connect to Artifactory through one dedicated URL.

📘

Federated repositories don't operate synchronously, so you should work with one fixed site. If you decide to move between sites, keep in mind that events take time to synchronize between those sites.

Set an Initial Federated Repository URL

A geo-synchronized topology requires that all platform deployments (Artifactory instances) be configured with the same Custom Base URL. However, Federated repositories also need a unique Federated Base URL to distinguish between the Federation members in the different platform deployments.

To set an initial Federated Repository URL:

  • Add the federatedRepoUrlBase parameter to the Global Configuration Descriptor file, under the <systemProperties> section:

    <urlBase>https://<ART_LB_URL></urlBase>
    <federatedRepoUrlBase>https://<ARTIFACTORY_SERVER_HOSTNAME>/artifactory</federatedRepoUrlBase>

    Where:

    • <ART_LB_URL>: The load balancer URL used as the instance's Custom Base URL
    • <ARTIFACTORY_SERVER_HOSTNAME>: The unique hostname for this Artifactory instance's Federated Base URL

    For example:

    <urlBase>https://artifactory.mycompany.com</urlBase>
    <federatedRepoUrlBase>https://site1.mycompany.com/artifactory</federatedRepoUrlBase>

    For information on how to modify the Global Configuration Descriptor, see Global Configuration Descriptor.

🚧

Warning

The federatedRepoUrlBase parameter is relevant only for Federated repositories. You can't apply it to other features. For a detailed guide that describes how to set the urlBase and still allow redirects and metadata to map to the Geo-LB, see Geo-Location LB Setup Steps.

Migrate Existing Federated Repositories to Geo-Synchronized Topology

From Artifactory version 7.21.13, you can migrate your existing Federated repositories to be configured with a dedicated Federated Repository URL instead of the Artifactory base URL.

📘

When setting up Federated Repositories in an HA environment, ensure on both sites that only one HA node is up and running.

To migrate Federated repositories to a geo-synchronized topology:

  1. Disconnect all the Federated repositories in either one of the sites, using one of the following methods:

    • One at a time on the Federated Repository page in the UI
    • Directly through the Config Descriptor file
  2. Wait for a while and then validate that all the Federated repositories are disconnected on the member site.

  3. Navigate to $JFROG_HOME/artifactory/var/etc/artifactory/artifactory.config.xml and add the following XML tag:

    <federatedRepoUrlBase>https://<address>/artifactory</federatedRepoUrlBase>

    Where:

    • <address>: The unique hostname for this Artifactory instance's Federated Base URL
  4. Reconnect all the Federated repositories.

  5. Validate that the configuration was applied in the member site.

  6. Monitor the logs for related errors.

  7. Test: Upload a new file for each repository to site 1 and download it to site 2.

  8. Optional: Perform a Full Sync if changes occurred on one of the sites while the Federated repositories were disconnected, for example upload, override, property changes, or delete actions.

Frequently Asked Questions

This section provides answers to frequently asked questions.

plusFAQs
Q: Why do all instances need the same Custom Base URL in a geo-synchronized topology?

A: The same Custom Base URL lets you connect to Artifactory through one dedicated URL and resolve from the same repositories without changing your build tool configuration based on which server you're routed to.

Q: Can I switch between sites in a geo-synchronized topology?

A: You should work with one fixed site, since Federated repositories don't operate synchronously. If you move between sites, allow time for events to synchronize first.

Q: From which Artifactory version can I migrate existing Federated repositories to this topology?

A: From Artifactory 7.21.13 onward. See Migrate Existing Federated Repositories to Geo-Synchronized Topology for the steps.

Q: Do I need to disconnect Federated repositories before migrating to this topology?

A: Yes. Disconnect all Federated repositories on one site, add the federatedRepoUrlBase tag, then reconnect them once the change is validated.

Related Topics


Did this page help you?