Docker Container Management
The TIBCO Streaming Model Management Server (MMS) launcher provides built-in functionality to manage MMS in a containerized environment. Using the commands in MMS, you can generate container source files, build Docker images, and run MMS in a Docker container. Running MMS in a container simplifies deployment by encapsulating the server and its dependencies into a portable and isolated unit.
Note: For more information, see MMS Launcher.
Prerequisites
Docker
The container functionality requires Docker to be installed on your system. For Windows users, Docker Desktop must be set to Linux containers
mode.
For more information, see Set up Linux Containers on Windows.
Note: Only Linux-based containers are supported, regardless of the host platform.
Commands
General Container Command Help
mms-launcher container --help
Output
Commands to run MMS in a Docker container
Usage: mms-launcher container <command>
Options:
-h, --help Display this help message
Commands:
generate Generate container source files for a manual build
run Run MMS in a Docker container
Use `mms-launcher container <command> --help` for more details.
Generate Container Source Files
The generate
command creates all necessary files to build an MMS container manually, including the Dockerfile
and configuration files.
Command Usage
mms-launcher container generate --output-directory <directory> [options]
Options
Name | Description | Default |
---|---|---|
-o, --output-directory <directory> |
Directory where the Dockerfile and other source files are generated. | Required |
-j, --jvm-argument <arg> |
JVM arguments to use when running the server in the container. Can be specified multiple times. | -enableassertions |
-s, --session-timeout-seconds <n> |
Server session timeout in seconds. | Environment default |
-t, --[no-]trace |
Enable or disable tracing for the server logs. | Environment default |
-w, --overwrite |
Overwrite existing files in the output directory. | Disabled |
-h, --help |
Display help for the command. | — |
Example
mms-launcher container generate --output-directory ./container-files --jvm-argument "-Xmx1024m" --trace
This command generates the container source files in the directory ./container-files
, enables tracing, and sets a JVM memory argument.
Run MMS in a Docker Container
The run
command builds the MMS container image and starts it, mapping the host port to the server port in the container.
Command Usage
mms-launcher container run [options]
Options
Name | Description | Default |
---|---|---|
-i, --image-name <name> |
Name for the Docker image in the format name[:tag] . |
tibco/mms:latest |
-c, --container-name <name> |
Name for the running container. If unspecified, Docker generates a random name. | Docker-generated |
-p, --host-port <port> |
Port on the host machine mapped to the server port in the container. | 2190 |
-n, --network <network> |
Docker network to use. Can be bridge (default) or a custom network name. |
bridge |
-sf, --substitution-file <file> |
File containing configuration substitutions. | —- |
-sv, --substitutions <subs> |
Substitutions as key-value pairs (for example, key1=value1,key2=value2 ). |
—- |
-j, --jvm-argument <arg> |
JVM arguments to use when running the server in the container. Can be specified multiple times. | -enableassertions |
-s, --session-timeout-seconds <n> |
Server session timeout in seconds. | Environment default |
-t, --[no-]trace |
Enable or disable tracing for the server logs. | Environment default |
-v, --verbose |
Enable detailed output for diagnostic purposes. | Disabled |
-w, --overwrite |
Overwrite existing files in the output directory. | Disabled |
-h, --help |
Display help for the command. | —- |
Example
mms-launcher container run --image-name my-mms:1.0 --host-port 2300 --jvm-argument "-Xms512m" --verbose
This command builds a container image named my-mms:1.0
, maps host port 2300
to the container, and enables verbose
output.
Use Cases
- Testing Custom Configurations:
Use generate
to create container source files and modify configurations in the generated files (For example, update Dockerfile
or server settings). It can also be used to build and run the container using Docker commands.
2. Automated Deployment:
Use run
to directly build and deploy the MMS container with pre-configured settings.
3. Networking with Other Containers:
Use the --network
option to connect multiple containers such as MMS with a streaming service container.
Note:
- Always use the
generate
command if you need to customize the container setup. - Use the
--overwrite
option with caution, as it replaces existing files in the output directory. - Regularly monitor server logs to ensure that the containerized MMS is functioning correctly.