diff --git a/.travis.yml b/.travis.yml index 120b655..d6c8f21 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,6 +26,8 @@ script: echo '#!/bin/bash SOLACE_DOCKER_IMAGE_REFERENCE="solace/solace-pubsub-standard:latest" ADMIN_PASSWORD="admin-password" + MAX_CONNECTIONS=100 # Broker system scaling: the maximum supported number of client connection + MAX_QUEUE_MESSAGES_MILLION=100 # Broker system scaling: the maximum number of queue messages, in millions GITHUB_BRANCH=BRANCH_REF if [ ! -d /var/lib/solace ]; then mkdir /var/lib/solace @@ -45,7 +47,7 @@ script: exit 1 fi chmod +x /var/lib/solace/install-solace.sh - /var/lib/solace/install-solace.sh -p $ADMIN_PASSWORD -i $SOLACE_DOCKER_IMAGE_REFERENCE + /var/lib/solace/install-solace.sh -p $ADMIN_PASSWORD -i $SOLACE_DOCKER_IMAGE_REFERENCE -n $MAX_CONNECTIONS -q $MAX_QUEUE_MESSAGES_MILLION fi' > automation_script - sed -i "s:BRANCH_REF:${TRAVIS_REPO_SLUG}/${TRAVIS_BRANCH}:g" automation_script - cat automation_script diff --git a/README.md b/README.md index 6608c92..9c73d53 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ This repository explains how to install a Solace PubSub+ Software Event Broker in various configurations onto Google Compute Engine (GCE) Linux Virtual Machines. This guide is intended for development and demo purposes. -The recommended event broker version is 9.4 or later. +The supported event broker version is 9.7 or later. For earlier broker releases use [this GitHub version of the QuickStart](//github.com/SolaceProducts/pubsubplus-gcp-quickstart/tree/v1.0.0). ## Description of the Solace PubSub+ Software Event Broker @@ -50,7 +50,7 @@ Repeat these instructions for all instances required, and follow the specific re > Tip: For an HA deployment, after the first Compute Engine instance has been created, go to its "VM instance details" by clicking on its name. Then use the "CREATE SIMILAR" button to create a new instance with most of the configuration details that will be described next pre-populated. -Determine the PubSub+ resource requirements based on the targeted [connection scaling](//docs.solace.com/Solace-SW-Broker-Set-Up/SW-Broker-Rel-Compat.htm#Connecti) +Determine the PubSub+ container image resource requirements consulting the [System Resource Requirements](//docs.solace.com/Configuring-and-Managing/SW-Broker-Specific-Config/System-Resource-Requirements.htm#res-req-container), adjusted to the targeted System Scaling parameters [Maximum Possible Concurrent Client Connections](//docs.solace.com/Configuring-and-Managing/SW-Broker-Specific-Config/System-Scaling-Parameters.htm#max-client-connections) and [Maximum Possible Queue Messages](//docs.solace.com/Configuring-and-Managing/SW-Broker-Specific-Config/System-Scaling-Parameters.htm#max-queue-messages). At a minimum, select standard 2 vCPU machine type, and at least 2 GB of memory, a CentOS 7 OS, and a disk with a size of at least 30 GB deployed on Centos7 OS: @@ -78,7 +78,7 @@ Take note of the configured IP addresses: ``, `` and `> ${LOG_FILE} echo "`date` INFO: Solace message broker image and tag: `docker images | grep solace | awk '{print $1,":",$2}'`" &>> ${LOG_FILE} +# Common for all scalings +shmsize="1g" +ulimit_nofile="2448:422192" +SWAP_SIZE="2048" -echo "`date` INFO:Set up swap" &>> ${LOG_FILE} -# ----------------------------------------- -# Decide which scaling tier applies based on system memory -# and set maxconnectioncount, ulimit, devshm and swap accordingly -MEM_SIZE=`cat /proc/meminfo | grep MemTotal | tr -dc '0-9'` -if [ ${MEM_SIZE} -lt 4000000 ]; then - # 100 if mem<4GiB - maxconnectioncount="100" - shmsize="1g" - ulimit_nofile="2448:6592" - SWAP_SIZE="1024" -elif [ ${MEM_SIZE} -lt 12000000 ]; then - # 1000 if 4GiB<=mem<12GiB - maxconnectioncount="1000" - shmsize="2g" - ulimit_nofile="2448:10192" - SWAP_SIZE="2048" -elif [ ${MEM_SIZE} -lt 29000000 ]; then - # 10000 if 12GiB<=mem<28GiB - maxconnectioncount="10000" - shmsize="2g" - ulimit_nofile="2448:42192" - SWAP_SIZE="2048" -elif [ ${MEM_SIZE} -lt 58000000 ]; then - # 100000 if 28GiB<=mem<56GiB - maxconnectioncount="100000" - shmsize="3380m" - ulimit_nofile="2448:222192" - SWAP_SIZE="2048" -else - # 200000 if 56GiB<=mem - maxconnectioncount="200000" - shmsize="3380m" - ulimit_nofile="2448:422192" - SWAP_SIZE="2048" -fi -echo "`date` INFO: Based on memory size of ${MEM_SIZE}KiB, determined maxconnectioncount: ${maxconnectioncount}, shmsize: ${shmsize}, ulimit_nofile: ${ulimit_nofile}, SWAP_SIZE: ${SWAP_SIZE}" &>> ${LOG_FILE} +echo "`date` INFO: Using shmsize: ${shmsize}, ulimit_nofile: ${ulimit_nofile}, SWAP_SIZE: ${SWAP_SIZE}" &>> ${LOG_FILE} echo "`date` INFO: Creating Swap space" &>> ${LOG_FILE} mkdir /var/lib/solace @@ -241,7 +218,8 @@ docker create \ --ulimit nofile=${ulimit_nofile} \ --net=host \ --restart=always \ - --env "system_scaling_maxconnectioncount=${maxconnectioncount}" \ + --env "system_scaling_maxconnectioncount=${MAX_CONNECTIONS}" \ + --env "system_scaling_maxqueuemessagecount=${MAX_QUEUE_MESSAGES_MILLION}" \ ${SOLACE_CLOUD_INIT} \ --name=solace ${SOLACE_IMAGE_ID}