Applying System Upgrades

1. Create a Backup

Make sure to back up your MI instance before upgrading to a newer version. This will ensure a safe restore of the application and database data in case system upgrade fails.

A backup can be created manually via mi-app-backup script, or via MI Console.

NOTE:

  • If you are upgrading MI app deployed as Simple Install or Orchestrated Environment with the re-created deployment manifest, proceed to the next steps.
  • If your MI app is deployed as Orchestrated Environment without a re-created manifest, skip the next steps and contact [email protected] for the list of changes to be applied for upgrade to a new version.

2. Download New Installer

Access Get MI to download a new installer.

NOTE: See Access Software Downloads and License Keys via Get MI for details.

3. Unpack the Installer

$ tar xvf MetricInsights-Installer-v7.0.2-Lite.tar.gz

4. Run the Installer

4.1. Simple Installation

Run ./installer.py --show-prior-command to see the last executed installer command. If you want to run the installer with the same parameters, run ./installer.py --use-prior-command -v. Otherwise, see the example commands below:

NOTE: It is very important to set a correct timezone for the application when running the installer using the --timezone parameter.

If a database is running on a remote server that has timezone different from the application timezone, specify a timezone of the remote database server using the --mysql-timezone parameter. This is an example of installing the application with MySQL running on a local host where the timezone is set to Pacific Time. Setting the --bind-address to 0.0.0.0 is also key:

./installer.py --bind-address 0.0.0.0 --timezone 'US/Pacific' -vv

Use the ./installer.py --timezone-list command to see the list of available timezones.

  • If MySQL runs on the local host, run: sudo ./installer.py --bind-address 0.0.0.0 --timezone <timezone> -vv.
  • If  MySQL runs on a remote database server:
    • If the remote database server has the same timezone as the Metric Insights application: sudo ./installer.py --bind-address 0.0.0.0 --db-hostname <remote DB host> --db-user <remote DB root username> --db-password <remote DB root password> --timezone <timezone> -vv
    • If the remote database server has a different timezone than the application: sudo ./installer.py --bind-address 0.0.0.0 --db-hostname <remote DB host> --db-user <remote DB root username> --db-password <remote DB root password> --timezone <timezone> --mysql-timezone <MySQL timezone> -vv

NOTE: Beginning v6.4.5, if parameter --db-hostname is enabled, you no longer need to specify components using the --components parameter.

Run ./installer.py --help to see the list of available installer options.

4.2. Orchestrated Environments

If your application's architecture has not changed, run the same installer command that has been used before, otherwise, proceed with the commands described below according to the application's deployment type.

Kubernetes

Before running the installer,  identify what timezone the Metric Insights application should be in. Note the timezone values to use below.

  • If the remote DB server has the same timezone as MI app:

sudo ./installer.py kubernetes --storage-class nfs  --nfs-server-address <nfs.example.com> --ingress-controller-type  nginx --hostname <MI-hostname> --dp-hostname  <dataprocessor_hostname> --registry <registry-url>  --timezone  <MI app timezone> -o <manifest filename>.yml

  • If the remote DB server has a different timezone than MI app:

sudo ./installer.py kubernetes --storage-class nfs  --nfs-server-address <nfs.example.com> --ingress-controller-type  nginx --hostname <MI-hostname> --dp-hostname  <dataprocessor_hostname> --registry <registry-url>  --timezone <MI app timezone> --mysql-timezone <remote database  server timezone> -o <manifest filename>.yml

The key here is using the -o option for the output file and then specifying a file name with a *.yml extension (yaml file).

Run ./installer.py kubernetes --help to see the list of available installer options.

Next, deploy the Metric Insights application to the K8s namespace using the newly created deployment configuration file:

$ kubectl --namespace <MI-namespace> apply -f <manifest filename>.yml 

OpenShift

