KVM

This tutorial will walk you through the steps required to get a single Solace PubSub+ software message broker machine image instance up and running in a Centos or Ubuntu environment and ready for messaging.

Before you begin

It's assumed you have:

  • Installed a Linux Kernel-based Virtual Machine (KVM).
  • It will use the Virtual Machine Manager GUI for simplicity.

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 system resources required to support each client connection scaling tier.

Minimum System Resources Required For Connection Scaling Tiers

Client Connections CPUs* Virtual Memory (MiB)
up to 100 2 1,930
up to 1,000 2 5,301
up to 10,000 4 12,892
up to 100,000 8 28,191
up to 200,000 12 53,816

*The monitoring node in a high-availability (HA) group needs only 1 CPU.

If you plan to scale your deployment above the 1,000 client connections tier you should note that you're going to need to provision space on a drive to ensure proper functioning of your message broker. The Solace PubSub+ software message broker provides a 30 GB disk partition, which is suitable for proof of concept use for up to 1,000 clients, but is insufficient for client connection tiers above 1,000 and most guaranteed messaging deployments in production environments. For production use, you must provision an additional drive for the message spool, and it's also recommended to provide an additional drive for diagnostics information. For instructions on provisioning additional storage space, see Storage Configuration, and for information on other defaults, see Software Message Broker Configuration Defaults.

High Availability Considerations

To deploy message brokers in high-availability (HA) redundancy groups, you must set up three separate message broker instances and then configure them as an HA group. For more information on how to configure existing message brokers into an HA group, see HA Group Configuration.

Step 1: Get a Software Message Broker

The first task is to download an edition of the Solace PubSub+ software message broker. For KVM on Linux platforms, the message broker is distributed as a compressed QCOW2.

  • Solace PubSub+ Standard or Solace PubSub+ Enterprise Evaluation Edition: Go to the Downloads page of dev.solace.com. Select the link in the Compressed QCOW2 section in either the PubSub+ Standard or PubSub+ Enterprise Evaluation columns. A compressed QCOW2 file called solace-pubsub-standard-<version>.qcow2.xz or solace-pubsub-evaluation-<version>.qcow2.xz, as appropriate, will be downloaded.
  • Solace PubSub+ Enterprise: If you have purchased PubSub+ Enterprise, Solace will provide information on how to download a QCOW2 file package from a secure Solace server. Contact Solace Support at support@solace.com if you require assistance.

Once you have the compressed package, you need to extract the QCOW2 image. You can use the xz command to extract it, and when completed you'll be left with a file called solace-pubsub-<edition>-<version>.qcow2. This is the file you'll use with Virtual Machine Manager.

Step 2: Import the Software Message Broker

Once KVM is installed, the easiest way to create a virtual machine (VM) is with the Virtual Machine Manager application.

  1. Launch the Virtual Machine Manager application.

    Ubuntu:

    image_3

    Centos:

    $ virt-manager

  2. Then import the QCOW2 file into the Virtual Machine Manager. This will create a new VM image for the message broker.
    • Select the creation icon on the left of the menu. This will open up the New VM wizard. Enter an appropriate name for your message broker VM and select Import Existing Disk Image. Then click Forward.
      image_4
    • Select the QCOW2 file, leave the OS Type and Version as “Generic”, then click Forward.
      image_5
    • Configure the Memory and CPUs for the VM, then click Forward.

      The amount of memory and number of CPUs configured determines the number of client connections that can be made to the message broker as was noted in System Requirements. In this example, 4 GiB of RAM and 2 CPUs has been used.

      image_6

    • Confirm that “Customize configuration before install” has been checked and that the network interface is correct by selecting Advanced Options (this example uses “MacVTap bridge”, which is a recommended option). Then click Finish.
    • The virtual machine manager will now launch the VM properties dialog.

    • Select 'Disk 1'. After expanding 'Advanced options', change the 'Disk bus' to VirtIO and set the 'Storage format' to qcow2. Click Apply and then Begin Installation.
    • The message broker will start up and display console output similar to the following:

  3. Login to the message broker.

    The message broker's application software resides in a container that is wrapped within a Linux OS to form a message broker virtual machine image. In its default state, this message broker Linux host environment has remote login disabled and contains no passwords.

    To log in to the message broker for the first time you must log in as sysadmin, which is the default user account for the Linux host environment. You will be prompted to create a password for that user.

    When you are logged in as sysadmin, you can then create passwords for the default users through the console. You must assign these default users passwords to allow remote login.

