Skip to content

Commit

Permalink
Simplified sentinel setup for 3 instances.
Browse files Browse the repository at this point in the history
  • Loading branch information
MichalKoziorowski-TomTom committed Jul 24, 2017
1 parent bc49f22 commit d21219d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
22 changes: 11 additions & 11 deletions redis-high-availability/azuredeploy.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,26 +97,26 @@
"_comment0": "/* T-shirt sizes may vary for different reasons, and some customers may want to modify these - so feel free to go ahead and define your favorite t-shirts */",
"tshirtSizeSmall": {
"vmSizeMember": "Standard_A1",
"numberOfMasters": 3,
"numberOfSlaves": 0,
"numberOfMasters": 1,
"numberOfSlaves": 2,
"totalMemberCount": 3,
"totalMemberCountExcludingLast": 2,
"vmTemplate": "[concat(variables('templateBaseUrl'), 'node-resources.json')]"
},
"tshirtSizeMedium": {
"vmSizeMember": "Standard_A2",
"numberOfMasters": 3,
"numberOfSlaves": 3,
"totalMemberCount": 6,
"totalMemberCountExcludingLast": 5,
"numberOfMasters": 1,
"numberOfSlaves": 2,
"totalMemberCount": 3,
"totalMemberCountExcludingLast": 2,
"vmTemplate": "[concat(variables('templateBaseUrl'), 'node-resources.json')]"
},
"tshirtSizeLarge": {
"vmSizeMember": "Standard_A5",
"numberOfMasters": 3,
"numberOfSlaves": 6,
"totalMemberCount": 9,
"totalMemberCountExcludingLast": 8,
"numberOfMasters": 1,
"numberOfSlaves": 2,
"totalMemberCount": 3,
"totalMemberCountExcludingLast": 2,
"arbiter": "Enabled",
"vmTemplate": "[concat(variables('templateBaseUrl'), 'node-resources.json')]"
},
Expand All @@ -128,7 +128,7 @@
"vmStorageAccountContainerName": "vhd-redis",
"vmStorageAccountDomain": ".blob.core.windows.net",
"vnetID": "[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]",
"scriptUrl": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/redis-high-availability/",
"scriptUrl": "https://raw.githubusercontent.com/mkozioro/azure-quickstart-templates/master/redis-high-availability/",
"templateBaseUrl": "[variables('scriptUrl')]",
"jumpboxTemplateEnabled": "jumpbox-resources.json",
"jumpboxTemplateDisabled": "empty-resources.json",
Expand Down
5 changes: 3 additions & 2 deletions redis-high-availability/redis-cluster-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ while getopts :n:v:c:m:s:i:p:lh optname; do
;;
v) # Version to be installed
VERSION=${OPTARG}
if [[ $VERSION == 3.* ]]; then IS_CLUSTER_AWARE=1; fi
# if [[ $VERSION == 3.* ]]; then IS_CLUSTER_AWARE=1; fi
;;
c) # Number of instances
INSTANCE_COUNT=${OPTARG}
Expand Down Expand Up @@ -346,7 +346,8 @@ configure_sentinel()
MASTER_NODE_IP="${IP_PREFIX}${MASTER_NODE_INDEX}"

# Patch the sentinel configuration file with a new master
sed -i "s/^sentinel monitor.*$/sentinel monitor mymaster ${MASTER_NODE_IP} ${REDIS_PORT} ${MASTER_NODE_COUNT}/g" /etc/redis/sentinel.conf
# sed -i "s/^sentinel monitor.*$/sentinel monitor mymaster ${MASTER_NODE_IP} ${REDIS_PORT} ${MASTER_NODE_COUNT}/g" /etc/redis/sentinel.conf
sed -i "s/^sentinel monitor.*$/sentinel monitor mymaster ${MASTER_NODE_IP} ${REDIS_PORT} 2/g" /etc/redis/sentinel.conf

# Make a writable log file
touch /var/log/redis-sentinel.log
Expand Down

0 comments on commit d21219d

Please sign in to comment.