Upgrade Podman-based installations (Podman Quadlets)
This article describes how to upgrade an existing Podman Quadlets Installation of Smart ID Certificate Manager (CM).
Prerequisites
Quadlet installation of Certificate Manager (CM) installed with version CM 8.10.x.
Podman version 4.9.4 or higher.
Administrator's Workbench, Registration Authority, and Certificate Controller clients from CM distributable package.
Access to the new version's distributable package including updated container images ,database migration scripts and configuration files.
Step-by-step instruction
1. Pre-upgrade preparations
Stop all running containers.
Use the following commands to stop the running containers:systemctl --user stop cf-server systemctl --user stop pgw
Verify that the container is stopped.
Check that all containers are stopped:podman ps --all
Ensure no containers from the previous deployment are running.
Backup Volumes: (optional but highly recommended)
If something goes wrong, the backup can be restored, and the system can return to its previous state.
Volumes that should be backed up are certs, config, bin and any relevant volume to your installation.Locate the volumes using:
podman volume list
Example (name can change but should contain (
cf-server
):Locate the Mountpoint on host:
Example:
Back up the Mountpoint.
Backup the database.
As part of the backup, make sure to backup thecmdb
database, please refer to the relevant database documentation for this step.Ensure database accessibility.
Verify that the database is accessible and functioning properly before proceeding:Unzip the distribution.
2. Load new container images
Import new Images.
Load the new container images using:Verify the Images.
Ensure the new images are loaded correctly:Confirm the tags and versions of the new image.
3. Update Quadlet configuration
Locate the
cf-server.container
andpgw.container
used for the previous installation.
The following command displays the path of the files.container
under theLoaded
attribute.Example
Modify configuration:
Modify the Image Name and tag to the new Image in the cf-server.container and pgw.container files.Reload systemd daemon:
Reload the systemd daemon to apply the changes:
4. Upgrade database and configuration files
Run database scripts. (only necessary for cf-server)
The upgrade scripts are stored in the upgrade directory under the distributable.
Execute the database upgrade script towards the database server.Ensure the script ran without errors.
Example for postgres:Update the configuration files.
Locate the .conf files under the upgrade folder inside the release distribution.Open the .conf files and update the configuration files according to the instructions specified by the .conf file. Upgrade should be done towards the volume Mountpoint.
If the configuration path specified in the .conf file do not map to a volume, changes will automatically be applied hence these files can be ignored.
5. Upgrade Protocol Gateway
Version specific actions for upgrading Protocol Gateway can be found in step 3 of the Upgrade Protocol Gateway page.
Only update configuration files.
6. Restart the containers
Start the updated containers:
Start the new containers using:Following the logs from startup can be done as follows:
Monitor logs.
Check the logs to ensure the containers started successfully:
7. Post-upgrade validation
Verify Connectivity.
Test connectivity using Administrator's Workbench and/or Registration Authority clients.Verify Configuration.
Access the container volumes to confirm that the configuration files are correctly applied:Check Database Connection.
Confirm that the container is successfully connected to the upgraded database.Health Checks.
Enable and test the health check for the Protocol Gateway (pgw):
8. Rollback procedure (if needed)
If any issue occurs during the upgrade, you can roll back using the following steps:
Stop the new containers.
Restore volumes.
Restore the backed-up volumes.Point to the previous Images.
Point to the old images incf-server.container
andpgw.container
.Restore Database
Start the old containers.
Restart the containers using the old quadlets:
9. Troubleshooting
View logs.
Use the following command to view container logs for debugging:Inspect container configuration.
Inspect the container configuration for issues:Access shell in container.
Start a shell inside the container for manual troubleshooting:Check systemd status.
Check the status of the systemd service:
Copyright 2024 Technology Nexus Secured Business Solutions AB. All rights reserved.
Contact Nexus | https://www.nexusgroup.com | Disclaimer | Terms & Conditions