Leveling up MongoDB - Updating MongoDB to 3.6.14

5 minute read time.

Evening Readers,

Today we are going to discuss upgrading mongo; specifically upgrading from Sage X3 MongoDB 3.4.16 to Sage X3 MongoDB 3.6.14 versions. This would apply to any builds of Sage X3 that are Product Update 9 or higher. We are going to do this with the Sage X3 installers (built and compiled by Sage) and not use the standalone Community editions that you can get for free from MongoDB’s website. There is a couple of key factors to be aware of:

  1. The mongodb.conf will need to be modified
  2. Do not restart any services or machines
    1. Warning: no matter how tempted you are to do it, do not, fight the urge.
  3. Syracuse will need updating as well

What I mean by all of this is that when you upgrade MongoDB from v3.4 to v3.6 MongoDB made some changes to the config file. Mainly, they dropped the net.http options. Therefore, when you upgrade to v3.6, with our installer mind you, these cannot exist. But they are needed for v3.4 (like a catch-22), which is why we make the change but do not restart the service. The services, both mongo and Syracuse, cache the config information upon starting. So, if you make changes while its running, they do not take affect until after a restart. In 3.4 we can remove the net.http without causing any issues to the existing install as long as we do not restart any services.

You can read more about MongoDB changes for v3.6 here:

 https://docs.mongodb.com/manual/release-notes/3.6-compatibility/#http-interface-and-rest-api

and here:

https://docs.mongodb.com/manual/release-notes/3.6-upgrade-standalone/#prerequisites

 

The other thing to note is that 3.4 must be fully upgraded before moving to 3.6. What does that mean? Well, before you upgrade to v3.6 there is a prerequisite to the Sage MongoDB v3.6.14 installer; and that is Syracuse. MongoDB v3.6 in conjunction with Sage X3, it needs some coding updates from Syracuse before the MongoDB v3.6 installer will work. Each X3 release will required a specific build of Syracuse for the 3.6 to successfully install. Like in Version 12 it is Syracuse 12.5 or higher, for example. So, this is what we will be jumping into right…

…about…

…now.

 

First things first, we have to update Syracuse. In my examples here, I will be using Version 12 and therefore my version of Syracuse I will be updating will be version 12 as well. We are going to start with updating Syracuse to Version 12.5. You can download Syracuse Version 12.5 from our knowledge here (https://support.na.sage.com). I will not be going into specifics on upgrading Syracuse but remember to select Modify Installation when installing Syracuse.

We don’t need to have any rogue installs of Syracuse floating around. Also, to note, when updating Syracuse, you will need to have the Service User & Password handy as the install will ask for it.

 

I’m going to assume your Syracuse install goes perfectly (as this is not a how to install Syracuse blog) and you have zero problems. If you do, you should probably talk to your business partner. And if you’re a Business Partner, you should probably talk to your local support or brush up on some more current implementation / Installation training (Sage Training can be found here: http://sageu.com).

Anyhow, make sure Syracuse is installed and the service is working and whatnot because the MongoDB part is next. As I mention in the beginning; before installing MongoDB update you have to modify the config file. The modifications are very simple, I promise, and you do not have to stop or restart anything. You do, however, need to know where MongoDB is installed. Once you have found where MongoDB is, you’re going to look for a mongodb.conf file. Its typically in a folder called config off the main directory for mongo.

Example location:

 

You are now going to want to open this conf file in a text editor like Notepad++ (which I prefer) or similar functioning application (gEDIT works well too).

Once you have the conf file open, you going to go down to about line 79. This should be the net: section (highlighted PINK in example below).

Example:

I have noted 2 sub-sections within the main net: section. These are the two we are going to change. I highlighted them ORANGE and YELLOW. ORANGE will be an optional one depending on how your environment is configured. If MongoDB and Syracuse are separated you will most likely need to update both. If they are on the same machine, you will most likely only need to update YELLOW.

 

With that said, the YELLOW section you will comment out the http: and enabled: lines like so:

If you have to update ORANGE section, you will adjust bindIp like so:

You will most likely have to do both. I have had only rare occasions where only the http: section needs to be commented out. But it could still be ok.

So, the conf file should now look like this:

 

At this point we will save the conf file. Depending on your environment and permissions, you may have to edit in administrator mode. Now that’s over, we can run the MongoDB installer for v3.6.14. Note, do not stop or restart anything, that includes servers and services.

Launch the installer and go next, next, accept, next and get to the type screen. We are going to do what we did for Syracuse and select modify installation and select the MongoDB version.

Hit next again and get to the Service configuration screen. Should look just like mine. Leave defaults and click next.

This next one will vary depending on the original setup of mongo when it was installed. If you have SSL setup leave it checked and continue. If you want to “Redo” your SSL Configuration, you can at this time too. If you did not use SSL on the original configuration, make sure it is unchecked.

Next it will ask for the Passphrase to the certifications when MongoDB was originally setup, if you have configured for SSL. If not, you will not get this screen

Then next and next again and let the installer do its magic. Follow the prompts as they pop up to continue through the install.

Click next and the Done button and we should be done installing.

 

Now we can see if we can log in. looks like I can get in

We can check the programs and features and see if the components updated.

…And sure enough they are.

That concludes how to update MongoDB from 3.4.16 to 3.6.14. I hope that was somewhat informative for you all. Until next time.

Parents Comment Children
No Data