Overview
This article will guide you through the process of installing webMethods Universal Messaging in a Docker container and accessing Universal Messaging using Universal Messaging Enterprise Manager. Docker containers encapsulate applications and their dependencies, providing a consistent and isolated environment. If you are adopting a microservices architecture, Docker is a natural fit. Each microservice can be packaged as a separate Docker container, and Universal Messaging instances can be deployed as needed to support communication between microservices.
Prerequisites :
- Docker should be installed on your system.
- Basic understanding of containerization architecture.
Universal Messaging Installation steps :
We will pull the SoftwareAG universal messaging image from the docker hub. Docker Hub is a registry service provided by Docker. It serves as a centralized repository for Docker images, allowing developers to share, distribute, and collaborate on containerized applications.
- Open the command prompt and run the below command and it will show you the docker version to confirm that the docker is installed properly.
- Command to view the docker version.
docker version
- Sample output.
Client: Cloud integration: v1.0.35+desktop.5 Version: 24.0.6 API version: 1.43 Go version: go1.20.7 Git commit: ed223bc Built: Mon Sep 4 12:32:48 2023 OS/Arch: windows/amd64 Context: default Server: Docker Desktop 4.25.2 (129061) Engine: Version: 24.0.6 API version: 1.43 (minimum version 1.12) Go version: go1.20.7 Git commit: 1a79695 Built: Mon Sep 4 12:32:16 2023 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.6.22 GitCommit: 8165feabfdfe38c65b599c4993d227328c231fca runc: Version: 1.1.8 GitCommit: v1.1.8-0-g82f18fe docker-init: Version: 0.19.0 GitCommit: de40ad0
- Command to view the docker version.
- Run the below command to pull the SoftwareAG universal messaging 10.15 version image from the docker hub.
docker pull softwareag/universalmessaging-server:10.15
docker pull
: This is the Docker command used to pull (download) Docker images from a container registry.softwareag/universalmessaging-server
: This is organized into two parts, the repository name and the image name.10.15
: This is the version of the Docker image. Docker images can have different versions, and in this case, the version or tag is “10.15”.
- We have our image ready now, run the below command to start the um server in the background for the first time.
docker run -d -p 9000:9000 --name hgumcontainer softwareag/universalmessaging-server:10.15
docker run
: This command is used to create and run a container from a specified image.-d
: This flag stands for “detached” mode. It means that the container will run in the background, and the terminal will be available for other commands.-p 9000:9000
: This specifies port mapping, it maps port from the host machine to a port inside the container. In this case, it maps port 9000 on the host to port 9000 inside the container.--name hgumcontainer
: This flag assigns a name to the container. In this case, the container is named “hgumcontainer.” which you can change as per your naming standards.softwareag/universalmessaging-server:10.15
: This is the name of the Docker image which will be used to create the container.
- Now the UM server should be running, run the below command to view the logs.
docker logs hgumcontainer
Connect to UM from UM Enterprise Manager :
- Open the UM Enterprise Manager by running “C:/SoftwareAG/UniversalMessaging/java/umserver/bin/nenterprisemgr.exe” exe file.
- Once the Enterprise Manager is opened you will be able to see the below options.
- Right-click on “Realms” -> “Connect to Realms,” fill in the “RNAME” with “nsp://localhost:9000,” and then click ‘OK’ to connect.
- Open the connection, you will able to see the screen below where you can create Queue/Topic and manage them.
Accessing Docker Container’s File System :
- Run the below command to start an interactive bash shell inside a running Docker container.
docker exec -it hgumcontainer /bin/bash
docker exec
: This command is used to execute a command inside a running container.-it
: This option will make the command run in interactive mode and allocate a terminal session.hgumcontainer
: This is the name of the running Docker container./bin/bash
: It starts an interactive bash shell.
- Now you can run the ‘ls’ command to list files and directories and the ‘cd’ command to check out those.
- Once you’re done with it, you can exit the nested terminal using the below command.
exit
Starting and Stopping container :
- Before starting the container run the below command to list all containers including stopped containers.
docker ps -a
docker ps
: This command is used to list running containers.-a
: This option (or flag) is used to display all containers, including those that are currently running and those that have stopped.
- After executing the above command, you will be able to find information about containers, including their IDs, names, and status. You can use this information to start or stop the containers as needed.
- Run the below command to start the container and don’t forget to replace ‘<container_id>‘ with the actual container ID or the container name.
docker start <container_id>
- Run the below command to stop the container and don’t forget to replace ‘<container_id>‘ with the actual id or name.
docker stop <container_id>
Delete/Remove container :
We can remove both running and stopped containers, but it is always recommended to first stop the container and then remove it.
- Remove/Delete stopped container: Run the below command to remove the stopped container and don’t forget the replace ‘<container_id_or_name>’ with the actual container ID or the name.
docker rm <container_id_or_name>
docker rm
: This command is to remove containers.<container_id_or_name>
: Replace this placeholder with the actual ID or name of the container.
- Remove/Delete running container: Run the below command to remove the running container and don’t forget the replace ‘<container_id_or_name>’ with the actual container ID or the name.
docker rm -f <container_id_or_name>
docker rm
: This command is to remove containers.-f
: This option stands for “force,” and it allows the removal of a running container. Without this option, Docker prevents the removal of running containers.<container_id_or_name>
: Replace this placeholder with the actual ID or name of the container.