Kubernetes environment
It is highly recommended to backup and restore your system before proceeding with an Axiomatics Services Manager (ASM) upgrade.
Backup and restore
- Local
- Cloud
Local Kubernetes (K8s) environments deployed with Minikube are intended to be used for testing purposes and their data should be non-critical and easy to regenerate. However, if you want to backup the Postgres running on the K8s pod, follow the steps below.
Backup
-
Enter the Pod.
kubectl exec -it deployment/db -n axiomatics-asm -- bin/bash -
Dump the databases.
su - postgrescd /tmppg_dump asm > asm.sqlpg_dump keycloak > keycloak.sqlpg_dump domain_manager > domain_manager.sqlpg_dump pd > pd.sql -
Exit.
exitexit -
Copy the SQL files to the host
kubectl cp axiomatics-asm/<db_pod_name>:tmp/asm.sql ./asm.sqlkubectl cp axiomatics-asm/<db_pod_name>:tmp/keycloak.sql ./keycloak.sqlkubectl cp axiomatics-asm/<db_pod_name>:tmp/domain_manager.sql ./domain_manager.sqlkubectl cp axiomatics-asm/<db_pod_name>:tmp/pd.sql ./pd.sqlwarningReplace the
<db_pod_name>placeholders with the name of the database pod.
Restore
-
Stop other Pods using the database.
kubectl scale --replicas 0 deployment.apps/adm -n axiomatics-asmkubectl scale --replicas 0 deployment.apps/asm -n axiomatics-asmkubectl scale --replicas 0 deployment.apps/keycloak -n axiomatics-asmkubectl scale --replicas 0 deployment.apps/pd-api -n axiomatics-asm -
Copy the SQL files to the database pod.
kubectl cp ./asm.sql axiomatics-asm/<db_pod_name>:tmp/asm.sqlkubectl cp ./keycloak.sql axiomatics-asm/<db_pod_name>:tmp/keycloak.sqlkubectl cp ./domain_manager.sql axiomatics-asm/<db_pod_name>:tmp/domain_manager.sqlkubectl cp ./pd.sql axiomatics-asm/<db_pod_name>:tmp/pd.sqlwarningReplace the
<db_pod_name>placeholders with the name of the database pod. -
Enter the Pod.
kubectl exec -it deployment/db -n axiomatics-asm -- bin/bash -
Drop the databases. Then, create them again and run the SQL files.
su - postgrespsql template1 -c 'drop database asm'psql template1 -c 'drop database keycloak'psql template1 -c 'drop database domain_manager'psql template1 -c 'drop database pd'psql template1 -c 'create database asm'psql template1 -c 'create database keycloak'psql template1 -c 'create database domain_manager'psql template1 -c 'create database pd'psql asm < /tmp/asm.sqlpsql keycloak < /tmp/keycloak.sqlpsql domain_manager < /tmp/domain_manager.sqlpsql pd < /tmp/pd.sql -
Exit.
exitexit -
Start the Pods again.
kubectl scale --replicas 1 deployment.apps/adm -n axiomatics-asmkubectl scale --replicas 1 deployment.apps/asm -n axiomatics-asmkubectl scale --replicas 1 deployment.apps/keycloak -n axiomatics-asmkubectl scale --replicas 1 deployment.apps/pd-api -n axiomatics-asm
Cloud environments are using RDS Postgres which offers the option to take backups automatically. Additionally, it is possible to take DB snapshots at any time that you can export, copy, and share. Finally, you can restore a new DB from a snapshot. For more information, refer to the AWS documentationOpens in a new tab.
Upgrade
The steps below will walk you through the process of upgrading ASM 7.3 to ASM 7.4.
The upgrade process is the same for local and cloud environments.
-
Download the ASM 7.4 distribution.
aws s3api get-object --bucket axiomatics-customer-artifacts --key releases/com/axiomatics/axiomatics-services-manager/axiomatics-services-manager/7.4.1-0/axiomatics-services-manager-7.4.1-0.zip axiomatics-services-manager-7.4.1-0.zip -
Extract the contents of the downloaded ZIP file.
tipOptionally, if you want to build your own images, navigate to the
docker/folder and build the images following the instructions provided here. This also applies if you are using custom Attribute Connectors, including the older http-pip and/or parser-pip. -
Navigate to the
kubernetes/folder and add theaxiomatics_ASM.licenselicense file. -
Open the
kubernetes/asmcharts/values.yamlfile and set the appropriate configuration values that correspond to the original installation.tipAlternatively, you can skip this step and use the
--setflag in the command below to pass directly the appropriate configuration values. -
Upgrade the helm charts.
helm upgrade -n axiomatics-asm asm -f asmcharts/values.yaml asmcharts