- 11 Nov 2022
- 5 Minutes to read
- Updated on 11 Nov 2022
- 5 Minutes to read
This article includes a brief introduction to the following topics,
- Container and its importance
- Container Orchestration (AKS & EKS)
- Using Decisions in Container
A container is a package that contains the code, configurations to the code, and all its dependencies to run the application or service within an isolated environment. Containers are based on Linux architecture. A container can be launched by pulling and running the Container Image. A Container Image is a static file that includes the executable code to run the container. Container Image becomes container during runtime. Container Images are stored in a private or public registry on a cloud Repository like Docker Hub, Amazon's Elastic Web Services, Azure Container Instances, etc.
To learn more about Containers, refer to the article by Docker.
How is Container different from Virtual Machine (VM)?
Container and VM have the same goal to run the application or service in an isolated environment.
- Virtual Machine (VM)
VMs or Virtual Machines uses hardware virtualization of the host computer. Hardware Virtualization is an abstraction of physical hardware (Ram, Memory, CPU, etc.) from the host machine to create another machine. It needs an operating system and a Kernel of its own.
Container, on the other hand, uses Operating System virtualization, where it shares the hardware, kernel, and OS of the host computer with other containers. Hence no need to install an operating system in a container. This makes Containers very fast and lightweight.
Why use containers over virtual machines?
The most important use case of an application or a service is its ability to scale within a business unit. Horizontal scaling with the VMs is complex and time-consuming, but with the help of containers, the process becomes easy and quick.
Passing Environment Variable to containers
Users need to configure multiple settings (file storage location, connection string, etc.) while installing an application with the help of an installer. But containers run with predefined configurations set in the container image. Using Environment Variables in CLI or passing the env.list path will help the user to set the dynamic configuration to containers before running the container image as a container.
To learn more about Environment Variable, refer to Environment variables in Compose.
Container orchestration is the automated process of deploying, auto-scaling, and managing containers as needed. Orchestration comes into the picture when the containers are running in Cluster. Clustering is a process where multiple containers (even thousands) running simultaneously will use the same database or file storage to run the applications.
How does Containers Orchestration work?
Depending upon the orchestration tool, a declarative configuration file is written in YAML or JASON format. This configuration file is written to define the desired configuration state, and the orchestration tool that runs the file uses its own intelligence to achieve that state.
The tool automatically deploys the containers to a host, choosing all the required hardware for the containers specified in the configuration file.
Once the containers are deployed, the orchestration tool manages everything based on the declarative configuration file.
Container Orchestration tools supported by Decisions
Kubernetes is an open-source and the most popular container orchestration platform used globally. It allows developers to effortlessly create containerized applications and services and scale, schedule, and monitor containers. To learn more about Kubernetes and its configuration, refer to the Kubernetes Official Website.
Amazon's Elastic Kubernetes Service (EKS)
Amazon EKS is a managed Kubernetes Service to run Kubernetes in AWS cloud or on-premises. EKS is a completely automated platform. EKS is a certified Kubernetes conformant, making it easy to run tooling and plugins developed by Kubernetes. To learn more about EKS, visit Amazon EKS.
Microsoft's Azure Kubernetes Services (AKS)
AKS is also a Managed Kubernetes Service similar to Amazon EKS, which is available on the Azure cloud. AKS can be used to handle scaling and managing containers and container-based applications. To learn more about AKS, visit Azure Kubernetes Services.
Using Decisions in Container
Users can deploy Decisions Container on multiple cloud servers or physical premises. There is no hard limit to the number of containers supported by a Decisions installation.
Below are changes needed for specific modules or features to utilize them for a container.
Document to PDF Steps and WordToPdf module
All Document to PDF Steps and WordToPdf module uses windows font, which is not supported by Linux. Decisions Containers has the ability to load the font from the /customfont folder. To use the windows font in containers, we need to volume map the /customfont.
The windows font can be found at C:\Windows\Fonts, and an easy and quick way to get TrueType fonts on a Linux system is to copy .TTF and .TTC files from the C:\Windows\Fonts to a new directory on the Linux environment and map the directory with /customfont.
Here is an example of the docker run command.
docker run -p [host port]:[container port] --name [CONTAINER_NAME] -v C:\[FOLDER_PATH]:/opt/decisions/data -v C:\[FOLDER PATH OF .TTF AND .TTC]:/customfont --env-file="[ENVIRONMENT_FILE_PATH]" [IMAGE_NAME]
The Download Agent button will not download the DecisionsAgent.msi in the container. To retrieve the .msi, it must be downloaded from the release site.
The HL7 module requires extra ports need to be opened and exposed. This can be done by running the Docker expose commands. Ports can be opened using the following command:
Afterward, the port can be published and mapped to the container. The following command does this.
Currently, containers can access all steps in the active directory module except for the Create user advanced and Set Password steps. For logging into a container using an AD account. The user must enter the domain name along with the username. (domainName\userName)
Setting up Environment Variable
Decisions has predefined environment variables to configure the settings while running the container. Some of them are required, and some of them are optional. Refer to the Creating Environment List File article to configure all the environment variable lists.
Refer to the following articles for deploying Decisions on Docker, Azure, AWS, and GCP.
- Deploying Containers on Docker
- Deploying Containers on Azure
- Deploying Containers on AWS
- Deploying Containers on GCP