This guide outlines the customization process for Terraform configurations to deploy the WEKA cluster on Azure. It is designed for system engineers with expertise in Azure and Terraform.
The Terraform package contains modules that can be tailored to suit your specific deployment requirements. The installation is based on applying the customized Terraform variables file to a predefined Azure subscription.
Applying the Terraform module 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 of that time is for resource deployment. The remainder 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:
Terraform (check the minimum required Terraform version specified in the Requirements section of Azure-WEKA deployment Terraform package.
For an ARM-based MAC workstation (for example, M1 or M2), see specific instructions below.
Initialize the Terraform-Azure-WEKA module 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 needs to be created within your subscription. The resource group also includes the Azure region.
Arm-based Mac workstation additional requirements
Follow these additional requirements to get Terraform working on an Arm-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
Create a main.tf file
Review the Terraform-Azure-WEKA example and use it as a reference for creating the main.tf according to your deployment specifics on Azure.
Tailor the main.tf file to create SMB-W or NFS protocol clusters by adding the relevant code snippet. Adjust parameters like the number of gateways, instance types, domain name, and share naming:
Add WEKA POSIX clients (optional): If needed, add WEKA POSIX clients to support your workload by incorporating the specified variables into the main.tf file:
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:
You can also track the cluster formation progress on the last backend 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.
When deploying a WEKA cluster on the cloud using Terraform, a default username (admin) is automatically generated, and Terraform creates the password. Only the password is stored in the Key Vault of the Azure console. This user facilitates communication between the cloud and the WEKA cluster, particularly during scale-up and scale-down operations.
As a best practice, it’s recommended to update the admin password in the WEKA cluster and the .
Procedure
In the WEKA cluster, update the admin user's password.
In the Azure console, navigate to Key Vault.
Update the weka_password service with the newly updated password.
Validate the changes by checking the results in the platform and ensuring they pass successfully.
Related topic
Set up the WEKA cluster to work with your Azure Blob storage
If you create an Azure Blob storage without using Terraform, you can set up the WEKA cluster to work with it.
Procedure
Gather the following details from your Azure account (refer to the Azure documentation for guidance):
Storage account name
Storage account container name
Storage account access key
Connect to one of the instances in your WEKA cluster and run the following command line, replacing the placeholders with your storage account details:
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.
The destroy command does not work properly if the Terraform deployment fails for any reason, such as dependencies not being present and Azure resource starvation. 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.