Knowledge BaseMetric InsightsSystem UpgradesUpgrading-in-place Metric Insights from v5.6.x to v6.2.x

Upgrading-in-place Metric Insights from v5.6.x to v6.2.x

This article covers in detail how to upgrade-in-place Metric Insights from v5.6.x to v6.2.x. This is for non-orchestrated environments of Metric Insights that will run v6 (also known as a Simple Install). To ensure the current v5 server is compatible with v6, please see the following help documentation:

 

1. Create a backup of Metric Insights v5

 Create backup on MI v 5.6.x and move it out of the /var/backups/mi-app-backups folder because this folder will be purged

$ mi-app-backup -vv
$ mv /var/backups/mi-app-backups/<your-v5-backup.tar.gz> /home/myuser

Move or copy any critical files out of the /opt/mi filesystem to ensure a backup copy exists after the uninstall. Place the files or copies in your home directory or in any directory other than /opt/mi. Here's an example of moving the files to /home/myuser/MIv5/

$ mv /opt/mi/iv/engine/config/saml.php /home/myuser/MIv5/
$ cp -Rf /opt/mi/iv/data/themes/* /home/myuser/MIv5/
$ cp -Rf /opt/mi/ssl/* /home/myuser/MIv5/

2. Stop Apache and MySQL services (if MySQL is running locally)

Stop and disable Apache and MySQL services. Note the service names can differ depending on what flavor of Linux the server is running:

  • Debian/Ubuntu:  apache2,  mysql/mariadb
  • RedHat/CentOS:  httpd,  mysqld/mariadb
$ systemctl stop mariadb
$ systemctl disable mariadb 
$ systemctl stop httpd
$ systemctl disable httpd

Check ports 80/443/3306 to ensure no lingering Apache and MySQL processes are occupying the ports

netstat -tulpn 

3. Download the Metric Insights v5.6.3 installer and unpack

Contact Metric Insights Support for the v5.6.3 installer. Once you receive the download link, download the install package and copy it to the MI server.

Untar the MI v5.6.3 install package by running the following tar command:

$ tar xvf MetricInsights-Installer-v5.6.3-Full.tar.gz

Move to the v5.6.3 install directory:

$ cd MetricInsights-Installer-v5.6.3-Full

4. Run the uninstaller script to remove v5 from the server

Use the uninstaller.py script to uninstall MI v5.6.x

$ ./uninstaller.py --purge --drop-db -vv

5. Download the latest Metric Insights v6 installer and unpack

Contact Metric Insights Support for the latest v6 installer. Once you receive the download link, download the install package and copy it to the MI server.

Untar the MI v6 install package by running the following tar command:

$ tar xvf MetricInsights-Installer-v6.2.1-Full.tar.gz

Move to the v6.2.1 install directory:

$ cd MetricInsights-Installer-v6.2.1-Full

 

6. Run the installer to deploy v6

Before running the installer, confirm whether the mysql database will run locally, or from a remote database server. Please also identify what timezone the Metric Insights application should be in. Note the timezone values to use below.

If mysql will locally on the same server, run the installer as follows:

$ ./installer.py --bind-address 0.0.0.0 --timezone <timezone> --dp-mysql-option <timezone> -vv

If mysql will run from a remote database server, run the installer as shown below. Note, MySQL 8 must already be installed on the remote db server.

$ ./installer.py --bind-address 0.0.0.0 --db-hostname <remote-db-server> --db-user <mysql-root-user> --db-password <mysql-root-password> --timezone <timezone> --dp-mysql-option <timezone> --components web,dataprocessor,seed,data-analyzer,monitoring -vv

 

7. Restore the v5 backup in v6

Restore your MI v5.6.x backup in MI v6. The backup file can be restored directly from the host server. There is no need to enter the v6 docker containers.

$ mi-app-restore /home/myuser/<your-v5-backup.tar.gz> --convert --skip-compatibility-check --force -vv

 

For more information about Metric Insights v6, please see the following articles: