Configure MSR image storage¶
If your MSR deployment has a single replica, you can continue to use the local file system to store your Docker images. If, though, your MSR deployment has multiple replicas, make sure that they are all using the same storage backend for high availability.
Whenever a user pulls an image, the MSR node serving the request needs to have access to that image.
Configure storage backends¶
To configure the storage backend, log in to the MSR web UI as an administrator, and in the left-side navigation panel navigate to System > Storage.
The storage configuration details pane presents the most common configuration
options. You can, however, upload your own configuration file in .yml
,
.yaml
, or .txt
format.
Local file systems |
|
Cloud storage providers |
|
Configure MSR for local file systems¶
By default, MSR creates a volume named dtr-registry-<replica-id>
to store
your images using the local file system. You can customize the name and path of
the volume by using mirantis/dtr install --dtr-storage-volume
or mirantis/dtr reconfigure --dtr-storage-volume.
Important
To deploy MSR with high availability, you must use a centralized storage backends to ensure that all MSR replicas can access the same set of images.
To verify the amount of space your images are using in the local file system:
Connect to the MSR node through SSH.
Obtain the path to the volume:
docker volume inspect dtr-registry-<replica-id>
#$. Verify the disk usage:
sudo du -hs \ $(dirname $(docker volume inspect --format '{{.Mountpoint}}' dtr-registry-<msr-replica>))
Note
You can configure your MSR replicas to store images on an NFS partition, thus allowing all replicas to share the same storage backend.