Skip to main content

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 agilitysync user account on the Linux machine that hosts Agility Sync.
  • The latest agilitysync-installer.sh file, provided by the Digital.ai support team.
  • The add_pagination_source_destination.js script, 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

  1. On the Linux machine, log in to the Agility Sync application with the agilitysync account. This user account is used to upgrade the Agility Sync application.

  2. Copy the agilitysync-installer.sh file 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.

  3. If the target server isn't connected to the internet, download the installation file to an intermediate server, then use sftp to copy it to /tmp on the target server.

  4. Make the script executable and change its owner to the agilitysync user.

    chmod +x /tmp/agilitysync-installer.sh
    chown -R agilitysync.agilitysync /tmp/agilitysync-installer.sh

Run the Install Script

note

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.

note

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.

  1. 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
  2. Run the updatedb script.

    $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.

  1. Download the add_pagination_source_destination.js script provided by the support team to the /tmp directory on the app server.

  2. 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:

    note

    Work with your AWS team to get the exact cluster details and credentials, including the cluster endpoint, tlsCAFile path, 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 &
  3. Monitor the script's progress by tailing the log file.

    tail -f add_indexes_output.log

    The 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.

  1. Connect using the command that matches your database:

    MongoDB:

    mongosh

    Amazon DocumentDB:

    mongosh ac-docdb-cluster.amazonaws.com:27017 --tls --tlsCAFile global-bundle.pem --retryWrites=false --username admin --password <your-password>
    note

    The 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.

  2. Switch to the agilitysync database.

    use agilitysync
  3. List the current indexes on the events collection.

    db.events.getIndexes()
  4. 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")
  5. Run db.events.getIndexes() again to confirm that only the following indexes remain:

    • _id_
    • event_index
    • is_revision_exists
    • data_map_id_1_status_1__id_-1
    • events_source_idx
    • event_type_1_status_1
    • Either events_destination_workitem_idx or events_viewlogs_target (at least one of these two must exist)
  6. Exit the database session.

Start the Services

Once all indexes are in place, start the Agility Sync services.

as-start-services