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.19
191579300362.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 migrate
Expected output:
[root@odppulse201:acceldata (ad-default)]$ accelo admin database migrate
INFO: Running database migrate command
Is the 'Database Service' up and running? [y/n]: : y
version from DB: 6.0
Now, trying to logon to the AccelData registry...
Docker login succeeded ✓
version from docker metadata: 6.0.19
INFO: Upgrading to 7.0.19
INFO: Tagging 7.0.19 image to pulse version
INFO: Removing old ad-db container
INFO: Creating new ad-db container
INFO: Connecting to new DB container
INFO: Setting compatibility version 7.0
INFO: Upgrading to 8.0.8
INFO: Tagging 8.0.8 image to pulse version
INFO: Remving old ad-db container
INFO: Creating new ad-db container
INFO: Upgrading mongo version to latest
To verify the MongoDB version, exec into the ad-db container and run the following command:
mongod --version
This 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.19
191579300362.dkr.ecr.us-east-1.amazonaws.com/acceldata/ad-database:migrate-8.0.8
Instead 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.19
topulse_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.
exit
Upgrade MongoDB from Version 7.0.x to 8.0.x
- Retag the version
8.0.8
topulse_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.8
image 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