Docker for Linux

This section walks you through the steps to set up a single PubSub+ software event broker container with Docker in a non-cloud Linux environment.

Before You Begin

It’s assumed that you have a stable version of the Docker daemon installed on your Linux host.

System Requirements

The number of CPUs and system memory allocations that your event broker requires depends on the number of client connections that you need to support. By default, fresh installations of the event broker allow up to 100 client connections.

To achieve desired stability and performance, the infrastructure that hosts the Pubsub+ software event broker must provide a minimum set of system resources. System resources broadly include requirements that are related to processors, memory, and storage. For details about the types of system resources that are required and their characteristics, see System Resource Requirements.

You can increase certain system limits by using System Scaling Parameters. Increasing these system limits also increases the system resources that are required. For more information, see Using System Scaling Parameters.

Information about configuring storage is at Managing Storage for Container Images.

The example on this page is suitable for use for up to 1,000 connections, and is appropriately configured for testing and PoC activities. If you plan to use your event broker in a production environment, or scale your system above 1,000 connections, make sure to consult the sections above and provision your system appropriately.

Step 1: Get a PubSub+ Software Event Broker

Pull the event broker image from the Docker repository using these two steps:

  1. Start Docker.

  2. Pull the image:
    >sudo docker pull solace/solace-pubsub-standard

This example assumes that you are using Solace PubSub+ Standard. If you want to use another edition, you need to obtain the appropriate event broker package:

  1. Go to the Solace PubSub+ Event Broker downloads page.
  2. Scroll to the Docker section, and then select the edition of the software event broker.
  3. Fill in your details, and then click Get The Downloads.

A compressed archive file called solace-pubsub-<edition>-<version>-docker.tar.gz will be downloaded.

Once you've obtained the package, start Docker and load the image.

For example:

>sudo docker load -i /tmp/solace-pubsub-enterprise-<version>-docker.tar.gz

Step 2: Create the Container

There are many options that you can set with the docker create or docker run command that is used to build the event broker container. The following example sets up a simple configuration suitable for a test deployment.

This example:

  • runs an event broker solace using the latest PubSub+ Standard image from Docker Hub
  • creates an admin user with global access permissions
  • publishes the following event broker container ports to the same ports on the Ubuntu host:
    • port 8080—enables SEMP management traffic to the container. Use this port when connecting to the container from Broker Manager (refer to PubSub+ Broker Manager for more information).

    • port 55555—enables SMF data to pass through the container.

    To use additional services, you must publish each corresponding port. For example, to pass AMQP encrypted traffic, you need to publish port 5671. For more information about the default ports that are used for each service, refer to Default Configuration for Software Event Brokers.

In the example, the storage-group (mapped to /var/lib/solace in the container) is bind-mounted to /mnt/solace on the host.

The storage-group requires at least 5.1 GB of storage space. See System Resource Requirements and Managing Storage for Container Images for more information.

You must create the /mnt/solace directory on the host before creating the container.

To run the container, enter the following command:

>sudo docker run -d -p 8080:8080 -p 55555:55555 --shm-size=1g --env username_admin_globalaccesslevel=admin --env username_admin_password=admin --name=solace 

--mount type=bind,source=/mnt/solace,destination=/var/lib/solace,ro=false solace/solace-pubsub-standard
  • If you loaded the image from a compressed tar archive, replace solace/solace-pubsub-standard in the example with the repository and tag that corresponds to your image. For example, if you loaded version 10.1.0.19 of the PubSub+ Enterprise edition, use solace-pubsub-enterprise:10.1.0.19.

If you are using SELinux and need to change the label of the host file or directory that is mounted into the container, you must use the --volume parameter. The --mount parameter does not support the z or Z options for modifying SELinux labels. For more information, see Configure the SELinux Label in the Docker documentation.

Step 3: Manage the PubSub+ Software Event Broker

To start issuing configuration or monitoring commands on the event broker, you can access Broker Manager or the Solace CLI

To access PubSub+ Broker Manager:

  1. Open a browser and enter http://localhost:8080.
  2. Log in as user admin with password admin.

To access the Solace CLI:

  1. Enter the following docker exec command:

    >sudo docker exec -it <container_name> /usr/sw/loads/currentload/bin/cli -A
  2. Type the following commands to enter configuration mode:

    solace> enable
    solace# config
    solace(configure)#

    For a list of Solace CLI commands currently supported on the event broker, refer to Software Event Broker CLI Commands.

Next Steps

You now have a software event broker container with a basic configuration that is ready for messaging tasks.

There are additional configuration tasks that you can make use of in the following topics:

When you are comfortable with your event broker, you can test messaging using the Solace SDKPerf application. You can download SDKPerf from the Other Software section in the Downloads page.

For more information about working with your event brokers, see the following: