- 13 Jun 2023
-
DarkLight
-
PDF
Stage 1: Prestaging
- Updated on 13 Jun 2023
-
DarkLight
-
PDF
These are the necessary activities to prepare for the upgrade and perform a backup of dependencies and other essential platform tasks.
Review Product Notices
-
Review all feature release information related to your IAP target release.
Feature Release 2022.1 2021.2 2021.1 2020.2 -
Review all breaking changes in the Itential software that can impact the upgrade timeline for your target release.
Breaking Changes Release 2022.1.x Release 2021.2.x Release 2021.1.x Release 2020.2.x -
Audit (review) all deprecation tasks prior to initiating the upgrade.
Deprecations Release 2022.1.x Release 2021.2.x Release 2021.1.x Release 2020.2.x -
Review all release alerts related to the Itential software.
Release Alerts Release 2022.1.x Release 2021.2.x Release 2021.1.x Release 2020.2.x
Confirm Dependencies
Audit (confirm) all dependencies meet the required minimum version.
Note: The latest dependency versions can be found on the Itential Dependencies page of the Itential Documentation site.
-
Backup and copy all existing MongoDB, Redis and RabbitMQ configuration files prior to upgrading the following dependencies.
Dependency OS Node.js MongoDB Redis RabbitMQ RabbitMQ Erlang Python -
Upgrade the dependencies to align with the required pre-requisites for the target IAP version.
Follow Upgrade Sequence for Environment
Itential assumes you are using different type of environments. Follow this sequence when upgrading to a newer IAP version: DEV-UAT-PROD
.
- Upgrade DEV to continue with new development. Upgrade UAT for sanity checks and regressions of Itential apps and custom apps. The DEV and UAT upgrade will serve as a source of truth database.
- As a pre-requisite for PROD upgrade, allow the IAP platform to soak for 24-hours after upgrading dependencies. Be sure to monitor MongoDB, Redis, and RabbitMQ behavior during that time.
Upgrade MongoDB
Upgrade MongoDB and enable the compatibility settings.
-
Follow the MongoDB upgrade path (4.2 → 4.4 → 5.0.0)
db.adminCommand( { setFeatureCompatibilityVersion: <version> } )
Example
db.adminCommand( { setFeatureCompatibilityVersion: "5.0" } )
-
Check MongoDB version compatibility.
db.version() db.getCollection.(“system.version”).({})
Confirm Workflow Collections
- Audit the workflow collections.
- Audit your existing workflows for Schema Validation Errors (Warnings and Drafts).
- Audit your existing workflows for deprecated tasks. These can be found in the Deprecations section of the Itential product documentation site.
Validate Indexes
Validate the indexes for jobs, tasks, and workflows from the MongoDB CLI.
See Database Indexes for additional guidance.
-
Connect to Mongo.
mongo > use pronghorn pronghorn.db>
-
Run the following commands.
db.jobs.getIndexes() db.tasks.getIndexes() db.workflows.getIndexes()
-
Expect, at a minimum, 14 Jobs, 8 Tasks, and 4 Workflows.
Stop Jobs
-
Stop all scheduled jobs and capture the input and groups data from all Automation Catalog jobs.
-
Before any major version upgrade, all jobs should be paused, canceled or completed before starting the upgrade process. For any jobs started on IAP 2019.3, or any version prior to 2019.3, it is important to ensure no tasks are left in a
primed
state. Tasks in theprimed
state are not supported with the migration script, so it is imperative that all jobs are paused and noprimed
tasks exist prior to the upgrade. Jobs withprimed
tasks will hang and theprimed
tasks will never run. Any tasks that are left on the system in aprimed
state must be removed manually.
Confirm Task Worker Settings
-
Confirm the TaskWorker settings in
workFlowEngine
and theproperties.json
file.workFlowEngine Service Config properties - “activate”: false
properties.json file [ “processTasksOnStart” : false ]
-
Stop TaskWorker and wait 30-minutes to complete the current running jobs in progress.
-
Stop IAP.
Backup MongoDB
Perform a mongoDump
and backup the MongoDB Collections.
-
Run the following command.
mongodump --host <MONGO HOSTNAME> --port=<MONGO PORT> --db=<PRONGHORN DB> --archive=<BACKUP LOC>/mongoDump<date>.bson
-
Alternatively, you can run this command.
mongodump --authenticationDatabase admin -u admin -p admin --db pronghorn -o /tmp/mongo-backup --excludeCollection jobs --excludeCollection tasks --gzip
-
Backup and copy all MongoDB Collections (Worfklows, Transformations,
ac_agenda_job
, Jobs, Tasks, Forms and Templates). -
Confirm there is sufficient disk space in the target directory (
/tmp
).
Backup Pronghorn Files and Install Directory
-
Backup the IAP pronghorn file system or installation directory (server.js, properties.json, all applications, all adapters).
-
Take a symlink (symbolic link) snapshot of the
@itentialopensource
and@<customer custom folder>
namespaces.ls -lart
To avoid missing adapters in @itentialopensource
, manually create all symlinks first before starting the upgrade.
➤ Install all opensoure applications and adapters in a custom placeholder directory under /opt/pronghorn/current/custom
.
➤ Go to @itentialopensource <dir>
and perform a symlink mapping of the installed apps/adapters to /opt/pronghorn/current/custom
.
➤ During the upgrade process, when the bin installer is run with -p
, you will be prompted to select Y
(yes) to copy the entire custom folder and automatically recreate the symlinks.
Figure 1: Custom Directory
Figure 2: Symlink Mapping
Backup NSO
Run ncs-backup
to backup NSO.
Download IAP Target Version
Download the IAP target version bin file from the Itential Software Repository.
Audit Dependency Vitals
Complete the following to bounce (soft restart) Redis, Rabbit MQ, and MongoDB, and then audit the dependency vitals. This is done to clean-up logs history and the logging buffer.
-
Run this vital check curl command to capture the dependencies current status.
curl -s http://<server>:port/status
-
Run the following to audit the MongoDB Cluster and Replica status.
sudo systemctl mongod stop
-
Wait 5 minutes and then start MongoDB.
sudo systemctl mongod start
-
Run the monitoring checkpoints to audit the MongoDB Cluster.
rs.status() rs.printSlaveReplicationInfo()
-
Bounce Redis, and then audit Sentinel and the Cluster status.
sudo systemctl stop redis-sentinal.service
sudo systemctl stop redis.service
-
Wait 5 minutes and then start the services.
sudo systemctl start redis-sentinal.service
sudo systemctl start redis.service
-
Audit the Sentinel status.
redis-cli -h redis-XX -p 26379 info|grep status
-
Run this command on all Redis servers.
redis-cli -h redis-XX -p 6379 info|grep role
-
Bounce RabbitMQ, and then audit the Cluster status.
sudo service rabbitmq-server stop
-
Wait 5 minutes and then start the RabbitMQ server.
sudo service rabbitmq-server start
-
Audit the RabbitMQ Cluster.
sudo rabbitmqctl cluster_status
-
Run this vital check curl command after bounce to capture the current status of dependencies.
curl -s http://<server>:port/status
Disable Deprecated Apps and Adapters
Disable all deprecated applications and adapters (as listed below) to prepare for a clean IAP start.
Deprecated Applications |
---|
@itential/app-smart_template |
@itential/app-object/ |
@itential/app-json/pronghorn.json |
@itential/app-tools/ |
@itential/app-string |
@itential/app-number |
@itential/app-golden_services |
@itential/app-golden_config |
@itential/app-array/ |
@itential/app-TaskWorker |
Deprecated Adapters |
---|
adapter @itential/adapter-mongo |
See Adapter Mongo for more detail.
- Go to Admin Essentials in IAP and select the active profile (i.e.,
profile1
). - Select the Configure tab and disable (uncheck) all deprecated apps/adapter under Edit Profile Services.
- Restart IAP.
Figure 3: Edit Profile to Disable Apps/Adapters
Complete Remaining Activites for Platform
- Audit the platform vitals for rogue processes, diskspace, CPU utilities, and memory.
- Stop the
cron
jobs. - Archive the log files.
- Confirm DB backup is complete.