Skip to content

Commit 60d29a9

Browse files
authored
Added option to expose broker services to internal Load Balancer only (no public access) (#34)
* Added private LB deployment option with updated documentation. * Moved testing to GH Actions
1 parent 792fa4d commit 60d29a9

File tree

9 files changed

+196
-91
lines changed

9 files changed

+196
-91
lines changed

.github/workflows/build-test.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: build
2+
3+
# Controls when the action will run.
4+
on:
5+
pull_request:
6+
7+
push:
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
timeout-minutes: 50
13+
14+
steps:
15+
- name: Set env
16+
run: |
17+
echo "AZURELOCATION=centralus" >> $GITHUB_ENV
18+
UNIQUEID="$(date +%s)"
19+
echo "UNIQUEID=$UNIQUEID" >> $GITHUB_ENV
20+
TESTRESOURCEGROUPNAME="GHTestResourceGroup${UNIQUEID}"
21+
TESTDEPLOYMENTNAME="GHTestDeployment${UNIQUEID}"
22+
echo "TESTRESOURCEGROUPNAME=$TESTRESOURCEGROUPNAME" >> $GITHUB_ENV
23+
echo "TESTDEPLOYMENTNAME=$TESTDEPLOYMENTNAME" >> $GITHUB_ENV
24+
echo "ADMINPASSWORD=GHAdminpwd1234!" >> $GITHUB_ENV
25+
echo "TESTRUNBRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV
26+
#
27+
sudo apt-get install jq -y
28+
sudo apt-get install -y jsonlint
29+
30+
- name: Checkout
31+
uses: actions/checkout@v2
32+
33+
- name: Azure Login
34+
uses: azure/login@v1
35+
with:
36+
creds: ${{ secrets.AZURE_CREDENTIALS }}
37+
38+
- name: Lint json templates
39+
run: |
40+
jsonlint-php nestedtemplates/*
41+
42+
- name: Setup test params
43+
run: |
44+
sed -i "s@ARTIFACTSLOCATION@$GITHUB_REPOSITORY/$TESTRUNBRANCH@g" ci/azuredeploy.parameters.json
45+
sed -i "s@UNIQUEID@$UNIQUEID@g" ci/azuredeploy.parameters.json
46+
sed -i "s@TEST_SOLACEDOCKERIMAGE@${{ secrets.BROKER_DOCKER_IMAGE_REF }}@g" ci/azuredeploy.parameters.json
47+
sed -i "s@ADMINPASSWORD@$ADMINPASSWORD@g" ci/azuredeploy.parameters.json
48+
sed -i "s@EXPOSURE@Public@g" ci/azuredeploy.parameters.json
49+
cat ci/azuredeploy.parameters.json
50+
51+
- name: Test deploy with public LB option
52+
run: |
53+
az group create --name $TESTRESOURCEGROUPNAME --location $AZURELOCATION
54+
echo "Creating publicly exposed cluster and waiting to become active"
55+
az group deployment create --name $TESTDEPLOYMENTNAME --resource-group $TESTRESOURCEGROUPNAME --template-file azuredeploy.json --parameters ci/azuredeploy.parameters.json
56+
az group show --name $TESTRESOURCEGROUPNAME | grep provisioningState
57+
export url=`az network public-ip show --resource-group $TESTRESOURCEGROUPNAME --name myLBPublicIPD --query [ipAddress] --output tsv`; echo $url
58+
curl -O https://sftp.solace.com/download/SDKPERF_C_LINUX64; tar -xvf SDKPERF_C_LINUX64 -C /tmp; /tmp/pubSubTools/sdkperf_c -cip=$url -mn=100000 -mr=0 -ptl=t1 -stl=t1 | grep "Total Messages"
59+
sleep 30
60+
bash -c 'if [[ -z `curl -sS -u admin:$ADMINPASSWORD http://$url:8080/SEMP -d "<rpc><show><config-sync></config-sync></show></rpc>" | grep "<oper-status>Up</oper-status>"` ]] ; then echo "config-sync not up!"; exit 1; fi'
61+
curl -sS -u admin:$ADMINPASSWORD http://$url:8080/SEMP -d "<rpc><show><redundancy></redundancy></show></rpc>"
62+
curl -sS -u admin:$ADMINPASSWORD http://$url:8080/SEMP -d "<rpc><show><config-sync></config-sync></show></rpc>"
63+
64+
- name: Delete test resource group (Cleanup)
65+
if: ${{ always() }}
66+
run: |
67+
az group delete --name $TESTRESOURCEGROUPNAME --yes

.travis.yml

Lines changed: 0 additions & 55 deletions
This file was deleted.

README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Build Status](https://travis-ci.org/SolaceProducts/pubsubplus-azure-quickstart-template.svg?branch=master)](https://travis-ci.org/SolaceProducts/pubsubplus-azure-quickstart-template)
1+
[![Actions Status](https://github.com/SolaceProducts/pubsubplus-azure-quickstart-template/workflows/build/badge.svg?branch=master)](https://github.com/SolaceProducts/pubsubplus-azure-quickstart-template/actions?query=workflow%3Abuild+branch%3Amaster)
22

33
# How to Deploy Standalone or HA Clusters of Solace PubSub+ Software Event Brokers onto Azure
44

@@ -21,10 +21,12 @@ The following diagram shows the PubSub+ broker nodes deployed in [Azure Availabi
2121

2222
Also note that for production use the type of data disks mounted from Azure Block Storage shall be adjusted from the default [Standard HDD](//docs.microsoft.com/en-us/azure/virtual-machines/disks-types)
2323

24+
The Load Balancer in the diagram is exposed publicly and the VMs are also publicly accessible via SSH. This is not always desirable and an "Internal" deployment option is also provided, which will only expose these internally with no public IP addresses created. In this case the Load Balancer and the VMs are only accessible from a VM within the virtual network.
25+
2426
![alt text](images/ha-cluster.png "HA Cluster Deployment")
2527

2628

27-
This is a two step process:
29+
The deployment is a two step process:
2830

2931
### Step 1:
3032

@@ -72,13 +74,14 @@ You need to fill in the following fields (* marks the mandatory ones):
7274
| Security Group Name | New or existing security group, where event broker default ports will be made publicly available. |
7375
| Workspace Name | New or existing OMS Log Analytics workspace, where logs and diagnostics are monitored. Leave this field empty to not deploy an OMS Workspace. |
7476
| Workspace Region | Select region to deploy OMS Log Analytics workspace. Not used if Workspace Name is empty. |
75-
| DNS Label for LB IP* | Used for the public DNS name of the Load Balancer. Name must satisfy regular expression ^[a-z][a-z0-9-]{1,61}[a-z0-9]$ |
77+
| VM and Loadbalancer exposure | Specify the type of access to the broker VMs for SSH and to the Load Balancer for broker services. 'Internal' will make them accessible only from the local virtual network. Default is "Public". |
78+
| DNS Label for LB IP | Used for the public DNS name of the Load Balancer. Name must satisfy regular expression ^[a-z][a-z0-9-]{1,61}[a-z0-9]$ |
7679
| DNS Label for VM IP | Used for the public DNS name of each Virtual Machine. Do not use '-'. The default offers to generate a unique name. |
7780
| CentOS Version | The CentOS version for deploying the Docker containers. Use CentOS 7.2, 7.3, or 7.4. |
7881
| Max Number of Client Connections | Broker system scaling: the maximum supported number of client connections |
7982
| Max Number of Queue Messages | Broker system scaling: the maximum number of queue messages, in millions of messages |
80-
| Message Routing VM Size |The size of a PubSub+ broker message routing node VM. Important: ensure adequate CPU and Memory resources are available to support the selected broker system scaling parameters. For requirements check [//docs.solace.com/Configuring-and-Managing/SW-Broker-Specific-Config/System-Scaling-Parameters.htm). |
81-
| Monitor VM Size | The size of the PubSub+ monitor node VM in a High Availabity deployment. For requirements check [https://docs.solace.com](//docs.solace.com/Configuring-and-Managing/SW-Broker-Specific-Config/System-Resource-Requirements.htm#res-req-container) |
83+
| Message Routing VM Size | The size of a PubSub+ broker message routing node VM. Important: ensure adequate CPU and Memory resources are available to support the selected broker system scaling parameters. For requirements, check the [Solace documentation](//docs.solace.com/Configuring-and-Managing/SW-Broker-Specific-Config/System-Scaling-Parameters.htm). |
84+
| Monitor VM Size | The size of the PubSub+ monitor node VM in a High Availabity deployment. For requirements, check [https://docs.solace.com](//docs.solace.com/Configuring-and-Managing/SW-Broker-Specific-Config/System-Resource-Requirements.htm#res-req-container) |
8285
| Data Disk Size | The size of the data disk in GB for diagnostics and message spooling on the Solace Message Routing Nodes. For requirements check https://docs.solace.com. |
8386
| Broker Docker Image Reference | A reference to the Solace PubSub+ event broker Docker image, from step 1. Either the image name with optional tag in an accessible Docker registry or a download URL. The download URL can be obtained from http://dev.solace.com/downloads/ or it can be a URL to a remotely hosted image version. The default value is `solace/solace-pubsub-standard:latest` |
8487
| Deployment Model* | High Availability or Single Node. |
@@ -106,7 +109,7 @@ If OMS workspace name has been specified, Microsoft OMS (Operations Management S
106109

107110
# Gaining admin access to the event broker
108111

109-
To manage the currently AD-Active event broker, you can connect to the Public IP Address associated with the Load Balancer as the 'admin' user. From the Resource Group view for your deployment on the Azure Portal, the Load Balancer is the resource named `myLB`, and its Public IP Address is the resource named `myLBPublicIPD`, which has an IP address and a DNS name that you can connect to.
112+
To manage the currently AD-Active event broker, you can connect to the Public IP Address associated with the Load Balancer as the 'admin' user (for the rest of the document it is assumed that the publicly exposed Load Balancer option has been deployed). From the Resource Group view for your deployment on the Azure Portal, the Load Balancer is the resource named `myLB`, and its Public IP Address is the resource named `myLBPublicIPD`, which has an IP address and a DNS name that you can connect to.
110113

111114
Refer to the [Management Tools section](//docs.solace.com/Management-Tools.htm ) of the online documentation to learn more about the available tools. The WebUI is the recommended simplest way to administer the event broker for common tasks.
112115

0 commit comments

Comments
 (0)