This option is available for use with the Oracle or Generic JDBC connector.
This procedure creates an auto-scalable cluster of Azure instances with QueryGrid installed. When deploying QueryGrid to hosts that are members of Azure Virtual Machine Scale Set (VMSS), you can automate the tdqg-node installations and registration process by specifying a bootstrap script that runs on all newly added members of the Azure VMSS.
The required script, TDQG_DEPLOYMENT.sh is packaged in the node package tdqg-node-version.tar.gz. The script must be uploaded to your Azure Storage Account and used as a Custom Script extension along with the tdqg-node.json token.
This procedure assumes the following prerequisites:
- You have required privileges to create a Virtual Machine Scale Set, Storage Account, and add roles to Managed Identity.
The following software is installed automatically if not already installed on the node:
- OpenJDK 11 if Java is not already present
- Add a system in Viewpoint and download the tdqg-node.json token file that was generated by the QueryGrid Manager.For information about downloading tdqg-node.json, see Adding Nodes Manually.
- Download the node package, see Downloading Required Packages.
- Unzip the package using the tar -xzvf tdqg-node-version.tar.gz command.TDQG_DEPLOYMENT.sh is available in the qgdeployment/azure path.
- Upload the TDQG_DEPLOYMENT.sh script and the tdqg-node.json token to a Storage Account container.
- Create Azure VMSS with the following options:
- Orchestration Mode: Uniform
- Scaling Policy: Manual
- Upgrade Policy: Automatic
- System Assigned Managed Identity: Enable
- After creating the VMSS, perform the following:
Step Action Add scaling options
- Select Scaling in the left menu.
- Select Custom autoscale.
- Edit rule for scale out with intended metric.
- Delete Scale-in rule (scaling is handled by QueryGrid).
- Select Extensions in the left menu.
- Add Custom Script for Linux extension.
- Select Browse.
Add the tdqg-node.json and TDQG_DEPLOYMENT.sh scripts that you uploaded to a storage account in step 4.
- Add bash TDQG_DEPLOYMENT.sh --tdqg_node_json_file tdqg-node.json --scale-in-enabled true to the Command field.
scale-in-enabled:trueThis enables automated scale-in performed by the QueryGrid software when a driver host has been idle for a certain amount of time. When combined with an Autoscale only out policy defined in the VMSS Scaling options, both scale in and scale out are automated.Because this task is performed by QueryGrid, if set to true, scale in occurs even if Scale-in rule is deleted. Add Managed Identity
Allowing Azure to perform the auto scale-in rather than using the QueryGrid scale-in enabled feature can cause queries to fail while the scale-in is being performed.
- Select Identity in the left menu.
- Under System Assigned, add Role Assignment for Resource Group with the Contributor role.