One of the great features of VMware Harbor registry is the out of the box image replication. Some of you may just use this feature for a simple way to back up your registry but I found another use case that may be of interest. Let’s say you wanted to build and update container images locally but you then wanted to run some of them out at remote data centers or remote branch offices. What if you also wanted the ability to run the same images at multiple locations? Well now you can. In this guide I will show you how to setup replication to push images out to remote locations then I will show you how you can pull them locally from the registry at that remote location.
- Centrally installed Harbor Registry with at least one image uploaded, see my guide here
- A second Harbor registry installed at a remote location
- Intranet access from the source Harbor Registry Server to port 80 of the remote Harbor registry instance
- A docker environment in both the source vSphere environment and the remote vSphere environment
- A quiet place where you will not be interrupted see my guide here
Here we will enter the details for our Harbor registry hosted out on a Public Cloud, in my example I am using Amazon but any cloud will work.
- Give a name for the job
- Give a name for the new connection
- Enter in the endpoint address of the instance of harbor in the cloud
- Enter the user name and password of an admin user
- Click test connection
- If it tested successfully click ok
Now scroll down and see the status of the replication job, it should only take a few minutes if you only have one image.
Notice that you now have that image replicated here. Also not anything you add to the local Harbor registry will appear here.
Now test the Harbor registry in the remote location by running an image from there. Start an a VM with Docker from the remote location and point to the registry there.
NOTE: I have setup the Harbor registries in insecure mode if you are using Photon OS see my guide here for RHEL/CENTOS see this guide https://docs.docker.com/registry/insecure/