Building and running the Eclipse Amlen messaging server Docker image

Build and deploy the Eclipse Amlen messaging server Docker image and start the Eclipse Amlen messaging server Docker container. The Eclipse Amlen messaging server handles connected clients and devices, and processes messages.

  • Ensure that you have access to a yum repository so that you can use the Dockerfile in the .tz file to build the Docker image.
  • Ensure that core files can be redirected to a known location. For more information about how to redirect core files, see Core file redirection.
  1. Build the messaging server Docker image.
    1. In the imaserver subdirectory, rename the EclipseAmlenServer-<build_info>.rpm file to imaserver.rpm by entering the following command:
      mv EclipseAmlenServer-<build_info>.rpm imaserver.rpm
    2. If you are not logged in as the root user, enter the following command:
      sudo sh
      Issuing this command enables you to run subsequent commands without having to specify sudo
    3. If your host OS is Red Hat, you need to modify the Dockerfile.
      Change "FROM centos:latest" to "FROM rhel:latest".
    4. Build the Eclipse Amlen imaserver Docker image by entering the following command:
      docker build --force-rm=true -t imaserver:<version> .
      Ensure that you include the period at the end of the command.
      This command builds the Docker container by using the Dockerfile, installs the imaserver.rpm, applies additional RPMs to the container, and updates any existing RPMs in the container. Successful completion of the command is indicated by output that is similar to the following line:
      Successfully built 3017eae88d88
    5. Confirm that the Eclipse Amlen imaserver Docker image has been built successfully by entering the following command:
      docker images
      and look for output that is similar to the following line:
      imaserver     0.1    0952b6b30178    2 seconds ago
  2. Create a .tar file of the image so that you can deploy the Eclipse Amlen messaging server on other hosts by entering the following command:
    docker save -o ./imaserver-<version>-dockerimage.tar imaserver:<version>
  3. Start the Eclipse Amlen messaging server by entering the following command:
    docker run --cap-add SYS_ADMIN --net=host -P -it --name IMA --env-file=imaserver-docker -m <memory_size> 
    -v <data_volume> -d imaserver:<version>
    where:
    <memory_size>
    The amount of memory available to the container. The minimum value is 4 GB. You can, however, specify a value that is as high as the available memory on the host.
    <data_volume>
    The external data volume to which the /var/messagesight directory is to be mapped. Mapping the directory to an external data volume is required so that data can be persisted over container updates. For information about using data volumes in Docker, see Managing data in containers.
    <version>
    The version of the software being installed for example 0.1.0.0-20210809.0852

    This command creates and starts the Eclipse Amlen messaging server Docker container.

    The following table shows the environment variables that are in the imaserver-docker.env file. You can set the environment variables and include them in the imaserver-docker.env file and include the file in the docker run command or you can specify them separately in the command by using the -e argument on the command.
    Table 1. Eclipse Amlen messaging server container environment variables
    Environment variable name Required? Description
    MESSAGESIGHT_ADMIN_HOST Optional IP address of the admin endpoint. The default is All
    MESSAGESIGHT_ADMIN_PORT Optional Port number of the admin endpoint. The default is 9089.
  4. Verify that the Eclipse Amlen messaging server container is running by entering the following command:
    docker ps
    1. Optional: To reconfirm that your browser has access to the messaging server container, load this URL in your web browser:
      https://<IP_Address>:9089>

      where IP_Address is the IP address of the host where the server is installed.

  5. If you are not logged in as the root user, enter the following command to exit from the sudo shell that you created at step 1.b:
    exit
  6. Set the licensed usage and accept the license agreement. For more information about using a REST Administration API to set the licensed usage and accept the license agreement, see Configuring the licensed usage for Eclipse Amlen and accepting the license by using REST Administration APIs.
You can create and run an Amlen WebUI Docker image that you can use to administer the Eclipse Amlen messaging server. For more information, see Building and running the Amlen WebUI Docker image.