Upgrade on an offline environment
The Axiomatics Services Manager (ASM) upgrading process can only be performed between two consecutive minor versions, meaning that you must be running version 7.4 in order to upgrade to version 7.5. Patching, however, is possible in between any two 7.5 patches.
It is essential to backup your system before proceeding with an Axiomatics Services Manager (ASM) upgrade due to a major PostgreSQL update. Otherwise, your data will be lost.
Upgrading or patching ASM will cause downtime for the application and consequently a temporary loss of service. As a result, the upgrade should be planned accordingly.
Requirements
For the offline installation of ASM, you need to acquire the following files from Axiomatics:
- artifacts.zip
- axiomatics-services-manager-VERSION.zip
- registryData.zip
- registryImage.tar
Contact Axiomatics Customer SupportOpens in a new tab if you have not received them.
When upgrading the logs won't be migrated. The old logs directory will still contain the previous logs.
-
Navigate to the existing ASM folder, stop ASM and remove all the containers.
- Dashboard enabled
- Dashboard disabled
*:first-child]:mt-0>The Dashboard provides visualization of key metrics for monitoring the authorization performance of the running instances of Access Decision Service (ADS).
docker-compose -f docker-compose.yml -f docker-compose.dashboard.yml down*:first-child]:mt-0 hidden>docker-compose down -
For upgrades only, remove the volume of the DB container.
warningThis step will erase all DB data and should be skipped when patching ASM. For upgrades, make sure you have backed up your data before proceeding.
docker volume rm docker_db -
If the old registry still exists, stop and delete it, and remove the volume.
docker stop registrydocker rm registry -v -
Extract the contents of
axiomatics-services-manager-<version>.zipto the folder where you want to run ASM on. -
Navigate to the folder of the extracted distribution and restore the Docker Registry Image.
docker load -i registryImage.tar -
Unzip the Docker Registry Image Volume (
registryData.zip). -
Run the Registry Container.
noteReplace
<ABSOLUTE_PATH_TO_DIR>with the path of the registry directory.docker run -d -p 5000:5000 --restart=always --name registry -v /<ABSOLUTE_PATH_TO_DIR>/registry:/var/lib/registry registry:2 -
Exctract
artifacts.zipand copy theartifactsfolder to the ASMdockerfolder. -
Update the
axiomatics-services-manager-<version>/docker/.envfile with the following values:
The file may be hidden.
CONNECTION=offline
REGISTRY=localhost:5000/
-
Optionally, you can run ASM on a machine with a hostname other than the default as follows:
Change the default hostname
- Navigate to the
dockerfolder of the extracted distribution. - Update the
HOSTvariable in the.envfile. The default value islocalhost. - Save the file and exit.
- Navigate to the
-
Copy a valid ASM license file to the
dockerfolder.noteThis file is provided separately by Axiomatics.
-
Enable the BuildKit feature of Docker:
- Linux/macOS
- Windows
*:first-child]:mt-0>export DOCKER_BUILDKIT=1*:first-child]:mt-0 hidden>Run the following command using PowerShell:
Env:DOCKER_BUILDKIT=1 -
Configure the SSL Certificate common name.
In production environments, you should import trusted certificates only, while in dev and test environments you have the ability to create a self-signed certificate.
- Import
- Create
*:first-child]:mt-0>ASM requires a
PKCS#12(Public Key Cryptography Standard #12) certificate.In case you already have a certificate with different format such as
.pem, you should convert it toPKCS#12. The certificate file must be namedcert.keystore.p12. During the creation of the certificate, the name (or alias) must be set toserver.- Navigate to the
docker/api.gateway/certs/folder of the extracted distribution. - Copy your certificate to this folder.
*:first-child]:mt-0 hidden>Generate a self-signed certificate as follows:
- Navigate to the
dockerfolder of the extracted distribution. - Open the
.envfile and update the following entries:CERTIFICATE_CNwith your common nameCERTIFICATE_KEY_STORE_PASSWORDwith your password
- Generate the certificate:
- Linux/macOS
- Windows
*:first-child]:mt-0>-
From the
docker/api.gateway/certs/folder, run the following command.sh generate_self_signed_certificate.sh -
Make sure that the following files were created:
cert.keystore.p12server.crt
*:first-child]:mt-0 hidden>-
From the
docker\api.gateway\certsfolder, run the following commands using PowerShell.warningIn the first command, replace
<your_cert_key_store_pw>and<your_cert_cn>with the same values that were previously used in the.envfile.docker build -t certificate -f ./Dockerfile.cert . --build-arg CERTIFICATE_KEY_STORE_PASSWORD=<your_cert_key_store_pw> --build-arg CERTIFICATE_CN=<your_cert_cn>docker create --name cert certificate; docker cp cert:/cert.keystore.p12 ./cert.keystore.p12; docker cp cert:/server.crt ./server.crt; docker rm -f cert; docker image rm certificate -
Make sure that the following files were created:
cert.keystore.p12server.crt
-
Optionally, if you are using custom Attribute Connectors, restore the
docker/asm.core/attribute.connectors/custom-attribute-connectorsfolder that you backed up previously. -
Build the ASM image and start all the service's containers.
- Dashboard enabled
- Dashboard disabled
*:first-child]:mt-0>docker-compose -f docker-compose.yml -f docker-compose.dashboard.yml up --build*:first-child]:mt-0 hidden>docker-compose up --build -
If you are upgrading ASM, restore your backed up data.