Upgrade Runbook 1.2.1.0

Overview

MOSIP version 1.2.1.0 (Platform version) has been released with significant improvements, including a Java version upgrade, performance optimizations, and critical bug fixes. This runbook provides comprehensive guidance for migrating your existing MOSIP implementation from version 1.2.0.1 to 1.2.1.0 (Platform version).

Intended Audience

This runbook is designed for countries, system integrators, and organizations currently running MOSIP version 1.2.0.1 who wish to upgrade to the latest version of the MOSIP Identity Platform i.e 1.2.1.0.

What This Guide Covers

This document provides step-by-step instructions to help you:

  • Prepare your environment for the upgrade

  • Update database schemas and configurations

  • Modify deployment scripts

  • Upgrade dependencies

  • Deploy upgraded MOSIP components safely and efficiently

Following these procedures ensures a smooth transition from version 1.2.0.1 to 1.2.1.0 with minimal disruption to your operations.

Pre-Upgrade Checklist

  • Base version of MOSIP platform should be 1.2.0.1. If the base version is older than 1.2.0.1 (For example MOSIP version 1.1.5.5 is installed), Please make sure to migrate to 1.2.0.1 by following guidance mentioned in this run book. You can refer to MOSIP Versioning Principle to understand how does platform versioning and repository versioning works and follow different schemes.

  • In case of customizations, the customized code must be updated and merged with the upgraded platform code. Refer to this runbook as a guide for migrating from Java 11 to Java 21.

Upgrade Procedure

Environment Preparation

  • Switch environment to maintenance mode (If applicable).

    • Notification to be provided to all the users on the downtime.

  • Uninstall all MOSIP services using delete.sh or individual helm delete command.

    • Secrets and configmaps used from external services need to be backed up. (e.g. postgres, minio, hsm etc).

    • Take backup of secrets and configmaps available in config-server and other namespace.

    • Delete scripts should be run from individual helm repo.

  • Take backup of the required services (as listed below) for any restore:

    • Postgress

      • Refer

        • Make sure to backup all the schema along with roles , users and password.

    • SoftHSM (this applies only to sandbox or testing environment upgrades and must not be used in production. For RealHSM, the upgrade process should be guided by the HSM administrator or the vendor.)

Upgrade Sequence

  • Step 1: Upgrade of External Services

    • Postgres server Upgrade

    • Minio Upgrade.

    • ActiveMQ Upgrade: delete and redeploy

  • Step 2: Adding additional definitions to keycloak

  • Step 3: DB schema Upgrade

  • Step 4: Config Migrator Run

  • Step 5: Skip redeployment of certain MOSIP services/batch jobs

  • Step 6: Deployment of additional artifcatory instance

  • Step 7: Deploy MOSIP services using relevant helm charts

  • Step 8: Post-upgrade verification

Follow the detailed instructions provided for each steps to complete the upgrade process as below:

Step 1: Upgrade of External Services

Upgrade postgres 15 to postgres 16

  • Refer to the provided commands below for installing postgres 16

    • Installation & Checks

If an upgrade is planned, refer to the official documentation recommended by the SI/DBA. The following steps are applicable only to the sandbox/testing environment:

  • Troubleshooting:

    • Upgrade Attempt

    • Status & bin directory checks

    • Checking ports

    • Restart

    • VACUM

    • Drop old cluster

Minio Upgrade

https://github.com/mosip/mosip-infra/blob/release-1.2.1.x/deployment/v3/external/object-store/minio/README.md#backup-and-restore-minio

Backup the older minio and restore the same to newer one deployed using helm chart following above mentioned document.

ActiveMQ Upgrade

  • Uninstall the existing ActiveMQ using the existing delete script from v1.2.0.1 tag.

  • Install latest ActiveMQ using install script from v1.2.1.0 tag.

Step 2: Adding additional definitions to keycloak

  • First delete the existing keycloak-init job using helm:

  • Deploy and run latest keycloak-init job by following the document to add new set of clients, roles, mappers and client scopes.

Step 3: MOSIP Specific Database upgrades

  • Follow the Instruction for DB Upgrade from 1.2.0.1 to 1.2.1.0.

  • In case of upgrading the production, after all the DB’s are upgraded successfully, check for the new db user otpuser created and update the password for the same to strong password and update the secrets in config-server secrets.

  • In case of sandbox or testing environment , update the password for otpuser as db-dbuser-password in postgres namespace as pre configured.

Step 4: Config Migrator Run

  • Follow the steps to migrate the configurations.

Step 5: Skip redeployment of certain MOSIP services/batch jobs

  • Add the pmp-revamp host to the global configmap manually.

    • @Mohan E to detail out one liner command for the same.

  • Do not run these services during redeployment: @Mohan E to add the places in install scripts which SI’s will comment to make this possible.

    • kernel keygen job

    • masterdata-loader

    • regproc-reprocessor

    • regproc saltgen job

    • idrepo saltgen job

    • ida keygen job

    • onboarder

    • conf-secrets

Step 6: Deployment of additional artifcatory instance

  • We will need two Instances of artifactory as part of ref-impl v1.2.0.1 to v1.2.1.0 upgrade to support both JAVA11 and JAVA 21 components.

  • For regclient v1.2.0.2 (JAVA 11 component):

    • As the regclient is not getting upgraded suggested to use v1.2.0.2, hence will continue to use artifactory-1.2.0.1 from helm chart to support older regclient-downloader.

    • Need this to be redeployed in new namespace to avoid changes in most of the install scripts. (new namespace : artifactory-1202)

    • Update the namespace in install script from v1.2.0.2 for artifactory. link

    • Execute the install script to install the same in artifactory-1202 namespace.

    • Delete reg-client-downloader if not deleted yet. link

    • Re-deploy reg-client downloader following. link

  • Other one for rest of the services which needs the dependent artifacts from upgraded artifactory-1.3.0. (JAVA 21 components)

    • Delete the older artifactory in case still runnning from artifactory namespace following. link

    • Install the newer artifactory followng. link

Steps 7: Deploy all the MOSIP application services from v1.2.1.0 of mosip-infra

  • Deployment scripts are available here.

Step 8: Post-Upgrade Verification

Functional Checks

  • Schema Validation

    • All tables created/updated per upgrade scripts.

    • Constraints valid.

    • Indexes valid.

    • Materialized views refreshed (if present).

  • Functional Validation

    • IDA Authentication API

    • Identity retrieval API

    • Credential issuance & revoke.[VS1] [VS2]

    • Admin UI functionality.

System Health

  • Service logs

  • Kafka consumer lags

  • DB performance

  • CPU/memory profile

  • Scheduled jobs verification

Integration Testing

Rollback Strategy (db rollback, respective config rollback, services redeploy with older charts)

Rollback is schema-specific and must be done using:

- Admin rollback

- IDA rollback

- Identity-service rollback

- Credential-service rollback

Rollback must be performed in reverse order of upgrade.

Final Notes

  • Ensure backups are always tested before performing rollback.

  • Apply DB scripts only on primary node in HA.

  • Validate DR node replication.

  • Keep a maintenance window.

FAQ

  1. What happens if there are pending messages in the ActiveMQ queues? A: If any messages are pending, they will be moved to the Reprocess stage so they can be processed later.

Last updated

Was this helpful?