Upgrade Agility Sync to 26.2 (Amazon DB or MongoDB)
Overview
This topic explains how to upgrade Agility Sync to version 26.2 when your deployment uses Amazon DocumentDB or MongoDB. In addition to the standard upgrade steps, 26.2 requires you to create new pagination indexes on the events collection and remove two indexes that are no longer used.
Prerequisites
- Access to the
agilitysyncuser account on the Linux machine that hosts Agility Sync. - The latest
agilitysync-installer.shfile, provided by the Digital.ai support team. - The
add_pagination_source_destination.jsscript, provided by the Digital.ai support team. - If you use Amazon DocumentDB, work with your AWS team to get the cluster connection details and credentials.
Download the Latest Agility Sync Installer
-
On the Linux machine, log in to the Agility Sync application with the
agilitysyncaccount. This user account is used to upgrade the Agility Sync application. -
Copy the
agilitysync-installer.shfile provided by the support team to a temporary directory, such as/tmp. This file contains both the latest application and the script that performs the install. -
If the target server isn't connected to the internet, download the installation file to an intermediate server, then use
sftpto copy it to/tmpon the target server. -
Make the script executable and change its owner to the
agilitysyncuser.chmod +x /tmp/agilitysync-installer.shchown -R agilitysync.agilitysync /tmp/agilitysync-installer.sh
Run the Install Script
Run the installer as the agilitysync user, not as root. The user that runs this script becomes the owner of the Agility Sync application, files, and directories. A common practice is to create a service account on the Linux machine called agilitysync.
Don't run the installer using sudo or the root user. The script uses sudo internally when it needs elevated permissions.
The following options don't start the Agility Sync services (-p) after the installer completes, so that you can create the new indexes before services restart.
-
Run the installer using the option that matches your database deployment:
-
If MongoDB or Amazon DocumentDB runs on a separate server, run:
/tmp/agilitysync-installer.sh -msp -
If MongoDB runs on the same server as Agility Sync, run:
/tmp/agilitysync-installer.sh -p
-
-
Run the
updatedbscript.$AGILITYSYNC_HOME/common/updatedb.py
Create the New Indexes
Agility Sync 26.2 introduces pagination indexes on the events collection. Complete these steps before you start the Agility Sync services.
-
Download the
add_pagination_source_destination.jsscript provided by the support team to the/tmpdirectory on the app server. -
Run the script that matches your database:
MongoDB on a separate server:
nohup mongosh "mongodb://<remote-ip>:27017/agilitysync" --file add_pagination_source_destination.js > "add_indexes_output.log" 2>&1 &MongoDB on the same server as the app server:
nohup mongosh "mongodb://localhost:27017/agilitysync" --file add_pagination_source_destination.js > "add_indexes_output.log" 2>&1 &Amazon DocumentDB:
noteWork with your AWS team to get the exact cluster details and credentials, including the cluster endpoint,
tlsCAFilepath, and login. The command below is an example.nohup mongosh "mongodb://db.cluster-amazonaws.com:27017/agilitysync" --tls --tlsCAFile /etc/global-bundle.pem --retryWrites=false --username <username> --password '<password>' --file add_pagination_source_destination.js > "add_indexes_output.log" 2>&1 & -
Monitor the script's progress by tailing the log file.
tail -f add_indexes_output.logThe script's runtime depends on the number of events in your database. The log shows the newly created index details. Wait until the script completes successfully before you continue.
Validate the Indexes
After the script finishes, connect to the database again to confirm that the indexes are in place.
-
Connect using the command that matches your database:
MongoDB:
mongoshAmazon DocumentDB:
mongosh ac-docdb-cluster.amazonaws.com:27017 --tls --tlsCAFile global-bundle.pem --retryWrites=false --username admin --password <your-password>noteThe Amazon DocumentDB command above is an example. Find the complete connection command on the AWS DocumentDB Cluster page, and work with your team to get the exact command and credentials for your environment.
-
Switch to the
agilitysyncdatabase.use agilitysync -
List the current indexes on the
eventscollection.db.events.getIndexes() -
Remove the following indexes, which are no longer used.
db.events.dropIndex("data_map_id_1_xref_id_1_status_1")db.events.dropIndex("data_map_id_1_status_1") -
Run
db.events.getIndexes()again to confirm that only the following indexes remain:_id_event_indexis_revision_existsdata_map_id_1_status_1__id_-1events_source_idxevent_type_1_status_1- Either
events_destination_workitem_idxorevents_viewlogs_target(at least one of these two must exist)
-
Exit the database session.
Start the Services
Once all indexes are in place, start the Agility Sync services.
as-start-services