Skip to content
This repository was archived by the owner on Jan 7, 2026. It is now read-only.

Commit 2fde6ce

Browse files
authored
9.4 release (#44)
* Supporting release 9.4 * Update template parameters * Now using the latest default ports * Added mounted volume ownership change * Added TCP for WAN optimization * Fix ports 8080 and 80 as HTTP for LB * Updated for deprecated config key * Updated template defaults with new S3 location * Update AMI machine IDs
1 parent 769b74f commit 2fde6ce

File tree

9 files changed

+312
-221
lines changed

9 files changed

+312
-221
lines changed

.travis.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,14 @@ script:
3333
- aws cloudformation validate-template --template-body file://templates/solace.template
3434
- aws cloudformation validate-template --template-body file://templates/nodecreate.template
3535
- yaml-lint -n templates/
36-
- sed -i "s@SolaceDockerImageParameterValue@$SOLACE_DOCKER_URL_PARAMETER_VALUE@g" ci/solace-aws-ha-3az-prod-travistest.json
37-
- sed -i "s@MessageBrokerNodeInstanceTypeParameterValue@$MESSAGEBROKERNODEINSTANCETYPE@g" ci/solace-aws-ha-3az-prod-travistest.json
38-
- sed -i "s@SolaceStackRegionNAME@$AWS_DEFAULT_REGION@g" ci/solace-aws-ha-3az-prod-travistest.json
36+
- #sed -i "s@SolaceDockerImageParameterValue@${SOLACE_DOCKER_URL_PARAMETER_VALUE}@g" ci/solace-aws-ha-3az-prod-travistest.json
37+
- sed -i "s@SolaceDockerImageParameterValue@solace/solace-pubsub-standard:latest@g" ci/solace-aws-ha-3az-prod-travistest.json
38+
- sed -i "s@EventBrokerNodeInstanceTypeParameterValue@${MESSAGEBROKERNODEINSTANCETYPE}@g" ci/solace-aws-ha-3az-prod-travistest.json
39+
- sed -i "s@SolaceStackRegionNAME@${AWS_DEFAULT_REGION}@g" ci/solace-aws-ha-3az-prod-travistest.json
3940
- aws s3 mb s3://solace-cf-quickstart-travistest || echo "s3 bucket already existed"
40-
- aws s3 sync . s3://solace-cf-quickstart-travistest/solace/messagebroker/latest --acl public-read
41+
- aws s3 sync . s3://solace-cf-quickstart-travistest/solace/eventbroker/latest --acl public-read
4142
- export TESTSTACKPREFIX="T$(date +%s)"; export TESTSTACKNAME="$TESTSTACKPREFIX-sol-aws-travistest";
42-
- aws cloudformation create-stack --stack-name $TESTSTACKNAME --template-body file://templates/solace-master.template --parameters file://ci/solace-aws-ha-3az-prod-travistest.json --on-failure DELETE --capabilities CAPABILITY_IAM
43+
- aws cloudformation create-stack --stack-name $TESTSTACKNAME --template-body file://templates/solace-master.template --parameters file://ci/solace-aws-ha-3az-prod-travistest.json --on-failure DO_NOTHING --capabilities CAPABILITY_IAM
4344
- echo "Waiting for stack create complete"
4445
- "travis_wait 30 sleep 1800 &"
4546
- until aws cloudformation describe-stacks --stack-name $TESTSTACKNAME | grep -m 1 -E 'CREATE_COMPLETE|DELETE_IN_PROGRESS'; do sleep 10; done
@@ -57,12 +58,13 @@ after_success:
5758
- echo "YAML linted"
5859
- echo "Cloudformation tested"
5960
- echo "Messaging tested"
60-
- if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_BRANCH" = "master" ]; then aws s3 sync . s3://solace-products/solace-aws-ha-quickstart/latest --acl public-read; fi
61+
- if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_BRANCH" = "master" ]; then aws s3 sync . s3://solace-products/pubsubplus-aws-ha-quickstart/latest --acl public-read; fi
6162

6263
after_script:
63-
- aws s3 rb s3://solace-cf-quickstart-travistest --force
64+
- #aws s3 rb s3://solace-cf-quickstart-travistest --force
6465
- aws cloudformation delete-stack --stack-name $TESTSTACKNAME
6566
- echo "Waiting for stack delete complete"
6667
- stackid="$(aws cloudformation describe-stacks --stack-name $TESTSTACKNAME | grep StackId | awk -F '"' '{print $4}')"
6768
- if [ -n "$stackid" ]; then until aws cloudformation describe-stacks --stack-name $stackid | grep -m 1 "DELETE_COMPLETE"; do sleep 10; done; fi
69+
- for volume in $(aws ec2 describe-volumes --region ${AWS_DEFAULT_REGION} --filters Name="status",Values="available" --query 'Volumes[*].VolumeId' --output text) ; do aws ec2 delete-volume --volume-id $volume --region ${AWS_DEFAULT_REGION} ; done
6870

README.md

Lines changed: 50 additions & 50 deletions
Large diffs are not rendered by default.

ci/solace-aws-ha-3az-prod-travistest.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@
2828
"ParameterValue": "24"
2929
},
3030
{
31-
"ParameterKey": "MessageBrokerNodeInstanceType",
32-
"ParameterValue": "MessageBrokerNodeInstanceTypeParameterValue"
31+
"ParameterKey": "EventBrokerNodeInstanceType",
32+
"ParameterValue": "EventBrokerNodeInstanceTypeParameterValue"
3333
},
3434
{
35-
"ParameterKey": "MessageBrokerNodeStorage",
36-
"ParameterValue": "0"
35+
"ParameterKey": "EventBrokerNodeStorage",
36+
"ParameterValue": "20"
3737
},
3838
{
3939
"ParameterKey": "MonitorNodeInstanceType",
@@ -57,6 +57,6 @@
5757
},
5858
{
5959
"ParameterKey": "QSS3KeyPrefix",
60-
"ParameterValue": "solace/messagebroker/latest/"
60+
"ParameterValue": "solace/eventbroker/latest/"
6161
}
6262
]

