Installing the Bridge by using Docker containers

Before you build and deploy the Docker images that you need to run Amlen Bridge, you must provision your operating system and install Docker.

  1. Complete the instructions to provision your operating system .
  2. Complete the instructions to install Docker on your operating system.
The installation involves modifying the imabridge-docker.env file, which contains the following content:

                IMABRIDGE_ADMINPORT=9082
                IMABRIDGE_ADMINIFACE=localhost
                IMABRIDGE_ADMINSECURE=true
                IMABRIDGE_ADMINUSER=adminUser
                IMABRIDGE_ADMINPW=adminPassword
                IMABRIDGE_ENABLEABOUT=true
                IMABRIDGE_AUTHENTICATION=basic
            
Table 1. A connection object defines the following properties that are required to connect to an MQTT server.
Parameter Default value Description
IMABRIDGE_ADMINPORT 9082 The mandatory admin port number, ranging from 1 to 65535.
IMABRIDGE_ADMINIFACE localhost The optional administrative interface.
IMABRIDGE_ADMINSECURE true The optional TLS switch, which is set to true by default (meaning TLS is enabled). If IMABRIDGE_ADMINSECURE is true, you must provide further TLS-related information, which is explained in the Using the Bridge configuration topic.
IMABRIDGE_ADMINUSER adminUser The optional admin user ID.
IMABRIDGE_ADMINPW adminPassword The optional password for IMABRIDGE_ADMINUSER. The password can be either plain text or obfuscated by using a uni-directional hash.
IMABRIDGE_ENABLEABOUT true The simple HTTP server is enabled showing the About page. IMABRIDGE_AUTHENTICATION is set to basic. If the username is not specified, an HTTP status of 401 is returned.
  1. Installing the Bridge
    1. Copy EclipseAmlenBridge-<build_info>.tz to the OS on which you are installing the Bridge.
    2. Create a subdirectory in which you can unpack the .tz file. For example, create a subdirectory called imabridge.
    3. Unpack the contents of the EclipseAmlenBridge-<build_info>.tz file into the imabridge subdirectory.
  2. Building and running the Bridge Docker image
    1. In the imabridge subdirectory, link the EclipseAmlenBridge-<build_info>.rpm file to imabridge.rpm by entering the following command: ln -s EclipseAmlenBridge-build_info.rpm imabridge.rpm
    2. The following commands are issued as a user with sudo access or a root.
    3. If your host OS is Red Hat Enterprise Linux™, you need to modify the Dockerfile. Change "FROM centos:latest" to "FROM rhel:latest".
    4. Build the Docker image by entering the following command: sudo docker build --force-rm=true -t imabridge:5.0.0.0 .
      Note: Ensure that you include the period at the end of the command.

      This command builds the Docker container by using the Dockerfile, installs the imabridge.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 217669ee8a82

    5. Confirm that the Docker image is built successfully by entering the following command: docker images

      Check the output is similar to the following line: imabridge 5.0.0.0 217669ee8a82 38 seconds ago 569MB

    6. Optional. Create a .tar file of the image so that you can deploy the Bridge on other hosts by entering the following command: sudo docker save -o ./imabridge-dockerimage.tar imabridge:5.0.0.0
    7. Edit the file imabridge-docker.env to set the username, password and interface for the REST admin endpoint. Note: If you want to create the admin endpoint later, then use a blank file.
    8. Create the container by using the following command: docker run --net=host -P -it --name BRIDGE -m <memory_size> -v <data_volume_on_host>:/var/imabridge --env-file imabridge-docker.env -d imabridge:5.0.0.0
    9. Verify that the Eclipse Amlen messaging bridge container is running by entering the following command: sudo docker ps.