How to configure Federated Repositories

Ino Choi
2021-09-14 15:38

From Artifactory 7.18.3, you can create Federated repositories, which enables bi-directional synchronization of local repositories in a multisite environment. 

User-added image

To enable this feature, follow these steps:

Prerequisites:

  • Enterprise or Enterprise+ subscription
  • Custom Base URL configured
  • Set up a Circle of Trust
    • We need to exchange public certificates between Artifactory instances. Copy a root certificate ($JFROG_HOME/artifactory/var/etc/access/keys/root.crt) from one instance to another instance’s $JFROG_HOME/artifactory/var/etc/access/keys/trusted folder.

Note: To avoid confusion, you should rename each source service’s certificate with a meaningful name. (e.g. root.crt -> east.crt)

User-added image

Now that we have configured the Circle of Trust, we can go ahead and set up Federated Repositories in Artifactory.

  • Create new Federated Repositories in both Artifactory instances.

User-added image

  • Artifactory instance #1 (fd-west)

User-added image

  • Artifactory instance #1 (fd-east)

User-added image

  • In the Federation tab, add a federated repository from the other Artifactory instance by adding the repository path URL.

User-added image

User-added image

User-added image

 

We can test to sync data across Federated Repositories.

  • Deploy a file to one of the repositories (fd-west).

User-added image

  • We can see that the same file has been deployed on the other repository (fd-east).

User-added image

  • In reverse, we can deploy a file to the “fd-east” repository.

User-added image

  • And we can see that the same file has been deployed on the “fd-west” repository.

User-added image

 

For more information, visit the confluence page on Federated Repositories.