Migrate MongoDB from Version 6.0.X to 8.0.X
To upgrade MongoDB in the ad-db container to version 7.0 and then to 8.0, you must first be running MongoDB version 6.0. MongoDB supports only successive version upgrades.
Upgrade MongoDB using Accelo Binary
- Download and load all required container images if you are working in an air-gapped network environment.
191579300362.dkr.ecr.us-east-1.amazonaws.com/acceldata/ad-database:migrate-7.0.19191579300362.dkr.ecr.us-east-1.amazonaws.com/acceldata/ad-database:migrate-8.0.8- Run the following command to upgrade MongoDB to version 8.0.8.
accelo admin database migrateExpected output:
[root@odppulse201:acceldata (ad-default)]$ accelo admin database migrateINFO: Running database migrate commandIs the 'Database Service' up and running? [y/n]: : yversion from DB: 6.0Now, trying to logon to the AccelData registry...Docker login succeeded ✓version from docker metadata: 6.0.19INFO: Upgrading to 7.0.19INFO: Tagging 7.0.19 image to pulse versionINFO: Removing old ad-db containerINFO: Creating new ad-db containerINFO: Connecting to new DB containerINFO: Setting compatibility version 7.0INFO: Upgrading to 8.0.8INFO: Tagging 8.0.8 image to pulse versionINFO: Remving old ad-db containerINFO: Creating new ad-db containerINFO: Upgrading mongo version to latestTo verify the MongoDB version, exec into the ad-db container and run the following command:
mongod --versionThis command returns the currently installed MongoDB version.
Upgrade MongoDB Manually
If you are working in an air-gapped network, download and manually load all required container images.
191579300362.dkr.ecr.us-east-1.amazonaws.com/acceldata/ad-database:migrate-7.0.19191579300362.dkr.ecr.us-east-1.amazonaws.com/acceldata/ad-database:migrate-8.0.8Instead of using the image
191579300362.dkr.ecr.us-east-1.amazonaws.com/acceldata/ad-database:migrate-8.0.8,
you can use the default ad-database image provided with the Pulse v3.8.X release.
The default MongoDB version bundled with Pulse v3.8.X is 8.0.X.
Upgrade MongoDB from Version 6.0.x to 7.0.x
- Retag the version
7.0.19topulse_version.
docker tag 191579300362.dkr.ecr.us-east-1.amazonaws.com/acceldata/ad-database:migrate-7.0.19 191579300362.dkr.ecr.us-east-1.amazonaws.com/acceldata/ad-database:<pulse_version>- Restart the ad-db service.
accelo restart ad-db -d- Exec into the ad-db container.
docker exec -it ad-db_default bash- Exec into the mongo shell.
mongo mongodb://accel:ACCELUSER_01082018@localhost:27017- Set the compatibility version to
7.0.
db.adminCommand( { setFeatureCompatibilityVersion: "7.0", confirm: true } )Expected Output:
{ "ok" : 1 }- Exit out of the MongoDB shell.
quit- Exit out of the ad-db container.
exitUpgrade MongoDB from Version 7.0.x to 8.0.x
- Retag the version
8.0.8topulse_version.
docker tag 191579300362.dkr.ecr.us-east-1.amazonaws.com/acceldata/ad-database:migrate-8.0.8 191579300362.dkr.ecr.us-east-1.amazonaws.com/acceldata/ad-database:<pulse_version>If you are using the MongoDB image bundled with Pulse v3.8.X, replace the
migrate-8.0.8image with the Pulse version you are upgrading to. The command looks as below.
docker tag 191579300362.dkr.ecr.us-east-1.amazonaws.com/acceldata/ad-database:<pulse_version_3.8.X> 191579300362.dkr.ecr.us-east-1.amazonaws.com/acceldata/ad-database:<pulse_version>Replace <pulse-version> with the actual version number, such as 3.8.0.
- Restart the ad-db service.
accelo restart ad-db -d- Exec into the ad-db container.
docker exec -it ad-db_default bash- Exec into the MongoDB shell.
mongo mongodb://accel:ACCELUSER_01082018@localhost:27017- Set the compatibility version to
8.0
db.adminCommand( { setFeatureCompatibilityVersion: "8.0", confirm: true } )Expected Output:
{ "ok" : 1 }- Exit out of the MongoDB shell.
quit- Exit out of the ad-db container.
exit