How to Deploy a Solace PubSub+ Event Broker to DigitalOcean
Tags: digitalocean, solace, pubsub, devops
Published: 2019-07-16 15:03:15

---
title: How to Deploy a Solace PubSub+ Event Broker to DigitalOcean
published: true
tags: digitalocean,solace,pubsub,DevOps
canonical_url: https://solace.com/blog/how-to-deploy-a-solace-pubsub-event-broker-to-digitalocean/
---

If you aren’t already aware, [DigitalOcean](https://digitalocean.com) is a cloud infrastructure provider whose purpose is to help “_developers easily build, test, manage, and scale applications of any size – faster than ever before.” _They make it easier to roll out pre-built applications and environments for your company, and to build your own. When it comes time to give those applications the ability to send and receive information, i.e. [_event-driven communication_](https://docs.solace.com/Best-Practices/Monitoring-Events.htm), whether request/reply using RESTful HTTP or pub/sub with AMQP, JMS or MQTT, you can easily install the PubSub+ event broker right alongside them. 

In this post we will set up our DigitalOcean account, choose which environment to deploy, and install PubSub+ into a Docker container on the DigitalOcean droplet. To get started, head over to [DigitalOcean](https://try.digitalocean.com/open-source/) and set up your account with either a username/password or via SSO with your Google account. If you already have a DigitalOcean account, you can skip this process.

## Initial Setup

DigitalOcean allows you to set up projects which help you organize resources, environments, etc. You can change these at any time, but it’s helpful to get started.

[![new docker project](https://solace.com/wp-content/uploads/2019/06/docker_new_project_torn-1024x949.png)](https://solace.com/wp-content/uploads/2019/06/docker_new_project_torn.png)

Once you’ve made it to the Dashboard, it’s time to create our droplet to install PubSub+ into. For this activity, we’re going to be using the latest Docker droplet, in this case _Docker 5:19.09.6_, as part of the Marketplace, and set up with Ubuntu 18.04 x64 by default.

Once that’s been selected, we need to choose the Standard Starter Plan, and we have some options for what droplet size to choose from. As listed on the [Docker for Linux Broker Setup Page](https://docs.solace.com/Solace-SW-Broker-Set-Up/Docker-Containers/Set-Up-Single-Linux-Container.htm), the minimum system resources required and recommended are:

![docker minimum system reqs](https://solace.com/wp-content/uploads/2019/06/docker_system_reqs-1024x594.png)

For the purposes of this post, we are going to select the $10/mo plan:

![docker new image](https://solace.com/wp-content/uploads/2019/06/docker_image_size-1024x428.png)

Note: you are only billed for the amount of time you use your droplet.

The next thing we select is the region for the droplet. We’ll be using San Francisco, but you can use any region you want.

![docker datacenter region](https://solace.com/wp-content/uploads/2019/06/docker_image_region-1024x339.png)

In order to make a console/terminal connection to the droplet, we need to add an SSH key. If you already have an SSH key, you’ll upload your _public_ key here. If not, you’ll need to create one, and [DigitalOcean has you covered](https://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys-on-ubuntu-1804) with the process.

The last steps to kick off the deployment is to assign or accept the hostname and choose a project to associate the droplet with. I’ve changed the hostname here to `solace1` and chosen the default project I created, but you can use the auto-generated hostname or enter your own. 

![finish droplet setup](https://solace.com/wp-content/uploads/2019/06/docker_finish_droplet_setup-1024x574.png)

When you’re ready, click Create!

![build droplet](https://solace.com/wp-content/uploads/2019/06/build_droplet_anim1.gif)

## Install PubSub+ on Droplet Container

Once the droplet is created, we’re ready to install the PubSub+ Docker container. To do so, you need to get to a terminal window and use `ssh` to connect to the droplet via the IP address listed:

```
ssh root@138.68.26.108
```

Note: While we won’t go into it with this post, I do not recommend running anything as the root user, and I highly recommend that you follow the [Initial Server Setup](https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-18-04) post by DigitalOcean for securing your droplet. This post is only to be considered a guide for setting up PubSub+ and not a guide for server common practices.

Once we’ve connected, let’s pull down the Docker container:

```
sudo docker pull solace/solace-pubsub-standard
```

Docker will start to pull down the image, which should happen pretty quickly:

![](https://solace.com/wp-content/uploads/2019/06/docker_pull-1024x250.png)

Now let’s create the PubSub+ event broker container with the image we downloaded:

```
sudo docker run -d -p 8080:8080 -p 55555:55555 --shm-size=2g --env username\_admin\_globalaccesslevel=admin --env username\_admin\_password=admin --name=solace solace/solace-pubsub-standard
```

Once it is created, we’ll get a UUID back for the container:

![](https://solace.com/wp-content/uploads/2019/06/docker_run-1024x122.png)

Now that we have the container working, we need to tell the preinstalled Linux firewall (ufw) to allow connections to our PubSub+ broker management tool. By default, the DigitalOcean droplet opens up IPv4/IPv6 firewall ports for SSH (22) and Docker (2375/2376). Our management tool utilizes port 8080, so we will need to open that up.

![](https://solace.com/wp-content/uploads/2019/06/linux_ufw_status.png)

We issue the following command to open up tcp port 8080:

```
sudo ufw allow 8080/tcp
```

![](https://solace.com/wp-content/uploads/2019/06/linux_ufw_allow.png)

Once we’ve enabled the ports, we can log in to the broker via `http://<ip address>:8080` using the default admin username (`admin`) and password (`admin`), and we will see the below screen:

![](https://solace.com/wp-content/uploads/2019/06/solace_broker_admin-1024x807.png)

## Next Steps

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

- [Default Configuration for Software Message Brokers](https://docs.solace.com/Configuring-and-Managing/SW-Broker-Specific-Config/SW-Broker-Configuration-Defaults.htm) – Go through the default port numbers for message broker services.
- [Scaling Tiers for Software Message Brokers](https://docs.solace.com/Configuring-and-Managing/SW-Broker-Specific-Config/Configuring-Conn-Scale-Tiers.htm)  – Learn about message broker connection scaling tiers.

Also, in order to fully utilize the message broker’s features, you should familiarize yourself with the configuration operations common to both Solace PubSub+ software message brokers and appliances. That information may be found in the topics in the [Configuration](https://docs.solace.com/Configuration.htm) section.

When you are feeling comfortable with your message broker, you can test messaging using the Solace SDKPerf application. You can download SDKPerf from the Other Software section on the [Downloads](https://solace.com/downloads/) page, with technical information on how to use SDKPerf with Solace PubSub+ located on our [Docs site](https://docs.solace.com/SDKPerf/SDKPerf.htm).

And that’s it! You’ve successfully set up a Solace PubSub+ event broker on DigitalOcean. Follow us on Twitter at [@solacedotcom](https://twitter.com/solacedotcom) and [@solacedevs](https://twitter.com/solacedevs), and our [YouTube channel](https://www.youtube.com/user/SolaceSystems) for new content.

The post [How to Deploy a Solace PubSub+ Event Broker to DigitalOcean](https://solace.com/blog/how-to-deploy-a-solace-pubsub-event-broker-to-digitalocean/) appeared first on [Solace](https://solace.com).