5.4 Upgrade to the Latest Enterprise Edition in Docker

Run these steps to upgrade to the latest release of Transaction Manager for Microservices - Distributed Transactions Enterprise Edition only if you use Oracle Database to store the transaction logs in the previous release. You can run these steps in the Docker environment.

The MicroTx Distributed Transactions coordinator runs in the main container. As part of the upgrade process, MicroTx Distributed Transactions creates an init process in an independent container. The init process starts, completes the prerequisite steps for the upgrade, upgrades the MicroTx Distributed Transactions coordinator, and then terminates when it finishes the upgrade. It uses the MicroTx Distributed Transactions image that the main container also uses.

Do not use the instructions in this section in the following scenarios:

  • if you cannot grant the required privileges to the database user, the database administrator must run SQL scripts to upgrade the Database. See Upgrade to the Latest Enterprise Edition Using SQL Scripts.
  • if you used etcd or internal memory to store the transaction logs in a previous release of Transaction Manager for Microservices - Distributed Transactions Enterprise Edition.
  • if you want to upgrade to the latest release of MicroTx Distributed Transactions Free.
  • if you want to upgrade MicroTx Distributed Transactions in Kubernetes clusters. See Upgrade to the Latest Enterprise Edition in Kubernetes Cluster.
To upgrade to Transaction Manager for Microservices - Distributed Transactions 26.1 Enterprise Edition:
  1. Before you begin, run the MicroTx Distributed Transactions transaction coordinator in maintenance mode to back up cached data. See Back Up Cached Maintenance Data.
  2. Download the files for the latest release of MicroTx Distributed Transactions. See Download the Installation Bundle.

    Ensure that you do not overwrite the files that you had downloaded for earlier versions of MicroTx Distributed Transactions.

    The latest image of the transaction coordinator is available at installation_directory/MicroTx-26.1/MicroTx/image/tmm-26.1.tgz. In the next few steps, you will use this file to update the existing transaction coordinator image.

  3. Load the MicroTx Distributed Transactions image to the local Docker repository. The MicroTx Distributed Transactions image is located at installation_directory/MicroTx-<version>/image/tmm-<version>.tgz.
    cd installation_directory/MicroTx-<version>/MicroTx
    docker load < image/tmm-<version>.tgz
    The following message is displayed when the image is loaded.
    Loaded image: tmm:<version>
  4. Set INIT_CONTAINER_ENABLED to True in the tcs.yaml file to enable the creation of an init process. The tcs.yaml file is located in the installation_directory/MicroTx-26.1/MicroTx/image folder.
  5. Run the following command to initiate an init process in a Docker container to upgrade MicroTx Distributed Transactions.

    Syntax

    docker container run --name init-otmm-app \
    -v "$(pwd)":/app/config \
    -w /app \
    -p 9000:9000/tcp \
    --env CONFIG_FILE=/app/config/tcs.yaml \
    --network=host \
    -e STORAGE_DB_CREDENTIAL='{"password":"<dbUserpassword>", "username":"<DBuserName>"}' \
    -d tmm:26.1

    Where,

    • --name init-otmm-app is the name of the MicroTx Distributed Transactions application that you want to upgrade.
    • -v "$(pwd)":/app/config mounts the current directory into container at the /app/config path.
    • -w /app specifies the working directory as /app. In this sample command, /app remains the default working directory as the volume is also mounted on this directory based on the value provided for the -v flag.
    • --env CONFIG_FILE=config/tcs.yaml specifies the location of the tcs.yaml file, which contains the coordinator configuration details.
    • -e STORAGE_DB_CREDENTIAL provides the user name and password to access Oracle Database.
    • tmm:<version> is the MicroTx Distributed Transactions Docker image that you have loaded to the local Docker repository.
  6. Remove the independent container, in which the init process ran, from the list of docker containers in Docker environment. The init process terminates automatically after it finishes the upgrade. Run the following command to remove the independent container.
    docker container rm <container_ID_of_init_otmm_app>
  7. Set INIT_CONTAINER_ENABLED to False in the tcs.yaml file.
  8. Run the following command to start running MicroTx Distributed Transactions in the Docker container.

    Syntax

    The following sample command runs the MicroTx Distributed Transactions application named otmm-app.

    docker container run --name otmm-app \
    -v "$(pwd)":/app/config \
    -w /app \
    -p 9000:9000/tcp \
    --env CONFIG_FILE=/app/config/tcs.yaml \
    --network=host \
    -e STORAGE_DB_CREDENTIAL='{"password":"<dbUserpassword>", "username":"<DBuserName>"}' \
    -d tmm:26.1

    Where,

    • --name otmm-app is the name of the MicroTx Distributed Transactions application that you want to create.
    • -v "$(pwd)":/app/config mounts the current directory into container at the /app/config path.
    • -w /app specifies the working directory as /app. In this sample command, /app remains the default working directory as the volume is also mounted on this directory based on the value provided for the -v flag.
    • --env CONFIG_FILE=config/tcs.yaml specifies the location of the tcs.yaml file, which contains the coordinator configuration details.
    • tmm:<version> is the MicroTx Distributed Transactions Docker image that you have loaded to the local Docker repository.