Install MSR using Docker Compose#
After installing the prerequisites, you can deploy MSR by following the steps below.
Download the MSR installer#
-
Locate the
.tgzinstaller package of the latest release of MSR at Mirantis Packages.
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.ymlconfiguration 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>.crtand<YOUR-DOMAIN.COM>.keyin a secure directory. - Update your
harbor.ymlconfiguration 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
443as 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:
```bash
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.