Updated in 4.44
Live Agent has been put in maintenance mode. The product will continue to be maintained in the foreseeable future. Users can continue to fully rely on Live Agent being available. In future releases, only security updates and bug fixes will be provided; no new features will be released.
This is a migration guide for the Live Agent 4.44 version upgrade. This release upgrades the PostgreSQL and Redis dependency versions. This breaking change requires manual data migration if you are not using them externally.
In the case of Redis, it works out of the box, but for PostgreSQL, you need to migrate the data from the old database to the new one.
Pre-Migration preparations
Change values.yaml
Values under .Values.postgresql are also affected. Make the necessary changes to your custom values.yaml file.
The cognigy-live-agent deployment is now called cognigy-live-agent-app. The change also applies to the service and ingress in your custom values.yaml file.
Old values
New values
Create backup-pod.yaml
A backup pod is required to access the PostgreSQL database. This pod will create a backup and restore it to the new database. The size of the backup pod must be at least three times bigger to store the dump.
Calculate the size of the database
For knowing the size of the database, you can run the following command:
The output will be something like this:
The size of the backup pod should be at least 3 GB.
backup-pod.yaml
To deploy the backup pod, run the following command:
Migration steps
Step 1. Set the replica count to 0
For app and worker replica sets, specify 0 in the replica count. It ensures that the database will not have any activity and the data will be backed up safely.
In the previous version, the cognigy-live-agent-app deployment is still called cognigy-live-agent.
Step 2. Attach a shell to the PostgreSQL backup pod and make a backup of the Live Agent database
Log in to the postgres-backup pod and create a dump of the live_agent_production database.
The prefix nohup and suffix & are used in the pg_dump command to run it in the background. You can bring the background command of the current session with the fg command and check the status of the background jobs with the jobs command.
Once done, jobs command should give no output.
Step 3. Delete the current release and check PVC reclaim policy
When the PostgreSQL and Redis versions have changed, the PVCs become incompatible with the new versions. To recover compatibility, delete the current release and the PVCs, then check the Live Agent PVC reclaim policy.
Step 4. Delete or modify existing database secrets
The existing secrets need to be deleted or modified with the new keys.
The system automatically generates new secrets in a new release
if existing secrets are not specified in the values.yaml file.
We recommend deleting the existing secrets and leaving the password fields commented in the values file for getting autogenerated ones. As an alternative to deleting the secrets, you can modify the existing ones. The only change when using internal PostgreSQL is the new PostgreSQL secret. It needs to contain the following keys:The values postgresql.auth.existingSecret and postgresql.auth.secretKeys.adminPasswordKey are set to postgres-password and password by default and need to be uncommented for using the created secret.
Step 5. Install the chart version 4.44.0
To restore the previous backup, install the new release without the migration job running or the deployments accessing the DB as it is empty. Set the migrations job to false in the custom-values.yaml file and decrease the replica count to 0 for both the app and worker:
Install the new version of the chart:
Then the only pods running will be the EFS, PostgreSQL and Redis ones.
Step 6. Restore backup to the new PostgreSQL pod
Attach a shell to the PostgreSQL backup pod and restore the ‘live_agent_production’ database to the new PostgreSQL pod.
Step 7. Change custom-values.yaml
Enable the migration job and increase the replica count to the desired number for the app and worker in the custom-values.yaml file.
Upgrade the chart.
Step 8. Attach a shell and remove the onboarding variable
Attach the shell to the app pod and remove the onboarding variable in Redis. It ensures that the onboarding screen is not shown after accessing Live Agent.
Step 9. Access Live Agent and verify the content
Check existing conversations and settings to ensure everything is working as expected. Once everything has been checked, you can delete the backup.
Remember to review that the released persistent volumes are deleted. If you have any issues, contact technical support.