5.1.3 Upgrade to the Latest Enterprise Edition in Docker

Run these steps to upgrade to the latest release of Transaction Manager for Microservices 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 coordinator runs in the main container. As part of the upgrade process, MicroTx creates an init process in an independent container. The init process starts, completes the prerequisite steps for the upgrade, upgrades the MicroTx coordinator, and then terminates when it finishes the upgrade. It uses the MicroTx image that the main container also uses.

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

  • if you used etcd or internal memory to store the transaction logs in a previous release of Transaction Manager for Microservices Enterprise Edition.
  • if you want to upgrade to the latest release of MicroTx Free.
  • if you want to upgrade MicroTx in Kubernetes clusters. See Upgrade to the Latest Enterprise Edition in Kubernetes Cluster.
To upgrade to Transaction Manager for Microservices 24.2 Enterprise Edition:
  1. Download the files for the latest release of MicroTx. See Download the Installation Bundle.

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

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

  2. Load the MicroTx image to the local Docker repository. The MicroTx image is located at installation_directory/otmm-<version>/image/tmm-<version>.tgz.
    cd installation_directory/otmm-<version>/otmm
    docker load < image/tmm-<version>.tgz
    The following message is displayed when the image is loaded.
    Loaded image: tmm:<version>
  3. 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/otmm-24.2/otmm/image folder.
  4. Run the following command to initiate an init process in a Docker container to upgrade MicroTx.

    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:24.2

    Where,

    • --name init-otmm-app is the name of the MicroTx 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 Docker image that you have loaded to the local Docker repository.
  5. 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>
  6. Set INIT_CONTAINER_ENABLED to False in the tcs.yaml file.
  7. Run the following command to start running MicroTx in the Docker container.

    Syntax

    The following sample command runs the MicroTx 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:24.2

    Where,

    • --name otmm-app is the name of the MicroTx 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 Docker image that you have loaded to the local Docker repository.