CentOS on Azure

In this section we walk you through the steps to manually get a basic messaging configuration of the Solace PubSub+ software message broker Docker container up-and-running on a CentOS instance in Microsoft Azure.

Before you begin

It's assumed you have:

  • An Azure account with permission to create and run a virtual machine.
  • A stable version of Docker Engine installed.

Quick Start Template

As an alternative to the manual setup procedure shown on this page, there is a quick start guide in Azure that can be used to deploy either a single Solace PubSub+ software message broker or a three-node high availability (HA) cluster.

System Requirements

The number of CPUs and system memory required by your message broker depends on the number of client connections you need to support. By default, fresh installations of the message broker allow up to 100 client connections by default.

The following table lists the minimum number of CPUs and the minimum value of the total memory that must be provisioned for each connection scaling tier.

Minimum System Resources Required For Connection Scaling Tiers

Client Connections CPUs A = System Memory (GiB) B = Provisioned Swap Space or Additional System Memory (GiB)

Total Memory Required (GiB)

(A + B)

up to 100* 2 1 1 2
up to 1,000 2 4 2 6
up to 10,000 minimum of 4 12 2 14
up to 100,000 minimum of 8 28 2 30
up to 200,000 minimum of 12 56 2 58

*The monitoring node in a high-availability (HA ) group needs only 1 CPU. For production deployments, a minimum of 2 CPUs and 4 GiB of system memory must be provisioned for all messaging nodes.

The example shown on this page is suitable for use for up to the 1,000 connection scaling tier, and is appropriately configured for testing and PoC activities. If you plan to use your message broker in a production environment, or scale above the 1,000 client connections tier, you should note that there are a number of adjustments that will be need to be made to the example and you should consult the following topics:

Step 1: Launch a Host & Install Docker

Use the Azure Dashboard’s Launch setup wizard to create an Azure virtual machine that you can use to run a message broker.

  1. On the Azure dashboard, click the Virtual Machines icon, and then click +Add.

    Create Azure Virtual Machines

    Follow the setup wizard, and accept the recommended default settings, except as noted in the following steps.

  2. In the Compute window, search for the host OS you want to use.

    For a CentOS 7 host, CentOS-Based 7.2 is recommended.

  3. In the Choose Virtual Machine Size step, select a size based on the connection scaling tier information presented in the System Requirements section.

    Note:  Use of the B1S virtual machine is not recommended.

  4. At a minimum, it is recommended that the network security group include the following inbound rules.
    SoureDestinationServiceAction
    AnyAnySSH(TCP/22)Allow
    AnyAnyCustom (TCP/8080)Allow
    AnyAnyCustom (TCP/55555)Allow

    These port numbers are used for the following services: 22-Host SSH; 8080-SEMP / PubSub+ Manager / SolAdmin; 55555-SMF/non-compressed message data connections. Other ports can be opened as required. For a list of ports associated with message broker services, see Configuration Defaults.

  5. Manually install and configure Docker on your CentOS host. Instructions can be found on the Docker Get Docker for CentOS Web page.

Step 2: Set Storage-Driver & IPtables

You have to set the storage-driver and iptables options on the host system.

For systemd-based systems, create a daemon.json file to set the iptables and devicemapper Docker daemon options. For test deployments, it is recommended to set iptables to false and storage-driver to devicemapper. These options are set in the daemon.json file located in /etc/docker/. Follow these steps to set the options.

  1. If Docker is not stopped, then enter this command.

    >sudo systemctl stop docker

  2. Create the daemon.json file in /etc/docker/.

    sudo tee /etc/docker/daemon.json <<-EOF
    {
    "storage-driver": "devicemapper",
    "iptables": false
    }
    EOF

  3. Apply the settings.

    >sudo systemctl daemon-reload
    >sudo systemctl disable docker
    >sudo systemctl enable docker
    >sudo systemctl start docker

Step 3: Get a Software Message Broker

You will need to get a Solace PubSub+ software message broker Docker package, which is a compressed tar archive containing a Docker repository consisting of a single message broker Docker image.

  • Solace PubSub+ Standard : Go to the Downloads page of dev.solace.com. Then select the docker link from Solace PubSub+ Standard. You will be able to download a compressed archive file called solace-pubsub-standard-<version>-docker.tar.gz.
  • Solace PubSub+ Enterprise Evaluation Edition: Go to the Downloads page of dev.solace.com. Then select the docker link from Solace PubSub+ Enterprise Evaluation Edition. You will be able to download a compressed archive file called solace-pubsub-evaluation-<version>-docker.tar.gz
  • Solace PubSub+ Enterprise: If you have purchased Solace PubSub+ Enterprise, Solace will give you information for how to download a compressed tar archive package from a secure Solace server. Contact Solace Support at support@solace.com if you require assistance.

Once you have your Docker package, you can upload it to a directory on your host and load the image using these steps:

  1. Start Docker:

    >sudo systemctl start docker

    You can use the status command to check the status of Docker.

    >sudo systemctl status docker

  2. Load the image:

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

    In this example, it has been assumed that the compressed tar archive of Solace PubSub+ Standard has been uploaded to /tmp

    When loading is finished, you can check the image with the images command.

    >sudo docker images

    REPOSITORY                 TAG          IMAGE ID     CREATED     SIZE
    solace-pubsub-standard     8.x.x.x      529588fc82ce 4 days ago  856.6 MB

Step 4: Set Docker Create Options

There are many options that you can set with the docker create command that is used to build the message broker container. In this example we will show one that sets up a simple configuration suitable for a test deployment that can be used to help you become familiar with Solace PubSub+.

  1. Create a docker-create script.

    >sudo tee /root/docker-create <<-EOF
    #!/bin/bash
    sudo docker create \
    --network=host \
    --uts=host \
    --shm-size=2g \
    --ulimit core=-1 \
    --ulimit memlock=-1 \
    --ulimit nofile=2448:42192 \
    --env 'username_admin_globalaccesslevel=admin' \
    --env 'username_admin_password=admin' \
    --name=solace solace-pubsub-<edition>:<version>
    EOF

    For production deployments, there are use-case dependent factors that will impact the option and configuration key settings in the docker create command. For example, the POSIX shared memory size, shm-size and nofile values must be set based on the connection scaling tier. For more information, see Docker Create Options Configuration, Topics Unique to Docker Images, and Connection Scaling Tiers.

    In this example, the admin Solace CLI user and an associated password are defined at container creation through the username_admin_globalaccesslevel and username_admin_password configuration keys. By default, in a message broker container, no Solace CLI users are defined, so setting these configuration keys allows the container to be administered through the Solace SolAdmin management tool without first entering the Solace CLI to create an admin user.

    In the above docker create command, the repository name is solace-pubsub-<edition>. The values of <edition> and <version> are dependent on the message broker Docker package you previously obtained. For example, if you downloaded version 8.10.0.1022 of Solace PubSub+ Standard, the value of <edition> is Standard and <version> is 8.10.0.1022.

  2. Make the docker-create script executable:

    >sudo chmod +x /root/docker-create

Step 5: Create the Container

Create and run the message broker container on your host.

  1. Create the container:

    >sudo /root/docker-create

    Once it’s done running, a long identifier will be displayed that looks something like this:

    1cb8dba3c07b6970b1e22c1067fde76010259e50a8548c3f2f202a6e9ce4e345

    This is the ID for the message broker container you have just created.

  2. Start the message broker:

    >sudo docker start solace

    You can use the docker ps command to check on the status of the message broker once it’s running.

    >sudo docker ps

    The STATUS column associated with the message broker will display if the container is running and for how long.

Next Steps

You now have a message broker container with a basic configuration that is ready for messaging tasks. To get yourself going, you can access either of the Solace management tools PubSub+ Manager or Solace CLI to start issuing configuration or monitoring commands.

To access the Solace PubSub+ Manager:

  1. Open a browser and enter http://<your-message broker's-ip-address>: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 solace /usr/sw/loads/currentload/bin/cli -A

  2. Type the following commands to enter configuration mode:

    solace> enable
    solace# config
    solace(configure)#

  3. For a list of Solace CLI commands currently supported on the message broker, refer to Software Message Broker CLI Commands.

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

Also, in order to fully utilize Solace's message broker features, you should familiarize yourself with the configuration operations common to both Solace PubSub+ software message brokers and appliances. For information, see the topics in the Configuration section.