scripts/gen-cluster-hosts.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# instance.
2121
#
2222
# The assumption is that the Cloudformation Stack deploys 2 autoscaling groups.
23-
# MessageBroker (/tmp/routers)
23+
# EventBroker (/tmp/routers)
2424
# MonitorNodes (/tmp/monitors)
2525
#
2626
# The complete list of hosts for this stack is saved
@@ -85,9 +85,9 @@ done
8585
# The different models will have slightly different labels for the
8686
# nodes associated with each group ... but it's simple to handle both cases.
8787
#pwd
88-
grep -q -e "-MessageBroker.*Stack-" ${SOLACE_HOSTS_FILE}
88+
grep -q -e "-EventBroker.*Stack-" ${SOLACE_HOSTS_FILE}
8989
if [ $? -eq 0 ] ; then
90-
grep -e "-MessageBroker.*Stack-" ${SOLACE_HOSTS_FILE} \
90+
grep -e "-EventBroker.*Stack-" ${SOLACE_HOSTS_FILE} \
9191
| awk '{print $1" ROUTERNODE"NR-1" "$2" "$3" "$4}' > /tmp/routers
9292
else
9393
cp ${SOLACE_HOSTS_FILE} /tmp/routers

scripts/install-solace.sh

Lines changed: 89 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ logging_format=""
4040
logging_group=""
4141
logging_stream=""
4242

43-
verbose=0
44-
4543
while getopts "c:d:p:s:u:v:f:g:r:" opt; do
4644
case "$opt" in
4745
c) config_file=$OPTARG
@@ -68,7 +66,6 @@ done
6866
shift $((OPTIND-1))
6967
[ "$1" = "--" ] && shift
7068

