Starting a Cluster of FTL Servers in Docker Containers
To start FTL servers that require explicit configuration, complete this task.
Docker must already be installed on the host computer.
- Procedure
- Arrange an FTL server configuration file.
All the servers in the cluster can use the same configuration file.
globals: core.servers: ftl1: host1:8585 ftl2: host2:8585 ftl3: host3:8585 servers: ftl1: - realm: {} ftl2: - realm: {} ftl3: - realm: {}The configuration file can include core servers, auxiliary servers, or both.
- Run the
build_imagesscript provided in samples/docker.Option Description No eFTL service ftl-tibftlserver:7.0.1 eFTL service eftl-tibftlserver:7.0.1 - Start the FTL server container.
To make the configuration file available within the container, bind the external file system with Docker's -v parameter.
Publish the FTL server port using Docker's -p parameter. This example uses the default port, 8585.
Supply the configuration file name as the argument to the FTL server's -c parameter.
Supply the server name as the argument to the FTL server's -n or --name parameter. The name refers to a server defined in the configuration file.
docker run -v /var/tmp:/tmp -p 8585:8585 ftl-tibftlserver:7.0.1 -c /tmp/ftl/ftlconfig.yml -n <server_name> - Repeat the preceding step for each FTL server in the configuration file.
In this example, start three servers:
- Start server
ftl1onhost1. - Start server
ftl2onhost2. - Start server
ftl3onhost3.
- Start server