Upgrade and manage parallel installations (migration case)

This example illustrates how Airlock IAM versions can be installed and managed in parallel on the same machine. This may be useful when upgrading Airlock IAM.

The following text is based on parallel installations of Airlock IAM 7.3 and 7.7.

copy
# Install version 7.3
./airlock-iam-installer-7.3.sh

# Create instances "a" and "b"
su - airlock

iam init -i "a"
iam systemd -i "a"
# Follow printed instructions to enable the service
# Note that the systemd service directly references version 7.3. This means that instance "a" will continue to use version 7.3 until an explicit upgrade is performed.
cat /home/airlock/iam/instances/a/airlock-iam-a.service

# Repeat the same steps for instance "b"

We now have:

File / Directory

Description

/opt/airlock-iam-7.3/

7.3 distribution.

The PATH variable of the "airlock" user points to this distribution, allowing the use of "iam" in place of the absolute path to "/opt/airlock-iam-7.3/bin/iam".

/opt/airlock-iam → /opt/airlock-iam-7.3/

Symlink to most recently installed version.

(This is not required for IAM to function. It only exists for scripting and added convenience.)

/home/airlock/iam/instances/a/

Configuration of instance "a".

Contains systemd service file pointing to "/opt/airlock-iam-7.3/".

/home/airlock/iam/instances/b/

Configuration of instance "b".

Contains systemd service file pointing to "/opt/airlock-iam-7.3/".

We will now install 7.7 and upgrade instance "a" to point to it, but leave instance "b" at 7.3:

copy
# Install version 7.7, this will not have any effect on instances "a" or "b".
./airlock-iam-installer-7.7.sh

# Upgrade instance "a"
su - airlock
iam upgrade -i "a"
iam systemd -i "a"
# Follow printed instruction to enable the new service.
# The old service will have to be stopped. The new service will replace the old one.

# When working with instance "b", a 7.3 instance, the 7.3 distribution must be used.
/opt/airlock-iam-7.3/bin/iam info -i "b"

As a result, we now have:

File / Directory

Description

/opt/airlock-iam-7.3/

7.3 distribution.

The PATH variable of the "airlock" user no longer points to this distribution.

/opt/airlock-iam-7.7/

7.7 distribution.

The PATH variable of the "airlock" user points to this distribution, allowing the use of "iam" in place of the absolute path to "/opt/airlock-iam-7.7/bin/iam".

/opt/airlock-iam → /opt/airlock-iam-7.7/

Symlink to most recently installed version.

(Note that this is not required. It only exists for added convenience and to simplify scripting.)

/home/airlock/iam/instances/a/

Configuration of instance "a".

Contains systemd service file pointing to "/opt/airlock-iam-7.7/".

/home/airlock/iam/instances/b/

Configuration of instance "b".

Contains systemd service file pointing to "/opt/airlock-iam-7.3/".