Docker Deployment on Windows Host

PREREQUISITES: 

We recommend using a bare-metal Windows system.

The Windows Subsystem for Linux (WSL) version 2 introduces a significant architectural change (it is now a full Linux kernel built by Microsoft), allowing Linux containers to run natively without emulation.

  1. Windows hypervisor should have a minimum 16Gb of RAM
  2. If the hypervisor is virtualized, nested virtualisation should be enabled
  3. Windows host should support Docker Desktop WSL 2 backend (currently supported only Windows 10 x64 systems: Version 1903 or higher, with Build 18362 or higher) → https://docs.docker.com/docker-for-windows/wsl/
  4. Follow the steps described in official Docker and Microsoft documentation → https://docs.docker.com/docker-for-windows/wsl/#prerequisites
  5. To run the Metric Insights installer, the Linux subsystem needs to be enabled and one of our supported Linux distributions must be installed → Supported Operating Systems

Simple installation architecture

If you are using a firewall on the Windows machine, the following ports are necessary for Metric Insights to work correctly:

  1. 80, 443 - HTTP and HTTPS ports for the UI Application Service (by default redirection to 443)
  2. 2550 - TCP port for the Data Processor cluster
  3. 2551 - TCP port for the Seed Node Service
  4. 3306 - MySQL port to get access from outside
  5. 8080, 8443 - HTTP and HTTPS ports for the REST API Data Processor Service (only one port is enabled at one time)
  6. 8081 - TCP port for Monitoring Tool

1. Connect to the server

  1. Connect to the host server and run Windows PowerShell as Admin user.
    Click Right mouse button on Start button → Windows PowerShell (Admin):

2. In PowerShell terminal for accessing Linux Subsystem run bash command and for switching to root user run sudo -i :

Note: The Metric Insights application must be installed as user root or as a user with sudo privileges (added to the wheel or sudo group, thereby included in the sudoers list). The docker daemon binds to a unix socket instead of a tcp port, therefore unix sockets are owned by user root and accessible by users with sudo privileges.

2. Download the MI app installation package

  1. Depending on the version, you will be given a link to the corresponding MI app installation package.
  2. Along with the link, Username and Password will be provided by the MI support team; enter these credentials into the respective fields.
  3. Confirm your agreement with the Terms and Conditions of the Metric Insights usage.
  4. Click [Submit].

This will initiate the download process of the .tar.gz archive (containing all files required to install the system).

3. Preparing Application Installer Package

In terminal go to archive location and untar it.

Example for v6.2.1 Full Installer Package:

cd /mnt/c/MetricInsights/

tar -xvzf MetricInsights-Installer-v6.2.1-Full.tar.gz

cd ./MetricInsights-Installer-v6.2.1-Full
Click to copy

4. Supported Linux Subsystems

Metric Insights v6.x installer can work on the following Operating Systems (any OS with Linux kernel >= 3.10):

  • RHEL 7/8
  • CentOS 7/8
  • Oracle Linux 7
  • Ubuntu 14/16/18
  • Debian 8/9/10

5. Run the installer

Normally, the application can be installed by simply running ./installer.py -v  but we recommend checking the help to ensure appropriate parameters are defined for the install. To see the help:

./installer.py -h

Also, for installing under Windows hypervisor need to run installer with options --skip-packages and --bind-address 0.0.0.0

./installer.py --skip-packages --bind-address 0.0.0.0 -v

Once the installation is complete, you will see a "Metric Insights application installed successfully" message.

5.1. Basic console commands

Not all tools will be installed with all components, each component has only: mi-version and mi-control. All of these tools become accessible only if the Web Component is installed.

mi-app-backup Wrapper for mi-app-backup (/opt/mi/backup is an internal mount point from the web docker container)
mi-app-restore Wrapper for mi-app-restore
mi-console Connect to the MI UI docker container directly
mi-control Docker-compose wrapper helping to manage Metric Insights docker containers
mi-cron Wrapper for mi-cron manipulating the MI cron tasks inside the docker container
mi-db-dump Wrapper for mi-db-dump
mi-db-mgr Wrapper for mi-db-mgr
mi-ldap-usersync Wrapper for mi-ldap-usersync
mi-maintenance Wrapper for mi-maintenance
mi-passwd Wrapper for mi-passwd
mi-version Show the installed Metric Insigths version

6. Checking deployment

To check container statuses we can run docker ps command from PowerShell or Linux Subsystem terminal console:

In browser navigate to Windows hypervisor address to check Web UI and Monitoring UI:

Note: username and password for Monitoring UI can be accessed from Docker Dashboard: