Docker Deployment (Simple Installer)

This article will detail how to setup and install a Metric Insights dockerized application.

PREREQUISITES:

In order to deploy Metric Insights using simple installer, the host must have the following software installed:

  1. docker-ce
  2. docker-compose==1.19.0
Simple installation architecture (Version 6.0.1)

If you are using a firewall on the Linux 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)
Simple installation architecture (Version 6.0.0)

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

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

1. Connect to the server by ssh

  1. Use ssh root@000.000.000.000 and replace the zeros with the server IP address.
  2. When prompted, enter the root password provided by your IT specialist.

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. Package Overview

  1. base 
    • subfolder with basic /opt/mi directory structure that will be overwritten by next update 
  2. build.properties 
    • a file with specified components versions
  3. data 
    • a subfolder with binary data and miscellaneous data (such as dependencies list and credentials for pulling docker images from docker.metricinsights.com by Installer in case with Lite type of package)
  4. installer.py 
    • the main executive file that initializes the Metric Insights installation process
  5. utils 
    • folder containing common libraries used by installer.py
    • also has third-party libraries

4. Operating Systems Supported

6.0.0 and 6.0.1 docker-compose Versions are restricted by Debian 7. Libc issue.

This version can be used on all supported Operating Systems (any OS with Linux kernel >= 3.10).

5. Initiate the installation process

By default, it is enough to run ./installer.py and after a few minutes you can get access to Metric Insights.

./installer.py

NOTE: This command can only be used by a root user.

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

5.2. The list of arguments that can be used during installation

Optional Parameters
-h, --help Show this help message and exit
-v, --verbose Verbose logging (default: False)
-y, --yes Assume "yes" on interactive requests (default: False)
--path INSTALL_PATH Base path for Metric Insights (default: /opt/mi)
--dp-hostname DATAPROCESSOR_HOSTNAME Data Processor service hostname for external services
--skip-packages Skip installation of any additional packages (default: False)
--show-packages Show packages required to run Metric Insights (default: False)
--db-ram-config DB_RAM_CONFIG Amount of RAM (integer value in gigabytes) on the MI Database Server. Options: [12,16,32] (default: None)
--db-hostname DB_HOSTNAME MySQL hostname of a Database server (default: mysql)
--db-port DB_PORT MySQL port for db-hostname (default: 3306)
--db-user DB_USER MySQL admin user name to init a Metric Insights database (default: root)
--db-password DB_PASSWORD MySQL admin user password
--dp-db-password DP_DB_PASSWORD MySQL Data Processor user password
--restrict-access RESTRICT_ACCESS Comma separated list of the MI services that must not have outside access. By default, all services are openned externally. Example: web, mysql, dataprocessor, seed (default: None)
--unprivileged During installation, skip actions that require root access, like system package installation. CAUTION: system must already have all the required packages installed (default: False)
--seed-hostname DATAPROCESSOR_SEED_HOSTNAME Data Processor seed service hostname for external services
--dp-url DP_URL Set Data Processor REST-API URL (default: http://dataprocessor:8080)
--dp-user DP_USER User to get access to the Data Processor REST-API service (default: dataprocessor)
--dp-password DP_PASSWORD Password for the Data Processor REST-API user (default: None)
--dp-enable-ssl Enable HTTPS for the Data Processor REST-API service. Ensure that correct SSL certificate and DP URL are provided (default: False)
--components COMPONENTS Comma separated list of components to deploy. Possible values: web, mysql, dataprocessor, seed (default: web, mysql, dataprocessor, seed)

6. Security

./installer.py --restrict-access mysql,dataprocessor

This way only UI can be accessible from thе outside.

0 Comments

Add your comment

E-Mail me when someone replies to this comment