Step 3: Configure the Host Name

To set the hostname for the new message broker, do the following:

  1. Shut down Solace PubSub+:

    [sysadmin@solace ~]$ solacectl service stop

  2. Configure the hostname:

    [sysadmin@solace ~]$ solacectl hostname configure <hostname>

  3. Restart the Solace PubSub+:

    [sysadmin@solace ~]$ solacectl service start

  4. Verify that the hostname has been set to the new one:

    [sysadmin@solace ~]$ hostname

Note:  The shell may still reflect the old hostname until a reboot, or a re-login (log out and log back in).

Where:

<name> is the hostname to assign to the message broker. Host names can contain up to 64 characters, composed of alphanumeric characters 0 to 9, a to z, A to Z, and underscores '_' and hyphens '-'. Note that '_' and '-' cannot be used at the beginning or end of a hostname. Host names must be unique among all configured message brokers.

Step 4: Access the Solace CLI

You can access the Solace CLI from the console in the Linux host environment. This is done through the Solace Control Utility.

When you first access the Solace CLI, you should do the following:

  • set a password for the admin user, which has access to all CLI commands
  • determine the message broker’s IP address so that you can enable remote access

To access the Solace CLI, do the following:

  1. To enter the Solace CLI from the console in the Linux host environment, enter the following command in the Linux host shell.

    [sysadmin@solace ~]$ solacectl cli

    A CLI banner and prompt appears.

    At the > prompt, you are at the User EXEC level of the Solace CLI command structure.

  2. Within the Solace CLI, enter the following commands to create an admin user named admin:

    solace> enable

    solace# configure

    solace(configure)# create username admin password <password>

    solace(configure/username)# global-access-level admin

  3. To determine the IP address assigned to the message broker, enter the following command:

    solace> show ip vrf management

    The displayed output lists the IP address assigned to the message broker (listed for eth0:1), which can be used to remotely manage it (that is, not from the VM console).

    solace> show ip vrf management
    VRF: management
    Number of interfaces: 1
    
    Status Flags:   R=Redundancy,  A=Admin,  O=Oper,  P=Physical
    Status Values:  U=Up,  D=Down,  N=Not Applicable
    
    Status
    Interface       V Router  IP Address          Source  R  A  O  P
    --------------  --------  ------------------  ------  -----------
    intf0:1         static    <IP Address>        system  U  U  U  U
    
    Number of active global routes: 5
    
    Destination       Gateway           Network Mask      Interface
    ----------------  ----------------  ----------------  ----------
    169.254.169.254   *                 255.255.255.255   N/A
    172.17.0.0        *                 255.255.0.0       N/A
    default           192.168.128.1     0.0.0.0           intf0
    169.254.0.0       *                 255.255.0.0       intf0
    192.168.128.0     *                 255.255.240.0     intf0
  4. To remotely access the Solace CLI for the message broker, you can now ssh to port 2222 of the message broker’s IP address and login in as the admin user.
  5. ssh -p 2222 admin@<public_ip>

Tip:  In addition to the admin CLI User, you can create additional CLI and file transfer users through the Solace CLI in the manner described in Management & Shell Users.

Step 5: Review Configuration Defaults

By default, a message broker starts with a basic configuration that has most common services enabled and ready for use. This basic configuration and the default ports that are used can be modified as required. For details, see Software Message Broker Configuration Defaults.

Next Steps

You now have a message broker with a basic configuration that is ready for messaging tasks. However, there are additional configuration tasks that you can perform. At this stage, you should do the following:

  1. Review the extra configuration tasks specific to Solace PubSub+ software message broker machine images presented on the Cloud & Machine Image Specific Topics page.

    These additional configurations allow you to further customize your message broker machine image to better suit your particular use-case and to make it more suitable for a production deployment.

  2. Begin to configure and manage the Solace PubSub+ software message broker machine image’s messaging operations through the Solace CLI in the same manner as you would other Solace PubSub+ message brokers (say, a Solace PubSub+ appliance or Solace PubSub+ software message broker Docker container). For information on how to perform these configuration and management tasks, see the topics in the Configuration category of the Solace customer documentation.