Upgrade Guide 7.3.0 to 7.4.0

If you are upgrading from version 7.2.x you must upgrade to version 7.3.0 first!

Important Note

Backup Your Data Before Proceeding!

Moreover, this guide assumes that the steps below are executed in one session. If the session is interrupted (e.g. due to a logout) then the passwords need to be re-exported in given order. Only then, the upgrade procedure can be continued at an intermediate step without receiving errors.

Acceptance Testing

Before upgrading your production instance we encourage you to exercise the upgrade scenario on your acceptance testing instance.

Shutting down 21Travel services

Enter the following to shut down 21Travel services.

The passwords assigned to the environment variables below have been chosen during initial deployment. The export statements can be omitted in case an .env file is used.

cd 21-travel-deployment
export POSTGRES_PASSWORD=secret_password_1
export AUTOD_DB_PW=secret_password_2
export AOPD_DB_PW=secret_password_3
export TRPD_DB_PW=secret_password_4
export KEYCLOAK_DB_PW=secret_password_5
export KEYCLOAK_ADMIN=your_keycloak_admin_username
export KEYCLOAK_ADMIN_PASSWORD=secret_password_6
docker compose down

Obtaining the 7.4.0 deployment environment

To obtain the 7.4.0 deployment environment enter the following.

git fetch origin
git rebase 7.4.0

If you get stuck during the rebase you can restore your previous state by entering the following.

git rebase --abort

If you would like to switch to the 7.3.0 deployment environment discarding your custom changes (e.g. domain names in Caddyfile) then enter the following.

git fetch origin
git reset --hard 7.4.0
# add necessary changes to Caddyfile
nano Caddyfile
git commit -m "Caddyfile: adjusted domain names" Caddyfile

Remove Unknown User in Custodial Data Table

It is important to make sure that none of the intra-VASP transactions are originated from the Unknown User (in order to distinguish this from previous usage the Unknown User pattern, the user is persisted as "Unknown2 User2").

To check this, execute following SQL against the trpd database (assuming Postgres is already running):

docker exec -i -e PGUSER=postgres -e PGDATABASE=21travel postgres psql <<EOF
DELETE FROM trpd.custodial_data WHERE first_name = 'Unknown2' AND last_name = 'User2';
\q
EOF

If the deletion fails due to foreign key constraint (ERROR: update or delete on table "custodial_data" violates foreign key constraint), open a support ticket for a migration guidance to remove the 'Unknown User' entries. Nevertheless, you should continue with the upgrade procedure to 7.4.0 because this error is not fatal. Resolving the error is merely a preparation step for a future version upgrade.

Starting 21Travel services

export TRAVEL_LOG=info
docker compose up -d