azure-templatesrabbitmq

Add nodes to the RabbitMQ cluster

IMPORTANT: These steps assume that you have already installed the Microsoft Azure command-line client (Microsoft Azure CLI) on your system and you are signed in to Microsoft Azure through it. If this is not the case, please refer to the FAQ for instructions on how to install and sign in to Microsoft Azure using the Azure CLI.


NOTE: To follow the steps below, you will need the subscription ID, deployment ID and resource group ID for the deployment to which you wish to add nodes. Find out how to obtain the subscription ID and the deployment and resource group IDs.

To add nodes to the RabbitMQ cluster, follow these steps:

  • Set the subscription ID for your deployment in the Azure CLI with the command below. Replace the SUBSCRIPTION-ID placeholder with the correct value.

    $ az account set --subscription SUBSCRIPTION-ID
    
  • Download the deployment template associated with your deployment using the command below. Replace the DEPLOYMENT-ID and RESOURCE-GROUP-ID placeholders with the correct values.

    $ az group deployment export --name DEPLOYMENT-ID --resource-group RESOURCE-GROUP-ID > template.json
    
  • Download the parameters file associated with your deployment using the command below. Replace the DEPLOYMENT-ID and RESOURCE-GROUP-ID placeholders with the correct values.

    $ az group deployment show --name DEPLOYMENT_ID --resource-group RESOURCE_GROUP_ID --query "properties.parameters" | sed '/"type":/d' > parameters.json
    
  • Redeploy the solution with the additional node(s) using the command below. Replace the DEPLOYMENT-ID and RESOURCE-GROUP-ID placeholders with the correct values, the APP-PASSWORD placeholders with the application password used when initially deploying the application, and the NUMBER-OF-SLAVES placeholder with the final number of nodes you wish to have in the cluster.

    $ az group deployment create --name DEPLOYMENT-ID --resource-group RESOURCE-GROUP-ID --template-file template.json --parameters @parameters.json --parameters appPassword=APP-PASSWORD '{"slaveCount": {"value": NUMBER-OF-SLAVES}}'
    

Verify that the new node(s) have been added successfully by logging in to the Azure portal and selecting the resource group and deployment to check the number of running nodes. Once you have confirmed that the new node(s) have been added successfully, log in to the primary node and verify that the new node(s) are now part of the cluster by checking the cluster status.

Last modification December 31, 2018