The Azure-WEKA Terraform package contains modules and examples to customize according to your deployment needs. The installation is based on applying the customized Terraform variables file to a predefined Azure subscription.
Applying the Terraform variables file performs the following:
Creates resources in a predefined resource group, such as virtual machines, network interfaces, function apps, load balancer, and more.
Deploys Azure virtual machines.
Installs the WEKA software.
Configures the WEKA cluster.
The total deployment time is about 30 minutes. Half the time is for resource deployment. The second is for the WEKA cluster installation and configuration.
Prerequisites
Before installing the WEKA software on Azure, the following prerequisites must be met:
The following must be installed on the workstation used for the deployment:
For an M1-based Mac workstation, see specific instructions below.
Obtain the Azure-WEKA Terraform package from https://github.com/weka/terraform-azr-wekaand save it to a local directory. To access the package, a git account is required, and it must be associated with the WEKA git organization.
Initialize the Azure-WEKA Terraform package using terraform init from the local directory. This command initializes a new or existing Terraform working directory by creating initial files, loading any remote state, downloading modules, and more.
Required permissions on Azure:
Privileged Role Administrator
Storage Blob Data Owner
Storage Account Contributor
Key Vault Administrator
To login to the Azure account using Azure CLI, use the az login command.
An Azure resource group is created within your subscription. The resource group also includes the Azure region.
M1-based Mac workstation additional requirements
Follow these additional requirements to get Terraform working on an M1-based Mac:
Run brew install tfenv
Run TFENV_ARCH=amd64 tfenv install 1.3.7
Run tfenv use 1.3.7
Run brew install kreuzwerker/taps/m1-terraform-provider-helper
Deploy WEKA on Azure using Terraform
You can use one of the provided examples as a template for the required deployment.
Go to the relevant directory in the examples directory and customize the Terraform variables file: vars.auto.tfvars.
Ensure the prefix and cluster_name variables are unique across the Azure environment.
Note: The example templates are simplified and have the minimum variable inputs to customize. For additional variable inputs to customize, you can modify their default values in the main variables.tf file, or add them to the Terraform variables file. See the README in the Azure-WEKA Terraform package for the full list of variable inputs.
To validate the configuration, run terraform plan.
Once the configuration validation is successful, run terraform apply.
Terraform applies the configuration on the specified Azure subscription and displays the cluster help commands.
Cluster help commands
The system displays the cluster help commands enabling you to perform the following:
Get the clusterization status
Get the cluster status
Fetch the WEKA cluster password
View the path to ssh keys
View the virtual machine IP addresses
Resize the cluster
Cluster help commands output example
In the following example, the prefix is v41, and the cluster name is jack.
Once Terraform applies the configuration and deploys all the required resources, you can use the cluster help commands to check the progress of the cluster deployment.
The following is the command syntax for checking the cluster status during the deployment progress:
Explore the following phases to check the deployment progress:
Preparation
Once the VM starts, it prepares all the required objects, such as setting the partition to /opt/weka, downloading the Weka release, and deploying the container drives.
You can track the progress of the preparation, which can take about 10 minutes.
Once the preparation phase completes, the list of requested virtual machines appears. The number of servers ready for clusterization depends on the required cluster size.
Run the following command to track the clusterization status:
The "ready for clusterization" section provides the list of virtual machines to be clusterized. In the following response example, the last backend v41-jack-vmss_3 runs the cluster formation:
Note: You can also track the cluster formation progress on the last backend (in this example, v41-jack-vmss_3) by opening the /tmp/cluster_creation.log file.
Validate the deployment
Once the deployment is completed, access the WEKA cluster GUI using the URL: http://<backend server DNS name or IP address>:14000 and get started with the WEKA cluster.
If the WEKA cluster is no longer required on Azure or you need to clean up the deployment, use the terraform destroy action (a token from get.weka.io is required). The object storage and storage account are not deleted.
If the Terraform deployment fails for any reason, such as dependencies not being present and Azure resource starvation, the destroy command does not work properly. Manually remove any resources created at the beginning of the Terraform script using the Azure console or Azure CLI before re-running the Terraform script.
If you need to preserve your data, create a snapshot using snap-to-object.