Skip to content

MayaScale Terraform

Terraform modules for deploying MayaScale across GCP, AWS, and Azure. Use these for automated, repeatable deployments with CI/CD integration.

CloudPathDescription
GCPgcp/mayascale/Direct Terraform module
GCP Marketplacegcp/mayascale/marketplace-package/Marketplace-wrapped module
AWSaws/mayascale/EC2 with NVMe instance storage
Azureazure/mayascale/VMs with local NVMe
module "mayascale" {
source = "./gcp/mayascale/marketplace-package"
project_id = "my-project"
goog_cm_deployment_name = "prod-storage"
zone = "us-central1-a"
performance_policy = "zonal-medium-performance"
}
VariableTypeDefaultDescription
project_idstringGCP project ID
goog_cm_deployment_namestringCluster name
zonestringus-central1-aPrimary zone
performance_policystringzonal-medium-performancePerformance tier
machine_typestring""Override (auto-selected from policy)
enable_web_ui_accessboolfalseOpen port 2020
use_spot_vmsboolfalseSpot VMs for testing
client_nvme_portnumber4420Base NVMe-oF port
client_protocolstringnvmenvme, iscsi, or both
client_exports_enabledbooltrueAuto-create client volumes
# Zonal (same-zone, <1ms latency)
performance_policy = "zonal-basic-performance" # 75K/100K IOPS, n2-highcpu-4, 1 SSD
performance_policy = "zonal-standard-performance" # 130K/380K IOPS, n2-highcpu-8, 2 SSDs
performance_policy = "zonal-medium-performance" # 200K/700K IOPS, n2-highcpu-16, 4 SSDs
performance_policy = "zonal-high-performance" # 350K/900K IOPS, n2-highcpu-32, 8 SSDs
performance_policy = "zonal-ultra-performance" # 800K/2M IOPS, n2-highcpu-64, 16 SSDs
# Regional (cross-zone HA, <2ms latency)
performance_policy = "regional-basic-performance" # 60K/100K IOPS
performance_policy = "regional-standard-performance" # 120K/380K IOPS
performance_policy = "regional-medium-performance" # 180K/700K IOPS
performance_policy = "regional-high-performance" # 315K/900K IOPS
performance_policy = "regional-ultra-performance" # 720K/1.8M IOPS
OutputDescription
cluster_nameDeployed cluster name
vip_addressPrimary VIP for client connections
storage_vip_primaryPrimary storage VIP
storage_vip_secondarySecondary storage VIP
mayascale_passwordWeb UI password
web_ui_urlWeb UI URL
ssh_primarySSH command for primary node
client_volumesNVMe-oF volume endpoints (NQN, port, VIP)
nvmeof_portBase NVMe-oF port
total_storage_gbTotal NVMe capacity
performance_characteristicsIOPS targets, capacity, instance details
network_architectureFrontend/backend network IPs
  • 2 Compute Engine instances with local NVMe SSDs
  • Dedicated backend network (10.200.0.0/24, MTU 8896)
  • Placement policy (zonal) for collocated VMs
  • TIER_1 networking for 30+ vCPU machines
  • Service account with required IAM roles
  • Client volume NVMe-oF exports (if enabled)
module "mayascale" {
source = "./aws/mayascale"
cluster_name = "prod-storage"
performance_policy = "zonal-medium"
key_pair_name = "my-key"
region = "us-east-1"
}
VariableTypeDefaultDescription
cluster_namestringCluster name
performance_policystringzonal-mediumPerformance tier
key_pair_namestringSSH key pair
regionstringAWS region
use_spot_instancesboolfalseSpot instances
client_nvme_portnumber4420Base NVMe-oF port
client_exports_enabledbooltrueAuto-create volumes

AWS uses NVMe instance storage families:

TierInstance TypeNVMe DevicesCapacity
Basici4i.xlarge1937 GB
Standardi3en.2xlarge25 TB
Highi3en.6xlarge415 TB
Ultrai3en.12xlarge830 TB
OutputDescription
vip_addressPrimary VIP
client_volumesNVMe-oF endpoints
ssh_commandsSSH commands for both nodes
deployment_summaryFull deployment details
node1_external_ip / node2_external_ipNode public IPs
module "mayascale" {
source = "./azure/mayascale"
cluster_name = "prod-storage"
location = "eastus"
vm_size = "Standard_L8s_v3"
}
Terminal window
# Initialize
terraform init
# Plan
terraform plan -out=tfplan
# Apply
terraform apply tfplan
# Get client connection info
terraform output client_volumes
terraform output vip_address
# Connect NVMe-oF client
nvme connect -t tcp \
-n nqn.2019-05.com.zettalane:mayascale-data-node-1 \
-a $(terraform output -raw vip_address) \
-s 4420
# Destroy
terraform destroy

After deployment, use the validation scripts:

Terminal window
# MayaScale validation (includes FIO performance tests)
./common/validate-mayascale.sh --cloud gcp # or aws, azure
# Check deployment outputs
terraform output deployment_summary