Deployment on Azure using Terraform
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.
If you are new to Azure and Terraform, refer to the Detailed deployment tutorial: WEKA on Azure using 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 initfrom 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.
You need to create an Azure resource group within your subscription, which 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 tfenvRun
TFENV_ARCH=amd64 tfenv install 1.3.7Run
tfenv use 1.3.7Run
brew install kreuzwerker/taps/m1-terraform-provider-helper
Create a main.tf file
The main Terraform configuration settings are included in the main.tf file. You can create it by following this procedure or using the WEKA Cloud Deployment Manager. See WEKA Cloud Deployment Manager Web (CDM Web) User Guide.
Procedure
Review the Terraform-Azure-WEKA example and use it as a reference for creating the
main.tfaccording to your Azure deployment specifics.Tailor the
main.tffile 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:
SMB-W
NFS
Add WEKA POSIX clients (optional): If needed, add WEKA POSIX clients to support your workload by incorporating the specified variables into the
main.tffile:
Apply the main.tf file
Once you complete the main.tf settings, apply it: Run terraform apply
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.
Related topic
Azure-WEKA deployment Terraform package description
Check the deployment progress
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:
Example
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.
Get your function key by running the command:
Track the preparation progress by running the command:
Response example:
Cluster formation status update
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:
Cluster formation
Run the following command to check the cluster status:
In the following response example, the cluster formation is completed as shown in the third line "clusterized": true:
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.
Related topics
Manage the system using the WEKA GUI
Manage the system using the WEKA CLI
Perform a basic IO sanity check
Update the admin user password
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 Azure Key Vault.
Procedure
In the WEKA cluster, update the admin user's password.
In the Azure console, navigate to Key Vault.
Update the
weka_passwordservice with the newly updated password.Validate the changes by checking the results in the Azure Logic Apps platform and ensuring they pass successfully.
Related topic
Set the license
To run IOs against the cluster, a valid license must be applied. Obtain a valid license and apply it to the WEKA cluster. For details, see License overview.
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:
Related information
Clean up the deployment
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.
Last updated