Tungsten TotalAgility in Docker Container
A Docker is an open platform for developing, shipping, and running applications. A Docker container image is a lightweight, standalone, executable package of software that includes everything needed to run an application: code, run-time, system tools, system libraries and settings.
Docker enables you to separate an application from its infrastructure, by providing ability to package and run an application such as Tungsten TotalAgility in a loosely isolated environment called a Container. Using Docker, you can manage your infrastructure in the same way you manage your applications while the isolation and security allows you to run many containers simultaneously on a given host using fewer resources than virtual machines.
Differences between Containers and Virtual Machines (VM)
Containers are an abstraction at the app layer that packages code and dependencies together. Multiple containers can run on the same machine and share the OS kernel with other containers, each running as isolated processes in user space. Containers take up less space than VMs (container images are typically tens of MBs in size), can handle more applications and require fewer VMs and Operating systems.
Virtual machines (VMs) are an abstraction of physical hardware turning one server into many servers. The hypervisor allows multiple VMs to run on a single machine. Each VM includes a full copy of an operating system, the application, necessary binaries and libraries – taking up tens of GBs. VMs can also be slow to boot.
Tungsten TotalAgility and Docker Container
Starting Tungsten TotalAgility v7.6, you can deploy Tungsten TotalAgility into your production environment, as an independent container or an orchestrated set of containers. The setup process remains the same whether your production environment is a local datacenter, a cloud provider, or a hybrid of the two. You do not need to use the Tungsten TotalAgility installation files to setup a Tungsten Automation, formerly Kofax environment, when it is packaged in a Docker container. Instead, Tungsten TotalAgility is already installed and only the relevant configuration settings, such as database connection strings, are required when the container runs.
Note: By default, all Tungsten TotalAgility containers do not have limits for memory or CPU.
The SQL Server runs either on another Windows container or another machine, as it cannot be run on the same Tungsten TotalAgility container.
Steps to Install Tungsten TotalAgility in a Docker container
Extract the Tungsten TotalAgility install media contents to a local directory on the Docker host machine. For the purpose of this article, we extracted the contents to C:\TotalAgility\ folder (refer screenshot).
Note: The host machine must have at least 30 GB disk space available for the Tungsten TotalAgility Docker Installation.
The Docker setup require a local working directory to create the container. Please note that the folder name must not contain any spaces. For the purpose of this article, we have our working directory set as C:\KTADockerSetup\ folder.
From the Install media folder, copy the contents of the \TotalAgility\Utilites\Docker folder to the working directory.
Remember you extracted the Tungsten TotalAgility install media zip file and left it at C:\TotalAgility\ ? Copy the contents of the C:\TotalAgility\ folder into your ContainerFiles folder in the working directory.
Now create a folder named “PowershellScripts” in your ContainerFiles folder. The folder structure should look like below at this stage:
Next we are going to install Docker on the host machine, before we can create the Tungsten TotalAgility container. For that open an elevated PowerShell command prompt, and type the following commands:
Check if a reboot is required by executing the following command:
If the output of this command is Yes, restart the server using the following command:
Once the restart is completed, the Docker installation should be completed and the service should be in a running state. You can check the status of the installation and Docker engine by executing the following command:
If the above is displayed, the setup of docker in the Windows host is successful.
Now that Docker has been successfully installed on the host machine, the next task is to make Docker work within the Tungsten TotalAgility Transformation Server space requirements, and to increase the default maximum size for the Docker container images. In order to do that please follow the below steps:
1. Open daemon.json available at “C:\ProgramData\docker\config”. If the file does not exist at that location, create the file.
2. Append the following text to daemon.json: { “storage-opts”: [“size=30GB”] }
Restart the Docker Engine service.
With that the Docker settings have been successfully modified and we are now ready to start setting up our Tungsten TotalAgility Docker Container. To start the process, execute the following command in the PowerShell console:
Please note that -t is tagname of the container (kta7.7docker) and it should be in lowercase.
Note: this can probably test your patience, as this will take a while to complete. So maybe go for a break and come back. 🙂
Now that docker container has been created, we need to initialise the Tungsten TotalAgility installation. For that we should generate “dockersettings.env” with the all the Tungsten Automation, formerly Kofax related settings described. The good news is, you can use the Tungsten TotalAgility Configuration Utility in the Docker mode. The generated file will be used in a later step to initialise the container.
Launch the Configuration Utility as Administrator.
Select “Docker mode” option and click OK to contine:
Make any required changes or leave all settings as default and click “Save Docker Settings” button.
You should be able to see the docker configuration file in the Configuration Utility folder.
Move the “.Env” file to TotalAgility folder as shown below:
We are now ready to initialise our container. Use the following command in the PowerShell window to initialise the container.
- -d – Container will run in detached mode
- -name – Name and unique identifier of the container
- -env – Path of “.env” file generated in step 18
- -p – Port of the application in the container (5005) : Exposed port of the Host(80)
- Kta7.7docker – Name of the docker container created in step 12
Once the Docker is initialised successfully a random generated text should appear as below:
You are all done – you have successfully setup and initialised a Tungsten TotalAgility docker container. Execute the following command in your PowerShell window to check if the docker container is running successfully.
If you see a message similar to the one mentioned above, you have successfully completed the installation.
COMING SOON – PART 2: How to connect to your newly setup Tungsten TotalAgility docker container.