Upgrade from version 4.2.1.x to version 4.2.2 in Docker

Upgrading OpenIAM in Docker environment is a straightforward process if following the steps below.

Pre-upgrade activities

  1. Take a full VM snapshot.

Take a full VM snapshot where Docker-based OpenIAM is running. If the database is external, take a snapshot of the external DB server as well. If the OS disk and data disk (container storage) are separate:

  • Take snapshots of the individual disks separately.
  • This ensures full restore capability in worst-case scenarios.
  1. Backup ElasticSearch (ES) audit logs.

Take a separate backup of Elasticsearch audit logs before proceeding with the upgrade. Verify the current disk utilization and allocated size. Ensure sufficient free space is available on the server. Remove unused or old images and unnecessary files to free up space. Finally, if required, provision and attach additional disk storage to accommodate future needs.

  1. Groovy user and database creation

Create:

  • Groovy database
  • Groovy user
  • Password for the Groovy user

An init.sql script will be provided by OpenIAM. Raise a support case with OpenIAM to obtain the required script and confirmation.

Upgrading

  1. Login and navigate to the openiam-docker-compose directory. Login as root
cd /usr/local/openiam/openiam-docker-compose
  1. Create a backup branch (here, 4.2.1.15 is considered the current version)
git status
sudo git checkout -b RELEASE-4.2.1.15-changes
sudo git add .
sudo git commit -a -m "RELEASE-4.2.1.15-changes"
  1. Switch to Target Release (version 4.2.2)
sudo git checkout -b update_to_RELEASE-4.2.2
sudo git pull origin RELEASE-4.2.2
  1. Resolve all merge conflicts (if any) manually.
sudo git add .
sudo git commit -a -m "resolved conflict changes"
  1. Merge the release branch
sudo git merge origin/RELEASE-4.2.2
git status

Starting OpenIAM

  1. Stop existing services
sudo ./shutdown.sh
docker ps

Verify that all OpenIAM-related containers are stopped.

  1. Log in to Docker registry. The Docker registry URL has been changed. Use the new registry URL (credentials remain same as for old URL)
docker login registry.openiam.com
  1. Remove ElasticSearch service (OpenIAM moved to OpenSearch).
docker service ls
docker service rm <service_name_of_ES>
  1. Run setup and start services
sudo ./setup.sh
sudo ./startup.sh

Post-upgrade validation

Verify that all containers are running with the following command.

docker ps