Install MSR using Docker Compose¶
After installing the prerequisites, you can deploy MSR by following the steps below.
Download the MSR installer¶
Locate the
.tgz
installer package of the latest release of MSR at https://packages.mirantis.com/?prefix=msr/. The release is available as a single bundle and is suitable only for offline installations.Right-click on the installer package and copy the download link.
Download the package to your instance:
wget https://s3-us-east-2.amazonaws.com/packages-mirantis.com/msr/harbor-offline-installer-<VERSION>.tgz
Extract the package:
tar xvf harbor-offline-installer-<VERSION>.tgz
Navigate to the extracted folder:
cd harbor
Configure MSR¶
Open the
harbor.yml
configuration file in your editor of choice, for example:cp harbor.yml.tmpl harbor.yml vim harbor.yml
Modify key parameters:
Set the hostname for MSR to the domain name or IP address where MSR will run:
hostname: <YOUR-DOMAIN.COM>
Set a password for the MSR admin:
harbor_admin_password: <YOUR-PASSWORD>
Ensure the directory where MSR stores its data has enough disk space:
data_volume: </YOUR/DATA/PATH>
Prepare certificates for SSL¶
To enable SSL, configure paths to your SSL certificate and key:
If you do not have an SSL certificate from a trusted certificate authority (CA), you can generate self-signed certificates for testing purposes:
openssl req -newkey rsa:4096 -nodes -sha256 -keyout ./<YOUR-DOMAIN.COM>.key -x509 -days 365 -out ./<YOUR-DOMAIN.COM>.crt
Note
For production environments, you can acquire the SSL certificates through providers like Let’s Encrypt or commercial CA vendors.
Place the generated
<YOUR-DOMAIN.COM>.crt
and<YOUR-DOMAIN.COM>.key
in a secure directory.Update your
harbor.yml
configuration file to point to these certificate files:certificate: </PATH/TO/YOUR-DOMAIN.COM>.crt private_key: </PATH/TO/YOUR-DOMAIN.COM>.key
Verify that your firewall settings allow traffic on port
443
as SSL communication requires this port to be open.
Install and start MSR¶
You can proceed to the MSR installation only after you have configured
harbor.yml
.
Run the installation script:
sudo ./install.sh
This script uses Docker Compose to install the MSR services.
Note
To enable image scanning, install Trivy along with MSR by running:
sudo ./install.sh --with-trivy
Verify if the services are running:
sudo docker compose ps
You should be able to see services like
harbor-core
,harbor-db
,registry
, and so on, running.
Access MSR¶
Once the services are running, you can access MSR from a web browser at
http://<YOUR-DOMAIN.COM>
using the admin credentials set in
harbor.yml
. You will get redirected to https
if SSL is enabled
on the instance.