🎄 Happy Holidays! 🥳
Most of Solace is closed December 24–January 1 so our employees can spend time with their families. We will re-open Thursday, January 2, 2024. Please expect slower response times during this period and open a support ticket for anything needing immediate assistance.
Happy Holidays!
Please note: most of Solace is closed December 25–January 2, and will re-open Tuesday, January 3, 2023.
Running Software Broker using Podman on MacOS (x86)
Here are the steps to get Solace Broker running using rootless podman. We will be using brew to install podman on the host.
a) Update brew
brew update
b) Upgrade brew
brew upgrade
c) Install podman
brew install podman
d) Create and start your podman machine
podman machine init --cpus=2 --disk-size=20 --memory=4096 -v $HOME:$HOME
Mount the $HOME
directory of the host on the machine. This will help you copy/move files seamlessly between the host and the podman machine.
e) Start the podman machine
podman machine start
f) Setup storage directory on the podman machine
podman machine ssh
Inside the podman machine:
cd $HOME mkdir storage-group
g) Get a PubSub+ Software Event Broker Image
Rootless Podman is supported for PubSub+ software event broker 10.1. Please select a version that is 10.1 or higher.
- Go to the Solace PubSub+ Event Broker downloads page.
- Scroll to the Docker section, and then select the edition of the software event broker.
- 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.
After you've obtained the package, load the image to the local Podman registry by running the following command on the host
podman load -i solace-pubsub-<edition>-<version>-docker.tar.gz
An example:
podman load -i solace-pubsub-standard-10.1.1.29-docker.tar.gz
h) Run the container
On the host machine, run the following command from a terminal.
podman run -d -u 0 -p 8080:8080 -p 55554:55555 -p 8008:8008 --shm-size=1g \ --env username_admin_globalaccesslevel=admin \ --env username_admin_password=admin --name=solace \ --net slirp4netns:port_handler=slirp4netns \ --volume /var/home/core/storage-group:/var/lib/solace:Z \ localhost/solace-pubsub-standard:10.1.1.29
NOTE: The --volume
option makes the broker runtime files available in the $HOME/storage-group
directory in the podman machine. Specifying a name solace with the --name
parameter will help you manage the podman machine by name instead of id.
If you want to access the debug logs and other broker runtime artifacts, you can access them inside the podman machine by opening an ssh session.
podman machine ssh tail -f $HOME/storage-group/jail/logs/debug.log
At any point in time, if you want to recreate the setup - you can run the following commands and start the steps afresh.
Shutdown the machine:
podman machine stop
Remove the machine:
podman machine rm podman-machine-default
Run the steps from D, E, F, and H described above.
For more information on rootless containers, refer to the documentation.
Comments
-
@giri - first thanks for these steps. I actually followed these to deploy a Standard PubSub+ on my M2 MacBook. I had to make two additional steps to get it to work, which I got from the Solace docs here:
(1) Give the container user access to the storage-group directory:
podman unshare chown 1000:0 -R $HOME/storage-group
(2) Change your
--volume
parameter to:--mount type=bind,source=/var/home/core/storage-group,destination=/var/lib/solace,relabel=private,ro=false \
Without these to the container would not start and logs showed the broker did not have permissions on
/var/lib/solace
0 -
@dishantlangayan Thanks for sharing this. The step that you mentioned is very much necessary if the container is started as a non-root user. I created these steps for Max x86, unless something is different in M2, not sure. Will check it again for the x86 (don't have M2).
0