Skip to main content
Version: 7.2

Kubernetes environment

It is highly recommended to backup and restore your system before proceeding with an upgrade.

Backup and restore

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

  1. Enter the Pod.

    kubectl exec -it deployment/db -n axiomatics-asm -- bin/bash
  2. Dump the databases.

    su - postgres
    cd /tmp
    pg_dump asm > asm.sql
    pg_dump keycloak > keycloak.sql
    pg_dump domain_manager > domain_manager.sql
    pg_dump pd > pd.sql
  3. Exit.

    exit 
    exit
  4. Copy the SQL files to the host

    kubectl cp axiomatics-asm/<db_pod_name>:tmp/asm.sql ./asm.sql 
    kubectl cp axiomatics-asm/<db_pod_name>:tmp/keycloak.sql ./keycloak.sql
    kubectl cp axiomatics-asm/<db_pod_name>:tmp/domain_manager.sql ./domain_manager.sql
    kubectl cp axiomatics-asm/<db_pod_name>:tmp/pd.sql ./pd.sql
    Important

    Replace the <db_pod_name> placeholders with the name of the database pod.

Restore

  1. Stop other Pods using the database.

    kubectl scale --replicas 0 deployment.apps/adm -n axiomatics-asm
    kubectl scale --replicas 0 deployment.apps/asm - n axiomatics-asm
    kubectl scale --replicas 0 deployment.apps/keycloak -n axiomatics-asm
    kubectl scale --replicas 0 deployment.apps/pd-api -n axiomatics-asm
  2. Copy the SQL files to the database pod.

    kubectl cp ./asm.sql  axiomatics-asm/<db_pod_name>:tmp/asm.sql 
    kubectl cp ./keycloak.sql axiomatics-asm/<db_pod_name>:tmp/keycloak.sql
    kubectl cp ./domain_manager.sql axiomatics-asm/<db_pod_name>:tmp/domain_manager.sql
    kubectl cp ./pd.sql axiomatics-asm/<db_pod_name>:tmp/pd.sql
    Important

    Replace the <db_pod_name> placeholders with the name of the database pod.

  3. Enter the Pod.

    kubectl exec -it deployment/db -n axiomatics-asm -- bin/bash
  4. Drop the databases. Then, create them again and run the SQL files.

    $ su - postgres
    $ psql 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 < asm.sql
    $ psql keycloak < keycloak.sql
    $ psql domain_manager < domain_manager.sql
    $ psql pd < pd.sql
  5. Exit.

    exit 
    exit
  6. Start the Pods again.

    kubectl scale --replicas 1 deployment.apps/adm -n axiomatics-asm
    kubectl scale --replicas 1 deployment.apps/asm -n axiomatics-asm
    kubectl scale --replicas 1 deployment.apps/keycloak -n axiomatics-asm
    kubectl scale --replicas 1 deployment.apps/pd-api -n axiomatics-asm

Upgrade

Axiomatics Services Manager 7.2 is the first version to support Kubernetes deployments. This means that there is no way to upgrade from previous versions of ASM. The steps below will guide you through the process of upgrading ASM 7.2 to the most recent available distribution of version 7.2.

note

The upgrade process is the same for local and cloud environments.

  1. Download the new ASM distribution.

    aws s3api get-object --bucket axiomatics-customer-artifacts --key releases/com/axiomatics/axiomatics-services-manager/axiomatics-services-manager/7.2.0-0/axiomatics-services-manager-7.2.0-0.zip axiomatics-services-manager-7.2.0-0.zip
  2. Extract the contents of the downloaded ZIP file.

    tip

    Optionally, if you want to build your own images, navigate to the docker/ folder and build the images following the instructions provided here. Otherwise, continue with the next step.

  3. Navigate to the kubernetes/ folder and add the axiomatics_ASM.license license file.

  4. Open the kubernetes/asmcharts/values.yaml file and set the appropriate configuration values that correspond to the original installation.

    tip

    Alternatively, you can skip this step and use the --set flag in the command below to pass directly the appropriate configuration values.

  5. Upgrade the helm charts.

    helm upgrade -n axiomatics-asm asm -f asmcharts/values.yaml asmcharts