This documentation provides information on how to deploy and operate a
Mirantis Secure Registry (MSR). The documentation is intended to help
operators to understand the core concepts of the product. The documentation
provides sufficient information to deploy and operate the solution.
The information provided in this documentation set is being constantly
improved and amended based on the feedback and kind requests from the
consumers of MSR.
Product Overview
Mirantis Secure Registry (MSR) is a solution that enables enterprises to store
and manage their container images on-premise or in their virtual private
clouds. Built-in security enables you to verify and trust the provenance
and content of your applications and ensure secure separation of concerns.
Using MSR, you meet security and regulatory compliance requirements.
In addition, the automated operations and integration with CI/CD speed up
application testing and delivery. The most common use cases for MSR include:
Helm charts repositories
Deploying applications to Kubernetes can be complex. Setting up a single
application can involve creating multiple interdependent Kubernetes
resources, such as pods, services, deployments, and replica sets. Each of
these requires manual creation of a detailed YAML manifest file as well.
This is a lot of work and time invested. With Helm charts (packages that
consist of a few YAML configuration files and some templates that are
rendered into Kubernetes manifest files) you can save time and install
the software you need with all the dependencies, upgrade, and configure it.
Automated development
Easily create an automated workflow where you push a commit that
triggers a build on a CI provider, which pushes a new image into
your registry. Then, the registry fires off a webhook and triggers
deployment on a staging environment, or notifies other systems
that a new image is available.
Secure and vulnerable free images
When an industry requires applications to comply with certain security
standards to meet regulatory compliances, your applications are as
secure as the images that run those applications. To ensure that your
images are secure and do not have any vulnerabilities, track your
images using a binary image scanner to detect components in images
and identify associated CVEs. In addition, you may also run image
enforcement policies to prevent vulnerable or inappropriate images
from being pulled and deployed from your registry.
Reference Architecture
The Mirantis Secure Registry (MSR) Reference Architecture provides
comprehensive technical information on MSR, including component particulars,
infrastructure specifications, and networking and volumes detail.
Introduction to MSR
Mirantis Secure Registry (MSR) is an enterprise-grade image storage
solution. Installed behind a firewall, either on-premises or on a virtual
private cloud, MSR provides a secure environment where users can store and
manage their images.
The advantages of MSR include the following:
Image and job management
MSR has a web-based user interface used for browsing images and auditing
repository events. With the web UI, you can see which Dockerfile lines
produced an image and, if security scanning is enabled, a list of all of the
software installed in that image and any Common Vulnerabilities and Exposures
(CVEs). You can also audit jobs with the web UI.
MSR can serve as a continuous integration and continuous delivery (CI/CD)
component, in the building, shipping, and running of applications.
Availability
MSR is highly available through the use of multiple replicas of all
containers and metadata. As such, MSR will continue to operate in the event
of machine failure, thus allowing for repair.
Efficiency
MSR can reduce the bandwidth used when pulling images by caching images
closer to users. In addition, MSR can clean up unreferenced manifests and
layers.
Built-in access control
As with Mirantis Kubernetes Engine (MKE), MSR uses role-based access control
(RBAC), which allows you to manage image access, either manually, with LDAP,
or with Active Directory.
Security scanning
A security scanner is built into MSR, which can be used to discover the
versions of the software that is in use in your images. This tool scans each
layer and aggregates the results, offering a complete picture of what is
being shipped as a part of your stack. Most importantly, as the security
scanner is kept up-to-date by tapping into a periodically updated
vulnerability database, it is able to provide unprecedented insight into your
exposure to known security threats.
Image signing
MSR ships with Notary, which allows you to sign and verify images using
Docker Content Trust.
Components
Mirantis Secure Registry (MSR) is a containerized application that runs on a
Mirantis Kubernetes Engine cluster. After deploying MSR, you can use your
Docker CLI client to log in, push, and pull images. For high availability, you
can deploy multiple MSR replicas, one on each MKE worker node.
All MSR replicas run the same set of services, and changes to the configuration
of one is replica is automatically propagated to other replicas.
Installing MSR on a node starts the containers that are detailed in the
following table:
Name
Description
dtr-api-<replica_id>
Executes the MSR business logic, serving the MSR web application and
API.
dtr-garant-<replica_id>
Manages MSR authentication.
dtr-jobrunner-<replica_id>
Runs cleanup jobs in the background.
dtr-nginx-<replica_id>
Receives HTTP and HTTPS requests and proxies those requests to other MSR
components. By default, the container listens to host ports 80 and 443.
dtr-notary-server-<replica_id>
Receives, validates, and serves Content Trust metadata, and is consulted
when pushing to or pulling from MSR with Content Trust enabled.
dtr-notary-signer-<replica_id>
Performs server-side timestamp and snapshot signing for Content Trust
metadata.
dtr-registry-<replica_id>
Implements pull and push functionality for Docker images and manages
the storage of images.
dtr-rethinkdb-<replica_id>
Serves as a database for persisting repository metadata.
dtr-scanningstore-<replica_id>
Stores security scanning data.
Important
Do not use the MSR components in your applications, as they are for internal
MSR use only.
System requirements
Mirantis Secure Registry can be installed on-premises or on the cloud.
Before installing, be sure your infrastructure has these requirements.
You can install MSR on-premises or on a cloud provider. To install MSR,
all nodes must:
Be a worker node managed by MKE (Mirantis Kubernetes Engine)
Have a fixed hostname
Minimum requirements:
16GB of RAM for nodes running MSR
4 vCPUs for nodes running MSR
25GB of free disk space
Recommended production requirements:
32GB of RAM for nodes running MSR
4 vCPUs for nodes running MSR
100GB of free disk space
Note that Windows container images are typically larger than Linux ones
and for this reason, you should consider provisioning more local storage
for Windows nodes and for MSR setups that will store Windows container
images.
When the image scanning feature is used, we recommend that you have at least
32 GB of RAM. As developers and teams push images into MSR, the
repository grows over time. As such, you should regularly inspect RAM, CPU, and
disk usage on MSR nodes, and increase resources whenever resource saturation is
seen to occur on a regular basis.
Networks
MSR creates the dtr-ol network at the time of installation. This
network allows for communication between MSR components running on different
nodes, for the purpose of MSR data replication.
When installing MSR on a node, make sure the following ports are open on
that node:
Port
Direction
Purpose
80/tcp
in
Web app and API client access to MSR.
443/tcp
in
Web app and API client access to MSR.
You can configure these ports during MSR installation.
Volumes
MSR uses these named volumes for persisting data:
Volume name
Description
dtr-ca-<replica_id>
Root key material for the MSR root CA that issues certificates
dtr-notary-<replica_id>
Certificate and keys for the Notary components
dtr-postgres-<replica_id>
Vulnerability scans data
dtr-registry-<replica_id>
Docker images data, if MSR is configured to store images on the local
filesystem
dtr-rethink-<replica_id>
Repository metadata
dtr-nfs-registry-<replica_id>
Docker images data, if MSR is configured to store images on NFS
You can customize the volume driver used for these volumes, by creating
the volumes before installing MSR. During the installation, MSR checks
which volumes don’t exist in the node, and creates them using the
default volume driver.
By default, the data for these volumes can be found at
/var/lib/docker/volumes/<volume-name>/_data.
Storage
By default, Mirantis Secure Registry stores images on the filesystem of
the node where it is running, but you should configure it to use a
centralized storage backend.
MSR supports the following storage systems:
Persistent volume
NFS (v3 and v4)
Bind mount
Volume
Cloud storage providers
Amazon S3
Microsoft Azure
Google Cloud Storage
Alibaba Cloud Object Storage Service
Note
Deploying MSR to Windows nodes is not supported.
MSR Web UI
The product formerly known as Docker Trusted Registry (DTR) is now Mirantis
Secure Registry (MSR).
MSR has a web UI where you can manage settings and user permissions.
You can push and pull images using the standard Docker CLI client or
other tools that can interact with a Docker registry.
The matches operator conforms subject fields to a user-provided regular
expression (regex). The regex for matches must follow the specification
in the official Go documentation: Package syntax.
Each of the following policies uses the rule engine:
Targeted to deployment specialists and QA engineers, the MSR Installation Guide
provides the detailed information and procedures you need to install
and configure Mirantis Secure Registry (MSR).
Preconfigure MKE
When installing or backing up MSR on a Mirantis Kubernetes Engine (MKE)
cluster, administrators must be able to deploy containers on MKE manager nodes
or MSR nodes. Take the following steps to enable this setting:
Log in to the MKE web UI.
In the left-side navigation panel, navigate to
<user name> > Admin Settings > Orchestration.
Scroll down to Container Scheduling and toggle the slider next
to Allow administrators to deploy containers on MKE managers or
nodes running MSR.
If MSR administrators are unable to deploy on MKE manager nodes or MSR nodes,
the MSR installation or backup will fail with the following error message:
Errorresponsefromdaemon:{"message":"could not find any nodes on which the container could be created"}
Install MSR online
Mirantis Secure Registry (MSR) is a containerized application that runs on a
swarm managed by Mirantis Kubernetes Engine (MKE). It can be installed
on-premises or on a cloud-based infrastructure.
Update Mirantis Container Runtime (MCR) to the latest version. For details,
refer to the section of the
MCR installation guide
that corresponds with your operating system.
MKE and MSR must be installed on different nodes, due to the potential
for resource and port conflicts. Install MSR on worker nodes
that will be managed by MKE. Note also that MSR cannot be installed on a
standalone MCR.
Install MSR
Log in to the MKE web UI as an administrator.
In the left-side navigation panel, navigate to
<user name> > Admin Settings > Mirantis Secure Registry.
Optional. Provide an external URL for MSR.
Select the MKE worker node where you want to install MSR.
Optional. Enable any of the following options, as required:
Assign an MSR replica ID
Disable TLS CA certificate for MKE
Use a PEM-encoded TLS CA certificate for MKE
A Docker CLI command used to install MSR will display. For example:
Optional. To run a load balancer that uses HTTP for health probes over port
80 or 443, temporarily reconfigure it to use TCP over a known open
port and enter the load balancer IP address as the value of
--dtr-external-url. Once MSR is installed, you can reconfigure the load
balancer to meet your requirements.
Run the MSR install command on any node that is both connected to the MKE
cluster and running MCR. Running the installation command in interactive TTY
(or -it) mode will prompt you for any required additional
information.
Note
MSR will not be installed on the node where you run the install command.
MSR will be installed on the MKE worker defined by the --ucp-node
flag.
To install a different version of MSR, replace 2.10.0
with the required version of MSR in the provided command.
MSR is deployed with self-signed certificates by default, so MKE might
not be able to successfully pull images from MSR. Use the optional
--dtr-external-url<msr-domain>:<port> flag during installation or
during a reconfiguration to automatically reconfigure MKE to trust MSR.
You can enable browser authentication using client certificates at install
time. This bypasses the MSR login page and hides the logout button, thus
overriding the requirement that you log in with a user name and password.
Verify that MSR is installed by logging in to the MKE web UI and then
navigating to
<user name> > Admin Settings > Mirantis Secure Registry. A
successful installation will display the MSR fully qualified domain name
(FQDN).
Note
MKE modifies /etc/docker/certs.d for each host and
adds the MSR CA certificate. MKE can then pull images from
MSR because MCR for each node in the MKE swarm has been configured to
trust MSR.
Optional. Reconfigure your load balancer back to your desired protocol and
port.
Verify MSR after installation
Log in to the MKE web UI.
From the left-side navigation panel, select
Shared Resources > Stacks . You should see MSR listed as a
stack.
Verify that the MSR web UI is accessible by navigating either to your MSR IP
address or FQDN in a browser window.
Note
Be sure to prefix the IP address or FQDN with https:// or your
browser may not load the web UI.
Configure MSR
Configure the certificates used for TLS communication:
Log in to the MSR web UI.
From the left-side navigation panel, navigate to System and
select the General tab.
Scroll down to Domain & Proxies and select
Show TLS settings.
Enter your TLS information and click Save.
Configure the storage backend to store your Docker images:
Log in to the MSR web UI.
From the left-side navigation panel, navigate to System and
select the Storage tab.
To make MSR highly available, you can add additional replicas to your MSR
cluster. Adding more replicas allows you to load-balance requests across all
replicas, thus enabling MSR to continue working if a replica fails.
For high-availability, you should set 3 or 5 MSR replicas. The replica nodes
must be managed by the same MKE.
The <mke-node-name> following the --ucp-node flag is the
target node to install the MSR replica. This is not the MKE
manager URL.
When you join a replica to an MSR cluster, you need to specify the ID of a
replica that is already part of the cluster. You can find an existing
replica ID by navigating to the Shared Resources > Stacks page
in the MKE web UI.
Verify that all replicas are running:
Log in to the MKE web UI.
Select Shared Resources > Stacks.
All replicas will display.
Install MSR offline
To install MSR on an offline host, you must first use a separate computer with
an Internet connection to download a single package with all the images and
then copy that package to the host where you will install MSR. Once the package
is on the host and loaded, you can install MSR offline as described in
Install MSR online.
Optional. Disable outgoing connections in the MSR web UI
Admin Settings. MSR makes outgoing connections for the following
tasks:
Analytics reporting
New version notifications
Online license verification
Vulnerability scanning database updates
Obtain the license
After you install MSR, download your new MSR license
and apply it using the MSR web UI.
Warning
Users are not authorized to run MSR without a valid license. For more
information, refer to Mirantis Agreements and Terms.
To download your MSR license:
Open an email from Mirantis Support with the subject Welcome to
Mirantis’ CloudCare Portal and follow the instructions for logging in.
If you did not receive the CloudCare Portal email, you likely have not yet
been added as a Designated Contact and should contact your Designated
Administrator.
In the top navigation bar, click Environments.
Click the Cloud Name associated with the license you want to
download.
Scroll down to License Information and click the
License File URL. A new tab opens in your browser.
Click View file to download your license file.
To update your license settings in the MSR web UI:
Log in to your MSR instance as an administrator.
In the left-side navigation panel, click Settings.
On the General tab, click Apply new license. A file
browser dialog displays.
Navigate to where you saved the license key (.lic) file, select it,
and click Open. MSR automatically updates with the new settings.
Uninstall MSR
Uninstalling MSR is a simple matter of removing all data associated with each
replica. To do this, run the destroy command once per replica:
Each time you run the destroy command, the system will prompt you
for the MKE URL, your MKE credentials, and the name of the replica you want to
destroy.
Operations Guide
The MSR Operations Guide provides the detailed information you
need to store and manage images on-premises or in a virtual private
cloud, to meet security or regulatory compliance requirements.
Access MSR
Configure your Mirantis Container Runtime
By default Mirantis Container Runtime uses TLS when pushing and pulling images
to an image registry like Mirantis Secure Registry (MSR).
If MSR is using the default configurations or was configured to use
self-signed certificates, you need to configure your Mirantis Container Runtime
to trust MSR. Otherwise, when you try to log in, push to, or pull images
from MSR, you’ll get an error:
The first step to make your Mirantis Container Runtime trust the certificate
authority used by MSR is to get the MSR CA certificate. Then you
configure your operating system to trust that certificate.
After adding the CA certificate to Keychain, restart Docker Desktop for
Mac.
Windows
In your browser navigate to https://<msr-url>/ca to download the TLS
certificate used by MSR. Open Windows Explorer, right-click the file
you’ve downloaded, and choose Install certificate.
Then, select the following options:
Store location: local machine
Check place all certificates in the following store
Click Browser, and select Trusted Root Certificate
Authorities
After adding the CA certificate to Windows, restart Docker Desktop for
Windows.
Ubuntu/ Debian
# Download the MSR CA certificate
sudocurl-khttps://<msr-domain-name>/ca-o/usr/local/share/ca-certificates/<msr-domain-name>.crt
# Refresh the list of certificates to trust
sudoupdate-ca-certificates
# Restart the Docker daemon
sudoservicedockerrestart
RHEL/ CentOS
# Download the MSR CA certificate
sudocurl-khttps://<msr-domain-name>/ca-o/etc/pki/ca-trust/source/anchors/<msr-domain-name>.crt
# Refresh the list of certificates to trust
sudoupdate-ca-trust
# Restart the Docker daemon
sudo/bin/systemctlrestartdocker.service
Boot2Docker
Log into the virtual machine with ssh:
docker-machinessh<machine-name>
Create the bootsync.sh file, and make it executable:
Mirantis Secure Registry can be configured to have one or more caches.
This allows you to choose from which cache to pull images from for
faster download times.
If an administrator has set up caches, you can
choose which cache to use when pulling images.
In the MSR web UI, navigate to your Account, and check the
Content Cache options.
Once you save, your images are pulled from the cache instead of the
central MSR.
Manage access tokens
You can create and distribute access tokens in MSR that grant users access at
specific permission levels.
Access tokens are associated with a particular user account. They take on the
permissions of that account when in use, adjusting automatically to any
permissions changes that are made to the associated user account.
Note
Regular MSR users can create access tokens that adopt their own account
permissions, while administrators can create access tokens that adopt the
account permissions of any account they choose, including the admin account.
Access tokens are of use in building CI/CD pipelines and other integrations, as
you can issue separate tokens for each integration and henceforth deactivate or
delete such tokens at any time. You can also use access tokens to generate a
temporary password for a user who is locked out of their account.
Note
To monitor users login events, enable the auditAuthLogsEnabled parameter
in the /settings API endpoint:
Mirantis Secure Registry (MSR) services are exposed using HTTPS by default,
which ensures encrypted communications between clients and your trusted
registry. If you do not pass a PEM-encoded TLS certificate during installation,
MSR generates a self-signed certificate, which can lead to an insecure site
warning whenever you access MSR through a browser. In addition, MSR includes an
HTTP Strict Transport Security (HSTS) header in all API responses, which can
cause your browser not to load the MSR web UI.
You can configure MSR to use your own TLS certificates, so that it is
automatically trusted by your browsers and client tools. You can also enable
user authentication using the client certificates provided by your
organization Public Key Infrastructure (PKI).
You can upload your own TLS certificates and keys using the MSR web UI, or you
can pass them as CLI options during installation or whenever you reconfigure
your MSR instance.
To replace the server certificates using the MSR web UI:
Log in at https://<msr-url>.
In the left-side navigation panel, navigate to System and scroll
down to Domain & Proxies.
Enter your MSR domain name and upload or copy and paste the certificate
information:
Certificate information
Description
Load balancer/public address
The domain name for accessing MSR.
TLS private key
The server private key.
TLS certificate chain
The server certificate and any intermediate public certificates from
your certificate authority (CA). The certificate must be valid for
the MSR public address and have SANs for all addresses that are used
to reach the MSR replicas, including load balancers.
TLS CA
The root CA public certificate.
Click Save.
At this point, if you have added certificates issued by a globally trusted CA,
any web browser or client tool should trust MSR. If you are using an
internal CA, you must configure the client systems to trust that CA.
To replace the server certificates using the CLI:
Refer to install and
reconfigure for TLS certificate options and usage
information.
Enable single sign-on
MSR and MKE share users by default, but the applications have distinct web UIs
that each require separate authentication. You can, however, configure MSR
to use single sign-on with MKE.
Note
Once you configure MSR to use single sign-on, you must create an
access token to interact with MSR using the CLI.
Enable at install time
Include --dtr-external-url<msr-url> in the MSR install command, where
<msr-url> is the MSR fully qualified domain name (FQDN) or a load
balancer, if one is in use:
When you navigate to the MSR web UI, you will be redirected to the MKE log in
page for authentication. After authentication, you will be directed back to the
MSR web UI.
Enable after install time
To enable single sign-on using the MSR web UI:
Log in to the MSR web UI.
In the left-side navigation panel, navigate to System.
On the General tab, scroll down to
Domains & Proxies.
In the Load Balancer / Public Address field, enter the MSR FQDN
or load balancer IP address, if one is in use. This is the URL where users
will be redirected once they are logged in.
Click Save.
Scroll down to Single Sign-On and slide the toggle that is next
to Automatically redirect users to MKE for login.
Before performing any maintenance or configuration changes, place the MSR in
read-only mode. This ensures data consistency and prevents unwanted
modifications during these operations. To enable read-only mode, run the
following command:
By default, Mirantis Secure Registry (MSR) uses persistent cookies.
Alternatively, you can switch to using session-based authentication cookies
that expire when you close your browser.
To disable persistent cookies:
Log in to the MSR web UI.
In the left-side navigation panel, navigate to System.
On the General tab, scroll down to Browser Cookies.
Slide the toggle to the right next to
Disable persistent cookies.
Verify that persistent cookies are disabled:
Using Chrome
Log in to the MSR web UI using Chrome.
Right-click any page and select Inspect.
In the Developer Tools panel, navigate to
Application > Cookies > https://<msr-external-url>.
Verify that Expires / Max-Age is set to
Session.
Using Firefox
Log in to the MSR web UI using Firefox.
Right-click any page and select Inspect.
In the Developer Tools panel, navigate to
Storage > Cookies > https://<msr-external-url>.
Verify that Expires / Max-Age is set to
Session.
Disable MSR telemetry
By default, MSR automatically records and transmits data to Mirantis
through an encrypted channel for monitoring and analysis purposes. The data
collected provides the Mirantis Customer Success Organization with information
that helps Mirantis to better understand the operational use of MSR by our
customers. It also provides key feedback in the form of product usage
statistics, which assists our product teams in making enhancements to Mirantis
products and services.
Caution
To send MSR telemetry, the container runtime and the jobrunner
container must be able to resolve api.segment.io and create a TCP
(HTTPS) connection on port 443.
To disable telemetry for MSR:
Log in to the MSR web UI as an administrator.
Click System in the left-side navigation panel to open the
System page.
Click the General tab in the details pane.
Scroll down in the details pane to the Analytics section.
Toggle the Send data slider to the left.
Configure external storage
By default, MSR uses the local file system of the node where it is running to
store your Docker images. You can, though, configure MSR to use an external
storage backend, for improved performance or high availability.
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.
Supported storage backends
Local file systems
NFS
Bind mount
Volume
Cloud storage providers
Amazon S3
Microsoft Azure
OpenStack Swift
Google Cloud Storage
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
registry.mirantis.com/msr/dtr install --dtr-storage-volume
or registry.mirantis.com/msr/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:
You can configure your MSR replicas to store images on an NFS partition,
thus allowing all replicas to share the same storage backend.
Deploy MSR on NFS
You can configure MSR to store Docker images in a Network File System (NFS)
directory.
Note
Changing storage backends involves initializing a new metadata store,
rather than reusing an existing volume, which facilitates online garbage
collection.
Prepare your environment
Verify that the NFS server has the correct configuration.
Verify that the NFS server has a fixed IP address.
Verify that all hosts that are running MSR have the correct NFS libraries.
Verify that the hosts can connect to the NFS server by listing the
directories exported by your NFS server:
Use the format nfs://<nfsserver>/<directory> for the NFS storage URL.
To support NFS v4, you can specify additional options when running the
install command with the --nfs-storage-url
option.
Note
When you join replicas to an MSR cluster, the replicas pick up your storage
configuration, and thus it is not necessary to respecify the configuration.
Reconfigure MSR to use NFS
Use the --storage-migrated option with the
reconfigure command to indicate the migration
status of your storage data during a reconfigure.
To reconfigure MSR to use an NFSv4 volume as a storage backend:
Configure MSR for S3-compatible cloud storage providers
You can configure MSR to store Docker images on Amazon S3 or any other file
servers with an S3-compatible API, such as Cleversafe or Minio.
Amazon S3 and compatible services store files in buckets, and users
have permissions to read, write, and delete files from those buckets.
When you integrate MSR with Amazon S3, MSR sends all read and write
operations to the S3 bucket so that the images are persisted in that location.
Prepare your environment
Create a bucket on Amazon S3 as described in the Creating a bucket
official AWS documentation.
Note
To ensure fast pulls and pushes, create the S3 bucket in the region that
is closest to the servers on which you are running MSR.
MSR supports the following S3 regions:
us-east-1
us-east-2
us-west-1
us-west-2
eu-west-1
eu-west-2
eu-central-1
ap-south-1
ap-southeast-1
ap-southeast-2
ap-northeast-1
ap-northeast-2
sa-east-1
cn-north-1
us-gov-west-1
ca-central-1
Create a new IAM user specifically for the MSR integration, applying an IAM
policy that restricts the user to the following permissions:
Navigate to System > Storage in the left-side navigation panel.
Select the Amazon S3 option in the details pane.
Adjust the S3 Settings.
Toggle the Send data slider to the right to configure MSR to
redirect clients each time a pull operation occurs.
Enter the pertinent information into the provided fields.
Field
Description
AWS Region Name
AWS region that hosts your S3 bucket.
S3 Bucket Name
Name of the S3 bucket in which the images are stored.
Region Endpoint
Endpoint name for the AWS region that hosts your S3 bucket.
Root Directory
Path to the location in the S3 bucket within which
the images are stored.
Access key
AWS access key to use to access the S3 bucket.
Note
If you are using an IAM policy, leave the
AWS access key field empty.
Secret Key
AWS secret key you can use to access the S3 bucket.
Note
If you are using an IAM policy, leave the AWS secret
key field empty.
Click Show advanced settings.
Toggle the Signature version 4 auth slider to the right to
configure MSR to authenticate requests with AWS signature version 4.
Toggle the Use HTTPS slider to the right to
configure MSR to secure all requests using the HTTPS protocol.
Toggle the Skip TLS slider to the right to
configure MSR to encrypt all traffic and not to verify the TLS
certificate in use by the storage backend.
If pertinent, in the Root CA Certificate field, enter the
public key certificate of the root certificate
authority that issued the storage backend certificate.
Click Submit to validate the configuration settings and save
the changes.
Configure your clients
Whenever you push or pull an image using MSR, the software redirects the
requests to the storage backend.
If MSR is configured for TLS verification and the TLS certificate in use by
your storage backend is not globally trusted, you must configure all
Mirantis Container Runtime instances that push or pull from MSR to trust that
certificate.
If MSR is configured to skip TLS verification, you must also
configure all Mirantis Container Runtime instances that push or pull from
MSR to skip TLS verification. To do this, add MSR to the list of
insecure registries when starting Docker.
Restore MSR with S3
To restore MSR using your previously configured S3 settings, use the
restore command with the
--dtr-use-default-storage option to maintain your metadata.
Migrate to a new storage backend
Your metadata store and your storage both persist when you migrate your data to
a new storage backend. MSR requires the new storage backend to contain an exact
copy of the data for the prior configuration. If you do not meet the
requirement you must reinitialize the storage using the
--reinitialize-storage option with the
dtr reconfigure command, which initializes a new metadata store
and erases your existing tags.
As a best practice, you should always move, back up, and restore MSR storage
backends together with your metadata.
To migrate data to a new storage backend:
Disable garbage collection:
Log in to the MSR web UI.
From the left-side menu, navigate to
System > Garbage Collection.
Select Never Disable garbage collection to ensure that any
blobs referenced in the backup you create will persist.
Important
Garbage collection must remain disabled throughout metadata backup
and the migration of your storage data.
Upon success, you will receive a 202Accepted response.
Migrate the contents of your current storage backend to the new one.
Reconfigure MSR using the reconfigure command with the
--storage-migrated option to preserve your existing tags. For
reconfigure command usage details, refer
to registry.mirantis.com/msr/dtr reconfigure.
Set up high availability
Mirantis Secure Registry is designed to scale horizontally as your usage
increases. You can increase the number of replicas for each of the resources
that MSR deploys.
Note
Additional replicas make MSR more tolerant to failure, but be aware that
performance degradation can result from having too many replicas in your
RethinkDB cluster.
All MSR replicas run the same set of services, and changes to their
configuration are automatically propagated to other replicas.
When sizing your MSR installation for high availability, Mirantis recommends
the following best practices:
Do not scale RethinkDB with only two replicas.
Caution
RethinkDB cannot tolerate a failure with an even number of replicas.
MSR replicas
Failures tolerated
1
0
3
1
5
2
7
3
Address failed replicas quickly, as the number of failures your cluster can
tolerate decreases whenever a replica is offline.
High availability prerequisites
High availability on MKE and MSR requires:
Three dedicated nodes on which to install MKE with high availability.
Three dedicated nodes on which to install MSR with high availability.
The number of nodes you deem necessary for running your containers and
applications.
That MSR replicas are configured to share the same object storage.
As a result, you will be prompted for the following data:
Existing replica id
The ID of any healthy MSR replica in the cluster.
Replica id
The ID of the MSR replica you want to remove, which can be the ID of an
unhealthy replica.
MKE username and password
The administrator credentials for MKE.
Important
If you are load balancing user requests across multiple MSR replicas,
be sure to remove this replica from the load balancing pool.
Use a load balancer
With a load balancer, users can access MSR using a single domain name.
Once you have achieved high availability by joining multiple MSR replica nodes,
you can configure a load balancer to balance user requests across those
replicas. The load balancer detects when a replica fails and immediately stops
forwarding requests to it, thus ensuring that the failure goes unnoticed by
users.
MSR does not provide a load balancing service. You must use either an
on-premises or cloud-based load balancer to balance requests across
multiple MSR replicas.
Important
Additional steps are needed to use the same load balancer with both MSR and
MKE. For more information, refer to Configure a load balancer
in the MKE documentation.
Verify cluster health
MSR exposes several endpoints that you can use to assess the health of an MSR
replica:
/_ping
Verifies whether the MSR replica is healthy. This is useful for load
balancing and other automated health check tasks. This endpoint is
unauthenticated.
/nginx_status
Returns the number of connections handled by the MSR NGINX front end.
/api/v0/meta/cluster_status
Returns detailed information about all MSR replicas.
You can use the unauthenticated /_ping endpoint on each MSR replica,
to check the health status of the replica and whether it should remain in the
load balancing pool or not.
The /_ping endpoint returns a JSON object for the replica being
queried that takes the following form:
{"Error":"<error-message>",
"Healthy":true}
A response of "Healthy":true indicates that the replica is suitable for
taking requests. It also signifies that the HTTP status code is 200.
An unhealthy replica will return 503 as the status code and populate
"Error" with more details on any of the following services:
Storage container (MSR)
Authorization (Garant)
Metadata persistence (RethinkDB)
Content trust (Notary)
Note that the purpose of the /_ping endpoint is to check the health of a
single replica. To obtain the health of every replica in a cluster, you must
individually query each replica.
Load balance MSR
Configure your load balancer for MSR, using the pertinent example below:
# Create the nginx.conf file, then# deploy the load balancer
dockerrun--detach\
--namedtr-lb\
--restart=unless-stopped\
--publish80:80\
--publish443:443\
--volume${PWD}/nginx.conf:/etc/nginx/nginx.conf:ro\
nginx:stable-alpine
HAProxy
# Create the haproxy.cfg file, then# deploy the load balancer
dockerrun--detach\
--namedtr-lb\
--publish443:443\
--publish80:80\
--publish8181:8181\
--restart=unless-stopped\
--volume${PWD}/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro\
haproxy:1.7-alpinehaproxy-d-f/usr/local/etc/haproxy/haproxy.cfg
Configure your load balancer to:
Load balance TCP traffic on ports 80 and 443.
Not terminate HTTPS connections.
Not buffer requests.
Correctly forward the Host HTTP header.
Not include a timeout for idle connections, or set the timeout
to more than 10 minutes.
Set up security scanning
For MSR to perform security scanning, you must have a running deployment of
Mirantis Secure Registry (MSR), administrator access, and an MSR license that
includes security scanning.
Before you can set up security scanning, you must verify that your Docker ID
can access and download your MSR license from DockerHub. If you are using a
license that is associated with an organization account, verify that your
Docker ID is a member of the Owners team, as only members of that team can
download license files for an organization. If you are using a license
associated with an individual account, no additional action is needed.
Note
To verify that your MSR license includes security scanning:
Log in to the MSR web UI.
In the left-side navigation panel, click System and navigate
to the Security tab.
If the Enable Scanning toggle displays, the license includes
security scanning.
To learn how to obtain and install your MSR license, refer to
Obtain the license.
Enable MSR security scanning
Log in to the MSR web UI as an administrator.
In the left-side navigation panel, click System and navigate
to the Security tab.
Slide the Enable Scanning toggle to the right.
Set the security scanning mode by selecting either Online or
Offline.
Online mode:
Online mode downloads the latest vulnerability database from a Docker
server and installs it.
To enable online security scanning, click Sync Database now.
Offline mode:
Offline mode requires that you manually perform the following steps.
Download the most recent CVE database.
Be aware that the example command specifies default values. It
instructs the container to output the database file to the
~/Downloads directory and configures the volume to map from the
local machine into the container. If the destination for the database
is in a separate directory, you must define an additional volume. For
more information, refer to the table that follows this procedure.
Click Select Database and open the downloaded CVE database
file.
Runtime environment variable override
Variable
Default
Override detail
CLOBBER_FILE
false
Set to true to overwrite an existing file with the same
database name.
CVE_DB_URL_ONLY
false
Set to true to output the CVE database URL; does not download the
CVE database.
DATABASE_OUTPUT
/data
Indicates the database download directory inside the container.
DATABASE_SCHEMA
3
Valid values:
1 (DTR 2.2.5 or lower)
2 (DTR 2.3.x; 2.4.x; 2.5.15 or lower; 2.6.11 or lower; 2.7.4 or lower)
3 (DTR 2.5.16 or higher; 2.6.12 or higher; 2.7.5 or higher)
DEBUG
false
Set to true to execute the script with set-x.
VERSION_ONLY
false
Set to true to produce a dry run that outputs the CVE database
version number, but does not download the CVE database.
Set repository scanning mode
Two image scanning modes are available:
On push
The image is re-scanned (1) on each dockerpush to the repository and
(2) when a user with write access clicks the Start Scan links
or the Scan button.
Manual
The image is scanned only when a user with write access clicks the
Start Scan links or Scan button.
By default, new repositories are set to scan On push, and any
repositories that existed before scanning was enabled are set to
Manual.
To change the scanning mode for an individual repository:
Verify that you have write or admin access to the repository.
Navigate to the repository, and click the Settings tab.
Scroll down to the Image scanning section.
Select the desired scanning mode.
Update the CVE scanning database
MSR security scanning indexes the components in your MSR images and
compares them against a CVE database. This database is routinely updated
with new vulnerability signatures, and thus MSR must be regularly updated with
the latest version to properly scan for all possible vulnerabilities. After
updating the database, MSR matches the components in the new CVE reports to the
indexed components in your images, and generates an updated report.
Note
MSR users with administrator access can learn when the CVE database was last
updated by accessing the Security tab in the MSR
System page.
Update CVE database in online mode
In online mode, MSR security scanning monitors for updates to
the vulnerability database, and downloads them when available.
To ensure that MSR can access the database updates, verify that the host can
access both https://license.mirantis.com and
https://dss-cve-updates.mirantis.com/ on port 443 using HTTPS.
MSR checks for new CVE database updates every day at 3:00 AM UTC. If an update
is available, it is automatically downloaded and applied, without interrupting
any scans in progress. Once the update is completed, the security scanning
system checks the indexed components for new vulnerabilities.
To set the update mode to online:
Log in to the MSR web UI as an administrator.
In the left-side navigation panel, click System and navigate
to the Security tab.
Click Online.
Your choice is saved automatically.
Note
To check immediately for a CVE database update, click
Sync Database now.
Update CVE database in offline mode
When connection to the update server is not possible, you can update it
manually. Download the CVE database as a .tar file from the
Mirantis CVE database archive.
Then load the file into your MSR instance by following the installation
instructions.
To set the update mode to offline:
Log in to the MSR web UI as an administrator.
In the left-side navigation panel, click System and navigate
to the Security tab.
Select Offline
Click Select Database and open the downloaded CVE database file.
MSR installs the new CVE database and begins checking the images that are
already indexed for components that match new or updated vulnerabilities.
Caches
The time needed to pull and push images is directly influenced by the distance
between your users and the geographic location of your MSR deployment. This is
because the files need to traverse the physical space and cross multiple
networks. You can, however, deploy MSR caches at different geographic
locations, to add greater efficiency and shorten user wait time.
With MSR caches you can:
Accelerate image pulls for users in a variety of geographical regions.
Manage user permissions from a central location.
MSR caches are inconspicuous to your users, as they will continue to log in and
pull images using the provided MSR URL address.
When MSR receives a user request, it first authenticates the request and
verifies that the user has permission to pull the requested image. Assuming
the user has permission, they then receive an image manifest that contains the
list of image layers to pull and which directs them to pull the images from a
particular cache.
When your users request image layers from the indicated cache, the cache pulls
these images from MSR and maintains a copy. This enables the cache to serve the
image layers to other users without having to retrieve them again from MSR.
Note
Avoid using caches if your users need to push images faster or if you want
to implement region-based RBAC policies. Instead, deploy multiple MSR
clusters and apply mirroring policies between them. For further details,
refer to Promotion policies and monitoring.
MSR cache prerequisites
Before deploying an MSR cache in a datacenter:
Obtain access to the Kubernetes cluster that is running MSR in your data
center.
Join the nodes into a cluster.
Dedicate one or more worker nodes for running the MSR cache.
Obtain TLS certificates with which to secure the cache.
Configure a shared storage system, if you want the cache to be highly
available.
Configure your firewall rules to ensure that your users have access to the
cache through your chosen port.
Note
For illustration purposes only, the MSR cache documentation details
caches that are exposed on port 443/TCP using an ingress controller.
MSR cache deployment scenario
MSR caches running in different geographic locations can provide your users
with greater efficiency and shorten the amount of time required to pull images
from MSR.
Consider a scenario in which you are running an MSR instance that is installed
in the United States, with a user base that includes developers located in the
United States, Asia, and Europe. The US-based developers can pull their images
from MSR quickly, however those working in Asia and Europe have to contend with
unacceptably long wait times to pull the same images. You can address this
issue by deploying MSR caches in Asia and Europe, thus reducing the wait time
for developers located in those areas.
The described MSR cache scenario requires three datacenters:
The MSR on Swarm deployment detailed herein assumes that you have a
running MSR deployment and that you have provisioned multiple
nodes and joined them into a swarm.
You will deploy your MSR cache as a Docker service, thus ensuring that Docker
automatically schedules and restarts the service in the event of a problem.
You manage the cache configuration using a Docker configuration and the TLS
certificates using Docker secrets. This setup enables you to securely manage
the node configurations for the node on which the cache is running.
Prepare the cache deployment
Important
To ensure MSR cache functionality, Mirantis highly recommends that you
deploy the cache on a dedicated node.
Label the cache node
To target your deployment to the cache node, you must first label that node. To
do this, SSH into a manager node of the swarm within which you want to deploy
the MSR cache.
If you are using MKE to manage that swarm, use a client bundle to configure
your Docker CLI client to connect to the swarm.
Configure the MSR cache
Following cache preparation, you will have the following file structure on your
workstation:
├──docker-stack.yml
├──config.yml# The cache configuration file
└──certs
├──cache.cert.pem# The cache public key certificate├──cache.key.pem# The cache private key└──dtr.cert.pem# MSR CA certificate
With the configuration detailed herein, the cache fetches image layers
from MSR and keeps a local copy for 24 hours. After that, if a user requests
that image layer, the cache re-fetches it from MSR.
The cache is configured to persist data inside its container. If something goes
wrong with the cache service, Docker automatically redeploys a new container,
but previously cached data is not persisted. You can customize the storage
parameters, if you want to store the image layers using a persistent storage
backend.
Also, the cache is configured to use port 443. If you are already using that
port in the swarm, update the deployment and configuration files to use another
port. Remember to create firewall rules for the port you choose.
Note
If you are using Mirantis Kubernetes Engine (MKE), you normally need to
select a port different from 443. Additionally, ensure the port is different
from any used by MSR, whether the default port 443 or a custom one.
Edit the docker-stack.yml file
With a single command, you can deploy the cache using the docker-stack.yml
file, which you mount into the container.
Edit the sample MSR cache configuration file that follows to fit your
environment:
You configure the MSR cache using a configuration file that you mount into the
container.
Edit the sample MSR cache configuration file that follows to fit your
environment, entering the relevant external MSR cache, worker node, or external
loadbalancer FQDN. Once configured, the cache fetches image layers from MSR and
maintains a local copy for 24 hours. If a user requests the image layer after
that period, the cache re-fetches it from MSR.
To deploy the MSR cache with a TLS endpoint, you must generate a TLS
certificate and key from a certificate authority.
Be aware that to expose the MSR cache through a node port or a host port, you
must use a Node FQDN (Fully Qualified Domain Name) as a SAN in your
certificate.
Create the MSR cache certificates:
Acquire your TLS certificate and key files.
Note
You can use a previously created CA signed SSL certificate, or you can
create a new one. [1]
Create a directory called certs and place in it the newly created
certificate for your MSR cache.
Configure the cert pem files, as detailed below:
pem file
Content to add
cache.cert.pem
Add the public key certificate for the cache. If the certificate
has been signed by an intermediate certificate authority, append its
public key certificate at the end of the file.
cache.key.pem
Add the unencrypted private key for the cache.
dtr.cert.pem
The cache communicates with MSR using TLS. If you have customized MSR
to use TLS certificates issued by a globally trusted certificate
authority, the cache automatically trusts MSR. If, though, you are
using the default MSR configuration, or MSR is using TLS certificates
signed by your own certificate authority, you need to configure the
cache to trust MSR, and edit the daemon.json file to allow for insecure registries.
Add the MSR CA certificate to the certs/dtr.cert.pem file:
In the MSR web UI, navigate to your Account, click the
Settings tab, and edit the Content Cache settings
to the newly deployed cache.
Note
To set up user accounts for multiple users simultaneously, use the
/api/v0/accounts/{username}/settings API endpoint.
Henceforth, you will be using the cache whenever you pull images.
Test the cache.
Verify that the cache is functioning properly:
Push an image to MSR.
Verify that the cache is configured to your user account.
Delete the image from your local system.
Pull the image from MSR.
Check the logs to verify that the cache is serving your request:
dockerservicelogs--followdtr-cache_cache
Issues with TLS authentication are the most common causes of cache
misconfiguration, including:
MSR not trusting the cache TLS certificates.
The cache not trusting MSR TLS certificates.
Your machine not trusting MSR or the cache.
You can use the logs to troubleshoot cache misconfigurations.
Clean up sensitive files, such as private keys for the cache, by running the
following command:
rm-rfcerts
Deploy an MSR cache with Kubernetes
Note
The MSR with Kubernetes deployment detailed herein assumes that you have a
running MSR deployment.
When you establish the MSR cache as a Kubernetes deployment, you ensure that
Kubernetes will automatically schedule and restart the service in the event
of a problem.
You manage the cache configuration with a Kubernetes Config Map and the TLS
certificates with Kubernetes secrets. This setup enables you to securely
manage the configurations of the node on which the cache is running.
Prepare the cache deployment
Following cache preparation, you will have the following file structure on your
workstation:
The YAML file that allows you to deploy the cache with a single command.
config.yaml
The cache configuration file.
certs
The certificates subdirectory.
cache.cert.pem
The cache public key certificate, including any intermediaries.
cache.key.pem
The cache private key.
dtr.cert.pem
The MSR CA certificate.
Create the MSR cache certificates
To deploy the MSR cache with a TLS endpoint you must generate a TLS
certificate and key from a certificate authority.
The manner in which you expose the MSR cache changes the Storage Area Networks
(SANs) that are required for the certificate. For example:
To deploy the MSR cache with an ingress object you must use an external MSR
cache address that resolves to your ingress controller as part of your
certificate.
To expose the MSR cache through a Kubernetes Cloud Provider, you must have
the external load balancer address as part of your certificate.
To expose the MSR cache through a Node port or a host port you must use a
Node FQDN (Fully Qualified Domain Name) as a SAN in your certificate.
Create the MSR cache certificates:
Acquire your TLS certificate and key files.
Note
You can use a previously created CA signed SSL certificate, or you can
create a new one. [1]
Create a directory called certs.
In the certs directory, place the newly created certificate for your MSR
cache.
Place the certificate authority in the certs directory, including any
intermediate certificate authorities of the certificate from your MSR
deployment. If your MSR deployment uses cert-manager, use kubectl to
source this from the main MSR deployment.
kubectlgetsecretmsr-nginx-ca-cert-ogo-template='{{ index .data "ca.crt" | base64decode }}'
Note
If cert-manager is not in use, you must provide your custom nginx.webtls
certificate.
Configure the MSR cache
The MSR cache takes its configuration from a configuration file that you mount
into the container.
The cache is configured to use port 443. If you are already using that
port in the swarm, update the deployment and configuration files to use another
port. Remember to create firewall rules for the port you choose.
Note
If you are using Mirantis Kubernetes Engine (MKE), you normally need to
select a port different from 443. Additionally, ensure the port is different
from any used by MSR, whether the default port 443 or a custom one.
You can edit the following MSR cache configuration file for your environment,
entering the relevant external MSR cache, worker node, or external loadbalancer
FQDN. Once you have configured the cache it fetches image layers from MSR and
maintains a local copy for 24 hours. If a user requests the image layer after
that period, the cache fetches it again from MSR.
cat > config.yaml <<EOFversion:0.1log:level:infostorage:delete:enabled:truefilesystem:rootdirectory:/var/lib/registryhttp:addr:0.0.0.0:443secret:generate-random-secrethost:https://<external-fqdn-dtrcache># Could be MSR Cache / Loadbalancer / Worker Node external FQDNtls:certificate:/certs/cache.cert.pemkey:/certs/cache.key.pemmiddleware:registry:-name:downstreamoptions:blobttl:24hupstreams:-https://<msr-url># URL of the Main MSR Deploymentcas:-/certs/msr.cert.pemEOF
By default, the cache stores image data inside its container. Thus, if
something goes wrong with the cache service and Kubernetes deploys a new Pod,
cached data is not persisted. The data is not lost, however, as it
persists in the primary MSR.
Note
Kubernetes persistent volumes or persistent volume claims must be in use to
provide persistent backend storage capabilities for the cache.
Define Kubernetes resources
The Kubernetes manifest file you use to deploy the MSR cache is independent
from how you choose to expose the MSR cache within your environment.
To create the Kubernetes resources, you must have the kubectl
command line tool configured to communicate with your Kubernetes cluster,
through either a Kubernetes configuration file or an MKE client bundle.
Review the running Pods in your cluster to confirm successful deployment:
kubectl-nmsrgetpods
Optional. Troubleshoot your deployment:
kubectl-nmsrdescribepods<pods>
and/or
`kubectl-nmsrlogs<pods>
Expose the MSR Cache
To provide external access to your MSR cache you must expose the cache Pods.
Important
Expose your MSR cache through only one external interface.
To ensure TLS certificate validity, you must expose the cache through the
same interface for which you previously created a certificate.
Kubernetes supports several methods for exposing a service, based on
your infrastructure and your environment. Detail is offered below for the
NodePort method and the Ingress Controllers method.
NodePort method
Add a worker node FQDN to the TLS certificate at the start and access the
MSR cache through an exposed port on a worker node FQDN.
Run the following command to determine the port on which you have exposed
the MSR cache:
kubectl-ndtrgetservices
Test the external reachability of your MSR cache. To do this, use curl
to hit the API endpoint, using both the external address of a worker node
and the NodePort:
In the ingress controller exposure scheme, you expose the MSR cache through an
ingress object.
Create a DNS rule in your environment to resolve an MSR cache external FQDN
address to the address of your ingress controller. In addition, specify at
the start the same MSR cache external FQDN within the MSR cache
certificate.
cat > dtrcacheingress.yaml <<EOFapiVersion:networking.k8s.io/v1kind:Ingressmetadata:name:dtr-cachenamespace:dtrannotations:nginx.ingress.kubernetes.io/ssl-passthrough:"true"nginx.ingress.kubernetes.io/secure-backends:"true"spec:tls:-hosts:-<external-msr-cache-fqdn># Replace this value with your external MSR Cache addressrules:-host:<external-msr-cache-fqdn># Replace this value with your external MSR Cache addresshttp:paths:-pathType:Prefixpath:"/cache"backend:service:name:dtr-cacheport:number:443EOFkubectl create -f dtrcacheingress.yaml
Test the external reachability of your MSR cache. To do this, use curl
to hit the API endpoint. The address should be the one you have previously
defined in the service definition file.
You will require the following to deploy MSR caches with high availability:
Multiple nodes, one for each cache replica
A load balancer
Shared storage system that has read-after-write consistency
With high availability, Mirantis recommends that you configure the replicas to
store data using a shared storage system. MSR cache deployment is the same,
though, regardless of whether you are deploying a single replica or multiple
replicas.
When using a shared storage system, once an image layer is cached, any replica
is able to serve it to users without having to fetch a new copy from MSR.
MSR caches support the following storage systems:
Alibaba Cloud Object Storage Service
Amazon S3
Azure Blob Storage
Google Cloud Storage
NFS
Openstack Swift
Note
If you are using NFS as a shared storage system, ensure read-after-write
consistency by verifying that the shared directory is configured with:
/dtr-cache*(rw,root_squash,no_wdelay)
In addition, mount the NFS directory on each node where you will deploy
an MSR cache replica.
To configure caches for high availability:
Use SSH to log in to a manager node of the cluster on which you want to
deploy the MSR cache. If you are using MKE to manage that cluster, you can
also use a client bundle to configure your Docker CLI client to connect to
the cluster.
Label each node that is going to run the cache replica:
Create the cache configuration files by following the instructions for
deploying a single cache replica. Be sure to adapt the storage object,
using the configuration options for the shared storage of your choice.
Deploy a load balancer of your choice to balance requests across your
set of replicas.
MSR cache configuration
MSR caches are based on Docker Registry, and use the same configuration file
format. The MSR cache extends the Docker Registry configuration file format,
though, introducing a new middleware called downstream with three
configuration options: blobttl, upstreams, and cas:
middleware:registry:-name:downstreamoptions:blobttl:24hupstreams:-<Externally-reachable address for upstream registry or content cache in format scheme://host:port>cas:-<Absolute path to next-hop upstream registry or content cacheCA certificate in the container's filesystem>
The following table offers detail specific to MSR caches for each parameter:
Parameter
Required
Description
blobttl
no
The TTL (Time to Live) value for blobs in the cache, offered as a
positive integer and suffix denoting a unit of time.
Valid values:
ns (nanoseconds)
us (microseconds)
ms (milliseconds)
s (seconds)
m (minutes)
h (hours)
Note
If the suffix is omitted, the system interprets the value as
nanoseconds.
If blobttl is configured, storage.delete.enabled must be set to
true.
cas
no
An optional list of absolute paths to PEM-encoded CA certificates of
upstream registries or content caches.
upstreams
yes
A list of externally-reachable addresses for upstream registries of
content caches. If you specify more than one host, it will pull from
registries in a round-robin fashion.
Garbage collection
Mirantis Secure Registry (MSR) supports garbage collection, the automatic
cleanup of unused image layers. You can configure garbage collection to occur
at regularly scheduled times, as well as set a specific duration for the
process.
Garbage collection first identifies and marks unused image layers, then
subsequently deletes the layers that have been marked.
Schedule garbage collection
Log in to the MSR web UI.
In the left-side navigation panel, navigate to System and
select the Garbage collection tab.
Set the duration for the garbage collection job:
Until done
For <number> minutes
Never
Set the garbage collection schedule:
Custom cron schedule (<hour,date,month,day>)
Daily at midnight UTC
Every Saturday at 1AM UTC
Every Sunday at 1AM UTC
Do not repeat
Click either Save & Start or Save.
Save & Start runs the garbage collection job immediately and
Save runs the job at the next scheduled time.
At the scheduled start time, verify that garbage collection has begun by
navigating to the Job Logs tab.
How garbage collection works
In conducting garbage collection, MSR performs the following actions in
sequence:
Establishes a cutoff time.
Marks each referenced manifest file with a timestamp. When manifest files
are pushed to MSR, they are also marked with a timestamp.
Sweeps each manifest file that does not have a timestamp after the cutoff
time.
Deletes the file if it is never referenced, meaning that no image tag uses
it.
Repeats the process for blob links and blob descriptors.
Each image stored in MSR is comprised of the following files:
The image filesystem, which consists of a list of unioned image layers.
A configuration file, which contains the architecture of the image along with
other metadata.
A manifest file, which contains a list of all the image layers and the
configuration file for the image.
MSR tracks these files in its metadata store, using RethinkDB, doing so in a
content-addressable manner in which each file corresponds to a cryptographic
hash of the file content. Thus, if two image tags hold exactly the same
content, MSR only stores the content once, which makes hash collisions nearly
impossible even when image tag names differ. For example, if wordpress:4.8
and wordpress:latest have the same content, MSR will only store that
content once. If you delete one of these tags, the other will remain intact.
As a result, when you delete an image tag, MSR cannot delete the
underlying files as it is possible that other tags also use the same
underlying files.
Create a new repository when pushing an image
By default, MSR only allows users to push images to repositories that already
exist, and for which the user has write privileges. Alternatively, you can
configure MSR to create a new private repository when an image is pushed.
To create a new repository when pushing an image:
Log in to the MSR web UI.
In the left-side navigation panel, click Settings and scroll
down to Repositories.
Slide the Create repository on push toggle to the right.
Pushing an image to a non-existing repository will create a new repository
using the following naming convention:
Non-admin users: <user-name>/<repository>
Admin users: <organization>/<repository>
Use a web proxy
Mirantis Secure Registry (MSR) makes outgoing connections to check for new
versions, automatically renew its license, and update its vulnerability
database. If MSR cannot access the Internet, you must manually apply
any updates.
One option to keep your environment secure while still allowing MSR
access to the Internet is to use a web proxy. If you have an HTTP or
HTTPS proxy, you can configure MSR to use it. To avoid downtime, you
should do this configuration outside business peak hours.
To configure MSR for web proxy use:
Log in as an administrator to a node where MSR is deployed.
MSR does not display the password portion of the URL when it is
presented in the MSR UI.
Verify that your web proxy is properly configured:
Log in to the MSR web UI.
In the left-side navigation panel, navigate to System.
Scroll down to Domains & Proxies and review the values of
HTTP proxy and HTTPS proxy.
Manage applications
In addition to storing individual and multi-architecture container images and
plugins, MSR supports the storage of applications as their own
distinguishable type.
Applications include the following two tags:
Image
Tag
Type
Under the hood
Invocation
<app-tag>-invoc
Container image represented by OS and architecture.
For example, linuxamd64.
Uses Mirantis Container Runtime. The Docker daemon is responsible for
building and pushing the image. Includes scan results for the invocation
image.
Application with bundled components
<app-tag>
Application
Uses the application client to build and push the image. Includes scan
results for the bundled components. Docker App is an experimental Docker
CLI feature.
Use docker app push to push your applications to MSR. For more
information, refer to Docker App
in the official Docker documentation.
View application vulnerabilities
Log in to the MSR web UI.
In the left-side navigation panel, click Repositories.
Select the desired repository and click the Tags tab.
Click View details on the <app-tag> or
<app-tag>-invoc row.
While it is possible to enable the just-in-time creation of multi-architecture
image repositories when creating a repository using the API, Mirantis does not
recommend using this option, as it will cause Docker Content Trust to fail
along with other issues. To manage Docker image manifests and manifest
lists, instead use the experimental command docker manifest.
Review repository information
The MSR web UI has an Info page for each repository that
includes the following sections:
A README file, which is editable by admin users.
The docker pull command for pulling the images contained in the
given repository. To learn more about pulling images, refer to
Pull and push images.
The permissions associated with the user who is currently logged in.
To view the Info section:
Log in to the MSR web UI.
In the left-side navigation panel, click Repositories.
Select the required repository by clicking the repository
name rather than the namespace name that precedes the /.
The Info tab displays by default.
To view the repository events that your permissions level has access to,
hover over the question mark next to the permissions level that displays under
Your permission.
Note
Your permissions list may include repository events that are not displayed
in the Activity tab. Also, it is not an exhaustive list of the
event types that are displayed in your activity stream. To learn more about
repository events, refer to Audit repository events.
Pull and push images
Just as with Docker Hub, interactions with MSR consist in the following:
docker login <msr-url> authenticates the user on MSR
docker pull <image>:<tag> pulls an image from MSR
docker push <image>:<tag> pushes an image to MSR
Pull an image
Note
It is only necessary to authenticate using docker login before
pulling a private image.
If you need to pull a private image, log in to MSR:
In the left-side navigation panel, click Repositories.
Select the relevant repository.
Navigate to the Tags tab.
Verify that the required tag is listed on the page.
Windows image limitations
The base layers of the Microsoft Windows base images have redistribution
restrictions. When you push a Windows image to MSR, Docker only pushes the
image manifest and the layers that are above the Windows base layers. As a
result:
When a user pulls a Windows image from MSR, the Windows base layers
are automatically fetched from Microsoft.
Because MSR does not have access to the image base layers, it cannot scan
those image layers for vulnerabilities. The Windows base layers are,
however, scanned by Docker Hub.
On air-gapped or similarly limited systems, you can configure Docker to push
Windows base layers to MSR by adding the following line to
C:\ProgramData\docker\config\daemon.json:
For production environments, Mirantis does not recommend configuring
Docker to push Windows base layers to MSR.
Delete images
Note
If your MSR instance uses image signing, you will need to remove any trust
data on the image before you can delete it. For more information, refer to
Delete signed images.
To delete an image:
Log in to the MSR web UI.
In the left-side navigation panel, select Repositories.
Click the relevant repository and navigate to the Tags tab.
Select the check box next to the tags that you want to delete.
Click Delete.
Alternatively, you can delete every tag for a particular image by deleting the
relevant repository.
To delete a repository:
Click the required repository and navigate to the Settings
tab.
Scroll down to Delete repository and click
Delete.
Scan images for vulnerabilities
Mirantis Secure Registry (MSR) has the ability to scan images for security
vulnerabilities contained in the US National Vulnerability Database. Security
scan results are reported for each image tag contained in a repository.
Security scanning is available as an add-on to MSR. If security scan results
are not available on your repositories, your organization may not have
purchased the security scanning feature or it may be disabled. Administrator
permissions are required to enable security scanning on your MSR instance.
Important
During scanning images for security vulnerabilities, MSR temporarily
extracts the contents of your images to disk. If malware is contained in
these images, external scanners may wrongly attribute that malware
to MSR. The key indication of this is the detection of malware in the
dtr-jobrunner container in /tmp/findlib-workdir-*.
To prevent any recurrence of the issue, Mirantis recommends configuring
the run-time scanner to exclude files found in the MSR dtr-jobrunner
containers in /tmp, or more specifically, if wildcards can be used,
in /tmp/findlib-workdir-*.
Security scan process
Scans run on demand when you initiate them in the MSR web UI or automatically
when you push an image to the registry.
Scanning process
MSR image scanning occurs in a service known as the dtr-jobrunner
container. To scan an image, MSR:
Extracts a copy of the image layers from the backend storage.
Extracts the files from the layer into a working directory inside
the dtr-jobrunner container.
Executes the scanner against the files in this working directory, collecting
a series of scanning data.
Once the scanning data is collected, the working directory for the layer is
removed.
Binary scan
The scanner first performs a binary scan on each layer of the image,
identifies the software components in each layer, and indexes the SHA of
each component in a bill-of-materials. A binary scan evaluates the
components on a bit-by-bit level, so vulnerable components are
discovered even if they are statically linked or use a different name.
The scan then compares the SHA of each component against the US National
Vulnerability Database that is installed on your MSR instance. When this
database is updated, MSR verifies whether the indexed components have newly
discovered vulnerabilities.
Layers excluded from scanning
MSR has the ability to scan both Linux and Windows images. However, because
Docker defaults to not pushing foreign image layers for Windows images,
MSR does not scan those layers. If you want MSR to scan your Windows images,
configure Docker to always push image layers, and
it will scan the non-foreign layers.
Scan images
Note
Only users with write access to a repository can manually start a scan.
Users with read-only access can, however, view the scan results.
Security scan on push
By default, a security scan runs automatically when you push an image to the
registry.
To view the results of a security scan:
Log in to the MSR web UI.
In the left-side navigation panel, select Repositories.
Click the required repository and select the Tags tab.
Click View details on the required tag.
Manual scanning
You can manually start a scan for images in repositories that you have
write access to.
To manually scan an image:
Log in to the MSR web UI.
In the left-side navigation panel, select Repositories.
Click the required repository and select the Tags tab.
Click Start a scan on the required image tag.
To review the scan results, click View details.
Change the scanning mode
You can change the scanning mode for each individual repository at any
time. You might want to disable scanning in either of the following scenarios:
You are pushing an image repeatedly during troubleshooting and do not want to
waste resources on rescanning.
A repository contains legacy code that is not used or updated frequently.
Note
To change an individual repository scanning mode, you must have write or
administrator access to the repository.
To change the scanning mode:
Log in to the MSR web UI.
In the left-side navigation panel, select Repositories.
Click the required repository and select the Settings tab.
Scroll down to Image scanning and under
Scan on push, select either On push or
Manual.
Review security scan results
Once MSR has run a security scan for an image, you can view the results.
Scan summaries
A summary of the results displays next to each scanned tag on the repository
Tags tab, and presents in one of the following ways:
If the scan did not find any vulnerabilities, the word Clean
displays in green.
If the scan found vulnerabilities, the severity level, Critical,
Major, or Minor, displays in red or orange with the
number of vulnerabilities. If the scan could not detect the version of
a component, the vulnerabilities are reported for all versions of the
component.
Detailed report
To view the full scanning report, click View details for the
required image tag.
The top of the resulting page includes metadata about the image including
the SHA, image size, last push date, user who initiated the push, security scan
summary, and the security scan progress.
The scan results for each image include two different modes so you can
quickly view details about the image, its components, and any
vulnerabilities found:
The Layers view lists the layers of the image in the order that
they are built by the Dockerfile.
This view can help you identify which command in the build
introduced the vulnerabilities, and which components are associated
with that command. Click a layer to see a summary of its
components. You can then click on a component to switch to the
Component view and obtain more details about the specific item.
Note
The layers view can be long, so be sure to scroll down if
you do not immediately see the reported vulnerabilities.
The Components view lists the individual component libraries
indexed by the scanning system in order of severity and number of
vulnerabilities found, with the most vulnerable library listed first.
Click an individual component to view details on the vulnerability it
introduces, including a short summary and a link to the official CVE database
report. A single component can have multiple vulnerabilities, and the scan
report provides details on each one. In addition, the component details
include the license type used by the component, the file path to the
component in the image, and the number of layers that contain the component.
Note
The CVE count presented in the scan summary of an image with multiple layers
may differ from the count obtained through summation of the CVEs for each
individual image component. This is because the scan summary performs a
summation of the CVEs in every layer of the image, and a component may be
present in more than one layer of an image.
What to do next
If you find that an image in your registry contains vulnerable
components, you can use the linked CVE scan information in each scan
report to evaluate the vulnerability and decide what to do.
If you discover vulnerable components, you should verify whether there is an
updated version available where the security vulnerability has been
addressed. If necessary, you can contact the component maintainers to
ensure that the vulnerability is being addressed in a future version or
a patch update.
If the vulnerability is in a base layer, such as an operating
system, you might not be able to correct the issue in the image. In this
case, you can switch to a different version of the base layer, or you
can find a less vulnerable equivalent.
You can address vulnerabilities in your repositories by updating the images to
use updated and corrected versions of vulnerable components or by using
a different component that offers the same functionality. When you have
updated the source code, run a build to create a new image, tag the
image, and push the updated image to your MSR instance. You can then
re-scan the image to confirm that you have addressed the
vulnerabilities.
Override a vulnerability
MSR security scanning sometimes reports image vulnerabilities that you know
have already been fixed. In such cases, it is possible to hide the
vulnerability warning.
Note
Only MSR administrators can override layer vulnerabilities.
To override a vulnerability:
Log in to the MSR web UI as an administrator.
In the left-side navigation panel, select Repositories.
Navigate to the required repository and click View details.
To review the vulnerabilities associated with each component in the image,
click the Components tab.
Select the component with the vulnerability you want to ignore,
navigate to the vulnerability, and click Hide.
Once dismissed, the vulnerability is hidden system-wide and will no
longer be reported as a vulnerability on affected images with the
same layer IDs or digests. In addition, MSR will not re-evaluate the
promotion policies that have been set up for the repository.
To re-evaluate the promotion policy for the affected image:
After hiding a particular vulnerability, you can re-evaluate the promotion
policy for the affected image.
Log in to the MSR web UI.
In the left-side navigation panel, select Repositories.
Navigate to the required repository and click View details.
Click Promote.
Scanner reporting
You can review and submit the vulnerability scanning results to
Mirantis Customer Support to help with the troubleshooting process.
Possible scanner report issues include:
Scanner crashes
Improperly extracted containers
Improperly detected components
Incorrectly matched backport
Vulnerabilities improperly matched to components
Vulnerability false positives
Export a scanner report
Log in to the MSR web UI.
In the left-side navigation panel, select Repositories.
Click the required repository and select the Tags tab.
Navigate to the required image and click View details.
Click Export Report and select:
Export as JSON to use for support and diagnostics.
Export as CSV to use for further processing by Windows or
Linux shell scripts.
Find the report as either scannerReport.json``or``scannerReport.txt in your browser downloads directory.
Submit a scanner report
You can send a scanner report directly to Mirantis Customer Support to help
the group in their troubleshooting efforts.
To send a scanner report directly to Mirantis Customer Support:
Log in to the MSR web UI.
Navigate to View Details and click Components.
Click Show layers affected for the layer you want to
report.
Click Report Issue. A pop-up window displays with the
fields detailed in the following table:
Field
Description
Component
Automatically filled out and not editable. If the information is
incorrect, make a note in the Additional info field.
Reported version or date
Automatically filled out and not editable. If the information is
incorrect, make a note in the Additional info field.
Report layer
Indicate the image or image layer. Options include:
Omit layer, Include layer, Include
image.
False Positive(s)
Optional. Select from the drop-down menu all CVEs you suspect are
false positives. Toggle the False Positive(s) control to
edit the field.
Missing Issue(s)
Optional. List CVEs you suspect are missing from the report. Enter
CVEs in the format CVE-yyyy-#### or CVE-yyyy-##### and
separate each CVE with a comma. Toggle the Missing
Issue(s) control to edit the field.
Incorrect Component Version
Optional. Enter any incorrect component version information in the
Missing Issue(s) field. Toggle the
Incorrect Component Version control to edit the field.
Additional info
Optional. Indicate anything else that does not pertain to other
fields. Toggle the Additional info control to edit this
field.
Fill out the fields in the pop-up window and click Submit.
MSR generates a JSON-formatted scanner report, which it bundles into a file
together with the scan data. This file downloads to your local drive, at which
point you can share it as needed with Mirantis Customer Support.
Important
To submit a scanner report along with the associated image, bundle the items
into a .tgz file and include that file in a Mirantis Customer
Support ticket.
By default, users can push the same tag multiple times to a repository,
thus overwriting the older versions of the tag. This can however lead to
problems if a user pushes an image with the same tag name but different
functionality. Also, when images are overwritten, it can be difficult to
determine which build originally generated the image.
To prevent tags from being overwritten, you can configure a repository
to be immutable. Once configured, MSR will not allow another image with the
same tag to be pushed to the repository.
Note
Enabling tag immutability disables repository tag limits.
Make tags immutable
You can enable tag immutability when creating a new repository or at a later
time.
To enable tag immutability when creating a new repository:
Mirantis Secure Registry (MSR) supports two image-signing mechanisms.
Cosign is the current recommended approach, while Docker Content Trust (DCT)
is deprecated.
MSR 2.9 environments with existing DCT signatures
that have not yet migrated to Cosign.
Sign images with Cosign
Mirantis Secure Registry (MSR) natively supports Cosign, providing a seamless
way to store and manage signed images. Cosign allows you to sign image tags on
the client side, giving consumers a way to verify the integrity of your images.
Because Cosign signatures are stored directly in the registry as standard OCI
artifacts, MSR does not require a dedicated signing server. All cryptographic
signing operations are performed entirely on the client side using the
Cosign CLI. After the client generates the signature, it is pushed directly to
your MSR repository alongside the image.
Cosign integrates with container workflows and allows you to configure
repositories, manage keys, and sign images using the cosignsign command.
Upgrade from MSR 2.9
When upgrading from MSR 2.9 to MSR 2.10, MSR provides a conditional
backward-compatibility path for Docker Content Trust (DCT) to ensure your
existing workflows do not break while you plan your migration to Cosign.
The upgrade behavior depends entirely on whether you have active DCT
signatures in your MSR 2.9 environment:
DCT upgrade behavior
MSR 2.9 state
MSR 2.10 upgrade behavior
Action required
Active DCT signatures present
The Notary server and Notary signer components are preserved.
Existing DCT signatures remain valid and you can continue
using dockertrust commands.
Plan your migration to Cosign. The Notary/DCT stack is
deprecated and will be removed in a future release.
No DCT signatures present
The Notary server and Notary signer components are removed
from the cluster during the upgrade.
None. Use Cosign for all new image signing requirements.
Before you can use Cosign, you must complete local setup.
Install Cosign CLI
To begin signing and verifying images, install the Cosign CLI tool on your
local machine. Detailed setup instructions for various operating systems can
be found in the official Sigstore Cosign Installation Guide.
Your CA certificate is issued by a well-know root CA.
Your MSR is installed on the local machine and is configured as an insecure
registry, although this is mostly a development and test configuration.
If the MSR is configured with a self-signed CA certificate, you must configure
the machine that runs the cosign or docker commands to trust the CA ,
certificate as detailed below.
Caution
If your remote MSR is configured as an insecure registry (using self-signed
certificates or plain HTTP), you must explicitly configure the Cosign client
to allow the connection. Cosign can respect the insecure-registries settings
defined in your Docker daemon.json file.
Alternatively, if you add the self-signed MSR CA certificate directly to
your operating system’s trusted root certificate store, the host will be
marked as secure and Cosign will communicate with it automatically without
requiring any extra insecure registry flags or daemon.json
configuration.
To configure your machine to trust a self-signed CA:
Create a certificate directory for the MSR host in the Docker configuration
directory:
Log in to MSR using the Docker CLI or the Cosign CLI:
Docker CLI:
$ dockerlogin<MSR_URL>-u<username>-p<password>
Cosign CLI:
$ cosignlogin<MSR_URL>-u<username>-p<password>
Image signing and verification scenarios
Cosign offers a flexible architecture that integrates with a wide
variety of cryptographic workflows. The examples on this page
represent the most common image signing scenarios used within
Mirantis Secure Registry (MSR).
Because Cosign supports many alternative signing methods, see the
official Cosign documentation for a complete list
of deployment scenarios and advanced configurations.
Sign with a self-managed key pair
This is the standard approach for managing your own cryptographic
keys. You generate a private/public key pair locally, use the private
key to sign the image, and use the public key to verify it.
For more information, see the Sigstore documentation on
self-managed keys.
Run the following command to generate a cosign.key (private key)
and cosign.pub (public key). You are prompted to enter a
password to protect the private key:
$ cosigngenerate-key-pair
Authenticate your container client to MSR, then use your private
key to sign the target image tag. Cosign automatically pushes the
signature artifact to your MSR repository:
Cosign can operate in secure, offline, or air-gapped data centers
because it does not depend on public internet services — such as the
Fulcio or Rekor transparency logs — to function.
Before you begin, verify the following prerequisites:
The client machine running the Cosign CLI must have direct network
access to the MSR instance.
If MSR uses a self-signed CA, the client machine must trust the MSR
CA certificate in its OS trust store, or you must configure the
registry under insecure-registries in the Docker
daemon.json file.
Public transparency log uploads must be explicitly bypassed because
there is no internet access to reach them.
Note
In an air-gapped environment, use the --tlog-upload=false flag
with all Cosign commands to prevent contact with public
transparency logs.
Attestations allow you to append authenticated metadata — such as
vulnerability scan reports, build provenance, or SBOMs — directly to
your container images. This metadata can later be evaluated by
admission controllers.
Cosign supports keyless signing, which eliminates the challenges of
managing long-lived cryptographic keys. Instead of generating and
storing permanent keys, Cosign uses an OpenID Connect (OIDC) identity
token from a trusted identity provider (IdP) to obtain a short-lived
signing certificate from Sigstore’s Fulcio Certificate Authority.
This scenario is commonly used in automated CI/CD environments such
as GitHub Actions, GitLab CI, or cloud providers using workload
identity.
Sign and push the image. When you run this command interactively,
Cosign opens a browser to complete an OIDC authorization challenge.
In CI/CD pipelines, Cosign automatically detects the ambient OIDC
token from the runner environment, or you can supply one explicitly
using the --identity-token flag:
Verify the signature. Because no public key file exists, specify
the expected OIDC provider issuer URL and the identity embedded
in the certificate, such as a developer’s email address or a
CI/CD workflow path:
Mirantis Kubernetes Engine (MKE) can be configured to enforce signature
verification, ensuring that only images signed by trusted entities can
be deployed on your cluster.
Because Cosign signatures are standard OCI artifacts stored directly
inside Mirantis Secure Registry (MSR), you can use the cryptographic
user keys provided in your MKE client bundle to sign images. This
allows MKE to confirm that a deployment came from an authorized user
or team identity.
Prerequisites
Complete the following steps before you start signing images:
Install the Cosign CLI on your local machine.
Confirm that your local machine has network access to MSR and log
in to the registry:
$ dockerloginmsr.example.com
Download an MKE client bundle for the user identity that will sign
the images. The bundle contains the cryptographic user certificates
(cert.pem and key.pem) recognized by MKE’s RBAC engine.
Import your MKE bundle keys into Cosign
Cosign can use your existing client bundle keys, but they must first
be converted into Cosign’s expected format. Navigate to the directory
containing your unzipped MKE client bundle and run the
import-key-pair command:
$ # Verify your bundle files are present$ lscert.pemkey.pem
$ # Import the MKE private key into Cosign format$ cosignimport-key-pair--keykey.pem
When prompted, enter and confirm a password. This generates two files
in your current working directory:
import-cosign.key — the encrypted private key used to sign
images.
import-cosign.pub — the public key used for verification.
For more details on key management utilities, see Importing Key Pairs
in the official Sigstore documentation.
Sign the image tag
To sign your container image using your imported MKE-associated key,
run:
Cosign prompts for the password you set during the import step, then
pushes the cryptographic signature directly to your MSR repository
alongside your image manifest.
Enforce signature verification in MKE 3
TechPreview
Warning
This feature is not yet available. It is planned for a future MKE 3
update following the MSR 2.10.0 release. Confirm feature
availability in your MKE version before attempting configuration.
After your images are signed using identities known to MKE, configure
your cluster to block unsigned images:
Log in to the MKE web interface as an administrator.
Toggle the enforcement policy and supply the required verification
parameters so that only verified images can be scheduled onto the
cluster.
With this policy active, any attempt to deploy a workload using an
unsigned image or an image signed by an untrusted key is rejected
by MKE.
Note
If your MSR instance uses a self-signed CA, confirm that your
local machine trusts the MSR CA, or configure the registry under
insecure-registries in the Docker daemon.json file so that
Cosign can connect to MSR to push signatures.
Delete signed images
In Mirantis Secure Registry (MSR), Cosign signatures are stored as
standard OCI artifacts. When you delete a primary container image tag
(for example, app:latest), MSR performs a cascade deletion to
clean up the repository and prevent orphaned signature data,
automatically removing the following related Cosign artifact tags:
Tag-based artifacts: <tag>.sig (the image signature) and
<tag>.att (any associated image attestations).
Digest-based artifacts: If no other non-Cosign tags in the
repository point to the underlying image digest, MSR also removes
sha256-<hex>, sha256-<hex>.sig, and sha256-<hex>.att.
After this workflow completes, the primary image tag and all
corresponding Cosign signature data are purged from MSR storage.
Delete a signature without deleting the image
You may need to strip a signature from an image, for example, to
invalidate a bad deployment pipeline stage, while keeping the
original container image tag intact.
Because Cosign signatures are stored as individual OCI tags, you can
remove them independently using the MSR Tag DELETE API:
Removing the signature tag reverts the image cosignSigned status
to false in the MSR catalog. The image remains in the repository
as an unsigned artifact. For more details, see the API Reference.
Deletion caveats
While Cosign does not prevent you from removing an image or its
signature, a deletion request to MSR can still fail due to the following system
constraints:
If an image has both DCT/Notary and Cosign signatures attached,
the legacy Notary signature triggers a 409Conflict error.
You must clear the Notary metadata before deleting.
If the target repository has an immutable tags policy enabled,
tag deletions are blocked regardless of the signing method used.
You must have write or administrative access in the MKE
Role-Based Access Control engine for the target namespace to
perform a deletion.
Delete legacy Docker Content Trust
In Mirantis Secure Registry (MSR), Docker Content Trust (DCT) and its
underlying Notary server and signer infrastructure are deprecated. If
you upgraded from MSR 2.9 with active signatures, the legacy Notary
stack is preserved for backward compatibility.
After you migrate your image-signing pipelines to Cosign,
administrators can permanently remove the legacy Notary stack,
including all legacy trust data, signing databases, and system
containers, from the MSR web UI or using the MSR administrative API.
Warning
Disabling Notary is a permanent, destructive action that tears down
the Notary subsystem and deletes all existing DCT signatures and
trust repositories. The Notary stack cannot be re-enabled after
removal. Verify that all required images have been re-signed with
Cosign before proceeding.
Delete Notary with the MSR web UI
Log in to the MSR web interface as a system administrator.
In the left navigation menu, go to Admin Settings and locate
the Signatures Management section.
Verify that the current status displays as Enabled, then click
Disable Notary.
When the confirmation prompt appears, type delete into the
text field and click Confirm to proceed. If you type the
confirmation word incorrectly, the prompt reappears. Click
Cancel to stop the operation without making any changes.
Wait for the process to complete. The button displays
Disabling Notary… while the system is in a decommissioning
state.
After the Notary infrastructure has been removed from your cluster,
the button displays Notary Disabled and a success notification
confirms the removal.
Delete Notary with the MSR administrative API
The MSR administrative API provides two endpoints for checking Notary
status and triggering its removal.
Check current Notary status
Before you disable Notary, verify the current system state:
GET /api/v0/admin/notary/status
A 200OK response indicates that Notary is active. The response
includes a count of repositories that contain legacy trust metadata:
{"state":"enabled","reposWithTrustData":14}
Disable the Notary infrastructure
To initiate the asynchronous teardown job, send an authorized request
to the disable endpoint:
POST /api/v0/admin/notary/disable
The endpoint returns the following HTTP response codes:
202Accepted — The decommission job has started or is already
running. The response body returns a job ID to track progress:
Mirantis Secure Registry (MSR) ships with both the Notary server and
the Notary signer, thus providing the required components for
using Docker Content Trust (DCT). DCT allows you to sign image tags,
giving consumers a way to verify the integrity of your images.
MSR implements DCT using a combination of server and client semantics. The
notary containers comprise the server side and are deployed by default with
every MSR installation. Operations on the client side are performed with a
combination of docker trust and notary commands and
operate on data that resides in the local trust store that these tools
maintain. Changes are then pushed from the local store to the Notary server so
that they are available with MSR.
As they are part of MSR, the Notary and the Registry servers are accessed
through a front-end proxy, with both components sharing the MKE RBAC
(Role-based Access Control) Engine. As such, you do not require
additional Docker client configuration to use DCT.
DCT is integrated with the Docker CLI and allows you to configure
repositories, add signers, and sign images using the docker trust
command.
Note
If the MSR certificate authority (CA) is self-signed, you must configure the
machine running the docker trust command to trust the MSR CA. To
do this, create a $HOME/.docker/tls/ folder and place the MSR CA file
in it. For example:
Before you can use Docker Content Trust (DCT), you must complete local setup.
Enable DCT
DCT is active on the server, but must be opted in to by any Docker client
who wants to use it. This is done by setting the DOCKER_CONTENT_TRUST
environment variable. It must be enabled whenever DCT is used locally.
Your CA certificate is issued by a well-know root CA.
Your MSR is installed on the local machine and is configured as an insecure
registry, although this is mostly a development and test configuration.
If the MSR is configured with a self-signed CA certificate, you must configure
the machine that runs the docker trust commands to trust the CA ,
certificate as detailed below.
Caution
It is not possible to use DCT with a remote MSR that is set up as an
insecure registry in the Docker daemon configuration. This is because the
Docker client does not use the server daemon for Notary operations, but
instead communicates directly with the MSR Notary service.
The client does not read the insecure registry configuration from the
server, and there is no way to configure the client for insecure registries.
To configure your machine to trust a self-signed CA:
Create a certificate directory for the MSR host in the Docker configuration
directory:
Verify that you do not receive certificate errors when accessing MSR
using the Docker CLI by running dockerlogin${MSR}.
Create a symlink between the certs.d and tls directories:
ln-scerts.d~/.docker/tls
Sign images that MKE can trust
Deprecated
A key MKE feature prevents the deployment of untrusted images on the cluster,
the use of which requires you to sign and push images to your MSR. To tie the
signed images back to MKE, you must sign the images with the private keys of
the MKE users. From an MKE client bundle, use key.pem as your private key,
and cert.pem as your public key on an x509 certificate.
To sign images in a way that MKE can trust, you must:
Download a client bundle for the user account you want to use for
signing the images.
Add the user’s private key to the trust store of your machine.
Initialize trust metadata for the repository.
Delegate signing for that repository to the MKE user.
Sign the image.
In the example scenario that follows, the nginx image is pulled from
Docker Hub, tagged as msr.example.com/dev/nginx:1, pushed to MSR,
and signed in a way that is trusted by MKE.
Download and extract an MKE client bundle into your local directory.
Load the private key into the local Docker trust store
(~/.docker/trust):
If you have not already done so, navigate to the MSR web UI and create a
repository for your image. This example uses the nginx repository in the
prod namespace.
As part of initiating the repository, the public key of the MKE user must be
added to the Notary server as a signer for the repository. You will be
prompted for passphrases to protect the keys, and you should make a note of
these passphrases.
Sign the image tag. The following steps include downloading the image from
Docker Hub, tagging the image for the user’s MSR repository, pushing the
image to the user’s repository, and signing the tag with the user’s key.
Alternatively, you can review the signed image from the MSR web UI.
Add a delegation
Deprecated
You have the option to sign an image using multiple user keys. For example, in
the event that an image must be signed by both a member of the Security team
and a member of the Development team.
To add a delegation:
The procedure herein assumes that the original user is a member of the
Development team, and thus you only need to add a Security team member.
Obtain a signing key pair for the Security team user. Refer to
Initial local setup for more information.
Add the private key of the Security team member to the local Docker
Container Trust store.
The image displays as unsigned once the trust data has been removed for
all of the roles that signed the image. At this point, you can
delete the image.
Using Docker Content Trust with a Remote MKE Cluster
Deprecated
For more advanced deployments, you may want to share one Mirantis Secure
Registry across multiple Mirantis Kubernetes Engines. However, customers
wanting to adopt this model alongside the Only Run Signed Images
MKE feature, run into problems as each MKE operates an independent
set of users.
Docker Content Trust (DCT) gets around this problem, since users from a
remote MKE are able to sign images in the central MSR and still apply
runtime enforcement.
In the following example, we will connect MSR managed by MKE cluster 1
with a remote MKE cluster which we are calling MKE cluster 2, sign the
image with a user from MKE cluster 2, and provide runtime enforcement
within MKE cluster 2. This process could be repeated over and over,
integrating MSR with multiple remote MKE clusters, signing the image
with users from each environment, and then providing runtime enforcement
in each remote MKE cluster separately.
Note
Before attempting this guide, familiarize yourself with Docker
Content Trust and Only Run Signed Images on a single MKE.
Many of the concepts within this guide may be new without
that background.
Prerequisites
Cluster 1, running UCP 3.0.x or higher, with a DTR 2.5.x or higher
deployed within the cluster.
Cluster 2, running UCP 3.0.x or higher, with no MSR node.
Nodes on Cluster 2 need to trust the Certificate Authority which
signed MSR’s TLS Certificate. This can be tested by logging on to a
cluster 2 virtual machine and running
curlhttps://msr.example.com.
The MSR TLS Certificate needs to be properly configured, ensuring that
the Loadbalancer/Public Address field has been configured, with
this address included within the certificate.
A machine with the Docker Client (CE 17.12 / EE 1803 or newer)
installed, as this contains the relevant
docker trust commands.
Registering MSR with a remote Mirantis Kubernetes Engine
As there is no registry running within cluster 2, by default MKE will
not know where to check for trust data. Therefore, the first thing we
need to do is register MSR within the remote MKE in cluster 2. When you
normally install MSR, this registration process happens by default to a
local MKE, or cluster 1.
Note
The registration process allows the remote MKE to get signature data
from MSR, however this will not provide Single Sign On (SSO). Users
on cluster 2 will not be synced with cluster 1’s MKE or MSR.
Therefore when pulling images, registry authentication will still
need to be passed as part of the service definition if the repository
is private. See the Kubernetes
example.
To add a new registry, retrieve the Certificate Authority (CA) used to
sign the MSR TLS Certificate through the MSR URL’s /ca endpoint.
$curl-kshttps://msr.example.com/ca>dtr.crt
Next, convert the MSR certificate into a JSON configuration file for
registration within the MKE for cluster 2.
You can find a template of the dtr-bundle.json below. Replace the
host address with your MSR URL, and enter the contents of the MSR CA
certificate between the new line commands \nand\n.
Note
JSON Formatting
Ensure there are no line breaks between each line of the MSR CA
certificate within the JSON file. Use your favorite JSON formatter
for validation.
$catdtr-bundle.json
{"hostAddress":"msr.example.com",
"caBundle":"-----BEGIN CERTIFICATE-----\n<contents of cert>\n-----END CERTIFICATE-----"}
Now upload the configuration file to cluster 2’s MKE through the MKE API
endpoint, /api/config/trustedregistry_. To authenticate against the
API of cluster 2’s MKE, we have downloaded an MKE client bundle,
extracted it in the current directory, and will reference the keys for
authentication.
Navigate to the MKE web interface to verify that the JSON file was
imported successfully, as the MKE endpoint will not output anything.
Select Admin > Admin Settings > Mirantis Secure Registry. If the
registry has been added successfully, you should see the MSR listed.
Additionally, you can check the full MKE configuration
file within cluster 2’s MKE. Once downloaded, the
ucp-config.toml file should now contain a section called [registries]
If the new registry isn’t shown in the list, check the
ucp-controller container logs on cluster 2.
Signing an image in MSR
We will now sign an image and push this to MSR. To sign images we need a
user’s public private key pair from cluster 2. It can be found in a
client bundle, with key.pem being a private key and cert.pem
being the public key on an X.509 certificate.
First, load the private key into the local Docker trust store
(~/.docker/trust). The name used here is purely metadata to help
keep track of which keys you have imported.
$ docker trust key load --name cluster2admin key.pem
Loading key from "key.pem"...
Enter passphrase for new cluster2admin key with ID a453196:
Repeat passphrase for new cluster2admin key with ID a453196:
Successfully imported key from key.pem
Next initiate the repository, and add the public key of cluster 2’s user
as a signer. You will be asked for a number of passphrases to protect
the keys. Keep note of these passphrases, and see [Docker Content Trust
documentation]
(/engine/security/trust/trust_delegation/#managing-delegations-in-a-notary-server)
to learn more about managing keys.
$ docker trust signer add --key cert.pem cluster2admin msr.example.com/admin/trustdemo
Adding signer "cluster2admin" to msr.example.com/admin/trustdemo...
Initializing signed repository for msr.example.com/admin/trustdemo...
Enter passphrase for root key with ID 4a72d81:
Enter passphrase for new repository key with ID dd4460f:
Repeat passphrase for new repository key with ID dd4460f:
Successfully initialized "msr.example.com/admin/trustdemo"
Successfully added signer: cluster2admin to msr.example.com/admin/trustdemo
Finally, sign the image tag. This pushes the image up to MSR, as well as
signs the tag with the user from cluster 2’s keys.
$ docker trust sign msr.example.com/admin/trustdemo:1
Signing and pushing trust data for local image msr.example.com/admin/trustdemo:1, may overwrite remote trust data
The push refers to repository [dtr.olly.dtcntr.net/admin/trustdemo]
27c0b07c1b33: Layer already exists
aa84c03b5202: Layer already exists
5f6acae4a5eb: Layer already exists
df64d3292fd6: Layer already exists
1: digest: sha256:37062e8984d3b8fde253eba1832bfb4367c51d9f05da8e581bd1296fc3fbf65f size: 1153
Signing and pushing trust metadata
Enter passphrase for cluster2admin key with ID a453196:
Successfully signed msr.example.com/admin/trustdemo:1
Within the MSR web interface, you should now be able to see your newly
pushed tag with the Signed text next to the size.
You could sign this image multiple times if required, whether it’s
multiple teams from the same cluster wanting to sign the image, or you
integrating MSR with more remote MKEs so users from clusters 1, 2, 3, or
more can all sign the same image.
Enforce Signed Image Tags on the Remote MKE
We can now enable Only Run Signed Images on the remote MKE. To do
this, login to cluster 2’s MKE web interface as an admin.
Select Admin > Admin Settings > Docker Content Trust.
Finally we can now deploy a workload on cluster 2, using a signed image
from an MSR running on cluster 1. This workload could be a simple
$dockerrun, a Swarm Service, or a Kubernetes workload. As a simple
test, source a client bundle, and try running one of your signed images.
$ source env.sh
$ docker service create msr.example.com/admin/trustdemo:1
nqsph0n6lv9uzod4lapx0gwok
overall progress: 1 out of 1 tasks
1/1: running [==================================================>]
verify: Service converged
$ docker service ls
ID NAME MODE REPLICAS IMAGE PORTS
nqsph0n6lv9u laughing_lamarr replicated 1/1 msr.example.com/admin/trustdemo:1
Troubleshooting
If the image is stored in a private repository within MSR, you need to
pass credentials to the Orchestrator as there is no SSO between cluster
2 and MSR. See the relevant
Kubernetes
documentation for more details.
This means that the image was signed correctly, however the user who
signed the image does not meet the signing policy in cluster 2. This
could be because you signed the image with the wrong user keys.
MSR URL must be a registered trusted registry
Errorresponsefromdaemon:msr.example.commustbearegisteredtrustedregistry.See'docker run --help'.
Mirantis Secure Registry (MSR) uses a job queue to schedule batch jobs.
Jobs are added to a cluster-wide job queue, and then consumed and
executed by a job runner within MSR.
All MSR replicas have access to the job queue, and have a job runner
component that can get and execute work.
How it works
When a job is created, it is added to a cluster-wide job queue and
enters the waiting state. When one of the MSR replicas is ready to
claim the job, it waits a random time of up to 3 seconds to give
every replica the opportunity to claim the task.
A replica claims a job by adding its replica ID to the job. That way,
other replicas will know the job has been claimed. Once a replica claims
a job, it adds that job to an internal queue, which in turn sorts the
jobs by their scheduledAt time. Once that happens, the replica
updates the job status to running, and starts executing it.
The job runner component of each MSR replica keeps a
heartbeatExpiration entry on the database that is shared by all
replicas. If a replica becomes unhealthy, other replicas notice the
change and update the status of the failing worker to dead. Also,
all the jobs that were claimed by the unhealthy replica enter the
worker_dead state, so that other replicas can claim the job.
Job types
MSR runs periodic and long-running jobs. The following is a complete list of
jobs you can filter for via the user interface or the API.
Job types
Job
Description
gc
A garbage collection job that deletes layers associated with deleted
images.
onlinegc
A garbage collection job that deletes layers associated with deleted
images without putting the registry in read-only mode.
onlinegc_metadata
A garbage collection job that deletes metadata associated with deleted
images.
onlinegc_joblogs
A garbage collection job that deletes job logs based on a configured job
history setting.
metadatastoremigration
A necessary migration that enables the onlinegc feature.
sleep
Used for testing the correctness of the jobrunner. It sleeps for 60
seconds.
false
Used for testing the correctness of the jobrunner. It runs the false
command and immediately fails.
tagmigration
Used for synchronizing tag and manifest information between the MSR
database and the storage backend.
bloblinkmigration
A DTR 2.1 to 2.2 upgrade process that adds references for blobs to
repositories in the database.
license_update
Checks for license expiration extensions if online license updates are
enabled.
scan_check
An image security scanning job. This job does not perform the actual
scanning, rather it spawns scan_check_single jobs (one for each layer
in the image). Once all of the scan_check_single jobs are complete,
this job will terminate.
scan_check_single
A security scanning job for a particular layer given by the parameter:SHA256SUM. This job breaks up the layer into components and checks each
component for vulnerabilities.
scan_check_all
A security scanning job that updates all of the currently scanned images
to display the latest vulnerabilities.
update_vuln_db
A job that is created to update MSR’s vulnerability database. It uses an
Internet connection to check for database updates through
https://dss-cve-updates.docker.com/ and updates the
dtr-scanningstore container if there is a new update available.
scannedlayermigration
A DTR 2.4 to 2.5 upgrade process that restructures scanned image data.
push_mirror_tag
A job that pushes a tag to another registry after a push mirror policy
has been evaluated.
poll_mirror
A global cron that evaluates poll mirroring policies.
webhook
A job that is used to dispatch a webhook payload to a single endpoint.
nautilus_update_db
The old name for the update_vuln_db job. This may be visible on old
log files.
ro_registry
A user-initiated job for manually switching MSR into read-only mode.
tag_pruning
A job for cleaning up unnecessary or unwanted repository tags which can
be configured by repository admins.
Job status
Jobs can have one of the following status values:
Job values
Status
Description
waiting
Unclaimed job waiting to be picked up by a worker.
running
The job is currently being run by the specified workerID.
done
The job has successfully completed.
errors
The job has completed with errors.
cancel_request
The status of a job is monitored by the worker in the database. If the
job status changes to cancel_request, the job is canceled by the
worker.
cancel
The job has been canceled and ws not fully executed.
deleted
The job and its logs have been removed.
worker_dead
The worker for this job has been declared dead and the job will not
continue.
worker_shutdown
The worker that was running this job has been gracefully stopped.
worker_resurrection
The worker for this job has reconnected to the databases and will cancel
this job.
Audit jobs with the web interface
As of DTR 2.2, admins were able to view and audit jobs within the software
using the API. MSR 2.6 enhances those capabilities by adding a Job
Logs tab under System settings on the user interface. The tab
displays a sortable and paginated list of jobs along with links to associated
job logs.
Prerequisite
Job Queue
View jobs list
To view the list of jobs within MSR, do the following:
Navigate to https://<msr-url> and log in with your MKE
credentials.
Select System from the left-side navigation panel, and then
click Job Logs. You should see a paginated list of past,
running, and queued jobs. By default, Job Logs shows the latest
10 jobs on the first page.
Specify a filtering option. Job Logs lets you filter by:
Action
Worker ID (the ID of the worker in an MSR replica that is
responsible for running the job)
Optional: Click Edit Settings on the right of the filtering
options to update your Job Logs settings.
Job details
The following is an explanation of the job-related fields displayed in
Job Logs and uses the filtered online_gc action from above.
Jobs values
Job Detail
Description
Example
Action
The type of action or job being performed.
onlinegc
ID
The ID of the job.
ccc05646-569a-4ac4-b8e1-113111f63fb9
Worker
The ID of the worker node responsible for running the job.
8f553c8b697c
Status
Current status of the action or job.
done
Start Time
Time when the job started.
9/23/20187:04PM
Last updated
Time when the job was last updated.
9/23/20187:04PM
View Logs
Links to the full logs for the job.
[ViewLogs]
View job-specific logs
To view the log details for a specific job, do the following:
Click View Logs next to the job’s Last Updated
value. You will be redirected to the log detail page of your selected job.
Notice how the job ID is reflected in the URL while the
Action and the abbreviated form of the job ID are reflected
in the heading. Also, the JSON lines displayed are job-specific MSR
container logs.
Enter or select a different line count to truncate the number of
lines displayed. Lines are cut off from the end of the logs.
Audit jobs with the API
Overview
This covers troubleshooting batch jobs via the API and was introduced in DTR
2.2. Starting in MSR 2.6, admins have the ability to audit jobs using the web
interface.
Prerequisite
Job Queue
Job capacity
Each job runner has a limited capacity and will not claim jobs that
require a higher capacity. You can see the capacity of a job runner via
the GET/api/v0/workers endpoint:
If worker 000000000000 notices the jobs in waiting state above,
then it will be able to pick up jobs 0 and 2 since it has the
capacity for both. Job 1 will have to wait until the previous scan
job, 0, is completed. The job queue will then look like:
The schedule field uses a cron expression following the
(seconds)(minutes)(hours)(dayofmonth)(month)(dayofweek)
format. For example, 57543*** with cron ID
48875b1b-5006-48f5-9f3c-af9fbdd82255 will be run at 03:54:57 on
any day of the week or the month, which is 2017-02-22T03:54:57Z in
the example JSON response above.
Enable auto-deletion of job logs
Mirantis Secure Registry has a global setting for auto-deletion of job logs
which allows them to be removed as part of garbage collection. MSR admins can
enable auto-deletion of repository events in MSR 2.6 based on specified
conditions which are covered below.
In your browser, navigate to https://<msr-url> and log in with
your MKE credentials.
Select System on the left-side navigation panel, which will
display the Settings page by default.
Scroll down to Job Logs and turn on Auto-Deletion.
Specify the conditions with which a job log auto-deletion will be
triggered.
MSR allows you to set your auto-deletion conditions based on the
following optional job log attributes:
Name
Description
Example
Age
Lets you remove job logs which are older than your specified number
of hours, days, weeks or months
2months
Max number of events
Lets you specify the maximum number of job logs allowed within MSR.
100
If you check and specify both, job logs will be removed from MSR
during garbage collection if either condition is met. You should see
a confirmation message right away.
Click Start Deletion if you’re ready. Read more about
Garbage collection if you’re unsure
about this operation.
Navigate to System > Job Logs to confirm that
onlinegc_joblogs has started.
Note
When you enable auto-deletion of job logs, the logs will be
permanently deleted during garbage collection.
Manage users
Authentication and authorization in MSR
With MSR you get to control which users have access to your image
repositories.
By default, anonymous users can only pull images from public
repositories. They can’t create new repositories or push to existing
ones. You can then grant permissions to enforce fine-grained access
control to image repositories. For that:
Start by creating a user.
Users are shared across MKE and MSR. When you create a new user in
Docker Universal Control Plane, that user becomes available in MSR
and vice versa. Registered users can create and manage their own
repositories.
You can also integrate with an LDAP service to manage users from a
single place.
Extend the permissions by adding the user to a team.
To extend a user’s permission and manage their permissions over
repositories, you add the user to a team. A team defines the
permissions users have for a set of repositories.
Note
To monitor users login events, enable the auditAuthLogsEnabled parameter
in the /settings API endpoint:
When a user creates a repository, only that user can make changes to the
repository settings, and push new images to it.
Organizations take permission management one step further, since they
allow multiple users to own and manage a common set of repositories.
This is useful when implementing team workflows. With organizations you
can delegate the management of a set of repositories and user
permissions to the organization administrators.
An organization owns a set of repositories, and defines a set of teams.
With teams you can define fine-grain permissions that a team of user has
for a set of repositories.
In this example, the ‘Whale’ organization has three repositories and two
teams:
Members of the blog team can only see and pull images from the
whale/java repository,
Members of the billing team can manage the whale/golang repository,
and push and pull images from the whale/java repository.
Create and manage teams
You can extend a user’s default permissions by granting them individual
permissions in other image repositories, by adding the user to a team. A
team defines the permissions a set of users have for a set of
repositories.
To create a new team, go to the MSR web UI, and navigate to the
Organizations page. Then click the organization where you want
to create the team.
Navigate to the Teams tab, click the New team
button, and give the team a name.
Add users to a team
Once you have created a team, click the team name, to manage its
settings. The first thing we need to do is add users to the team. Click
the Add Member button and add users to the team.
Manage team permissions
The next step is to define the permissions this team has for a set of
repositories. Navigate to the Repositories tab, and click the Add
repository button.
Choose the repositories this team has access to, and what permission
levels the team members have.
Three permission levels are available:
Permission level
Description
Read only
View repository and pull images.
Read & Write
View repository, pull and push images.
Admin
Manage repository and change its settings, pull and push images.
Delete a team
If you’re an organization owner, you can delete a team in that
organization. Navigate to the Team, choose the Settings tab, and
click Delete.
Create and manage organizations
When a user creates a repository, only that user has permissions to make
changes to the repository.
For team workflows, where multiple users have permissions to manage a
set of common repositories, create an organization. By default, MSR has
one organization called ‘docker-datacenter’, that is shared between MSR
and MKE.
To create a new organization, navigate to the MSR web UI, and go to
the Organizations page.
Click the New organization button, and choose a meaningful name for
the organization.
Repositories owned by this organization will contain the organization
name, so to pull an image from that repository, you’ll use:
Click Save to create the organization, and then click the
organization to define which users are allowed to manage this
organization. These users will be able to edit the organization
settings, edit all repositories owned by the organization, and define
the user permissions for this organization.
For this, click the Add user button, select the users that you
want to grant permissions to manage the organization, and click
Save. Then change their permissions from ‘Member’ to Org Owner.
Permission levels
Mirantis Secure Registry allows you to define fine-grain permissions over
image repositories.
Administrators
Users are shared across MKE and MSR. When you create a new user in
Mirantis Kubernetes Engine, that user becomes available in MSR and
vice versa. When you create a trusted admin in MSR, the admin has
permissions to manage:
Users across MKE and MSR
MSR repositories and settings
MKE resources and settings
Team permission levels
With Teams you can define the repository permissions for a set of users (read,
read-write, and admin).
Repository operation
read
read-write
admin
View/browse
x
x
x
Pull
x
x
x
Push
x
x
Start a scan
x
x
Delete tags
x
x
Edit description
x
Set public or private
x
Manage user access
x
Delete repository
x
Note
Team permissions are additive. When a user is a member of multiple
teams, they have the highest permission level defined by those teams.
Overall permissions
Permission level
Description
Anonymous or unauthenticated Users
Can search and pull public repositories.
Authenticated Users
Can search and pull public repos, and create and manage their own
repositories.
Team Member
Everything a user can do, plus the permissions granted by the team the
user is a member of..
Organization Owner
Can manage repositories and teams for the organization.
Admin
Can manage anything across MKE and MSR.
Manage webhooks
You can configure MSR to automatically post event notifications to a
webhook URL of your choosing. This lets you build complex CI and CD
pipelines with your Docker images.
Webhook types
To subscribe to the webhook events for a repository or namespace you must have
admin rights for the particular component.
For example, a “foo/bar” repository admin may subscribe to its tag push
events, whereas an MSR admin can subscribe to any event.
Event type
Scope
Access level
Availability
Tag pushed to repository
TAG_PUSH
Individual repositories
Repository admin
Web UI and API
Tag pulled from repository
TAG_PULL
Individual repositories
Repository admin
Web UI and API
Tag deleted from repository
TAG_DELETE
Individual repositories
Repository admin
Web UI and API
Manifest pushed to repository
MANIFEST_PUSH
Individual repositories
Repository admin
Web UI and API
Manifest pulled from repository
MANIFEST_PULL
Individual repositories
Repository admin
Web UI and API
Manifest deleted from repository
MANIFEST_DELETE
Individual repositories
Repository admin
Web UI and API
Security scan completed
SCAN_COMPLETED
Individual repositories
Repository admin
Web UI and API
Security scan failed
SCAN_FAILED
Individual repositories
Repository admin
Web UI and API
Image promoted from repository
PROMOTION
Individual repositories
Repository admin
Web UI and API
Image mirrored from repository
PUSH_MIRRORING
Individual repositories
Repository admin
Web UI and API
Image mirrored from remote repository
POLL_MIRRORING
Individual repositories
Repository admin
Web UI and API
Repository created, updated, or deleted
REPO_CREATED
REPO_UPDATED
REPO_DELETED
Namespace, organizations
Namespace, organization owners
API only
Security scanner update completed
SCANNER_UPDATE_COMPLETED
Global
MSR admin
API only
Manage repository webhooks using web UI
You must have admin privileges to the repository to create a webhook
or edit any aspect of an existing webhook.
Create a webhook for your repository
In your browser, navigate to https://<msr-url> and log in with
your credentials.
Select Repositories from the left-side navigation panel, and
then click the name of the repository that you want to view. Note that
you will have to click the repository name following the / after the
specific namespace for your repository.
Select the Webhooks tab, and click New Webhook.
From the drop-down list, select the event that will trigger the
webhook.
Set the URL that will receive the JSON payload.
Validate the integration by clicking the Test button
next to the Webhook URL field.
If the integration is working, you will receive a JSON payload at the URL
you specified for the event type notification you selected.
Paste the TLS certificate associated with your webhook URL into the
TLS Cert field.
Note
For testing purposes, you can test your TLS certificate over HTTP
rather than HTTPS.
Click Create to save the webhook. Once saved, your webhook is
active and starts sending POST notifications whenever your selected event
type is triggered.
As a repository admin, you can add or delete a webhook at any point.
Additionally, you can create, view, and delete webhooks for your
organization or trusted registry using the API.
Manage repository webhooks using API
Triggering notifications
Refer to Webhook types for a list of events that can trigger
notifications through the API.
From the MSR web interface, click API on the bottom left-side
navigation panel to explore the API resources and endpoints. Click
Execute to send your API request.
Your MSR hostname serves as the base URL for your API requests.
API curl requests
Use curl to send HTTP or HTTPS API requests. Note that you must
specify skipTLSVerification:true on your request to test the
webhook endpoint over HTTP.
The namespace/organization or repo to subscribe to. For
example, foo/bar to subscribe to pushes to the bar repository
within the namespace/organization foo.
endpoint
The URL to send the JSON payload to.
You must supply a “key” to scope a particular webhook event
to a repository or a namespace/organization.
If you are an MSR admin, you can omit the “key”, in which case a POST event
notification of the specified type will be triggered for all MSR repositories
and namespaces.
Receive a payload
When your specified event type occurs, MSR will send a POST request
to the given endpoint with a JSON-encoded payload that has the following
wrapper:
Applies to the event type received at the specified
subscription endpoint.
contents
Refers to the payload of the event itself. Each event is
different, therefore the structure of the JSON object in contents
will change depending on the event type. Refer to
Manage content structure using API for more details.
Test payload subscriptions
Before subscribing to an event, you can view and test your endpoints
using fake data. To send a test payload, send a POST request to
/api/v0/webhooks/test with the following payload:
Change type to the event type that you want to receive. MSR will
then send an example payload to your specified endpoint. The example
payload sent is always the same.
Manage content structure using API
Comments after (//) are for informational purposes only, and the
example payloads have been clipped for brevity.
To view the subscriptions for a resource you must first have admin rights for
that resource. After which, you can send requests for all subscriptions from a
particular API endpoint. The response will include data for all resource users.
To view all webhook subscriptions for a repository, run:
To view all webhook subscriptions for a namespace/organization, run:
GET/api/v0/repositories/{namespace}/webhooks
Delete a subscription
You can delete a subscription if you are an MSR repository admin or an
admin of the resource associated with the event subscription. Regular users,
however, can only delete subscriptions for the repositories they manage.
To delete a webhook subscription, send a DELETE/api/v0/webhooks/{id}
request, replacing {id} with the ID of the webhook subscription you intend
to delete.
Manage repository events
Audit repository events
Starting in DTR 2.6, each repository page includes an Activity tab
which displays a sortable and paginated list of the most recent events within
the repository. This offers better visibility along with the ability to audit
events. Event types listed vary according to your repository
permission level. Additionally, MSR admins can enable auto-deletion
of repository events as part of maintenance and cleanup.
In the following section, we will show you how to view and audit the
list of events in a repository. We will also cover the event types
associated with your permission level.
View List of Events
As of DTR 2.3, admins were able to view a list of MSR events using the API. MSR
2.6 enhances that feature by showing a permission-based events list for each
repository page on the web interface. To view the list of events within a
repository, do the following:
Navigate to https://<msr-url> and log in with your MSR credentials.
Select Repositories from the left-side navigation panel, and
then click on the name of the repository that you want to view. Note that
you will have to click on the repository name following the / after the
specific namespace for your repository.
Select the Activity tab. You should see a paginated list of the
latest events based on your repository permission level. By default,
Activity shows the latest 10 events and excludes pull
events, which are only visible to repository and MSR admins.
If you’re a repository or an MSR admin, uncheck Exclude pull
to view pull events. This should give you a better understanding of who
is consuming your images.
To update your event view, select a different time filter from the
drop-down list.
Activity Stream
The following table breaks down the data included in an event and uses
the highlighted CreatePromotionPolicy event as an example.
Event detail
Description
Example
Label
Friendly name of the event.
CreatePromotionPolicy
Repository
This will always be the repository in review following the
<user-or-org>/<repository_name> convention outlined in
Create a repository
test-org/test-repo-1
Tag
Tag affected by the event, when applicable.
test-org/test-repo-1:latest where latest is the affected tag
SHA
The digest value for ``CREATE` operations such as creating a new image
tag or a promotion policy.
sha256:bbf09ba3
Type
Event type. Possible values are: CREATE, GET, UPDATE,
DELETE, SEND, FAIL and SCAN.
CREATE
Initiated by
The actor responsible for the event. For user-initiated events, this
will reflect the user ID and link to that user’s profile. For image
events triggered by a policy – pruning, pull / push mirroring, or
promotion – this will reflect the relevant policy ID except for manual
promotions where it reflects PROMOTIONMANUAL_P, and link to the
relevant policy page. Other event actors may not include a link.
PROMOTIONCA5E7822
Date and Time
When the event happened in your configured time zone.
20189:59PM
Event Audits
Given the level of detail on each event, it should be easy for MSR and
security admins to determine what events have taken place inside of MSR.
For example, when an image which shouldn’t have been deleted ends up
getting deleted, the security admin can determine when and who initiated
the deletion.
Event Permissions
Repository event
Description
Minimum permission level
Push
Refers to CreateManifest and UpdateTag events. Learn more
about pushing images.
Authenticated users
Scan
Requires security scanning to be set
up by an MSR admin.
Once enabled, this will display as a SCAN event type.
Authenticated users
Promotion
Refers to a CreatePromotionPolicy event which links to the
Promotions tab of the repository where you can edit
the existing promotions. See Promotion Policies for different ways to promote
an image.
Repository admin
Delete
Refers to “Delete Tag” events. Learn more about Delete images.
Authenticated users
Pull
Refers to “Get Tag” events. Learn more about Pull an image.
Mirantis Secure Registry has a global setting for repository event
auto-deletion. This allows event records to be removed as part of garbage
collection. MSR administrators can enable auto-deletion of repository
events in DTR 2.6 based on specified conditions which are covered below.
In your browser, navigate to https://<msr-url> and log in with your
admin credentials.
Select System from the left-side navigation panel, which
displays the Settings page by default.
Scroll down to Repository Events and turn on
Auto-Deletion.
Specify the conditions with which an event auto-deletion will be triggered.
MSR allows you to set your auto-deletion conditions based on the following
optional repository event attributes:
Name
Description
Example
Age
Lets you remove events older than your specified number of hours, days,
weeks or months.
2months
Max number of events
Lets you specify the maximum number of events allowed in the
repositories.
6000
If you check and specify both, events in your repositories will be removed
during garbage collection if either condition is met. You should see a
confirmation message right away.
Click Start Deletion if you are ready.
Navigate to System > Job Logs to confirm that
onlinegc_events has happened.
Mirantis Secure Registry allows you to automatically promote and mirror
images based on a policy. In MSR 2.7, you have the option to promote
applications with the experimental docker app CLI addition. Note that
scanning-based promotion policies do not take effect until all
application-bundled images have been scanned. This way you can create a
Docker-centric development pipeline.
You can mix and match promotion policies, mirroring policies, and
webhooks to create flexible development pipelines that integrate with
your existing CI/CD systems.
Promote an image using policies
One way to create a promotion pipeline is to automatically promote
images to another repository.
You start by defining a promotion policy that’s specific to a
repository. When someone pushes an image to that repository, MSR checks
if it complies with the policy you set up and automatically pushes the
image to another repository.
You can also promote images between different MSR deployments. This not
only allows you to create promotion policies that span multiple MSRs,
but also allows you to mirror images for security and high availability.
You start by configuring a repository with a mirroring policy. When
someone pushes an image to that repository, MSR checks if the policy is
met, and if so pushes it to another MSR deployment or Docker Hub.
Another option is to mirror images from another MSR deployment. You
configure a repository to poll for changes in a remote repository. All
new images pushed into the remote repository are then pulled into MSR.
This is an easy way to configure a mirror for high availability since
you won’t need to change firewall rules that are in place for your
environments.
Mirantis Secure Registry allows you to create image promotion pipelines
based on policies.
In this example we will create an image promotion pipeline such that:
Developers iterate and push their builds to the dev/website
repository.
When the team creates a stable build, they make sure their image is
tagged with -stable.
When a stable build is pushed to the dev/website repository, it
will automatically be promoted to qa/website so that the QA team
can start testing.
With this promotion policy, the development team doesn’t need access to
the QA repositories, and the QA team doesn’t need access to the
development repositories.
Configure your repository
Once you’ve created a repository, navigate to the
repository page on the MSR web interface, and select the Promotions tab.
Note
Only administrators can globally create and edit promotion policies.
By default users can only create and edit promotion policies on
repositories within their user namespace.
Click New promotion policy, and define the image promotion
criteria.
MSR allows you to set your promotion policy based on the following image
attributes:
Image attributes
Name
Description
Example
Tag name
Whether the tag name equals, starts with, ends with, contains, is one
of, or is not one of your specified string values
Promote to Target if Tag name ends in stable
Component
Whether the image has a given component and the component name equals,
starts with, ends with, contains, is one of, or is not one of your
specified string values
Promote to Target if Component name starts with b
Vulnerabilities
Whether the image has vulnerabilities – critical, major, minor,
or all – and your selected vulnerability filter is greater than or
equals, greater than, equals, not equals, less than or equals, or less
than your specified number
Promote to Target if Critical vulnerabilities = 3
Note
Only integer values are supported.
License
Whether the image uses an intellectual property license and is one of
or not one of your specified words
Promote to Target if License name = docker
Now you need to choose what happens to an image that meets all the
criteria.
Select the target organization or namespace and repository
where the image is going to be pushed. You can choose to keep the image
tag, or transform the tag into something more meaningful in the
destination repository, by using a tag template.
In this example, if an image in the dev/website is tagged with a
word that ends in “stable”, MSR will automatically push that image to
the qa/website repository. In the destination repository the image
will be tagged with the timestamp of when the image was promoted.
Everything is set up! Once the development team pushes an image that
complies with the policy, it automatically gets promoted. To confirm,
select the Promotions tab on the dev/website repository.
You can also review the newly pushed tag in the target repository by
navigating to qa/website and selecting the Tags tab.
Mirantis Secure Registry allows you to create mirroring policies for a
repository. When an image gets pushed to a repository and meets the
mirroring criteria, MSR automatically pushes it to a repository in a
remote Mirantis Secure Registry or Hub registry.
This not only allows you to mirror images but also allows you to create
image promotion pipelines that span multiple MSR deployments and
datacenters.
Available since MSR 3.1.8
Similarly, Helm charts can also be mirrored between MSR instances.
This capability ensures consistent availability and management of Helm charts
across multiple MSR environments. Furthermore, Helm charts can be mirrored
and pushed to Docker Hub repositories, which enables integration with external
sources.
Create a mirroring policy
In this example we will create an image mirroring policy such that:
Developers iterate and push their builds to
msr-example.com/dev/website the repository in the MSR
deployment dedicated to development.
When the team creates a stable build, they make sure their image is
tagged with -stable.
When a stable build is pushed to msr-example.com/dev/website, it
will automatically be pushed to qa-example.com/qa/website,
mirroring the image and promoting it to the next stage of
development.
With this mirroring policy, the development team does not need access to
the QA cluster, and the QA team does not need access to the development
cluster.
You need to have permissions to push to the destination repository in
order to set up the mirroring policy.
Configure your repository connection
Once you have created a repository, navigate to
the repository page on the web interface, and select the Mirrors
tab.
Click New mirror to define where the image will be pushed if it
meets the mirroring criteria.
Under Mirror direction, choose Push to remote registry.
Specify the following details:
Field
Description
Registry type
You can choose between Mirantis Secure Registry and
Docker Hub. If you choose MSR, enter your MSR URL.
Otherwise, Docker Hub defaults to
https://index.docker.io
Username and password or access token
Your credentials in the remote repository you wish to push to.
To use an access token instead of your password, see
authentication token.
Repository
Enter the namespace and the repository_name after the /
Show advanced settings
Enter the TLS details for the remote repository or check
Skip TLS verification. If the MSR remote repository is
using self-signed TLS certificates or certificates signed by your own
certificate authority, you also need to provide the public key
certificate for that CA. You can retrieve the certificate by accessing
https://<msr-domain>/ca. Remote certificate authority
is optional for a remote repository in Docker Hub.
Note
Make sure the account you use for the integration has
permissions to write to the remote repository.
Click Connect to test the integration.
In this example, the image gets pushed to the qa/example repository
of an MSR deployment available at qa-example.com using a service
account that was created just for mirroring images between repositories.
Next, set your push triggers. MSR allows you to set your mirroring
policy based on the following image attributes:
Name
Description
Example
Tag name
Whether the tag name equals, starts with, ends with, contains, is one
of, or is not one of your specified string values
Copy image to remote repository if Tag name ends in stable
Component
Whether the image has a given component and the component name equals,
starts with, ends with, contains, is one of, or is not one of your
specified string values
Copy image to remote repository if Component name starts with b
Vulnerabilities
Whether the image has vulnerabilities – critical, major, minor,
or all – and your selected vulnerability filter is greater than or
equals, greater than, equals, not equals, less than or equals, or less
than your specified number
Copy image to remote repository if Critical vulnerabilities = 3
License
Whether the image uses an intellectual property license and is one of
or not one of your specified words
Copy image to remote repository if License name = docker
You can choose to keep the image tag, or transform the tag into
something more meaningful in the remote registry by using a tag
template.
In this example, if an image in the dev/website repository is tagged
with a word that ends in stable, MSR will automatically push that
image to the MSR deployment available at qa-example.com. The image
is pushed to the qa/example repository and is tagged with the
timestamp of when the image was promoted.
Everything is set up! Once the development team pushes an image that
complies with the policy, it automatically gets promoted to
qa/example in the remote trusted registry at qa-example.com.
Metadata persistence
When an image is pushed to another registry using a mirroring policy,
scanning and signing data is not persisted in the destination
repository.
If you have scanning enabled for the destination repository, MSR is
going to scan the image pushed. If you want the image to be signed, you
need to do it manually.
Mirantis Secure Registry allows you to set up a mirror of a repository by
constantly polling it and pulling new image tags as they are pushed.
This ensures your images are replicated across different registries for
high availability. It also makes it easy to create a development
pipeline that allows different users access to a certain image without
giving them access to everything in the remote registry.
To mirror a repository, start by
creating a repository in the MSR deployment that
will serve as your mirror. Previously, you were only able to set up pull
mirroring from the API. Starting in DTR 2.6, you can also mirror and pull
from a remote MSR or Docker Hub repository.
Available since MSR 3.1.8
In addition to mirroring images, Helm charts can also be mirrored between
MSR instances. This capability ensures consistent availability and management
of Helm charts across multiple MSR environments. Furthermore, MSR supports
the mirroring and pulling of Helm charts from Docker Hub repositories,
which enables integration with external sources.
Pull mirroring on the web interface
To get started, navigate to https://<msr-url> and log in with your
MKE credentials.
Select Repositories in the left-side navigation panel, and then
click on the name of the repository that you want to view. Note that you will
have to click on the repository name following the / after the specific
namespace for your repository.
Next, select the Mirrors tab and click New mirror.
On the New mirror page, choose
Pull from remote registry.
Specify the following details:
Field
Description
Registry type
You can choose between Mirantis Secure Registry and
Docker Hub. If you choose MSR, enter your MSR URL.
Otherwise, Docker Hub defaults to
https://index.docker.io
Username and password or access token
Your credentials in the remote repository you wish to poll from.
To use an access token instead of your password, see
authentication token.
Repository
Enter the namespace and the repository_name after the /
Show advanced settings
Enter the TLS details for the remote repository or check
SkipTLSverification. If the MSR remote repository is using
self-signed certificates or certificates signed by your own certificate
authority, you also need to provide the public key certificate for that
CA. You can retrieve the certificate by accessing
https://<msr-domain>/ca. Remote certificate authority
is optional for a remote repository in Docker Hub.
After you have filled out the details, click Connect to test the
integration.
Once you have successfully connected to the remote repository, new
buttons appear:
Click Save to mirror future tag, or;
To mirror all existing and future tags, click Save & Apply
instead.
Pull mirroring on the API
There are a few different ways to send your MSR API requests. To explore
the different API resources and endpoints from the web interface, click
API on the bottom left-side navigation panel.
Click Try it out and enter your HTTP request details.
namespace and reponame refer to the repository that will be poll
mirrored. The boolean field, initialEvaluation, corresponds to
Save when set to false and will only mirror images created
after your API request. Setting it to true corresponds to
Save & Apply which means all tags in the remote repository will
be evaluated and mirrored. The other body parameters correspond to the
relevant remote repository details that you can see on the MSR web
interface. As a best practice,
use a service account just for this purpose. Instead of providing the
password for that account, you should pass an authentication
token.
If the MSR remote repository is using self-signed certificates or
certificates signed by your own certificate authority, you also need to
provide the public key certificate for that CA. You can get it by
accessing https://<msr-domain>/ca. The remoteCA field is
optional for mirroring a Docker Hub repository.
Click Execute. On success, the API returns an HTTP201
response.
Review the poll mirror job log
Once configured, the system polls for changes in the remote repository
and runs the poll_mirror job every 15 minutes. On success, the
system will pull in new images and mirror them in your local repository.
Starting in DTR 2.6, you can filter for poll_mirror jobs to review
when it was last ran. To manually trigger the job and force pull
mirroring, use the POST/api/v0/jobs API endpoint and specify
poll_mirror as your action.
When defining promotion policies you can use templates to dynamically
name the tag that is going to be created.
Important
Whenever an image promotion event occurs, the MSR timestamp for the event
is in UTC (Coordinated Universal Time). That timestamp, however, is converted
by the browser and presents in the user’s time zone. Inversely, if a
time-based tag is applied to a target image, MSR captures it in UTC but
cannot convert it to the user’s timezone due to the tags being immutable
strings.
You can use these template keywords to define your new tag:
Template
Description
Example result
%n
The tag to promote
1, 4.5, latest
%A
Day of the week
Sunday, Monday
%a
Day of the week, abbreviated
Sun, Mon, Tue
%w
Day of the week, as a number
0, 1, 6
%d
Number for the day of the month
01, 15, 31
%B
Month
January, December
%b
Month, abbreviated
Jan, Jun, Dec
%m
Month, as a number
01, 06, 12
%Y
Year
1999, 2015, 2048
%y
Year, two digits
99, 15, 48
%H
Hour, in 24 hour format
00, 12, 23
%I
Hour, in 12 hour format
01, 10, 10
%p
Period of the day
AM, PM
%M
Minute
00, 10, 59
%S
Second
00, 10, 59
%f
Microsecond
000000, 999999
%Z
Name for the timezone
UTC, PST, EST
%j
Day of the year
001, 200, 366
%W
Week of the year
00, 10, 53
Use Helm charts
Helm is a tool that manages Kubernetes packages called charts, which are
put to use in defining, installing, and upgrading Kubernetes applications.
These charts, in conjunction with Helm tooling, deploy applications
into Kubernetes clusters. Charts are comprised of a collection of files and
directories, arranged in a particular structure and packaged as a .tgz
file. Charts define Kubernetes objects, such as the Service
and DaemonSet objects used in the application under deployment.
MSR enables you to use Helm to store and serve Helm charts,
thus allowing users to push charts to and pull charts from MSR
repositories using the Helm CLI and the MSR API.
Available since MSR 3.1.8
Helm charts can be mirrored between MSR instances, thus ensuring consistent
availability and management across multiple environments. Furthermore, MSR
supports the pulling and pushing of Helm charts between its instances, as well
as the mirroring of Helm charts between MSR and external repositories, such
as Docker Hub.
Note
To obtain the CA certificate required by the Helm charts commands, navigate
to https://<msr-url>/ca and download the certificate, or run:
curl-skhttps://<msr-url>/ca>ca.crt
MSR supports both Helm v2 and v3. The two versions differ significantly with
regard to the Helm CLI, which affects the applications under deployment rather
than Helm chart support in MSR. One key difference is that while Helm v2
includes both the Helm CLI and Tiller (Helm Server), Helm v3 includes only the
Helm CLI. Helm charts (referred to as releases following their installation
in Kubernetes) are managed by Tiller in Helm v2 and by Helm CLI in Helm v3.
Though the Helm CLI can be used to pull a Helm chart by itself or a Helm
chart and its provenance file, it is not possible to use the Helm CLI to
pull a provenance file by itself.
Pull a chart
Use the helmpull CLI command to pull a Helm chart:
To push a Helm chart using the Helm CLI, first install the helmcm-pushplugin from chartmuseum/helm-push. It is not possible to push
a provenance file using the Helm CLI. For detailed guidance on advanced
configuration options and additional parameters, consult the
plugin’s official documentation.
Use the helmpush CLI command to push a Helm chart:
Use the MSR web UI to view the MSR Helm repository charts.
In the MSR web UI, navigate to Repositories.
Click the name of the repository that contains the charts you want to view.
The page will refresh to display the detail for the selected Helm
repository.
Click the Charts tab. The page will refresh to display
all the repository charts.
View
UI sequence
Chart versions
Click the View Chart button associated with the required
Helm repository.
Chart description
Click the View Chart button associated with the required
Helm repository.
Click the View Chart button for the particular chart
version.
Default values
Click the View Chart button associated with the required
Helm repository.
Click the View Chart button for the particular chart
version.
Click Configuration.
Chart templates
Click the View Chart button associated with the required
Helm repository.
Click the View Chart button for the particular chart
version.
Click Template.
Delete charts from a Helm repository
You can only delete charts from MSR Helm repositories using the MSR API, not
the web UI.
To delete a version of a particular chart from a Helm repository through the
MSR API:
Helm chart linting can ensure that Kubernetes YAML files and Helm charts
adhere to a set of best practices, with a focus on production readiness and
security.
A set of established rules forms the basis of Helm chart linting. The process
generates a report that you can use to take any necessary actions.
Implement Helm linting
Perform Helm linting using either the MSR web UI or the MSR API.
Helm linting with the web UI
Open the MSR web UI.
Navigate to Repositories.
Click the name of the repository that contains the chart you want to lint.
Click the Charts tab.
Click the View Chart button associated with the required Helm
chart.
Click the View Chart button for the required chart version.
Click the Linting Summary tab.
Click the Lint Chart button to generate a Helm chart linting
report.
Indicates when deployments use the deprecated serviceAccount field.
Use the serviceAccountName field instead.
drop-net-raw-capability
Indicates when containers do not drop NET_RAW capability.
NET_RAW makes it so that an application within the container is able
to craft raw packets, use raw sockets, and bind to any address. Remove
this capability in the containers under containerssecuritycontexts.
env-var-secret
Indicates when objects use a secret in an environment variable.
Do not use raw secrets in environment variables. Instead, either mount
the secret as a file or use a secretKeyRef. Refer to Using Secrets
for details.
mismatching-selector
Indicates when deployment selectors fail to match the pod template
labels.
Confirm that your deployment selector correctly matches the labels in
its pod template.
no-anti-affinity
Indicates when deployments with multiple replicas fail to specify
inter-pod anti-affinity, to ensure that the orchestrator attempts to
schedule replicas on different nodes.
Specify anti-affinity in your pod specification to ensure that the
orchestrator attempts to schedule replicas on different nodes. Using
podAntiAffinity, specify a labelSelector that matches pods for
the deployment, and set the topologyKey to
kubernetes.io/hostname. Refer to Inter-pod affinity and anti-affinity
for details.
no-extensions-v1beta
Indicates when objects use deprecated API versions under extensions/v1beta.
Indicates when deployments expose port 22, which is commonly reserved
for SSH access.
Ensure that non-SSH services are not using port 22. Confirm that any
actual SSH servers have been vetted.
unset-cpu-requirements
Indicates when containers do not have CPU requests and limits set.
Set CPU requests and limits for your container based on its
requirements. Refer to Requests and limits
for details.
unset-memory-requirements
Indicates when containers do not have memory requests and limits set.
Set memory requests and limits for your container based on its
requirements. Refer to Requests and limits
for details.
writable-host-mount
Indicates when containers mount a host path as writable.
Set containers to mount host paths as readOnly, if you need to
access files on the host.
cluster-admin-role-binding
CIS Benchmark 5.1.1 Ensure that the cluster-admin role is only used
where required.
Create and assign a separate role that has access to specific
resources/actions needed for the service account.
docker-sock
Alert on deployments with docker.sock mounted in containers.
Ensure the Docker socket is not mounted inside any containers by
removing the associated Volume and VolumeMount in deployment
yaml specification. If the Docker socket is mounted inside a container
it could allow processes running within the container to execute Docker
commands which would effectively allow for full control of the host.
exposed-services
Alert on services for forbidden types.
Ensure containers are not exposed through a forbidden service type such
as NodePort or LoadBalancer.
host-ipc
Alert on pods/deployment-likes with sharing host’s IPC namespace.
Ensure the host’s IPC namespace is not shared.
host-network
Alert on pods/deployment-likes with sharing host’s network namespace.
Ensure the host’s network namespace is not shared.
host-pid
Alert on pods/deployment-likes with sharing host’s process namespace.
Ensure the host’s process namespace is not shared.
privilege-escalation-container
Alert on containers if allowing privilege escalation that could gain
more privileges than its parent process.
Alert on deployments with privileged ports mapped in containers.
Ensure privileged ports [0, 1024] are not mapped within
containers.
sensitive-host-mounts
Alert on deployments with sensitive host system directories mounted in containers.
Ensure sensitive host system directories are not mounted in containers
by removing those Volumes and VolumeMounts.
unsafe-proc-mount
Alert on deployments with unsafe /proc mount
(procMount=Unmasked) that will bypass the default masking behavior
of the container runtime.
Ensure container does not unsafely exposes parts of /proc by setting
procMount=Default. Unmasked ProcMount bypasses the default
masking behavior of the container runtime. See Pod Security Standards
for more details.
unsafe-sysctls
Alert on deployments specifying unsafe sysctls that may lead to
severe problems like wrong behavior of containers.
For the following endpoints, note that while the Swagger API Reference
does not specify example responses for HTTP 200 codes,
this is due to a Swagger bug and responses will be returned.
# Get chart or provenance file from repoGEThttps://<msrhost>/charts/<namespace>/<reponame>/<chartname>/<filename># Template a chart versionGEThttps://<msrhost>/charts/api/<namespace>/<reponame>/charts/<chartname>/<chartversion>/template
Chart storage limit
Users can safely store up to 100,000 charts per repository; storing a greater
number may compromise some MSR functionality.
Tag pruning
Tag pruning is the process of cleaning up unnecessary or unwanted repository
tags. As of v2.6, you can configure the Mirantis Secure Registry (MSR) to
automatically perform tag pruning on repositories that you manage by:
Specifying a tag pruning policy or alternatively,
Setting a tag limit
Note
When run, tag pruning only deletes a tag and does not carry out any
actual blob deletion.
Known Issue
While the tag limit field is disabled when you turn on immutability for a
new repository, this is currently not the case with Repository Settings. As
a workaround, turn off immutability when setting a tag limit via
Repository Settings > Pruning.
In the following section, we will cover how to specify a tag pruning
policy and set a tag limit on repositories that you manage. It will not
include modifying or deleting a tag pruning policy.
Specify a tag pruning policy
As a repository administrator, you can now add tag pruning policies on
each repository that you manage. To get started, navigate to
https://<msr-url> and log in with your credentials.
Select Repositories in the left-side navigation panel, and then
click on the name of the repository that you want to update. Note that you will
have to click on the repository name following the / after the specific
namespace for your repository.
Select the Pruning tab, and click New pruning policy
to specify your tag pruning criteria:
MSR allows you to set your pruning triggers based on the following image
attributes:
Image attributes
Name
Description
Example
Tag name
Whether the tag name equals, starts with, ends with, contains, is one
of, or is not one of your specified string values
Tag name = test`
Component name
Whether the image has a given component and the component name equals,
starts with, ends with, contains, is one of, or is not one of your
specified string values
Component name starts with b
Vulnerabilities
Whether the image has vulnerabilities – critical, major, minor, or
all – and your selected vulnerability filter is greater than or equals,
greater than, equals, not equals, less than or equals, or less than
your specified number
Critical vulnerabilities = 3
License
Whether the image uses an intellectual property license and is one of
or not one of your specified words
License name = docker
Last updated at
Whether the last image update was before your specified number of
hours, days, weeks, or months. For details on valid time units, see
Go’s ParseDuration function
Last updated at: Hours = 12
Specify one or more image attributes to add to your pruning criteria,
then choose:
Prune future tags to save the policy and apply your selection to
future tags. Only matching tags after the policy addition will be
pruned during garbage collection.
Prune all tags to save the policy, and evaluate both existing and
future tags on your repository.
Upon selection, you will see a confirmation message and will be
redirected to your newly updated Pruning tab.
If you have specified multiple pruning policies on the repository, the
Pruning tab will display a list of your prune triggers and
details on when the last tag pruning was performed based on the trigger,
a toggle for deactivating or reactivating the trigger, and a
View link for modifying or deleting your selected trigger.
All tag pruning policies on your account are evaluated every 15 minutes.
Any qualifying tags are then deleted from the metadata store. If a tag
pruning policy is modified or created, then the tag pruning policy for
the affected repository will be evaluated.
Set a tag limit
In addition to pruning policies, you can also set tag limits on
repositories that you manage to restrict the number of tags on a given
repository. Repository tag limits are processed in a first in first out
(FIFO) manner. For example, if you set a tag limit of 2, adding a third
tag would push out the first.
To set a tag limit, do the following:
Select the repository that you want to update and click the
Settings tab.
Turn off immutability for the repository.
Specify a number in the Pruning section and click
Save. The Pruning tab will now display your tag
limit above the prune triggers list along with a link to modify this
setting.
Image enforcement policies and monitoring
MSR users can automatically block clients from pulling images stored in the
registry by configuring enforcement policies at either the global or repository
level.
An enforcement policy is a collection of rules used to determine whether an
image can be pulled.
A good example of a scenario in which an enforcement policy can be useful is
when an administrator wants to house images in MSR but does not want those
images to be pulled into environments by MSR users. In this case, the
administrator would configure an enforcement policy either at the global or
repository level based on a selected set of rules.
Enforcement policies: global versus repository
Global image enforcement policies differ from those set at the repository level
in several important respects:
Whereas both administrators and regular users can set up enforcement policies
at the repository level, only administrators can set up enforcement
policies at the global level.
Only one global enforcement policy can be set for each MSR instance, whereas
multiple enforcement policies can be configured at the repository level.
Global enforcement policies are evaluated prior to repository policies.
Enforcement policy rule attributes
Global and repository enforcement policies are generated from the same set of
rule attributes.
Note
Images must comply with all the enforcement policy rules to be pulled.
If any rule evaluates to false, the system blocks image pull.
This requirement also applies to tags associated with an image digest.
All tags must meet all the enforcement policy rules for an image digest they
refer to.
Rule attributes
Name
Filters
Example
Tag name
equals
startswith
endswith
contains
oneof
notoneof
Tag name starts with dev
Component name
equals
startswith
endswith
contains
oneof
notoneof
Component name starts with b
All CVSS 3 vulnerabilities
greaterthanorequals
greaterthan
equals
notequals
lessthanorequals
lessthan
All CVSS 3 vulnerabilities less than 3
Critical CVSS 3 vulnerabilities
greaterthanorequals
greaterthan
equals
notequals
lessthanorequals
lessthan
Critical CVSS vulnerabilities less than 3
High CVSS 3 vulnerabilities
greaterthanorequals
greaterthan
equals
notequals
lessthanorequals
lessthan
High CVSS 3 vulnerabilities less than 3
Medium CVSS 3 vulnerabilities
greaterthanorequals
greaterthan
equals
notequals
lessthanorequals
lessthan
Medium CVSS 3 vulnerabilities less than 3
Low CVSS 3 vulnerabilities
greaterthanorequals
greaterthan
equals
notequals
lessthanorequals
lessthan
Low CVSS 3 vulnerabilities less than 3
License name
oneof
notoneof
License name one of msr
Last updated at
before
Last updated at before 12hours
Configure enforcement policies
Use the MSR web UI to set up enforcement policies for both repository and
global enforcement.
Set up repository enforcement
Important
Users can only create and edit enforcement policies for repositories
within their user namespace.
To set up a repository enforcement policy using the MSR web UI:
Log in to the MSR web UI.
Navigate to Repositories.
Select the repository to edit.
Click the Enforcement tab and select New enforcement
policy.
Define the enforcement policy rules with the desired rule attributes and
select Save. The screen displays the new enforcement policy in
the Enforcement tab. By default, the new enforcement policy is
toggled on.
Once a repository enforcement policy is set up and activated, pull requests
that do not satisfy the policy rules will return the following error message:
Only administrators can set up global enforcement policies.
To set up a global enforcement policy using the MSR web UI:
Log in to the MSR web UI.
Navigate to System.
Select the Enforcement tab.
Confirm that the global enforcement function is Enabled.
Define the enforcement policy rules with the desired criteria and select
Save.
Once the global enforcement policy is set up, pull requests against any
repository that do not satisfy the policy rules will return the following
error message:
Administrators and users can monitor enforcement activity in the MSR web UI.
Important
Enforcement events can only be monitored at the repository level. It is not
possible, for example, to view in one location all enforcement events that
correspond to the global enforcement policy.
Navigate to Repositories.
Select the repository whose enforcement activity you want to review.
Select the Activity tab to view enforcement event activity. For
instance you can:
Identify which policy triggered an event using the enforcement ID
displayed on the event entry. (The enforcement IDs for each enforcement
policy are located on the Enforcement tab.)
Identify the user responsible for making a blocked pull request, and the
time of the event.
Upgrade MSR
MSR uses semantic versioning. While downgrades are not supported, Mirantis
supports upgrades according to the following rules:
When upgrading from one patch version to another, you can skip patch
versions because no data migration is performed for patch versions.
When upgrading between minor versions, you cannot skip versions, however
you can upgrade from any patch version of the previous minor version to any
patch version of the current minor version.
When upgrading between major versions, make sure to upgrade one major
version at a time - and also to upgrade to the earliest available minor
version. It is strongly recommended that you first upgrade to the latest
minor/patch version for your major version.
Description
From
To
Supported
patch upgrade
x.y.0
x.y.1
yes
skip patch version
x.y.0
x.y.2
yes
patch downgrade
x.y.2
x.y.1
no
minor upgrade
x.y.*
x.y+1.*
yes
skip minor version
x.y.*
x.y+2.*
no
minor downgrade
x.y.*
x.y-1.*
no
skip major version
x..
x+2..
no
major downgrade
x..
x-1..
no
major upgrade
x.y.z
x+1.0.0
yes
major upgrade skipping minor version
x.y.z
x+1.y+1.z
no
A few seconds of interruption may occur during the upgrade of an MSR cluster,
so schedule the upgrade to take place outside of peak hours to avoid any
business impacts.
Minor upgrade
Important
Only perform the MSR upgrade once any correlating upgrades to Mirantis
Kubernetes Engine (MKE) and/or Mirantis Container Runtime (MCR) have
completed.
Mirantis recommends the following upgrade sequence:
MCR
MKE
MSR
Before starting the MSR upgrade, confirm that:
The version of MKE in use is supported by the upgrade version of MSR.
The MKE and MSR backups are both recent.
A backup of current swarm state has been created.
To create a swarm state backup, perform the following from an MKE manager
node:
(if possible) A backup exists of the images stored by MSR, if it is
configured to store images on the local filesystem or within an NFS store.
BACKUP_LOCATION=/example_directory/filename
# If local filesystem
sudotar-cf${BACKUP_LOCATION}-C/var/lib/docker/volumes/dtr-registry-${REPLICA_ID}# If NFS store
sudotar-cf${BACKUP_LOCATION}-C/var/lib/docker/volumes/dtr-registry-nfs-${REPLICA_ID}
None of the MSR replica nodes are exhibiting time drift. To make this
determination, review the kernel log timestamps for each of the nodes. If
time drift is occurring, use clock synchronization (e.g., NTP) to keep
node clocks in sync.
Local filesystems across MSR nodes are not exhibiting any disk storage
issues.
Confirm that at least 16GB RAM is available on the node on which you are
running the upgrade. If the MSR node does not have access to the internet,
follow the offline installation documentation to get the images.
Once you have the latest image on your machine (and the images on the target
nodes, if upgrading offline), run the upgrade command.
Note
The upgrade command can be run from any available node, as MKE is
aware of which worker nodes have replicas.
By default, the upgrade command runs in interactive mode and prompts for any
necessary information. If you are performing the upgrade on an existing
replica, pass the --existing-replica-id flag.
The upgrade command will start replacing every container in your MSR cluster,
one replica at a time. It will also perform certain data migrations. If
anything fails or the upgrade is interrupted for any reason, rerun the upgrade
command (the upgrade will resume from the point of interruption).
Step 3. Verify Upgrade Success
To confirm that the newly upgraded MSR environment is ready:
Make sure that all running MSR containers reflect the newly upgraded MSR
version:
dockerps--filtername=dtr
Verify that the MSR web UI is accessible and operational.
Confirm push and pull functionality of Docker images to and from the
registry
Ensure that the MSR metadata store is in good standing:
REPLICA_ID=$(dockerinspect-f'{{.Name}}'$(dockerps-q-fname=dtr-rethink)|cut-f3-d'-')
dockerrun-it--rm--netdtr-ol\-vdtr-ca-$REPLICA_ID:/ca\dockerhubenterprise/rethinkcli:v2.3.0$REPLICA_ID# List problems in the cluster detected by the current node.
>r.db("rethinkdb").table("current_issues")[]
Metadata Store Migration
When upgrading from 2.5 to 2.6, the system will run a
metadatastoremigration job following a successful upgrade. This involves
migrating the blob links for your images, which is necessary for online garbage
collection. With 2.6, you can log into the MSR web interface and navigate
to System > Job Logs to check the status of the
metadatastoremigration job.
Garbage collection is disabled while the migration is running. In the case of a
failed metadatastoremigration, the system will retry twice.
If the three attempts fail, it will be necessary to manually retrigger the
metadatastoremigration job. To do this, send a POST request to the
/api/v0/jobs endpoint:
Alternatively, select API from the bottom left-side navigation
panel of the MSR web interface and use the Swagger UI to send your API request.
Patch upgrade
A patch upgrade changes only the MSR containers and is always safer than a
minor version upgrade. The command is the same as for a minor upgrade.
MSR cache upgrade
If you have previously deployed a cache, be sure to upgrade the node dedicated
for your cache to keep it in sync with your upstream MSR replicas. This
prevents authentication errors and other strange behaviors.
Download the vulnerability database
After upgrading MSR, it is necessary to redownload the vulnerability database.
Monitor MSR
Mirantis Secure Registry is a Dockerized application. To monitor it, you
can use the same tools and techniques you’re already using to monitor
other containerized applications running on your cluster. One way to
monitor MSR is using the monitoring capabilities of Docker Universal
Control Plane.
In your browser, log in to Mirantis Kubernetes Engine (MKE), and
navigate to the Stacks page. If you have MSR set up for
high-availability, then all the MSR replicas are displayed.
To check the containers for the MSR replica, click the replica you
want to inspect, click Inspect Resource, and choose Containers.
Now you can drill into each MSR container to see its logs and find the
root cause of the problem.
Health check endpoints
MSR also exposes several endpoints you can use to assess if an MSR
replica is healthy or not:
/_ping: Checks if the MSR replica is healthy, and returns a
simple json response. This is useful for load balancing or other
automated health check tasks.
/nginx_status: Returns the number of connections being handled by
the NGINX front-end used by MSR.
/api/v0/meta/cluster_status: Returns extensive information about
all MSR replicas.
Cluster status
The /api/v0/meta/cluster_status endpoint requires administrator
credentials, and returns a JSON object for the entire cluster as observed by
the replica being queried. You can authenticate your requests using HTTP basic
auth.
{"current_issues":[{"critical":false,"description":"... some replicas are not ready. The following servers arenotreachable:dtr_rethinkdb_f2277ad178f7",}],"replica_health":{"f2277ad178f7":"OK","f3712d9c419a":"OK","f58cf364e3df":"OK"},}
You can find health status on the current_issues and
replica_health arrays. If this endpoint doesn’t provide meaningful
information when trying to troubleshoot, try troubleshooting using
logs.
Check notary audit logs
Docker Content Trust (DCT) keeps audit logs of changes made to trusted
repositories. Every time you push a signed image to a repository, or
delete trust data for a repository, DCT logs that information.
These logs are only available from the MSR API.
Get an authentication token
To access the audit logs you need to authenticate your requests using an
authentication token. You can get an authentication token for all
repositories, or one that is specific to a single repository.
MSR returns a JSON file with a token, even when the user doesn’t have
access to the repository to which they requested the authentication
token. This token doesn’t grant access to MSR repositories.
The JSON file returned has the following structure:
{"token":"<token>","access_token":"<token>","expires_in":"<expiration in seconds>","issued_at":"<time>"}
Changefeed API
Once you have an authentication token you can use the following
endpoints to get audit logs:
URL
Description
Authorization
GET/v2/_trust/changefeed
Get audit logs for all repositories.
Global scope token
GET/v2/<msr-url>/<repository>/_trust/changefeed
Get audit logs for a specific repository.
Repository-specific token
Both endpoints have the following query string parameters:
Field name
Required
Type
Description
change_id
Yes
String
A non-inclusive starting change ID from which to start
returning results. This will typically be the first or last change ID
from the previous page of records requested, depending on which
direction your are paging in.
The value 0 indicates records should be returned starting from the
beginning of time.
The value 1 indicates records should be returned starting from the
most recent record. If 1 is provided, the implementation will also
assume the records value is meant to be negative, regardless of the
given sign.
records
Yes
String integer
The number of records to return. A negative value indicates the number
of records preceding the change_id should be returned. Records are
always returned sorted from oldest to newest.
Below is the description for each of the fields in the response:
Field name
Description
count
The number of records returned.
ID
The ID of the change record. Should be used in the change_id field of
requests to provide a non-exclusive starting index. It should be treated
as an opaque value that is guaranteed to be unique within an instance of
notary.
CreatedAt
The time the change happened.
GUN
The MSR repository that was changed.
Version
The version that the repository was updated to. This increments every
time there’s a change to the trust repository.
This is always 0 for events representing trusted data being removed
from the repository.
SHA256
The checksum of the timestamp being updated to. This can be used with
the existing notary APIs to request said timestamp.
This is always an empty string for events representing trusted data
being removed from the repository
Category
The kind of change that was made to the trusted repository. Can be
update, or deletion.
The results only include audit logs for events that happened more than
60 seconds ago, and are sorted from oldest to newest.
Even though the authentication API always returns a token, the
changefeed API validates if the user has access to see the audit logs or
not:
If the user is an admin they can see the audit logs for any
repositories,
All other users can only see audit logs for repositories they have
read access.
Troubleshoot MSR
This guide contains tips and tricks for troubleshooting MSR problems.
Troubleshoot overlay networks
High availability in MSR depends on swarm overlay networking. One way to
test if overlay networks are working correctly is to deploy containers
to the same overlay network on different nodes and see if they can ping
one another.
If the second command succeeds, it indicates overlay networking is
working correctly between those nodes.
You can run this test with any attachable overlay network and any Docker
image that has sh and ping.
Access RethinkDB directly
MSR uses RethinkDB for persisting data and replicating it across
replicas. It might be helpful to connect directly to the RethinkDB
instance running on an MSR replica to check the MSR internal state.
Warning
Modifying RethinkDB directly is not supported and may cause problems.
via RethinkCLI
The RethinkCLI can be run from a separate
image in the mirantis organization. Note that the
commands below are using separate tags for non-interactive and
interactive modes.
Non-interactive
Use SSH to log into a node that is running an MSR replica, and run the
following:
# List problems in the cluster detected by the current node.REPLICA_ID=$(dockercontainerls--filter=name=dtr-rethink--format'{{.Names}}'|cut-d'/'-f2|cut-d'-'-f3|head-n1)&&echo'r.db("rethinkdb").table("current_issues")'|dockerrun--rm-i--netdtr-ol-v"dtr-ca-${REPLICA_ID}:/ca"-eDTR_REPLICA_ID=$REPLICA_IDmirantis/rethinkcli:v2.2.0-ninon-interactive
On a healthy cluster the output will be [].
Interactive
Starting in DTR 2.5.5, you can run RethinkCLI from a separate image.
First, set an environment variable for your MSR replica ID:
RethinkDB stores data in different databases that contain multiple
tables. Run the following command to get into interactive mode and query
the contents of the DB:
# List problems in the cluster detected by the current node.
> r.db("rethinkdb").table("current_issues")
[]
# List all the DBs in RethinkDB
> r.dbList()
[ 'dtr2',
'jobrunner',
'notaryserver',
'notarysigner',
'rethinkdb' ]
# List the tables in the dtr2 db
> r.db('dtr2').tableList()
[ 'blob_links',
'blobs',
'client_tokens',
'content_caches',
'events',
'layer_vuln_overrides',
'manifests',
'metrics',
'namespace_team_access',
'poll_mirroring_policies',
'promotion_policies',
'properties',
'pruning_policies',
'push_mirroring_policies',
'repositories',
'repository_team_access',
'scanned_images',
'scanned_layers',
'tags',
'user_settings',
'webhooks' ]
# List the entries in the repositories table
> r.db('dtr2').table('repositories')
[ { enableManifestLists: false,
id: 'ac9614a8-36f4-4933-91fa-3ffed2bd259b',
immutableTags: false,
name: 'test-repo-1',
namespaceAccountID: 'fc3b4aec-74a3-4ba2-8e62-daed0d1f7481',
namespaceName: 'admin',
pk: '3a4a79476d76698255ab505fb77c043655c599d1f5b985f859958ab72a4099d6',
pulls: 0,
pushes: 0,
scanOnPush: false,
tagLimit: 0,
visibility: 'public' },
{ enableManifestLists: false,
id: '9f43f029-9683-459f-97d9-665ab3ac1fda',
immutableTags: false,
longDescription: '',
name: 'testing',
namespaceAccountID: 'fc3b4aec-74a3-4ba2-8e62-daed0d1f7481',
namespaceName: 'admin',
pk: '6dd09ac485749619becaff1c17702ada23568ebe0a40bb74a330d058a757e0be',
pulls: 0,
pushes: 0,
scanOnPush: false,
shortDescription: '',
tagLimit: 1,
visibility: 'public' } ]
Individual DBs and tables are a private implementation detail and may
change in MSR from version to version, but you can always use
dbList() and tableList() to explore the contents and data
structure.
When an MSR replica is unhealthy or down, the MSR web UI displays a
warning:
Warning: The following replicas are unhealthy: 59e4e9b0a254; Reasons: Replica reported health too long ago: 2017-02-18T01:11:20Z; Replicas 000000000000, 563f02aba617 are still healthy.
To fix this, you should remove the unhealthy replica from the MSR
cluster, and join a new one. Start by running:
Warnings display in a red banner at the top of the MSR web UI to indicate
potential vulnerability scanning issues.
Warning
Cause
Warning: Cannot perform security scans because no
vulnerability database was found.
Displays when vulnerability scanning is enabled but there is no
vulnerability database available to MSR. Typically, the warning displays
when a vulnerability database update is run for the first time
and the operation fails, as no usable vulnerability database exists at
this point.
Warning: Last vulnerability database sync failed.
Displays when a vulnerability database update fails, even though there
is a previous usable vulnerability database available for vulnerability
scans. The warning typically displays when a vulnerability database
update fails, despite successful completion of a prior vulnerability
database update.
Note
The terms vulnerability database sync and
vulnerability database update are interchangeable, in the
context of MSR web UI warnings.
Note
The issuing of warnings is the same regardless of whether vulnerability
database updating is done manually or is performed automatically through a
job.
MSR undergoes a number of steps in performing a vulnerability database update,
including TAR file download and extraction, file validation, and the update
operation itself. Errors that can trigger warnings can occur at any point in
the update process. These errors can include such system-related matters as low
disk space, issues with the transient network, or configuration
complications. As such, the best strategy for troubleshooting MSR vulnerability
scanning issues is to review the logs.
To view the logs for an online vulnerability database update:
Online vulnerability database updates are performed by a jobrunner container,
the logs for which you can view through a docker CLI command or by using the
MSR web UI:
CLI command:
dockerlogs<jobrunner-container-name>
MSR web UI:
Navigate to System > Job Logs in the left-side navigation
panel.
To view the logs for an offline vulnerability database update:
The MSR vulnerability database update occurs through the dtr-api container.
As such, access the logs for that container to ascertain the reason for update
failure.
To obtain more log information:
If the logs do not initially offer enough detail on the cause of vulnerability
database update failure, set MSR to enable debug logging, which will display
additional debug logs.
Refer to the reconfigure CLI command documentation for
information on how to enable debug logging. For example:
Certificate issues when pushing and pulling images
If TLS is not properly configured, you are likely to encounter an
x509:certificatesignedbyunknownauthority error when attempting to run
the following commands:
docker login
docker push
docker pull
To resolve the issue:
Verify that your MSR instance has been configured with your TLS certificate
Fully Qualified Domain Name (FQDN). For more information, refer to
Add a custom TLS certificate.
Alternatively, but only in testing scenarios, you can skip using a certificate
by adding your registry host name as an insecure registry in the Docker
daemon.json file:
{"insecure-registries":["registry-host-name"]}
Disaster recovery
Disaster recovery overview
Mirantis Secure Registry is a clustered application. You can join
multiple replicas for high availability.
For an MSR cluster to be healthy, a majority of its replicas (n/2 + 1)
must be healthy and able to communicate with the other replicas.
This is also known as maintaining quorum.
The three possible failure scenarios are detailed below.
Replica is unhealthy but cluster maintains quorum
One or more replicas are unhealthy, but the overall majority (n/2 + 1)
is still healthy and able to communicate with one another.
Here, the MSR cluster has five replicas but one of the nodes has
stopped working, and the other has problems with the MSR overlay
network.
Even though these two replicas are unhealthy the MSR cluster has a
majority of replicas that are still working, which means that the cluster is
healthy.
Thus, you should repair the unhealthy replicas, or remove them
from the cluster and join new ones.
The majority of replicas are unhealthy
A majority of replicas are unhealthy, making the cluster lose quorum,
but at least one replica is still healthy, or at least the data volumes
for MSR are accessible from that replica.
Here, the MSR cluster is unhealthy but since one replica is
still running it is possible to repair the cluster without having to
restore from a backup, which minimizes the amount of data loss.
All replicas are unhealthy
In this total disaster scenario, in which all MSR replicas are lost, the data
volumes for all MSR replicas are corrupted or lost.
Here, you must restore MSR from an existing backup. Such an operation should be
considered as a last resort, as such an emergency repair may prevent some data
loss.
When one or more MSR replicas are unhealthy but the overall majority
(n/2 + 1) is healthy and able to communicate with one another, your MSR
cluster is still functional and healthy.
Given that the MSR cluster is healthy, there’s no need to execute any
disaster recovery procedures like restoring from a backup.
Instead, you should:
Remove the unhealthy replicas from the MSR cluster.
Join new replicas to make MSR highly available.
Since an MSR cluster requires a majority of replicas to be healthy at all
times, the order of these operations is important. If you join more
replicas before removing the ones that are unhealthy, your MSR cluster
might become unhealthy.
Split-brain scenario
To understand why you should remove unhealthy replicas before joining
new ones, imagine you have a five-replica MSR deployment, and something
goes wrong with the overlay network connection the replicas, causing
them to be separated in two groups.
Because the cluster originally had five replicas, it can work as long as
three replicas are still healthy and able to communicate (5 / 2 + 1 =
3). Even though the network separated the replicas in two groups, MSR is
still healthy.
If at this point you join a new replica instead of fixing the network
problem or removing the two replicas that got isolated from the rest,
it’s possible that the new replica ends up in the side of the network
partition that has less replicas.
When this happens, both groups now have the minimum amount of replicas
needed to establish a cluster. This is also known as a split-brain
scenario, because both groups can now accept writes and their histories
start diverging, making the two groups effectively two different
clusters.
Remove replicas
To remove unhealthy replicas, you’ll first have to find the replica ID
of one of the replicas you want to keep, and the replica IDs of the
unhealthy replicas you want to remove.
You can find the list of replicas by navigating to Shared Resources >
Stacks or Swarm > Volumes (when using swarm mode) on the MKE web
interface, or by using the MKE client bundle to run:
dockerps--format"{{.Names}}"|grepdtr
# The list of MSR containers with <node>/<component>-<replicaID>, e.g.# node-1/dtr-api-a1640e1c15b6
Another way to determine the replica ID is to SSH into an MSR node and
run the following:
For an MSR cluster to be healthy, a majority of its replicas (n/2 + 1)
need to be healthy and be able to communicate with the other replicas.
This is known as maintaining quorum.
In a scenario where quorum is lost, but at least one replica is still
accessible, you can use that replica to repair the cluster. That replica
doesn’t need to be completely healthy. The cluster can still be repaired
as the MSR data volumes are persisted and accessible.
Repairing the cluster from an existing replica minimizes the amount of
data lost. If this procedure doesn’t work, you’ll have to restore from
an existing backup.
Diagnose an unhealthy cluster
When a majority of replicas are unhealthy, causing the overall MSR
cluster to become unhealthy, operations like dockerlogin,
dockerpull, and dockerpush present internalservererror.
Accessing the /_ping endpoint of any replica also returns the same
error. It’s also possible that the MSR web UI is partially or fully
unresponsive.
Perform an emergency repair
Use the registry.mirantis.com/msr/dtremergency-repair command to
try to repair an unhealthy MSR cluster, from an existing replica.
This command checks the data volumes for the MSR replica are
uncorrupted, redeploys all internal MSR components and reconfigured them
to use the existing volumes. It also reconfigures MSR removing all other nodes
from the cluster, leaving MSR as a single-replica cluster with the replica you
chose.
Start by finding the ID of the MSR replica that you want to repair from. You
can find the list of replicas by navigating to Shared Resources > Stacks or
Swarm > Volumes (when using swarm mode) on the MKE web interface, or by
using an MKE client bundle to run:
dockerps--format"{{.Names}}"|grepdtr
# The list of MSR containers with <node>/<component>-<replicaID>, e.g.# node-1/dtr-api-a1640e1c15b6
Another way to determine the replica ID is to SSH into an MSR node and
run the following:
If the emergency repair command fails, try running it again using a
different replica ID. As a last resort, you can restore your cluster
from an existing backup.
Metadata on the deployed repositories and images, such as image
architecture and size.
Access control to repos and images
Permissions for teams and repositories, pertaining to who has access to
which images.
Notary data
Notary tags and signatures, as applicable to images that are signed.
Scan results
Image security scanning results, pertaining to vulnerabilities in your
images.
Certificates and keys
The certificates, public keys, and private keys in use by MSR for mutual
TLS communication.
Images content
The images you push to MSR. This data can either be stored on the file
system of the node that is running MSR, or depending on the
configuration it can be stored on a different storage system.
Image content, which must be backed up separately, depending on the MSR
configuration.
User, organization, and teams information, the backup for
which must be made as part of your MKE backup.
Vulnerability database,
which can be redownloaded following a restore operation.
Back up MSR data
To create a full backup of MSR you must back up both the image content and MSR
metadata.
To ensure the smoothest possible restore, Mirantis recommends that you create
your MSR backups from the same MSR replica.
Locate your replica ID
You need your MSR replica ID to create a backup. You can determine your replica
ID through the MKE web UI, using the MKE client bundle, or by accessing an MSR
node with SSH and running a command.
To locate your replica ID through the MKE web UI:
Navigate to Shared Resources > Stacks or Swarm >
Volumes (when using swarm mode).
To locate your replica ID using the MKE client bundle:
From a terminal that uses an MKE client bundle, run:
dockerps--format"{{.Names}}"|grepdtr
# The list of MSR containers with <node>/<component>-<replicaID>, e.g.# node-1/dtr-api-a1640e1c15b6
To locate your replica ID using SSH to access an MSR node:
The chained commands detailed above perform the following tasks:
Set your MSR version and replica ID.
To back up a specific replica, modify the --existing-replica-id
flag in the backup command to manually set the replica ID.
Prompt for the <mke-url> and <mke-username>.
Prompt for your <mkepassword> without saving it to your disk or
printing it to the terminal.
Retrieve the CA certificate for the specified <mke-url>.
To skip TLS verification, replace the --ucp-ca flag with
--ucp-insecure-tls. Mirantis does not recommend this flag for
production environments.
Include the MSR version and timestamp in your tar backup file.
Important
To ensure constant user access to MSR, by default the backup
command does not pause the MSR replica that is undergoing the backup
operation. As such, you can continue to make changes to the replica, however
those changes will not be saved into the backup. To circumvent this
behavior, use the --offline-backup option and be sure to remove the
replica from the load balancing pool to avoid user interruption.
As the backup contains sensitive information, such as private keys, you may opt
to encrypt it. To do so, run:
gpg--symmetric{{metadata_backup_file}}
This command prompts you for a password to encrypt the backup, copies the
backup file, and encrypts it.
The backup of the MSR metadata should present as follows:
tar-tf{{metadata_backup_file}}# The archive should look like this
dtr-backup-v2.10.0/
dtr-backup-v2.10.0/rethink/
dtr-backup-v2.10.0/rethink/properties/
dtr-backup-v2.10.0/rethink/properties/0
Use the following command if you have encrypted the metadata backup:
gpg-d{{metadata_backup_file}}|tar-t
Alternatively, you can create a backup of an MKE cluster and restore it to a
new cluster, and then restore MSR on the new cluster to confirm your MSR
backup.
Restore from backup
In the event that a majority of the RethinkDB table replicas in use by MSR are
unhealthy, and an emergency repair is unsuccessful, you must restore
the cluster from a backup.
Important
Use the same MKE cluster upon which you created the
backup. If you restore on a different MKE cluster, the MSR resources will
be owned by non-existent users, and thus you will not be able to manage
the resources despite their being stored in the MSR data store.
Use the same version of the registry.mirantis.com/msr/dtr
image that you used in creating the backup.
To restore MSR from a backup:
Using the client bundle, run the following command to stop and remove any
MSR container that is still running:
If MSR uses a different storage backend, follow the best practices
recommended for that system.
Use the registry.mirantis.com/msr/dtr restore command to
perform MSR installation and complete it with the configuration that was
created during backup.
Load your MKE client bundle and run the following command:
read-sp'ucp password: '<MKE-password>;
Run the following command to restore MSR from your backup, for example:
Use --dtr-use-default-storage if the storage backend has not been
changed. If you are using a custom backend, use either
--dtr-storage-volume to reference an existing Docker volume,
or --nfs-storage-url if the backend is on NFS.
For a full list of supported options, refer to
CLI Reference: registry.mirantis.com/msr/dtr restore.
If you scan images in MSR, you must update the vulnerability
database in the MSR UI. Refer to Enable MSR security scanning for more
information.
After you successfully restore MSR, you can join new replicas as you would
following a fresh installation.
You can submit feedback on MSR to Mirantis either by rating your experience or
through a Jira ticket.
To rate your MSR experience:
Log in to the MSR web UI.
Click Give feedback at the bottom of the screen.
Rate your MSR experience from one to five stars, and add any additional
comments in the provided field.
Click Send feedback.
To offer more detailed feedback:
Log in to the MSR web UI.
Click Give feedback at the bottom of the screen.
Click create a ticket in the 5-star review dialog
to open a Jira feedback collector.
Fill in the Jira feedback collector fields and add attachments as
necessary.
Click Submit.
Migration Guide
Moving from MSR 2.10 to MSR 4 is a significant transition that
introduces a new architecture, improved security models, and
streamlined policy-based configuration. The process may take time
depending on your system and data volume, but your current MSR
instance remains operational throughout.
Subscriptions for MKE, MSR, and MCR provide access to
prioritized support for designated contacts from your company, agency, team,
or organization. Mirantis service levels for MKE, MSR, and MCR are
based on your subscription level and the Cloud (or cluster) you designate in
your technical support case. Our support offerings are described
here,
and if you do not already have a support subscription, you may inquire about
one via the contact us form.
Mirantis’ primary means of interacting with customers who have technical
issues with MKE, MSR, or MCR is our
CloudCare Portal. Access to our
CloudCare Portal requires prior authorization by your company, agency, team,
or organization, and a brief email verification step. After Mirantis sets up
its backend systems at the start of the support subscription, a designated
administrator at your company, agency, team or organization, can designate
additional contacts. If you have not already received and verified an
invitation to our CloudCare Portal, contact your local designated
administrator, who can add you to the list of designated contacts.
Most companies, agencies, teams, and organizations have multiple designated
administrators for the CloudCare Portal, and these are often the persons most
closely involved with the software. If you don’t know who is a
local designated administrator, or are having problems accessing the
CloudCare Portal, you may also send us an email.
Once you have verified your contact details via our verification email, and
changed your password as part of your first login, you and all your colleagues
will have access to all of the cases and resources purchased. We
recommend you retain your ‘Welcome to Mirantis’ email, because it contains
information on accessing our CloudCare Portal, guidance on
submitting new cases, managing your resources, and so forth. Thus, it can
serve as a reference for future visits.
We encourage all customers with technical problems to use the
knowledge base, which you can access on the Knowledge tab
of our CloudCare Portal. We also encourage you to review the
MKE, MSR, and MCR products documentation which includes release notes,
solution guides, and reference architectures. These are
available in several formats. We encourage use of
these resources prior to filing a technical case; we may already have fixed
the problem in a later release of software, or provided a solution or
technical workaround to a problem experienced by other customers.
One of the features of the CloudCare Portal is the ability to associate
cases with a specific MKE cluster; these are known as “Clouds” in
our portal. Mirantis has pre-populated customer accounts with one or more
Clouds based on your subscription(s). Customers may also create and manage
their Clouds to better match how you use your subscription.
We also recommend and encourage our customers to file new cases based on a
specific Cloud in your account. This is because most Clouds also have
associated support entitlements, licenses, contacts, and cluster
configurations. These greatly enhance Mirantis’ ability to support you in a
timely manner.
You can locate the existing Clouds associated with your account by using the
“Clouds” tab at the top of the portal home page. Navigate to the appropriate
Cloud, and click on the Cloud’s name. Once you’ve verified that Cloud
represents the correct MKE cluster and support entitlement, you
can create a new case via the New Case button towards the top of the
Cloud’s page.
One of the key items required for technical support of most MKE, MSR, and MCR
cases is the support dump. This is a compressed archive of configuration data
and log files from the cluster. There are several ways to gather a support
dump, each described in the paragraphs below. After you have collected a
support dump, you can upload the dump to your new technical support case
by following
this guidance
and using the “detail” view of your case.
Use the Web UI to get a support dump
To get the support dump from the web UI:
Log into the MKE web UI with an administrator account.
In the top-left menu, click your username and choose
Support Dump.
It may take a few minutes for the download to complete.
To submit the support dump to Mirantis Customer Support:
Click Share support bundle on the success prompt that displays
when the support dump finishes downloading.
Fill in the Jira feedback dialog, and click Submit.
Use the CLI to get a support dump
To get the support dump from the CLI, use SSH to log into a node and run:
The support dump only contains logs for the node where you’re running the
command. If your MKE is highly available, you should collect support dumps
from all of the manager nodes.
Use PowerShell to get a support dump
On Windows worker nodes, run the following command to generate a local support
dump:
The CLI tool has commands to install, configure, and backup Mirantis Secure
Registry (MSR). It also allows uninstalling MSR. By default the tool runs in
interactive mode. It prompts you for the values needed.
Additional help is available for each command with the –help option.
If not specified, registry.mirantis.com/msr/dtr uses the
latest tag by default. To work with a different version, specify it in
the command. For example, dockerrun-it--rmregistry.mirantis.com/msr/dtr:2.10.0.
The backup command creates a tar file with the contents
of the volumes used by MSR, and prints it. You can then use
registry.mirantis.com/msr/dtrrestore to restore the data from an existing backup.
Note
This command only creates backups of configurations, and image
metadata. It does not back up users and organizations. Users and
organizations can be backed up during an MKE backup.
It also does not back up Docker images stored in your registry. You
should implement a separate backup policy for the Docker images
stored in your registry, taking into consideration whether your MSR
installation is configured to store images on the filesystem or is
using a cloud provider.
This backup contains sensitive information and should be stored
securely.
Using the --offline-backup flag temporarily shuts down the
RethinkDB container. Take the replica out of your load balancer to
avoid downtime.
Options
Option
Environment variable
Description
--debug
$DEBUG
Enable debug mode for additional logs.
--existing-replica-id
$DTR_REPLICA_ID
The ID of an existing MSR replica. To add, remove or modify an MSR
replica, you must connect to the database of an existing replica.
--help-extended
$DTR_EXTENDED_HELP
Display extended help text for a given command.
--ignore-events-table
$DTR_IGNORE_EVENTS_TABLE
Option to prevent backup of the events table for online backups, to
reduce backup size (the option is not available for offline backups).
--ignore-scan-data
$DTR_IGNORE_SCAN_DATA
Option to prevent backup of the scanning data for online backups, to
reduce backup size (the option is not available for offline backups).
--include-job-logs
$DTR_INCLUDE_JOB_LOGS
Option to include job logs in online backups.
--nocolor
$NOCOLOR
Disable output coloring in logs.
--offline-backup
$DTR_OFFLINE_BACKUP
This flag takes RethinkDB down during backup and
takes a more reliable backup. If you back up MSR with this flag,
RethinkDB will go down during backup. However, offline backups are
guaranteed to be more consistent than online backups.
--ucp-ca
$UCP_CA
Use a PEM-encoded TLS CA certificate for MKE. Download the MKE
TLS CA certificate from https://<mke-url>/ca, and use--ucp-ca"$(catca.pem)".
--ucp-insecure-tls
$UCP_INSECURE_TLS
Disable TLS verification for MKE. The installation
uses TLS but always trusts the TLS certificate used by MKE, which can
lead to man-in-the-middle attacks. For production deployments,
use --ucp-ca"$(catca.pem)" instead.
The destroy command forcefully removes all containers
and volumes associated with an MSR replica without notifying
the rest of the cluster.
Use this command on all replicas uninstall MSR.
Use the remove command to gracefully scale down your MSR cluster.
Options
Option
Environment variable
Description
--replica-id
$MSR_DESTROY_REPLICA_ID
The ID of the replica to destroy.
--ucp-url
$UCP_URL
The MKE URL including domain and port.
--ucp-username
$UCP_USERNAME
The MKE administrator username.
--ucp-password
$UCP_PASSWORD
The MKE administrator password.
--debug
$DEBUG
Enable debug mode for additional logs.
--help-extended
$MSR_EXTENDED_HELP
Display extended help text for a given command.
--nocolor
$NOCOLOR
Disable output coloring in logs.
--ucp-insecure-tls
$UCP_INSECURE_TLS
Disable TLS verification for MKE. The installation uses TLS but always
trusts the TLS certificate used by MKE, which can lead to
man-in-the-middle attacks. For production deployments, use --ucp-ca"$(catca.pem)" instead.
--ucp-ca
$UCP_CA
Use a PEM-encoded TLS CA certificate for MKE.Download the MKE TLS CA
certificate from https:///ca, and use --ucp-ca"$(catca.pem)".
The emergency-repair command repairs an MSR cluster that has lost
quorum by reverting your cluster to a single MSR replica.
There are three actions you can take to recover an unhealthy MSR cluster:
If the majority of replicas are healthy, remove the unhealthy nodes
from the cluster, and join new ones for high availability.
If the majority of replicas are unhealthy, use the
emergency-repair command to revert your cluster to a single MSR
replica.
If you cannot repair your cluster to a single replica, you must
restore from an existing backup, using the restore command.
When you run this command, an MSR replica of your choice is repaired and
turned into the only replica in the whole MSR cluster. The containers
for all the other MSR replicas are stopped and removed. When using the
force option, the volumes for these replicas are also deleted.
After repairing the cluster, you should use the join command to add
more MSR replicas for high availability.
Options
Option
Environment variable
Description
--debug
$DEBUG
Enable debug mode for additional logs.
--existing-replica-id
$MSR_REPLICA_ID
The ID of an existing MSR replica. To add, remove or modify MSR, you
must connect to the database of an existing healthy replica.
--help-extended
$MSR_EXTENDED_HELP
Display extended help text for a given command.
--nocolor
$NOCOLOR
Disable output coloring in logs.
--overlay-subnet
$MSR_OVERLAY_SUBNET
The subnet used by the dtr-ol overlay network.
Example: 10.0.0.0/24. For high-availability, MSR creates an overlay
network between MKE nodes. This flag allows you to choose the subnet for
that network. Make sure the subnet you choose is not used on any machine
where MSR replicas are deployed.
--prune
$PRUNE
Delete the data volumes of all unhealthy replicas. With this
option, the volume of the MSR replica you’re restoring is preserved but
the volumes for all other replicas are deleted. This has the same result
as completely uninstalling MSR from those replicas.
--ucp-ca
$UCP_CA
Use a PEM-encoded TLS CA certificate for MKE. Download the MKE
TLS CA certificate from https:///ca, and use --ucp-ca"$(catca.pem)".
--ucp-insecure-tls
$UCP_INSECURE_TLS
Disable TLS verification for MKE. The installation
uses TLS but always trusts the TLS certificate used by MKE, which can
lead to man-in-the-middle attacks. For production deployments,
use --ucp-ca"$(catca.pem)" instead.
--ucp-password
$UCP_PASSWORD
The MKE administrator password.
--ucp-url
$UCP_URL
The MKE URL including domain and port.
--ucp-username
$UCP_USERNAME
The MKE administrator username.
--y,yes
$YES
Answer yes to any prompts.
--max-wait
$MAX_WAIT
The maximum amount of time MSR allows an operation to complete within.
This is frequently used to allocate more startup time to very large MSR
databases. The value is a Golang duration string. For example, "10m"
represents 10 minutes.
Use --ucp-ca"$(catca.pem)" instead of --ucp-insecure-tls for a production deployment.
Options
Option
Environment variable
Description
--async-nfs
$ASYNC_NFS
Use async NFS volume options on the replica specified in the
--existing-replica-id option. The NFS configuration must be set with
--nfs-storage-url explicitly to use this option. Using
--async-nfs will bring down any containers on the replica that use
the NFS volume, delete the NFS volume, bring it back up with the
appropriate configuration, and restart any containers that were brought
down.
--client-cert-auth-ca
$CLIENT_CA
Specify root CA certificates for client authentication with
--client-cert-auth-ca"$(catca.pem)".
--custom-ca-cert-bundle
$CUSTOM_CA_CERTS_BUNDLE
Provide a file containing additional CA certificates for MSR service
containers to use when verifying TLS server certificates.
--debug
$DEBUG
Enable debug mode for additional logs.
--dtr-ca
$MSR_CA
Use a PEM-encoded TLS CA certificate for MSR. By default MSR generates a
self-signed TLS certificate during deployment. You can use your own root
CA public certificate with --dtr-ca"$(catca.pem)".
--dtr-cert
$MSR_CERT
Use a PEM-encoded TLS certificate for MSR. By default MSR generates a
self-signed TLS certificate during deployment. You can use your own
public key certificate with --dtr-cert"$(catcert.pem)". If the
certificate has been signed by an intermediate certificate authority,
append its public key certificate at the end of the file to establish a
chain of trust.
--dtr-external-url
$MSR_EXTERNAL_URL
URL of the host or load balancer clients use to reach MSR. When you use
this flag, users are redirected to MKE for logging in. Once
authenticated they are redirected to the URL you specify in this flag.
If you do not use this flag, MSR is deployed without single sign-on with
MKE. Users and teams are shared but users log in separately into the two
applications. You can enable and disable single sign-on within your MSR
system settings. Format https://host[:port], where port is the
value you used with --replica-https-port. Since HSTS (HTTP
Strict-Transport-Security) header is included in all API responses, make
sure to specify the FQDN (Fully Qualified Domain Name) of your MSR, or
your browser fails to load the web interface.
--dtr-key
$MSR_KEY
Use a PEM-encoded TLS private key for MSR. By default MSR generates a
self-signed TLS certificate during deployment. You can use your own TLS
private key with --dtr-key"$(catkey.pem)".
--dtr-storage-volume
$MSR_STORAGE_VOLUME
Customize the volume to store Docker images. By default MSR creates a
volume to store the Docker images in the local filesystem of the node
where MSR is running, without high-availability. Use this flag to
specify a full path or volume name for MSR to store images. For
high-availability, make sure all MSR replicas can read and write data on
this volume. If you are using NFS, use --nfs-storage-url instead.
--enable-client-cert-auth
$ENABLE_CLIENT_CERT_AUTH
Enables TLS client certificate authentication. Use
--enable-client-cert-auth=false to disable it. If enabled, MSR will
additionally authenticate users via TLS client certificates. You must
also specify the root certificate authorities (CAs) that issued the
certificates with --client-cert-auth-ca.
--enable-pprof
$MSR_PPROF
Enables pprof profiling of the server. Use --enable-pprof=false to
disable it. Once MSR is deployed with this flag, you can access the
pprof endpoint for the API server at /debug/pprof, and the registry
endpoint at /registry_debug_pprof/debug/pprof.
--help-extended
$MSR_EXTENDED_HELP
Display extended help text for a given command.
--http-proxy
$MSR_HTTP_PROXY
The HTTP proxy used for outgoing requests.
--https-proxy
$MSR_HTTPS_PROXY
The HTTPS proxy used for outgoing requests.
--log-host
$LOG_HOST
The syslog system to send logs to. The endpoint to send logs to. Use
this flag if you set --log-protocol to tcp or udp.
--log-level
$LOG_LEVEL
Log level for all container logs when logging to syslog. Default: INFO.
The supported log levels are debug, info, warn, error, or fatal.
--log-protocol
$LOG_PROTOCOL
The protocol for sending logs. Default is internal. By default, MSR
internal components log information using the logger specified in the
Docker daemon in the node where the MSR replica is deployed. Use this
option to send MSR logs to an external syslog system. The supported
values are tcp, udp, or internal. Internal is the default
option, stopping MSR from sending logs to an external system. Use this
flag with --log-host.
--nfs-options
$NFS_OPTIONS
Pass in NFS volume options verbatim for the replica specified in the
--existing-replica-id option. The NFS configuration must be set with
--nfs-storage-url explicitly to use this option. Specifying
--nfs-options will pass in character-for-character the options
specified in the argument when creating or recreating the NFS volume.
For instance, to use NFS v4 with async, pass in “rw,nfsvers=4,async” as
the argument.
--nfs-storage-url
$NFS_STORAGE_URL
Use NFS to store Docker images following this format: nfs://<ip|hostname>/<mountpoint>. By default, MSR creates a volume to store the
Docker images in the local filesystem of the node where MSR is running,
without high availability. To use this flag, you need to install an NFS
client library like nfs-common in the node where you are deploying MSR.
You can test this by running showmount-e<nfs-server>. When you
join new replicas, they will start using NFS so there is no need to
specify this flag. To reconfigure MSR to stop using NFS, leave
--nfs-storage-url"" option empty. Refer to
Deploy MSR on NFS for more details.
--nocolor
$NOCOLOR
Disable output coloring in logs.
--no-proxy
$MSR_NO_PROXY
List of domains the proxy should not be used for. When using
--http-proxy you can use this flag to specify a list of domains that
you do not want to route through the proxy. Format acme.com[,acme.org].
--overlay-subnet
$MSR_OVERLAY_SUBNET
The subnet used by the dtr-ol overlay network. Example: 10.0.0.0/24.
For high-availability, MSR creates an overlay network between MKE nodes.
This flag allows you to choose the subnet for that network. Make sure
the subnet you choose is not used on any machine where MSR replicas are
deployed.
--replica-http-port
$REPLICA_HTTP_PORT
The public HTTP port for the MSR replica. Default is 80. This allows
you to customize the HTTP port where users can reach MSR. Once users
access the HTTP port, they are redirected to use an HTTPS connection,
using the port specified with --replica-https-port. This port can
also be used for unencrypted health checks.
--replica-https-port
$REPLICA_HTTPS_PORT
The public HTTPS port for the MSR replica. Default is 443. This
allows you to customize the HTTPS port where users can reach MSR. Each
replica can use a different port.
--replica-id
$MSR_INSTALL_REPLICA_ID
Assign a 12-character hexadecimal ID to the MSR replica. Random by
default.
--replica-rethinkdb-cache-mb
$RETHINKDB_CACHE_MB
The maximum amount of space in MB for RethinkDB in-memory cache used by
the given replica. Default is auto. Auto is (available_memory-1024)/2. This config allows changing the RethinkDB cache usage per
replica. You need to run it once per replica to change each one.
--ucp-ca
$UCP_CA
Use a PEM-encoded TLS CA certificate for MKE. Download the MKE TLS CA
certificate from https://<mke-url>/ca, and use --ucp-ca"$(catca.pem)".
--ucp-insecure-tls
$UCP_INSECURE_TLS
Disable TLS verification for MKE. The installation uses TLS but always
trusts the TLS certificate used by MKE, which can lead to
man-in-the-middle attacks. For production deployments, use --ucp-ca"$(catca.pem)" instead.
--ucp-node
$UCP_NODE
The hostname of the MKE node to use to deploy MSR. Random by default.
You can find the hostnames of the nodes in the cluster in the MKE web
interface, or by running docker node ls command on an MKE manager
node. Note that MKE and MSR must not be installed on the same node, and you should instead install MSR on worker nodes that will be managed by MKE.
--ucp-password
$UCP_PASSWORD
The MKE administrator password.
--ucp-url
$UCP_URL
The MKE URL including domain and port.
--ucp-username
$UCP_USERNAME
The MKE administrator username.
--registry-username<value>
$REGISTRY_USERNAME
Set the registry username to use when pulling MSR images.
--registry-password<value>
$REGISTRY_PASSWORD
Set the registry password to use when pulling MSR images.
registry.mirantis.com/msr/dtr join
Add a new replica to an existing MSR cluster. Use SSH to log into any
node that is already part of MKE.
The join command creates a replica of an existing MSR on a node
managed by Mirantis Kubernetes Engine (MKE).
For setting MSR for high-availability, create 3, 5, or 7 replicas of MSR.
Options
Option
Environment variable
Description
--debug
$DEBUG
Enable debug mode for additional logs.
--existing-replica-id
$MSR_REPLICA_ID
The ID of an existing MSR replica. To add, remove or modify MSR, you
must connect to the database of an existing healthy replica.
--help-extended
$MSR_EXTENDED_HELP
Display extended help text for a given command.
--nocolor
$NOCOLOR
Disable output coloring in logs.
--replica-http-port
$REPLICA_HTTP_PORT
The public HTTP port for the MSR replica. Default is 80. This allows
you to customize the HTTP port where users can reach MSR. Once users
access the HTTP port, they are redirected to use an HTTPS connection,
using the port specified with --replica-https-port. This port can
also be used for unencrypted health checks.
--replica-https-port
$REPLICA_HTTPS_PORT
The public HTTPS port for the MSR replica. Default is 443. This
allows you to customize the HTTPS port where users can reach MSR. Each
replica can use a different port.
--replica-id
$MSR_INSTALL_REPLICA_ID
Assign a 12-character hexadecimal ID to the MSR replica. Random by
default.
--replica-rethinkdb-cache-mb
$RETHINKDB_CACHE_MB
The maximum amount of space in MB for RethinkDB in-memory cache used by
the given replica. Default is auto. Auto is (available_memory-1024)/2. This config allows changing the RethinkDB cache usage per
replica. You need to run it once per replica to change each one.
--skip-network-test
$MSR_SKIP_NETWORK_TEST
Do not test whether overlay networks are working correctly between MKE nodes.
For high-availability, MSR creates an overlay network between MKE nodes
and tests it before joining replicas.
Important
Do not use the --skip-network-test option in production
deployments.
--ucp-ca
$UCP_CA
Use a PEM-encoded TLS CA certificate for MKE. Download the MKE TLS CA
certificate from https://<mke-url>/ca, and use --ucp-ca"$(catca.pem)".
--ucp-insecure-tls
$UCP_INSECURE_TLS
Disable TLS verification for MKE. The installation uses TLS but always
trusts the TLS certificate used by MKE, which can lead to
man-in-the-middle attacks. For production deployments, use --ucp-ca"$(catca.pem)" instead.
--ucp-node
$UCP_NODE
The hostname of the MKE node to use to deploy MSR. Random by default.
You can find the hostnames of the nodes in the cluster in the MKE web
interface, or by running docker node ls on an MKE manager
node. Note that MKE and MSR cannot be installed on the same node,
instead install MSR on worker nodes that will be managed by MKE.
--ucp-password
$UCP_PASSWORD
The MKE administrator password.
--ucp-url
$UCP_URL
The MKE URL including domain and port.
--ucp-username
$UCP_USERNAME
The MKE administrator username.
--unsafe-join
$MSR_UNSAFE_JOIN
Join a new replica even if the cluster is unhealthy. Joining replicas to
an unhealthy MSR cluster leads to split-brain scenarios, and data loss.
Don’t use this option for production deployments.
--max-wait
$MAX_WAIT
The maximum amount of time MSR allows an operation to complete within.
This is frequently used to allocate more startup time to very large MSR
databases. The value is a Golang duration string. For example, "10m"
represents 10 minutes.
--registry-username<value>
$REGISTRY_USERNAME
Set the registry username to use when pulling MSR images.
--registry-password<value>
$REGISTRY_PASSWORD
Set the registry password to use when pulling MSR images.
The reconfigure command changes MSR configuration settings.
MSR is restarted for the new configurations to take effect. To have no
down time, configure your MSR for high availability.
Options
Option
Environment variable
Description
--async-nfs
$ASYNC_NFS
Use async NFS volume options on the replica specified in the
--existing-replica-id option. The NFS configuration must be set with
--nfs-storage-url explicitly to use this option. Using
--async-nfs will bring down any containers on the replica that use
the NFS volume, delete the NFS volume, bring it back up with the
appropriate configuration, and restart any containers that were brought
down.
--client-cert-auth-ca
$CLIENT_CA
Specify root CA certificates for client authentication with
--client-cert-auth-ca"$(catca.pem)".
--custom-ca-cert-bundle
$CUSTOM_CA_CERTS_ BUNDLE
Specify additional CA certificates for MSR service containers to use
when verifying TLS server certificates with
--custom-ca-cert-bundle"$(catca.pem)"
--debug
$DEBUG
Enable debug mode for additional logs of this bootstrap container (the
log level of downstream MSR containers can be set with --log-level).
--dtr-ca
$MSR_CA
Use a PEM-encoded TLS CA certificate for MSR. By default MSR generates a
self-signed TLS certificate during deployment. You can use your own root
CA public certificate with --dtr-ca"$(catca.pem)".
--dtr-cert
$MSR_CERT
Use a PEM-encoded TLS certificate for MSR. By default MSR generates a
self-signed TLS certificate during deployment. You can use your own
public key certificate with --dtr-cert"$(catcert.pem)". If the
certificate has been signed by an intermediate certificate authority,
append its public key certificate at the end of the file to establish a
chain of trust.
--dtr-external-url
$MSR_EXTERNAL_URL
URL of the host or load balancer clients use to reach MSR. When you use
this flag, users are redirected to MKE for logging in. Once
authenticated they are redirected to the url you specify in this flag.
If you don’t use this flag, MSR is deployed without single sign-on with
MKE. Users and teams are shared but users login separately into the two
applications. You can enable and disable single sign-on in the MSR
settings. Format https://host[:port], where port is the value you
used with --replica-https-port. Since HSTS (HTTP
Strict-Transport-Security) header is included in all API responses, make
sure to specify the FQDN (Fully Qualified Domain Name) of your MSR, or
your browser may refuse to load the web interface.
--dtr-key
$MSR_KEY
Use a PEM-encoded TLS private key for MSR. By default MSR generates a
self-signed TLS certificate during deployment. You can use your own TLS
private key with --dtr-key"$(catkey.pem)".
--dtr-storage-volume
$MSR_STORAGE_ VOLUME
Customize the volume to store Docker images. By default MSR creates a
volume to store the Docker images in the local filesystem of the node
where MSR is running, without high-availability. Use this flag to
specify a full path or volume name for MSR to store images. For
high-availability, make sure all MSR replicas can read and write data on
this volume. If you’re using NFS, use --nfs-storage-url instead.
--enable-client-cert-auth
$ENABLE_CLIENT_CERT_ AUTH
Enables TLS client certificate authentication; use
--enable-client-cert-auth=false to disable it. If enabled, MSR will
additionally authenticate users via TLS client certificates. You must
also specify the root certificate authorities (CAs) that issued the
certificates with --client-cert-auth-ca.
--enable-pprof
$MSR_PPROF
Enables pprof profiling of the server. Use --enable-pprof=false to
disable it. Once MSR is deployed with this flag, you can access the
pprof endpoint for the api server at /debug/pprof, and the registry
endpoint at /registry_debug_pprof/debug/pprof.
--existing-replica-id
$MSR_REPLICA_ID
The ID of an existing MSR replica. To add, remove or modify MSR, you
must connect to an existing healthy replica’s database.
--force-recreate-nfs-volume
$FORCE_RECREATE_NFS_ VOLUME
Force MSR to recreate NFS volumes on the replica specified by
--existing-replica-id.
--help-extended
$MSR_EXTENDED_HELP
Display extended help text for a given command.
--http-proxy
$MSR_HTTP_PROXY
The HTTP proxy used for outgoing requests.
--https-proxy
$MSR_HTTPS_PROXY
The HTTPS proxy used for outgoing requests.
--log-host
$LOG_HOST
The syslog system to send logs to. The endpoint to send logs to. Use
this flag if you set --log-protocol to tcp or udp.
--log-level
$LOG_LEVEL
Log level for all container logs when logging to syslog. Default: INFO.
The supported log levels are debug, info, warn, error,
or fatal.
--log-protocol
$LOG_PROTOCOL
The protocol for sending logs. Default is internal. By default, MSR
internal components log information using the logger specified in the
Docker daemon in the node where the MSR replica is deployed. Use this
option to send MSR logs to an external syslog system. The supported
values are tcp, udp, and internal. Internal is the default
option, stopping MSR from sending logs to an external system. Use this
flag with --log-host.
--max-wait
$MAX_WAIT
The maximum amount of time MSR allows an operation to complete within.
This is frequently used to allocate more startup time to very large MSR
databases. The value is a Golang duration string. For example, "10m"
represents 10 minutes.
--nfs-options
$NFS_OPTIONS
Pass in NFS volume options verbatim for the replica specified in the
--existing-replica-id option. The NFS configuration must be set with
--nfs-storage-url explicitly to use this option. Specifying
--nfs-options will pass in character-for-character the options
specified in the argument when creating or recreating the NFS volume.
For instance, to use NFS v4 with async, pass in “rw,nfsvers=4,async” as
the argument.
List of domains the proxy should not be used for. When using
--http-proxy you can use this flag to specify a list of domains that
you don’t want to route through the proxy. Format acme.com[,acme.org].
--reinitialize-storage
$REINITIALIZE_STORAGE
Set the flag when you have changed storage backends but have not moved
the contents of the old storage backend to the new one. Erases
all tags in the registry.
--replica-http-port
$REPLICA_HTTP_PORT
The public HTTP port for the MSR replica. Default is 80. This allows
you to customize the HTTP port where users can reach MSR. Once users
access the HTTP port, they are redirected to use an HTTPS connection,
using the port specified with –replica-https-port. This port can also
be used for unencrypted health checks.
--replica-https-port
$REPLICA_HTTPS_PORT
The public HTTPS port for the MSR replica. Default is 443. This
allows you to customize the HTTPS port where users can reach MSR. Each
replica can use a different port.
--replica-rethinkdb-cache-mb
$RETHINKDB_CACHE_ MB
The maximum amount of space in MB for RethinkDB in-memory cache used by
the given replica. Default is auto. Auto is (available_memory-1024)/2. This config allows changing the RethinkDB cache usage per
replica. You need to run it once per replica to change each one.
--storage-migrated
$STORAGE_MIGRATED
A flag added in 2.6.4 which lets you indicate the migration status of
your storage data. Specify this flag if you are migrating to a new
storage backend and have already moved all contents from your old
backend to your new one. If not specified, MSR will assume the new
backend is empty during a backend storage switch, and consequently
destroy your existing tags and related image metadata.
--ucp-ca
$UCP_CA
Use a PEM-encoded TLS CA certificate for MKE. Download the MKE TLS CA
certificate from https://<mke-url>/ca, and use --ucp-ca"$(catca.pem)".
--ucp-insecure-tls
$UCP_INSECURE_TLS
Disable TLS verification for MKE.
--ucp-password
$UCP_PASSWORD
The MKE administrator password.
--ucp-url
$UCP_URL
The MKE URL including domain and port.
--ucp-username
$UCP_USERNAME
The MKE administrator username.
--registry-username<value>
$REGISTRY_USERNAME
Set the registry username to use when pulling MSR images.
--registry-password<value>
$REGISTRY_PASSWORD
Set the registry password to use when pulling MSR images.
The remove command scales down your MSR cluster by removing exactly
one replica. All other replicas must be healthy and will remain healthy
after this operation.
Options
Option
Environment variable
Description
--debug
$DEBUG
Enable debug mode for additional logs.
--existing-replica-id
$MSR_REPLICA_ID
The ID of an existing MSR replica. To add, remove or modify MSR, you
must connect to the database of an existing healthy replica.
--force
$DTR_FORCE_REMOVE_REPLICA
Ignore pre-checks when removing a replica.
--help-extended
$MSR_EXTENDED_HELP
Display extended help text for a given command.
--nocolor
$NOCOLOR
Disable output coloring in logs.
--replica-id
$MSR_REMOVE_REPLICA_ID
DEPRECATED Alias for --replica-ids
--replica-ids
$MSR_REMOVE_REPLICA_IDS
A comma separated list of IDs of replicas to remove from the cluster.
--ucp-ca
$UCP_CA
Use a PEM-encoded TLS CA certificate for MKE. Download the MKE TLS CA
certificate from https://<mke-url>/ca, and use --ucp-ca"$(catca.pem)".
--ucp-insecure-tls
$UCP_INSECURE_TLS
Disable TLS verification for MKE. The installation uses TLS but always
trusts the TLS certificate used by MKE, which can lead to MITM
(man-in-the-middle) attacks. For production deployments, use --ucp-ca"$(catca.pem)" instead.
The restore command performs a fresh installation of MSR, and
reconfigures it with configuration data from a tar file generated by
registry.mirantis.com/msr/dtrbackup. If you are restoring MSR
after a failure, please make sure you have destroyed the old MSR fully.
There are three actions you can take to recover an unhealthy MSR cluster:
If the majority of replicas are healthy, remove the unhealthy nodes
from the cluster, and join new nodes for high availability.
If the majority of replicas are unhealthy, use the
emergency-repair command to revert your
cluster to a single MSR replica.
If you cannot repair your cluster to a single replica, you must
restore from an existing backup, using the restore command.
This command does not restore Docker images. You should implement a
separate restore procedure for the Docker images stored in your
registry, taking in consideration whether your MSR installation is
configured to store images on the local filesystem or using a cloud
provider.
After restoring the cluster, you should use the :command`join` command to add
more MSR replicas for high availability.
Options
Option
Environment variable
Description
--async-nfs
$ASYNC_NFS
Use async NFS volume options on the replica specified by
--existing-replica-id.
--client-cert-auth-ca
$CLIENT_CA
PEM-encoded TLS root CA certificates for client certificate
authentication.
--custom-ca-cert-bundle
$CUSTOM_CA_CERTS_BUNDLE
Provide a file containing additional CA certificates for MSR service
containers to use when verifying TLS server certificates.
--debug
$DEBUG
Enable debug mode for additional logs.
--existing-replica-id
$MSR_REPLICA_ID
The ID of an existing MSR replica. To add, remove or modify MSR, you
must connect to an existing healthy replica’s database.
--dtr-ca
$MSR_CA
Use a PEM-encoded TLS CA certificate for MSR. By default MSR generates a
self-signed TLS certificate during deployment. You can use your own TLS
CA certificate with --dtr-ca"$(catca.pem)".
--dtr-cert
$MSR_CERT
Use a PEM-encoded TLS certificate for MSR. By default MSR generates a
self-signed TLS certificate during deployment. You can use your own TLS
certificate with --dtr-cert"$(catca.pem)".
--dtr-external-url
$MSR_EXTERNAL_URL
URL of the host or load balancer clients use to reach MSR. When you use
this flag, users are redirected to MKE for logging in. Once
authenticated they are redirected to the URL you specify in this flag.
If you don’t use this flag, MSR is deployed without single sign-on with
MKE. Users and teams are shared but users log in separately into the two
applications. You can enable and disable single sign-on within your MSR
system settings. Format https://host[:port], where port is the value
you used with --replica-https-port.
--dtr-key
$MSR_KEY
Use a PEM-encoded TLS private key for MSR. By default MSR generates a
self-signed TLS certificate during deployment. You can use your own TLS
private key with --dtr-key"$(catca.pem)".
--dtr-storage-volume
$MSR_STORAGE_VOLUME
Note
One of three options you can use for MSR backend storage, the other
two being dtr_use-default-storage and nfs_storage_url. The
use of one of the three options is mandatory, depending on your
setup, to allow for MSR to fall back to the storage setting you
configured at the time of backup.
If you have previously configured MSR to use a full path or volume name
for storage, specify the --dtr-storage-volume option as this will
cause MSR to use the same setting on restore. Refer to
dtr install and
dtr reconfigure for usage detail.
--dtr-use-default-storage
$MSR_DEFAULT_STORAGE
Note
One of three options you can use for MSR backend storage, the other
two being dtr_storage-volume and nfs_storage_url. The
use of one of the three options is mandatory, depending on your
setup, to allow for MSR to fall back to the storage setting you
configured at the time of backup.
If cloud storage was previously configured, then the default storage on
restore is cloud storage. Otherwise, local storage is used.
--nfs-storage-url
$NFS_STORAGE_URL
Note
One of three options you can use for MSR backend storage, the other
two being dtr_storage-volume and --dtr-use-default-storage.
The use of one of the three options is mandatory, depending on your
setup, to allow for MSR to fall back to the storage setting you
configured at the time of backup.
If NFS was previously configured, you must manually create a storage
volume on each MSR node and specify --dtr-storage-volume with the
newly-created volume instead. For additional NFS configuration options
to support NFS v4, refer to dtr install
and dtr reconfigure.
--enable-client-cert-auth
$ENABLE_CLIENT_CERT_AUTH
Enables TLS client certificate authentication; use
--enable-client-cert-auth=false to disable it.
--enable-pprof
$MSR_PPROF
Enables pprof profiling of the server. Use --enable-pprof=false to
disable it. Once MSR is deployed with this flag, you can access the
pprof endpoint for the api server at /debug/pprof, and the registry
endpoint at /registry_debug_pprof/debug/pprof.
--help-extended
$MSR_EXTENDED_HELP
Display extended help text for a given command.
--http-proxy
$MSR_HTTP_PROXY
The HTTP proxy used for outgoing requests.
--https-proxy
$MSR_HTTPS_PROXY
The HTTPS proxy used for outgoing requests.
--log-host
$LOG_HOST
The syslog system to send logs to.The endpoint to send logs to. Use this
flag if you set --log-protocol to tcp or udp.
--log-level
$LOG_LEVEL
Log level for all container logs when logging to syslog. Default:
INFO. The supported log levels are debug, info, warn,
error, or fatal.
--log-protocol
$LOG_PROTOCOL
The protocol for sending logs. Default is internal.By default, MSR
internal components log information using the logger specified in the
Docker daemon in the node where the MSR replica is deployed. Use this
option to send MSR logs to an external syslog system. The supported
values are tcp, udp, and internal. Internal is the default option,
stopping MSR from sending logs to an external system. Use this flag with
--log-host.
--max-wait
$MAX_WAIT
The maximum amount of time MSR allows an operation to complete within.
This is frequently used to allocate more startup time to very large MSR
databases. The value is a Golang duration string. For example, "10m"
represents 10 minutes.
--nfs-options
$NFS_OPTIONS
Pass in NFS volume options verbatim for the replica specified by
--existing-replica-id.
--nocolor
$NOCOLOR
Disable output coloring in logs.
--no-proxy
$MSR_NO_PROXY
List of domains the proxy should not be used for.When using
--http-proxy you can use this flag to specify a list of domains that
you don’t want to route through the proxy. Format acme.com[,acme.org].
--replica-http-port
$REPLICA_HTTP_PORT
The public HTTP port for the MSR replica. Default is 80. This allows
you to customize the HTTP port where users can reach MSR. Once users
access the HTTP port, they are redirected to use an HTTPS connection,
using the port specified with --replica-https-port. This port can
also be used for unencrypted health checks.
--replica-https-port
$REPLICA_HTTPS_PORT
The public HTTPS port for the MSR replica. Default is 443. This
allows you to customize the HTTPS port where users can reach MSR. Each
replica can use a different port.
--replica-id
$MSR_INSTALL_REPLICA_ID
Assign a 12-character hexadecimal ID to the MSR replica. Mandatory.
--replica-rethinkdb-cache-mb
$RETHINKDB_CACHE_MB
The maximum amount of space in MB for RethinkDB in-memory cache used by
the given replica. Default is auto. Auto is (available_memory-1024)/2. This config allows changing the RethinkDB cache usage per
replica. You need to run it once per replica to change each one.
--ucp-ca
$UCP_CA
Use a PEM-encoded TLS CA certificate for MKE. Download the MKE TLS CA
certificate from https://<mke-url>/ca, and use --ucp-ca"$(catca.pem)".
--ucp-insecure-tls
$UCP_INSECURE_TLS
Disable TLS verification for MKE. The installation uses TLS but always
trusts the TLS certificate used by MKE, which can lead to
man-in-the-middle attacks. For production deployments, use --ucp-ca"$(catca.pem)" instead.
--ucp-node
$UCP_NODE
The hostname of the MKE node to use to deploy MSR. Random by default.
You can find the hostnames of the nodes in the cluster in the MKE web
interface, or by running docker node ls on an MKE manager
node. Note that MKE and MSR must not be installed on the same node,
instead install MSR on worker nodes that will be managed by MKE.
--ucp-password
$UCP_PASSWORD
The MKE administrator password.
--ucp-url
$UCP_URL
The MKE URL including domain and port.
--ucp-username
$UCP_USERNAME
The MKE administrator username.
--registry-username<value>
$REGISTRY_USERNAME
Set the registry username to use when pulling MSR images.
--registry-password<value>
$REGISTRY_PASSWORD
Set the registry password to use when pulling MSR images.
The dtr upgrade command upgrades DTR 2.9.x to the current version
(2.10.x) of the image.
Options
Option
Environment variable
Description
--debug
$DEBUG
Enable debug mode for additional logs.
--existing-replica-id
$MSR_REPLICA_ID
The ID of an existing MSR replica. To add, remove or modify MSR, you
must connect to an existing healthy replica’s database.
--help-extended
$MSR_EXTENDED_HELP
Display extended help text for a given command.
--nocolor
$NOCOLOR
Disable output coloring in logs.
--ucp-ca
$UCP_CA
Use a PEM-encoded TLS CA certificate for MKE. Download the MKE TLS CA
certificate from https://<mke-url>/ca, and use --ucp-ca"$(catca.pem)".
--ucp-insecure-tls
$UCP_INSECURE_TLS
Disable TLS verification for MKE. The installation uses TLS but always
trusts the TLS certificate used by MKE, which can lead to
man-in-the-middle attacks. For production deployments, use --ucp-ca"$(catca.pem)" instead.
--ucp-password
$UCP_PASSWORD
The MKE administrator password.
--ucp-url
$UCP_URL
The MKE URL including domain and port.
--ucp-username
$UCP_USERNAME
The MKE administrator username.
--max-wait
$MAX_WAIT
The maximum amount of time MSR allows an operation to complete within.
This is frequently used to allocate more startup time to very large MSR
databases. The value is a Golang duration string. For example, "10m"
represents 10 minutes.
--registry-username<value>
$REGISTRY_USERNAME
Set the registry username to use when pulling MSR images.
--registry-password<value>
$REGISTRY_PASSWORD
Set the registry password to use when pulling MSR images.
Release Notes
This document describes the latest changes, enhancements, known issues, and
fixes for Mirantis Secure Registry (MSR) for versions 2.10.x.
2.10.0
Release date
Name
Highlights
2026-07-07
MSR 2.10.0
Initial MSR 2.10 release introducing the following key features:
Cosign-aware signing in the web UI, with signature
facility badges per image tag indicating DCT (Notary)
and Cosign signing status.
New API endpoints for Notary lifecycle management,
including status reporting and decommissioning.
Automatic disabling of the deprecated Notary subsystem
on install and upgrade when no trust data is present.
Notary deprecation banner on image tag detail pages.
Version update list now sourced from
registry.mirantis.com instead of Docker Hub.
Support for Docker Engine v25 and v29.
Black Duck security scanner updated to version
2025.12.0.
New features and enhancements
MSR 2.10.0 includes the following new features and enhancements:
MSR introduces Cosign-aware signing in the web UI,
deprecates legacy Notary, and adds API endpoints for Notary
lifecycle management.
[ENGDTR-4543] Automatic Notary decommissioning
MSR now automatically disables the deprecated Notary subsystem during
installation and upgrade when no Notary trust data (signed
images) is present on the system.
[ENGDTR-4544] Notary management API endpoints
MSR adds the following API endpoints:
GET/api/v0/admin/notary/status - Reports the current status of the
Notary subsystem.
POST/api/v0/admin/notary/disable - Initiates decommissioning of the
Notary subsystem.
[ENGDTR-4545] Cosign-aware signing
The MSR web UI now distinguishes between Cosign and legacy Notary
signatures. The Signed column and image header display the
appropriate signing status for each image.
[ENGDTR-4561] Notary deprecation banner
MSR now displays a deprecation banner on the image tag detail
page when legacy Notary signatures are present.
[ENGDTR-4587] Signature facility badges
The MSR web UI now displays signature facility badges on each image tag
to indicate whether the tag is signed with Cosign, DCT (Notary), or both:
A blue C badge indicates a valid Cosign signature.
A blue D badge indicates a valid DCT signature.
A red D badge indicates an expired DCT signature.
Both badges can appear together for a single tag. Unsigned tags
display no badges. Each badge includes a hover tooltip with
additional signature details.
Component and dependency updates
MSR updates the Black Duck security scanner, Docker, and
the version-check source used by the upgrade API.
[ENGDTR-4509] Black Duck security scanner update
MSR updates the Black Duck security scanner (previously Synopsys
security scanner) to version 2025.12.0. Notable upstream changes since
the previous version include the following:
Chainguard container images
Minimus container images
Rust binaries
Go binaries
.NET components
OpenWRT ipkg packages
Wind River Linux
In addition, the following issues are resolved in Black Duck 25.12.0:
False negative CVE-2021-23792 missing from
imageio-metadata 3.3.2
Unexpected match .NET 20171205-snapshot-8cb086ca for
coreclr.dll
c-ares version is being detected as the wrong version
False negative: Apache Common Beanutils missing vulnerability
freeRTOS false positive match
CVE-2022-3515 mapping to gnupg 2.2.27-3ubuntu2.1
Fixed a memory consumption issue in a background job that
applies new vulnerabilities to existing scans
Fixed an issue in distribution backport matching in cases
where no backports matched to a component via hash sum; this
will improve backport matching for example when linux
distribution info is overridden via an analysis configuration
file
Improved query for calculating vulnerability counts with
large scans
[ENGDTR-4532] Version-check source update for the upgrade API
MSR now retrieves its version update list from registry.mirantis.com
instead of Docker Hub.
Note
Ensure that your network filtering rules allow outbound connections to
registry.mirantis.com so that the MSR web UI can display notification
banners when a new product version becomes available.
[ENGDTR-4541] Docker update
MSR adds support for Docker Engine v25 and v29.
Addressed issues
MSR 2.10.0 is an initial version release, and as such it has no legacy issues
that require resolution.
Known issues
This section describes the MSR known issues with available workarounds, along
with a list of current product limitations:
(ENGDTR-5013) Cosign signature details not listed in v1 API response
The signatures array returned by the MSR v1 repositories/tags API
does not include entries for Cosign signatures. Only DCT/Notary
signatures are listed there. The cosignSigned field still
correctly reports whether an image has one or more Cosign signatures,
but individual signature details are not enumerated for Cosign.
Workaround
Cosign signing and verification are client-side operations by design.
Use the cosign CLI (for example, cosigntree or cosignverify) as the source of truth for inspecting and validating Cosign
signatures on an image.
Major component versions
The following table provides the versioning information for the major
middleware components that comprise the MSR 2.10.0 patch release.
MSR 2.10.0 is an initial version release, and as such it has no legacy
vulnerabilities or exposures that require resolution.
Deprecations
With the introduction of Cosign in MSR 2.10, Mirantis is deprecating
Docker Content Trust (DCT) and the legacy Notary server and signer
infrastructure. Although MSR 2.10 maintains backward compatibility for existing
signatures, Mirantis will discontinue maintenance and support for the Notary
stack in a future release. Users should plan to migrate their signing workflows
to the client-only Cosign architecture.
Release Compatibility Matrix
MSR 2.10 Compatibility Matrix
Mirantis Secure Registry (MSR, and formerly Docker Trusted Registry) provides
an enterprise grade container registry solution that can be easily integrated
to provide the core of an effective secure software supply chain.
MSR functionality is dependent on MKE, and MKE functionality is dependent on MCR. As such, MSR operating system compatibility is contingent on the operating system compatibility of the MCR versions with which your particular MKE version is compatible.
To determine MSR operating system compatibility:
Access the MKE compatibility matrix
and locate the version of MKE that you are running with MSR.
Note the MCR versions with which that MKE version is compatible.
Access the MCR compatibility matrix
and locate the MCR versions that are compatible with your version of MKE
to determine operating system compatibility.
The Mirantis Kubernetes Engine (MKE) and Mirantis Secure Registry (MSR) web
user interfaces (UIs) both run in the browser, separate from any backend
software. As such, Mirantis aims to support browsers separately from
the backend software in use.
Mirantis currently supports the following web browsers:
Browser
Supported version
Release date
Operating systems
Google Chrome
96.0.4664 or newer
15 November 2021
MacOS, Windows
Microsoft Edge
95.0.1020 or newer
21 October 2021
Windows only
Firefox
94.0 or newer
2 November 2021
MacOS, Windows
To ensure the best user experience, Mirantis recommends that you use the
latest version of any of the supported browsers. The use of other browsers
or older versions of the browsers we support can result in rendering issues,
and can even lead to glitches and crashes in the event that some JavaScript
language features or browser web APIs are not supported.
Important
Mirantis does not tie browser support to any particular MKE or MSR software
release.
Mirantis strives to leverage the latest in browser technology to build more
performant client software, as well as ensuring that our customers benefit from
the latest browser security updates. To this end, our strategy is to regularly
move our supported browser versions forward, while also lagging behind the
latest releases by approximately one year to give our customers a
sufficient upgrade buffer.
MKE, MSR, and MCR Maintenance Lifecycle
The MKE, MSR, and MCR platform subscription provides software, support, and
certification to enterprise development and IT teams that build and manage
critical apps in production at scale. It provides a trusted platform for all
apps which supply integrated management and security across the app lifecycle,
comprised primarily of Mirantis Kubernetes Engine, Mirantis Secure Registry
(MSR), and Mirantis Container Runtime (MCR).
Detailed here are all currently supported product versions, as well as the
product versions most recently deprecated. It can be assumed that all earlier
product versions are at End of Life (EOL).
Important Definitions
“Major Releases” (X.y.z): Vehicles for delivering major and minor feature
development and enhancements to existing features. They incorporate all
applicable Error corrections made in prior Major Releases, Minor Releases,
and Maintenance Releases.
“Minor Releases” (x.Y.z): Vehicles for delivering minor feature
developments, enhancements to existing features, and defect corrections. They
incorporate all applicable Error corrections made in prior Minor Releases,
and Maintenance Releases.
“Maintenance Releases” (x.y.Z): Vehicles for delivering Error corrections
that are severely affecting a number of customers and cannot wait for the
next major or minor release. They incorporate all applicable defect
corrections made in prior Maintenance Releases.
“End of Life” (EOL): Versions are no longer supported by Mirantis,
updating to a later version is recommended.
Support lifecycle
GA to 12 months
12 to 18 months
18 to 24 months
Full support
Full support 1
Limited Support for existing installations 2
1
Software patches for critical bugs and security issues only; no feature
enablement.
2
Software patches for critical security issues only.
With the intent of improving the customer experience, Mirantis strives to offer
maintenance releases for the Mirantis Secure Registry (MSR) software every
six to eight weeks. Primarily, these maintenance releases will aim to resolve
known issues and issues reported by customers, quash CVEs, and reduce technical
debt. The version of each MSR maintenance release is reflected in the third
digit position of the version number (as an example, for MSR 2.9 the most
current maintenance release is MSR 2.10.0).
In parallel with our maintenance MSR release work, each year Mirantis will
develop and release a new major version of MSR, the Mirantis support lifespan
of which will adhere to our legacy two year standard.
End of Life Date
The End of Life (EOL) date for MSR 2.9 is 2026-DEC-01.
The MSR team will make every effort to hold to the release cadence stated here.
Customers should be aware, though, that development and release cycles can
change, and without advance notice.
Technology Preview features
A Technology Preview feature provides early access to upcoming product
innovations, allowing customers to experiment with the functionality and
provide feedback.
Technology Preview features may be privately or publicly available and neither
are intended for production use. While Mirantis will provide assistance with
such features through official channels, normal Service Level Agreements do not
apply.
As Mirantis considers making future iterations of Technology Preview features
generally available, we will do our best to resolve any issues that customers
experience when using these features.
During the development of a Technology Preview feature, additional components
may become available to the public for evaluation. Mirantis cannot guarantee
the stability of such features. As a result, if you are using Technology
Preview features, you may not be able to seamlessly upgrade to subsequent
product releases.
Mirantis makes no guarantees that Technology Preview features will graduate to
generally available features.
Open Source Components and Licenses
Click any product component license below to download a text
file of that license to your local system.