From Artifactory 7.18.3, you can create Federated repositories, which enables bi-directional synchronization of local repositories in a multisite environment.
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)
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.
- Artifactory instance #1 (fd-west)
- Artifactory instance #1 (fd-east)
- In the Federation tab, add a federated repository from the other Artifactory instance by adding the repository path URL.
We can test to sync data across Federated Repositories.
- Deploy a file to one of the repositories (fd-west).
- We can see that the same file has been deployed on the other repository (fd-east).
- In reverse, we can deploy a file to the “fd-east” repository.
- And we can see that the same file has been deployed on the “fd-west” repository.
For more information, visit the confluence page on Federated Repositories.