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
- 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.
- 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.
- 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
- Login and navigate to the
openiam-docker-composedirectory. Login asroot
cd /usr/local/openiam/openiam-docker-compose
- Create a backup branch (here, 4.2.1.15 is considered the current version)
git statussudo git checkout -b RELEASE-4.2.1.15-changessudo git add .sudo git commit -a -m "RELEASE-4.2.1.15-changes"
- Switch to Target Release (version 4.2.2)
sudo git checkout -b update_to_RELEASE-4.2.2sudo git pull origin RELEASE-4.2.2
- Resolve all merge conflicts (if any) manually.
sudo git add .sudo git commit -a -m "resolved conflict changes"
- Merge the release branch
sudo git merge origin/RELEASE-4.2.2git status
Starting OpenIAM
- Stop existing services
sudo ./shutdown.shdocker ps
Verify that all OpenIAM-related containers are stopped.
- 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
- Remove ElasticSearch service (OpenIAM moved to OpenSearch).
docker service lsdocker service rm <service_name_of_ES>
- Run setup and start services
sudo ./setup.shsudo ./startup.sh
Post-upgrade validation
Verify that all containers are running with the following command.
docker ps