MongoDB Manual Upgrade

This document describes the steps to manually upgrade MongoDB.

  1. Pull or load the required MongoDB container images.

For Online installations

For air-gaped installations

  • docker load -i ad-db_4.4.20.tgz

  • docker load -i ad-db_5.0.16.tgz

  • docker load -i ad-db_6.0.5.tgz

Upgrade to Version 4.4

  1. Retag the version 4.4.20 to 3.2.0 by executing the following command.

docker tag 191579300362.dkr.ecr.us-east-1.amazonaws.com/acceldata/ad-database:migrate-4.4.20 191579300362.dkr.ecr.us-east-1.amazonaws.com/acceldata/ad-database:3.2.0
  1. Restart the ad-db service by executing the following command.

accelo restart ad-db -d
  1. Exec into the ad-db container by executing the following command.

docker exec -it ad-db_default bash
  1. Exec into the mongo shell by executing the following command.

mongo mongodb://accel:ACCELUSER_01082018@localhost:27017
  1. Set the compatibility version to 4.4.

db.adminCommand( { setFeatureCompatibilityVersion: "4.4" } )

The expected output for the above command is as follows.

{ "ok" : 1 }

  1. Exit the mongo shell by executing the following command.

quit
  1. Exit the ad-dbcontainer by executing the following command.

exit

Upgrade to Version 5.0

  1. Retag the version 5.0.16 to 3.2.0 by executing the following command.

docker tag 191579300362.dkr.ecr.us-east-1.amazonaws.com/acceldata/ad-database:migrate-5.0.16 191579300362.dkr.ecr.us-east-1.amazonaws.com/acceldata/ad-database:3.2.0
  1. Restart the ad-db service by executing the following command.

accelo restart ad-db -d
  1. Exec into the ad-db container by executing the following command.

docker exec -it ad-db_default bash
  1. Exec into the mongo shell by executing the following command.

mongo mongodb://accel:ACCELUSER_01082018@localhost:27017
  1. Set the compatibility version to 5.0 by executing the following command.

db.adminCommand( { setFeatureCompatibilityVersion: "5.0" } )

The expected output for the above command is as follows.

{ "ok" : 1 }

  1. Exit out of the mongo shell by executing the following command.

quit
  1. Exit the ad-db container by executing the following command.

exit

Upgrade to Version 6.0.5

  1. Retag the version 6.0.5 to 3.2.0 by executing the following command.

docker tag 191579300362.dkr.ecr.us-east-1.amazonaws.com/acceldata/ad-database:migrate-6.0.5 191579300362.dkr.ecr.us-east-1.amazonaws.com/acceldata/ad-database:3.2.0
  1. Restart the ad-db service by executing the following command.

accelo restart ad-db -d
  1. Exec into the ad-db container by executing the following command.

docker exec -it ad-db_default bash
  1. Exec into the mongo shell by executing the following command.

mongosh mongodb://accel:ACCELUSER_01082018@localhost:27017

Since compatibility was already 5.0, upgrade goes as expected and you need not take any other action.

Validate the MongoDB Migration

If the Pulse Web UI loads without any issues, the DB migration is successful. Clear the browser cache and check few dashboard pages to validate.