To create a deployment configuration file (also called a  manifest), use the Metric Insights installer to generate a yaml file. Here's an example where we are setting the following values:

  • Kubernetes Type = openshift
  • Storage Type = NFS
  • NFS server address = 192.168.33.10
  • Private Docker Registry

OpenShift 3:

If the remote DB server has the same timezone as MI app: 

sudo ./installer.py kubernetes --type openshift --storage-class nfs  --nfs-server-address <nfs.example.com> --ingress-controller-type  nginx --hostname <MI-hostname> --dp-hostname  <dataprocessor_hostname> --registry <registry-url>  --timezone <MI app timezone> -o <manifest filename>.yml

If the remote DB server has a different timezone than MI app:

sudo ./installer.py kubernetes --type openshift --storage-class nfs  --nfs-server-address <nfs.example.com> --ingress-controller-type  nginx --hostname <MI-hostname> --dp-hostname  <dataprocessor_hostname> --registry <registry-url>  --timezone <MI app timezone> --mysql-timezone <remote  databaseserver timezone> -o <manifest filename>.yml

OpenShift 4:

If the remote DB server has the same timezone as MI app: 

sudo ./installer.py kubernetes --storage-class nfs --nfs-server-address <nfs.example.com> --ingress-controller-type  nginx --hostname <MI-hostname> --dp-hostname  <dataprocessor_hostname> --registry <registry-url>  --timezone <MI app timezone> -o <manifest filename>.yml

If the remote DB server has a different timezone than MI app:

sudo ./installer.py kubernetes --storage-class nfs  --nfs-server-address <nfs.example.com> --ingress-controller-type  nginx --hostname <MI-hostname> --dp-hostname  <dataprocessor_hostname> --registry <registry-url>  --timezone <MI app timezone> --mysql-timezone <remote  databaseserver timezone> -o <manifest filename>.yml

The key here is using the -o option for the output file and then specifying a file name with a *.yml extension (yaml file).

Run ./installer.py kubernetes --help to see the list of available installer options.

Next, deploy the Metric Insights application by applying the newly created deployment configuration file:

$ oc apply -f application.yml 

Docker Swarm

  • If the remote DB server has the same timezone as MI app: sudo ./installer.py swarm --timezone <MI app timezone> -o <manifest filename>.yml
  • If the remote DB server has a different timezone than MI app: sudo ./installer.py swarm --timezone <MI app timezone> --mysql-timezone <remote database server timezone> -o <manifest filename>.yml
  • If the Metric Insights Docker images will be pulled from a private Docker registry, use the --registry option along with the Docker registry URL as in sudo ./installer.py swarm... --registry docker.metricinsights.com. When providing a registry URL, be sure to not include “https://.” The supported values are <hostname> or <hostname>:<port> without any protocol.

Note: Run ./installer.py swarm --help to see the list of available installer options.

To deploy docker swarm using the deployment manifest, use the docker stack deploy command:

$ docker stack deploy -c mi-swarm.yml --with-registry-auth mi

Amazon ECS (Terraform, Cloudformation)

HashiCorp Terraform
  1. Run the installer:
sudo ./installer.py ecs --type terraform -o ./modules/metricinsights/
  1. Create Terraform execution plan:
$ terraform plan
  1. Apply the created plan:
$ terraform apply
Cloudformation
  • If the remote DB server has the same timezone as MI app: sudo ./installer.py ecs --timezone <MI app timezone> -o <manifest filename>.json
  • If the remote DB server has a different timezone than MI app: sudo ./installer.py  ecs --timezone <MI app timezone> --mysql-timezone <remote  database server timezone> -o <filename>.json

Note: Run ./installer.py ecs --help to see the list of available installer options.

Once the manifest is generated, apply it via AWS console.

5. Troubleshooting

If the system upgrade process goes not as planned:

  1. Install the previous MI application version
    • NOTE: The installer will ask, whether you want to install an older version, confirm and proceed with the installation process.
  2. Execute restore from the previously created backup, once the previous MI application version is installed.