From Flow 7.0, the Flow Bootstrap can be installed and configured to run on Docker. This means that you can deploy Data Engines, Integration Engines, Message Engines, Data Sources, and Data Consumers to Docker containers.
Prerequisites
- A basic understanding of what a Docker container is and how to configure it
- An advanced understanding of Docker networking is required if you intend to use Flow in Docker containers that need to communicate with each other, or with other nodes on a domain
- One or more hosts on which your Docker containers will run. This may be an instance of Docker Desktop running on your Windows, Linux, or macOS computer; or you may choose to run a Docker daemon and client on a Linux machine, either on-premise or in the cloud. The following resources are helpful:
Using a Console Terminal to execute Docker Commands
Once you have your environment running a Docker client, use the following command to pull the latest version of the Flow Bootstrap:
sudo docker pull flowsoftwareinc/flowbootstrap:latest
The above command pulls a Docker Image from Docker Hub.
Note: This will stop the Flow components that are currently running in your environment. Please exercise caution when doing this in Production and plan for Flow to be unavailable while the components are being upgraded to the latest version and then are restarted.
To run a docker container hosting the Flow Bootstrap, execute the following command in a terminal:
sudo docker run --name flowbootstrap -h HOSTNAME -p 4501:4501 -p 80:80 -p 443:443 -td flowsoftwareinc/flowbootstrap:latest
Note what each of the parameters represents, as these may be different in your environment:
- --name flowbootstrap: You are explicitly naming your docker container "flowbootstrap". You can change this name according to your organization's policies. Note that a docker container name must be unique. If you leave out this parameter, your system will generate a container name for you, which may be acceptable. This parameter is not used by the Flow Bootstrap.
- -h HOSTNAME: You are specifying a name (in this case HOSTNAME) that will be referenced internally by the Flow Bootstrap inside the Docker container. It may be the same as the --name specified. However, keep a record of this name because it is used by the Flow instance when configuring and communicating with this container. Your hostname must be unique across all containers on the same host.
- -p HOST_PORT:CONTAINER_PORT: This creates a mapping between a network port in the container and a network port in the host. In the example provided, three ports are mapped:
- 4501 - is the default port that Flow components use to communicate with each other. The container port must align with the Flow instance's system configuration (see How do I change the default port that Flow components use to communicate with each other?) The host port must be unique per host.
- 80 - is the default port that the Flow Server is configured to use.
- 443 - is the default port that the Flow components use if HTTPS is configured.
- -t: This allocates a terminal or console inside the container which allows you to interact with the container as if it were a standard UNIX-like system.
- -d: This runs the container in a "detached mode" to make sure it starts in the background and does not block the terminal that started it. Note, in the example above both the t and d options have been combined into -td.
- flowsoftwareinc/flowbootstrap:latest: This creates a container using the image named "flowsoftwareinc/flowbootstrap:latest".
Flow System Configuration
From within a Linux or Docker system, you typically need to specify a SQL username and password for the Bootstrap to communicate with the Flow Database. In the Flow Config tool, open the SYSTEM\Properties and make sure to set the Username and Password properties:
Flow Platform Naming
Naming a Flow Platform requires an additional reference to bind it to the correct Docker container. This is why the HOSTNAME parameter is required when creating the container. In the deployment view, name your Platform as follows:
- <host name or IP address>:<host port>;<docker host name>
Notice the colon to designate the port, and semicolon to designate the docker host name. See the example as follows:
- 123.45.67.89:4501;Bootstrap1
where the Docker HOSTNAME was specified as Bootstrap1.
Useful Docker Commands
To view a list of the images that you have pulled:
sudo docker images
To view a list of running Docker containers:
sudo docker ps
Pay attention to the "Container ID" and "Names" fields, because either of these may be used to reference your container in other Docker commands. The Container ID is a hexadecimal string of 64 characters, but is usually abbreviated to the first 12 characters - these 12 characters are sufficient to reference the Docker container.
In fact, you can even use just the first 1 or 2 characters of the Container ID to reference the container, as long as those characters uniquely identify the container on your host.
To stop a Docker container:
sudo docker stop CONTAINER_ID (or CONTAINER_NAME)
To remove a Docker container:
sudo docker rm CONTAINER_ID (or CONTAINER_NAME)
To view statistics, such as CPU and Memory usage, of all running Docker containers:
sudo docker stats
You will need to use Ctrl+C to exit the above command.
To view the live logs being generated by the Flow Bootstrap (similar to using Windows Event Viewer):
sudo docker container logs CONTAINER_ID (or CONTAINER_NAME) --since 360m --follow
You will need to use Ctrl+C to exit the above command.
To access the shell within a container:
sudo docker exec -it CONTAINER_ID (or CONTAINER_NAME) sh
After executing the above command, you'll be within the shell of the container. This allows you to access Linux commands, such as to edit files within the container (e.g. the /app/Bootstrap.settings file). To exit the shell, type the word exit and press Enter. This will return you to the terminal on the host.
To view detailed configuration specific to a container:
sudo docker inspect CONTAINER_ID (or CONTAINER_NAME)
To see which ports have been mapped in a container:
sudo docker port CONTAINER_ID (or CONTAINER_NAME)
Using Docker Desktop
If you are using Docker Desktop, you can search for the Flow Bootstrap image by typing "flowsoftwareinc" in the Search bar at the top - you should find two options for the Flow Bootstrap - one for Arm processors, suffixed by the word "Arm", and the other for Intel processors.
Once you've pulled the image, you will see something like the following, indicating that you have the latest version of the Flow Bootstrap image:
From here on, we recommend you use Docker console/terminal commands to create your Docker containers because these provide the flexibility required to specify the hostname, map ports, etc.