71-
verbose=1
7269
echo "config_file=$config_file , solace_directory=$solace_directory , admin_password_file=$admin_password_file , \
7370
solace_uri=$solace_uri , disk_size=$disk_size , volume=$disk_volume , logging_format=$logging_format , \
7471
logging_group=$logging_group , logging_stream=$logging_stream , Leftovers: $@"
@@ -103,6 +100,7 @@ fi
103100
## Try to load solace_uri as a docker registry uri
104101
echo "`date` Testing ${solace_uri} for docker registry uri:"
105102
if [ -z "`docker pull ${solace_uri}`" ] ; then
103+
# If NOT in this branch then load was successful
106104
echo "`date` INFO: Found that ${solace_uri} was not a docker registry uri, retrying if it is a download link"
107105
if [[ ${solace_uri} == *"solace.com/download"* ]]; then
108106
REAL_LINK=${solace_uri}
@@ -189,18 +187,27 @@ chmod 0600 /var/lib/solace/swap
189187
swapon -f /var/lib/solace/swap
190188
grep -q 'solace\/swap' /etc/fstab || sudo sh -c 'echo "/var/lib/solace/swap none swap sw 0 0" >> /etc/fstab'
191189
190+
echo "`date` INFO: Applying TCP for WAN optimizations" &>> ${LOG_FILE}
191+
echo '
192+
net.core.rmem_max = 134217728
193+
net.core.wmem_max = 134217728
194+
net.ipv4.tcp_rmem = 4096 25165824 67108864
195+
net.ipv4.tcp_wmem = 4096 25165824 67108864
196+
net.ipv4.tcp_mtu_probing=1' | sudo tee /etc/sysctl.d/98-solace-sysctl.conf
197+
sudo sysctl -p /etc/sysctl.d/98-solace-sysctl.conf
198+
192199
cd ${solace_directory}
193200
194201
host_name=`hostname`
195202
host_info=`grep ${host_name} ${config_file}`
196-
local_role=`echo $host_info | grep -o -E 'Monitor|MessageBrokerPrimary|MessageBrokerBackup'`
203+
local_role=`echo $host_info | grep -o -E 'Monitor|EventBrokerPrimary|EventBrokerBackup'`
197204
198-
primary_stack=`cat ${config_file} | grep MessageBrokerPrimary | rev | cut -d "-" -f1 | rev | tr '[:upper:]' '[:lower:]'`
199-
backup_stack=`cat ${config_file} | grep MessageBrokerBackup | rev | cut -d "-" -f1 | rev | tr '[:upper:]' '[:lower:]'`
205+
primary_stack=`cat ${config_file} | grep EventBrokerPrimary | rev | cut -d "-" -f1 | rev | tr '[:upper:]' '[:lower:]'`
206+
backup_stack=`cat ${config_file} | grep EventBrokerBackup | rev | cut -d "-" -f1 | rev | tr '[:upper:]' '[:lower:]'`
200207
monitor_stack=`cat ${config_file} | grep Monitor | rev | cut -d "-" -f1 | rev | tr '[:upper:]' '[:lower:]'`
201208
202209
# Get the IP addressed for node
203-
for role in Monitor MessageBrokerPrimary MessageBrokerBackup
210+
for role in Monitor EventBrokerPrimary EventBrokerBackup
204211
do
205212
role_info=`grep ${role} ${config_file}`
206213
role_name=${role_info%% *}
@@ -209,10 +216,10 @@ do
209216
Monitor )
210217
MONITOR_IP=${role_ip}
211218
;;
212-
MessageBrokerPrimary )
219+
EventBrokerPrimary )
213220
PRIMARY_IP=${role_ip}
214221
;;
215-
MessageBrokerBackup )
222+
EventBrokerBackup )
216223
BACKUP_IP=${role_ip}
217224
;;
218225
esac
@@ -224,21 +231,31 @@ case $local_role in
224231
ROUTER_NAME="monitor${monitor_stack}"
225232
REDUNDANCY_CFG=""
226233
;;
227-
MessageBrokerPrimary )
234+
EventBrokerPrimary )
228235
NODE_TYPE="message_routing"
229236
ROUTER_NAME="primary${primary_stack}"
230237
REDUNDANCY_CFG="--env redundancy_matelink_connectvia=${BACKUP_IP} --env redundancy_activestandbyrole=primary --env configsync_enable=yes"
231238
is_primary="true"
232239
;;
233-
MessageBrokerBackup )
240+
EventBrokerBackup )
234241
NODE_TYPE="message_routing"
235242
ROUTER_NAME="backup${backup_stack}"
236243
REDUNDANCY_CFG="--env redundancy_matelink_connectvia=${PRIMARY_IP} --env redundancy_activestandbyrole=backup --env configsync_enable=yes"
237244
;;
238245
esac
239246
240-
if [ $disk_size == "0" ]; then
241-
SPOOL_MOUNT="-v internalSpool:/usr/sw/internalSpool -v adbBackup:/usr/sw/adb -v softAdb:/usr/sw/internalSpool/softAdb"
247+
# Setup password file permissions
248+
chown -R 1000001 $(dirname ${admin_password_file})
249+
chmod 700 $(dirname ${admin_password_file})
250+
251+
if [[ ${disk_size} == "0" ]]; then
252+
#Create new volumes that the PubSub+ Message Broker container can use to consume and store data.
253+
docker volume create --name=jail
254+
docker volume create --name=var
255+
docker volume create --name=softAdb
256+
docker volume create --name=diagnostics
257+
docker volume create --name=internalSpool
258+
SPOOL_MOUNT="-v jail:/usr/sw/jail -v var:/usr/sw/var -v softAdb:/usr/sw/internalSpool/softAdb -v diagnostics:/var/lib/solace/diags -v internalSpool:/usr/sw/internalSpool"
242259
else
243260
echo "`date` Create primary partition on new disk"
244261
(
@@ -252,56 +269,70 @@ else
252269
253270
mkfs.xfs ${disk_volume}1 -m crc=0
254271
UUID=`blkid -s UUID -o value ${disk_volume}1`
255-
echo "UUID=${UUID} /opt/pubsubplus xfs defaults 0 0" >> /etc/fstab
272+
echo "UUID=${UUID} /opt/pubsubplus xfs defaults,uid=1000001 0 0" >> /etc/fstab
256273
mkdir /opt/pubsubplus
274+
mkdir /opt/pubsubplus/jail
275+
mkdir /opt/pubsubplus/var
276+
mkdir /opt/pubsubplus/softAdb
277+
mkdir /opt/pubsubplus/diagnostics
278+
mkdir /opt/pubsubplus/internalSpool
257279
mount -a
258-
SPOOL_MOUNT="-v /opt/pubsubplus:/usr/sw/internalSpool -v /opt/pubsubplus:/usr/sw/adb -v /opt/pubsubplus:/usr/sw/internalSpool/softAdb"
280+
chown 1000001 -R /opt/pubsubplus/
281+
SPOOL_MOUNT="-v /opt/pubsubplus/jail:/usr/sw/jail -v /opt/pubsubplus/var:/usr/sw/var -v /opt/pubsubplus/softAdb:/usr/sw/internalSpool/softAdb -v /opt/pubsubplus/diagnostics:/var/lib/solace/diags -v /opt/pubsubplus/internalSpool:/usr/sw/internalSpool"
259282
fi
260283
261-
# Start up the SolOS docker instance with HA config keys
262-
echo "`date` INFO: Executing 'docker create'"
284+
#Define a create script
285+
tee ~/docker-create <<-EOF
286+
#!/bin/bash
263287
docker create \
264-
--uts=host \
265-
--shm-size=${shmsize} \
266-
--ulimit core=-1 \
267-
--ulimit memlock=-1 \
268-
--ulimit nofile=${ulimit_nofile} \
269-
--net=host \
270-
--restart=always \
271-
-v jail:/usr/sw/jail \
272-
-v var:/usr/sw/var \
273-
-v /mnt/pubsubplus/secrets:/run/secrets \
274-
${SPOOL_MOUNT} \
275-
--log-driver=awslogs \
276-
--log-opt awslogs-group=${logging_group} \
277-
--log-opt awslogs-stream=${logging_stream} \
278-
--env "system_scaling_maxconnectioncount=${maxconnectioncount}" \
279-
--env "logging_debug_output=all" \
280-
--env "logging_debug_format=${logging_format}" \
281-
--env "logging_command_output=all" \
282-
--env "logging_command_format=${logging_format}" \
283-
--env "logging_system_output=all" \
284-
--env "logging_system_format=${logging_format}" \
285-
--env "logging_event_output=all" \
286-
--env "logging_event_format=${logging_format}" \
287-
--env "logging_kernel_output=all" \
288-
--env "logging_kernel_format=${logging_format}" \
289-
--env "nodetype=${NODE_TYPE}" \
290-
--env "routername=${ROUTER_NAME}" \
291-
--env "username_admin_globalaccesslevel=admin" \
292-
--env "username_admin_passwordfilepath=$(basename ${admin_password_file})" \
293-
--env "service_ssh_port=2222" \
294-
${REDUNDANCY_CFG} \
295-
--env "redundancy_group_passwordfilepath=$(basename ${admin_password_file})" \
296-
--env "redundancy_enable=yes" \
297-
--env "redundancy_group_node_primary${primary_stack}_nodetype=message_routing" \
298-
--env "redundancy_group_node_primary${primary_stack}_connectvia=${PRIMARY_IP}" \
299-
--env "redundancy_group_node_backup${backup_stack}_nodetype=message_routing" \
300-
--env "redundancy_group_node_backup${backup_stack}_connectvia=${BACKUP_IP}" \
301-
--env "redundancy_group_node_monitor${monitor_stack}_nodetype=monitoring" \
302-
--env "redundancy_group_node_monitor${monitor_stack}_connectvia=${MONITOR_IP}" \
303-
--name=solace ${SOLACE_IMAGE_ID}
304-
288+
--uts=host \
289+
--shm-size=${shmsize} \
290+
--ulimit core=-1 \
291+
--ulimit memlock=-1 \
292+
--ulimit nofile=${ulimit_nofile} \
293+
--net=host \
294+
--restart=always \
295+
-v /mnt/pubsubplus/secrets:/run/secrets \
296+
${SPOOL_MOUNT} \
297+
--log-driver awslogs \
298+
--log-opt awslogs-group=${logging_group} \
299+
--log-opt awslogs-stream=${logging_stream} \
300+
--env "system_scaling_maxconnectioncount=${maxconnectioncount}" \
301+
--env "logging_debug_output=all" \
302+
--env "logging_debug_format=${logging_format}" \
303+
--env "logging_command_output=all" \
304+
--env "logging_command_format=${logging_format}" \
305+
--env "logging_system_output=all" \
306+
--env "logging_system_format=${logging_format}" \
307+
--env "logging_event_output=all" \
308+
--env "logging_event_format=${logging_format}" \
309+
--env "logging_kernel_output=all" \
310+
--env "logging_kernel_format=${logging_format}" \
311+
--env "nodetype=${NODE_TYPE}" \
312+
--env "routername=${ROUTER_NAME}" \
313+
--env "username_admin_globalaccesslevel=admin" \
314+
--env "username_admin_passwordfilepath=$(basename ${admin_password_file})" \
315+
--env "service_ssh_port=2222" \
316+
--env "service_webtransport_port=8008" \
317+
--env "service_webtransport_tlsport=1443" \
318+
--env "service_semp_tlsport=1943" \
319+
${REDUNDANCY_CFG} \
320+
--env "redundancy_authentication_presharedkey_key=`cat ${admin_password_file} | awk '{x=$0;for(i=length;i<51;i++)x=x "0";}END{print x}' | base64`" \
321+
--env "redundancy_enable=yes" \
322+
--env "redundancy_group_node_primary${primary_stack}_nodetype=message_routing" \
323+
--env "redundancy_group_node_primary${primary_stack}_connectvia=${PRIMARY_IP}" \
324+
--env "redundancy_group_node_backup${backup_stack}_nodetype=message_routing" \
325+
--env "redundancy_group_node_backup${backup_stack}_connectvia=${BACKUP_IP}" \
326+
--env "redundancy_group_node_monitor${monitor_stack}_nodetype=monitoring" \
327+
--env "redundancy_group_node_monitor${monitor_stack}_connectvia=${MONITOR_IP}" \
328+
--name=solace ${SOLACE_IMAGE_ID}
329+
EOF
330+
331+
#Make the file executable
332+
chmod +x ~/docker-create
333+
334+
echo "`date` INFO: Creating the Solace container"
335+
~/docker-create
305336
306337
# Start the solace service and enable it at system start up.
307338
chkconfig --add solace-pubsubplus

0 commit comments

Comments
 (0)