Code Monkey home page Code Monkey logo

solace-single-docker-compose's Introduction

Configure a Standalone Software Message Broker

This project provides instructions and tools to get a single Solace PubSub+ software message broker Docker container up-and-running on a desktop using Docker Compose.

If you are interested in setting up message brokers in an High Availability (HA) redundancy group, take a look at Configure High-availability Groups Using Docker Compose.

Contents

Before you begin

The example shown, which makes use of Solace PubSub+ Standard, is suitable for use with up to 100 client connections. However, a maximum of 1,000 client connections can be configured on your platform, provided appropriate resources have been provisioned. For more information about system requirements, see Editions of PubSub+ Event Broker: Software and System Resource Requirements.

You must have installed one of:

Ensure that Docker Compose is running by entering the following command:

docker-compose --help

If the help text is not displayed, you may need to install Docker Compose. See Install Docker Compose for instructions.

Step 1: Download the Docker Compose Template

Clone the GitHub repository containing the Docker Compose template:

git clone https://github.com/SolaceLabs/solace-single-docker-compose.git
cd solace-single-docker-compose/template

Step 2: Create a PubSub+ Software Message Broker

Run the following command to create a PubSub+ software message broker using the Compose template:

docker-compose -f PubSubStandard_singleNode.yml up -d

The Compose template runs a message broker named pubSubStandardSingleNode, using the latest PubSub+ Standard image pulled from Docker Hub, creates an admin user with global access permissions, and publishes the following message broker container ports to the same ports on the host:

  • port 1443 -- Web Transport over TLS
  • port 1883 -- MQTT Default VPN
  • port 1943 -- SEMP over TLS
  • port 2222 -- SSH connection to the Solace CLI
  • port 5671 -- AMQP Default VPN over TLS
  • port 5672 -- AMQP Default VPN
  • port 8000 -- MQTT Default VPN over WebSockets
  • port 8008 -- Web transport
  • port 8080 -- SEMP / PubSub+ Manager
  • port 8443 -- MQTT Default VPN over WebSockets/TLS
  • port 8883 -- MQTT Default VPN over TLS
  • port 9000 -- REST Default VPN
  • port 9443 -- REST Default VPN over TLS
  • port 55003 -- SMF Compressed
  • port 55443 -- SMF over TLS
  • port 55554 -- SMF

For more information about the default ports used for each service, refer to Software Message Broker Configuration Defaults. Once the container is created, it will take about 60 seconds for the message broker to finish activating.

Note: On MacOS Big Sur and later, port 55555 (the default SMF port for the software broker) is blocked. If this port is mapped to a port on a Docker container, the container fails to start, either silently or with a "port in use" error. To avoid this problem with MacOS Big Sur, map the SMF port to a different port on the host.

Step 3: Manage the PubSub+ Software Message Broker

You can access the Solace management tool, PubSub+ Manager, or the Solace CLI to start issuing configuration or monitoring commands on the message broker.

Solace PubSub+ Manager management access:

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

Solace CLI management access:

  1. Enter the following docker exec command:
docker exec -it pubSubStandardSingleNode /usr/sw/loads/currentload/bin/cli -A
  1. Enter the following commands to enter configuration mode:
solace> enable
solace# config
solace(configure)#
  1. Issue configuration or monitoring commands. For a list of commands currently supported on the message broker, refer to Software Message Broker CLI Commands.

Next Steps

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

To familiarize yourself with the some of the features of PubSub+ software message brokers and appliances, see Best Practices and the Feature Index.

When you are feeling comfortable with your message broker, you can test messaging using the Solace SDKPerf application. You can download SDKPerf from the dev.solace.com Downloads page.

solace-single-docker-compose's People

Contributors

arshrai17 avatar miarobinson avatar michellefthomas avatar mrc0113 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

solace-single-docker-compose's Issues

Looking for docker version for Apple Silicon

How can I get the docker image version for Apple Silicon ? The existing image only works on AMD platform, tried on Apple Silicon and got the error

solace_1  | Host Boot ID: a896865d-0885-4eaa-8a28-c7234009b9a6
solace_1  | Starting PubSub+ Software Event Broker Container: Wed Sep 22 17:14:57 UTC 2021
solace_1  | Setting umask to 077
solace_1  | SolOS Version: soltr_9.11.0.9
solace_1  | Failed to render config files, exiting (rc = 2)
solace_1  | runtime: failed to create new OS thread (have 2 already; errno=22)
solace_1  | fatal error: newosproc
solace_1  |
solace_1  | runtime stack:
solace_1  | runtime.throw(0xc9aa66, 0x9)
solace_1  | 	/usr/local/go/src/runtime/panic.go:596 +0x95
solace_1  | runtime.newosproc(0xc420028000, 0xc420038000)
solace_1  | 	/usr/local/go/src/runtime/os_linux.go:163 +0x18c

Please expose more ports by default

Unless using Docker on Linux in "host" network mode, ports are not able to be opened/exposed dynamically... only when the container is created. Which means if you want to use other protocols on other ports, you need to blow away the container and recreate it.

Can we please expose a basic subset of ports to make it easy for developers to start using the broker in a multi-protocol way? E.g.: https://github.com/SolaceLabs/solace-single-docker-compose

port 8080 — Use this port when configuring the message broker container with Solace PubSub+ Manager.
port 55555 — Your applications can use Solace APIs to connect to the message broker on this port.
port 8008 — The JavaScript sample applications below use this port to pass Web Messaging traffic through the message broker.
ports 1883 & 8000 — Ports for MQTT connectivity, over TCP and over WebSockets respectively
port 5672 — AMQP 1.0 applications using Apache QPID APIs would connect here
port 9000 — Use REST to send messaging and event data with Solace’s RESTful API port
port 2222 — Use SSH to connect to the Solace Command Line Interface (CLI) for advanced configuration

This would be in Step 2 of the README, and just uncommenting certain lines of the YAML file.

Thanks!

Port 55555 blocked by MacOS Big Sur

Solace default SMF port 55555 apparently is blocked under MacOS Big Sur.
The issue is a bit irritating, as the port won't show up in any port list of the OS.

Existing templates start silently to fail on simple things like Try-Me with ws protocol (as underlying SMF is not available).
New templates will not start with a "port in use" error.

See
https://apple.stackexchange.com/questions/410987/port-55555-on-mac-os-big-sur-already-in-use
https://developer.apple.com/forums/thread/671197
for reference.

Maybe it might be a good idea to at least create a hint to this in the template?
I've fixed this by mapping port 55555 to 55566 in docker-compose.yml

Compose does not support 'deploy' configuration

Got below warming while executing docker-compose -f PubSubStandard_singleNode.yml up -d

WARNING: Some services (primary) use the 'deploy' key, which will be ignored. Compose does not support 'deploy' configuration - use docker stack deploy to deploy to a swarm.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.