Running Universal Messaging Containers
You run a container from a Universal Messaging server image by using the docker
run
command. To acces the container from outside, you must map the default
container port 9000
and the deafult JMX Promethus agent container port
9200
to a free port on the host machine, for example:
docker run -d -p 9000:9000 -p 9200:9200 --name umcontainer
cp.icr.io/cp/webmethods/universalmessaging/universalmessaging-server:11.1
You can then use the host ports to access the server remotely via a URL, for example:
nsp://dockerhostname:hostport
Optionally, you can specify the following environment variables when running a container:
-
REALM_NAME
- the name of the Universal Messaging realm. AfterREALM_NAME
is set and persisted, you cannot change the realm name. -
INIT_JAVA_MEM_SIZE
- the initial Java heap size in megabytes. -
MAX_JAVA_MEM_SIZE
- the maximum Java heap size in megabytes. -
MAX_DIRECT_MEM_SIZE
- the maximum direct memory size in gigabytes. -
BASIC_AUTH_ENABLE
- enables basic authentication on the server. -
BASIC_AUTH_MANDATORY
- enables and manages basic authentication on the server. -
STARTUP_COMMAND
- configures the server to execute a given command at start-up. -
LOG_FRAMEWORK
- enables the Log4j2 logging framework. The valid value islog4j2
. If you do not specify this variable, the server uses the default logging frameworkfLogger
. TOOLS_ONLY
- starts the container in serverless mode. You can use such containers only to run the included tools to manage other Universal Messaging server containers. For more information about how to run a container in serverless mode, see Administering Universal Messaging Containers.
You can specify the environment variables when you run a container as follows:
docker run -d -e REALM_NAME=umtest -e INIT_JAVA_MEM_SIZE=2048 -e MAX_JAVA_MEM_SIZE=2048
-e MAX_DIRECT_MEM_SIZE=3G -e BASIC_AUTH_ENABLE=Y -e BASIC_AUTH_MANDATORY=Y -e LOG_FRAMEWORK=log4j2
-e STARTUP_COMMAND="runUMTool.sh CreateChannel -channelname=test -rname=nsp://localhost:9000"
-p 9000:9000 --name umcontainer
cp.icr.io/cp/webmethods/universalmessaging/universalmessaging-server:11.1
When a client authenticates, the client provides credentials (username and password) over a SASL mechanism where the server uses the configured modules to authenticate. In case of basic authentication, as in the example above, the server authenticates a user by username and password against the users.txt file in the Software AG_directory\common\conf directory.
To check for your running container, use the docker ps
command. The
following example shows the output of the command:
CONTAINER ID a15557bccc7c IMAGE universalmessaging-server:11.1
COMMAND "/bin/sh -c umstart.…" CREATED 6 seconds ago STATUS Up 5 seconds
PORTS 0.0.0.0:9000->9000/tcp NAMES umcontainer