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.
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.
You need to create an Azure resource group within your subscription, which includes the Azure region.
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.tf
according to your Azure deployment specifics.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:
SMB-W
smb_protocol_gateways_number = 3
smb_protocol_gateway_instance_type = "Standard_L48s_v3"
smbw_enabled = true
smb_domain_name = "CUSTOMER_DOMAIN"
smb_share_name = "SPECIFY_SMB_SHARE_NAMING"
smb_setup_protocol = true
NFS
nfs_protocol_gateways_number = 1
nfs_protocol_gateway_instance_type = "Standard_L48s_v3"
nfs_setup_protocol = true
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:
clients_number = 2
client_instance_type = "Standard_L48s_v3"
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
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:
curl --fail https://<prefix>-<cluster name>-function-app.azurewebsites.net/api/status?code=$function_key
Example
Explore the following phases to check the deployment progress:
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
Run first IOs with WEKA filesystem
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 .
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 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:
weka fs tier s3 add azure-obs --site local --obs-name default-local --obs-type AZURE --hostname <Storage account name>.blob.core.windows.net --port 443 --bucket <Storage account container name> --access-key-id <Storage account name> --secret-key <Storage account access key> --protocol https --auth-method AWSSignature4
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.