MayaScale Terraform
Terraform modules for deploying MayaScale across GCP, AWS, and Azure. Use these for automated, repeatable deployments with CI/CD integration.
Module Locations
Section titled “Module Locations”| Cloud | Path | Description |
|---|---|---|
| GCP | gcp/mayascale/ | Direct Terraform module |
| GCP Marketplace | gcp/mayascale/marketplace-package/ | Marketplace-wrapped module |
| AWS | aws/mayascale/ | EC2 with NVMe instance storage |
| Azure | azure/mayascale/ | VMs with local NVMe |
Quick Start
Section titled “Quick Start”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"}Key Variables
Section titled “Key Variables”| Variable | Type | Default | Description |
|---|---|---|---|
project_id | string | — | GCP project ID |
goog_cm_deployment_name | string | — | Cluster name |
zone | string | us-central1-a | Primary zone |
performance_policy | string | zonal-medium-performance | Performance tier |
machine_type | string | "" | Override (auto-selected from policy) |
enable_web_ui_access | bool | false | Open port 2020 |
use_spot_vms | bool | false | Spot VMs for testing |
client_nvme_port | number | 4420 | Base NVMe-oF port |
client_protocol | string | nvme | nvme, iscsi, or both |
client_exports_enabled | bool | true | Auto-create client volumes |
Performance Policies
Section titled “Performance Policies”# Zonal (same-zone, <1ms latency)performance_policy = "zonal-basic-performance" # 75K/100K IOPS, n2-highcpu-4, 1 SSDperformance_policy = "zonal-standard-performance" # 130K/380K IOPS, n2-highcpu-8, 2 SSDsperformance_policy = "zonal-medium-performance" # 200K/700K IOPS, n2-highcpu-16, 4 SSDsperformance_policy = "zonal-high-performance" # 350K/900K IOPS, n2-highcpu-32, 8 SSDsperformance_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 IOPSperformance_policy = "regional-standard-performance" # 120K/380K IOPSperformance_policy = "regional-medium-performance" # 180K/700K IOPSperformance_policy = "regional-high-performance" # 315K/900K IOPSperformance_policy = "regional-ultra-performance" # 720K/1.8M IOPSKey Outputs
Section titled “Key Outputs”| Output | Description |
|---|---|
cluster_name | Deployed cluster name |
vip_address | Primary VIP for client connections |
storage_vip_primary | Primary storage VIP |
storage_vip_secondary | Secondary storage VIP |
mayascale_password | Web UI password |
web_ui_url | Web UI URL |
ssh_primary | SSH command for primary node |
client_volumes | NVMe-oF volume endpoints (NQN, port, VIP) |
nvmeof_port | Base NVMe-oF port |
total_storage_gb | Total NVMe capacity |
performance_characteristics | IOPS targets, capacity, instance details |
network_architecture | Frontend/backend network IPs |
What Gets Deployed
Section titled “What Gets Deployed”- 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)
Quick Start
Section titled “Quick Start”module "mayascale" { source = "./aws/mayascale"
cluster_name = "prod-storage" performance_policy = "zonal-medium" key_pair_name = "my-key" region = "us-east-1"}Key Variables
Section titled “Key Variables”| Variable | Type | Default | Description |
|---|---|---|---|
cluster_name | string | — | Cluster name |
performance_policy | string | zonal-medium | Performance tier |
key_pair_name | string | — | SSH key pair |
region | string | — | AWS region |
use_spot_instances | bool | false | Spot instances |
client_nvme_port | number | 4420 | Base NVMe-oF port |
client_exports_enabled | bool | true | Auto-create volumes |
Instance Selection
Section titled “Instance Selection”AWS uses NVMe instance storage families:
| Tier | Instance Type | NVMe Devices | Capacity |
|---|---|---|---|
| Basic | i4i.xlarge | 1 | 937 GB |
| Standard | i3en.2xlarge | 2 | 5 TB |
| High | i3en.6xlarge | 4 | 15 TB |
| Ultra | i3en.12xlarge | 8 | 30 TB |
Key Outputs
Section titled “Key Outputs”| Output | Description |
|---|---|
vip_address | Primary VIP |
client_volumes | NVMe-oF endpoints |
ssh_commands | SSH commands for both nodes |
deployment_summary | Full deployment details |
node1_external_ip / node2_external_ip | Node public IPs |
Quick Start
Section titled “Quick Start”module "mayascale" { source = "./azure/mayascale"
cluster_name = "prod-storage" location = "eastus" vm_size = "Standard_L8s_v3"}Common Workflow
Section titled “Common Workflow”# Initializeterraform init
# Planterraform plan -out=tfplan
# Applyterraform apply tfplan
# Get client connection infoterraform output client_volumesterraform output vip_address
# Connect NVMe-oF clientnvme connect -t tcp \ -n nqn.2019-05.com.zettalane:mayascale-data-node-1 \ -a $(terraform output -raw vip_address) \ -s 4420
# Destroyterraform destroyValidation
Section titled “Validation”After deployment, use the validation scripts:
# MayaScale validation (includes FIO performance tests)./common/validate-mayascale.sh --cloud gcp # or aws, azure
# Check deployment outputsterraform output deployment_summary