Upgrade

elDoc server and dependencies upgrade guide

Contents:


1. elDoc upgrade procedure

elDoc upgrade procedure contains the following main steps:

  1. Obtain latest release distro
  2. Back-up current deployment (configuration files located in the elDoc deployment folder, eldoc.service file located in the /etc/systemd/system folder by default, etc.)
  3. Replace existing files with the files from the latest release distro
  4. Transfer and apply all configuration parameters used with the previous version to the newly copied configuration files respectively (configuration files: eldoc.conf, elDoc-server.sh, eldoc.service)
    Note: Make sure you only copy over the changes not the entire files!
Upgrade can be performed directly to the latest version skipping upgrades to the intermediate versions (e.g.: elDoc v5.0.4 can be upgraded directly to elDoc v5.3.2).

IMPORTANT

  1. In case target version is not a direct descendant of the currently installed version - you need to review release notes of all intermediate versions for any changes which affect backward compatibility and follow respective post-upgrade steps (if any).
  2. On the first launch after upgrade elDoc may need to perform database schema updates. It is crucial to check log files (located in the ../elDoc/logs directory) after elDoc initial launch after upgrade and make sure no error messages are present in the upgrade log.

2. MongoDB upgrade procedure

WARNING: Potential Data Loss

Always ensure you have a valid backup of your data before proceeding with the upgrade. The standard location of the MongoDB data, according to the elDoc deployment guide, is the /local/mongoData directory.

IMPORTANT

Always consult the official MongoDB documentation when upgrading to specific versions, as this guide provides only a high-level overview of the steps.

For your convenience links to the official MongoDB resources on performing upgrade are provided below:

Upgrade to MongoDB 7.0:

Upgrade to MongoDB 6.0:

Upgrade to MongoDB 5.0:

MongoDB upgrade steps (high-level)

Perform a gradual upgrade if the target version is not a direct descendant of the currently installed MongoDB version. For example, an upgrade from version 5.0 to 7.0 should be done incrementally: 5.0 → 6.0 → 7.0.

The steps below describe MongoDB upgrade when it was installed using dnf repository manager, considering upgrade scenario from v4.4 to v5.0:

1) Disable existing repo:

nano /etc/yum.repos.d/mongodb-org-4.4.repo

In the repo-config file set param "enabled=1" to "enabled=0"

2) Add new repo config and perform installation of the new version:

nano /etc/yum.repos.d/mongodb-org-5.0.repo

Add the contents exactly as provided on the page: Install MongoDB Community Edition on RedHat.

dnf update -y mongodb-org

3) Update Feature Compatibility Version:

Once new version of the MongoDB is up and running you need to update the Feature Compatibility Version by executing the following set of commands:

mongo
use admin
db.auth("root")
db.adminCommand( { setFeatureCompatibilityVersion: "5.0" } )
exit

NOTE: Value of the following parameter: "{ setFeatureCompatibilityVersion: "5.0" }" equals version of the MongoDB to which upgrade was performed.

NOTE: For upgrading MongoDB installed using tarball - you need to skip steps 1 and 2 and instead follow the standard MongoDB installation procedure using tarball. Once binaries are updated and MongoDB is up and running - proceed with the step "3) Update Feature Compatibility Version" directly.

After taking all the steps above the MongoDB upgrade procedure is done.


3. Full-text search service upgrade procedure

elDoc uses Apache Solr for providing a full-text search functionality. Upgrade procedure of the Solr software is provided below.

Solr has two main folders (path provided based on the standard deployment guide):

  • folder with binaries: /local/solr
  • folder with data: /local/solrData

Apache Solr upgrade steps

The steps below describe Solr binaries update procedure only.

1) Download latest version of Apache Solr server (as per Software Requirements page)

2) Execute upgrade steps

#stop running elDoc sync-service (JMC) and Solr services;
systemctl stop jmc && systemctl stop solr

#extract archive with the latest Solr server to the defined folder
tar -zxvf solr-9.0.0.tgz -C /local/solr

#cerate a symlink to the latest version of the Solr server
ln -sfn /local/solr/solr-9.0.0/ /local/solr/solr

#launch Solr and elDoc sync-service (JMC) services
systemctl start solr && systemctl start jmc

3) Solr index rebuild

We also recommend to perform Solr index full rebuild after Solr version upgrade, steps are provided below.

Note: Solr index rebuild will require significant amount of time on large datasets.

#stop running elDoc sync-service (JMC) and Solr services;
systemctl stop jmc && systemctl stop solr

#delete folder with Solr index
rm -rf /local/solrData/data/[CORE_NAME]

#delete JMC oplog timestamp file
rm -f /local/jmc/oplog.timestamp

#launch Solr and elDoc sync-service (JMC) services
systemctl start solr && systemctl start jmc

After taking all the steps above the Apache Solr upgrade procedure is done.

Last modified: August 16, 2024