azure-templatesjenkins

Add nodes to the 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 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 ADMIN-PASSWORD and APP-PASSWORD placeholders with the same administration password and application password used when initially deploying the application, and the NUMBER-OF-NODES 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 adminPassword=ADMIN-PASSWORD appPassword=APP-PASSWORD '{"slaveCount": {"value": NUMBER-OF-NODES}}'
    
Last modification December 26, 2018