Skip to main content

Overview

Deploy Metlo on Microsoft Azure using Azure Resource Manager (ARM) templates. This guide covers deploying Metlo as a virtual machine in your Azure subscription.

Prerequisites

  • Azure subscription with active billing
  • Azure CLI installed (optional, for CLI deployment)
  • SSH public key for VM access
  • Resource group created (or will be created during deployment)

Deployment Methods

Deploy via Azure Portal

1

Access ARM Template

Download the Metlo ARM template:
wget https://raw.githubusercontent.com/metlo-labs/metlo/master/deploy/azure/deployment.json
Or access it directly from the GitHub repository.
2

Create Custom Deployment

  1. Navigate to Azure Portal
  2. Search for “Deploy a custom template”
  3. Click “Build your own template in the editor”
  4. Paste the contents of deployment.json or upload the file
  5. Click “Save”
3

Configure Parameters

Provide the following parameters:
Subscription
string
required
Select your Azure subscription
Resource Group
string
required
Create new or select existing resource group
Region
string
required
Select the Azure region for deployment (default: resource group location)
VM Name
string
default:"Metlo-Manager"
Name for the Metlo virtual machine
Admin Password or Key
string
required
SSH public key for accessing the VM (recommended over password)
4

Review and Create

  1. Review all configuration settings
  2. Accept the terms and conditions
  3. Click “Create” to start the deployment
  4. Wait approximately 15-20 minutes for deployment to complete
5

Access Deployment Outputs

After deployment completes, navigate to the deployment outputs:
  1. Go to Resource Group → Deployments
  2. Click on the deployment name
  3. View “Outputs” tab for:
    • Hostname (FQDN)
    • SSH command
    • Admin username

Resource Details

Virtual Machine

VM Size
string
default:"Standard_B2s"
  • 2 vCPUs
  • 4 GB RAM
  • Burstable performance tier
  • Suitable for small to medium production workloads
Operating System
string
default:"Ubuntu Server 18.04 LTS"
Latest Ubuntu 18.04 LTS image from Canonical
OS Disk
string
default:"Standard_LRS"
  • Standard HDD Locally Redundant Storage
  • 30GB disk size
  • Upgrade to Premium_LRS for better performance

Networking

The deployment creates:
  • Virtual Network (metloVNet): 10.1.0.0/16 address space
  • Subnet (metloSubnet): 10.1.0.0/24 address prefix
  • Public IP Address: Dynamic allocation with DNS label
  • Network Interface: Connected to subnet with public IP
  • Network Security Group: With configured security rules

Network Security Group Rules

The template creates the following inbound security rules:
PriorityNamePortProtocolSourceDescription
1000MetloSSH22TCP*SSH access
1001Metlo-Collector-10-88081TCP10.0.0.0/8Collector from private network
1002Metlo-Collector-172.16-128000TCP172.16.0.0/12UI from private network
1003Metlo-Collector-192.168-168000TCP192.168.0.0/16UI from private network
The default configuration allows SSH access from any IP address (0.0.0.0/0). For production deployments:
  1. Restrict SSH access to specific IP ranges
  2. Consider using Azure Bastion for SSH access
  3. Add rules for ports 8000, 8080, and 8081 as needed

Post-Deployment Configuration

Retrieve Connection Information

The deployment outputs provide:
az deployment group show \
  --name metlo-deployment \
  --resource-group metlo-rg \
  --query properties.outputs.hostname.value -o tsv

SSH Access

Connect using the SSH command from outputs: Or use the private key if specified:
ssh -i /path/to/private-key [email protected]

Configure Additional NSG Rules

To access Metlo UI and services externally, add NSG rules:
az network nsg rule create \
  --resource-group metlo-rg \
  --nsg-name metloSecGroupNet \
  --name AllowMetloUI \
  --priority 1100 \
  --source-address-prefixes "YOUR_IP/32" \
  --destination-port-ranges 8000 \
  --protocol Tcp \
  --access Allow

Verify Metlo Installation

SSH into the VM and check the deployment status:
# Check if deployment script completed
sudo cat /var/log/azure/custom-script/handler.log

# Check Metlo services
sudo metlo-deploy status

# View Docker containers
cd /opt/metlo
sudo docker-compose ps

Accessing Metlo

Once the deployment is complete and NSG rules are configured:
  • Frontend UI: http://YOUR_VM_FQDN:8000
  • Backend API: http://YOUR_VM_FQDN:8080
  • Collector Endpoint: http://YOUR_VM_FQDN:8081

Scaling Recommendations

VM Size Upgrades

For production workloads, consider upgrading to:
WorkloadVM SizevCPUsRAMCost/Month*
SmallStandard_B2s24 GB~$30
MediumStandard_D2s_v328 GB~$70
LargeStandard_D4s_v3416 GB~$140
X-LargeStandard_D8s_v3832 GB~$280
*Approximate costs in East US region

Storage Upgrades

Upgrade to Premium SSD for better performance:
az vm deallocate --resource-group metlo-rg --name Metlo-Manager
az vm update --resource-group metlo-rg --name Metlo-Manager \
  --set storageProfile.osDisk.managedDisk.storageAccountType=Premium_LRS
az vm start --resource-group metlo-rg --name Metlo-Manager

Backup and Disaster Recovery

Enable Azure Backup

1

Create Recovery Services Vault

az backup vault create \
  --resource-group metlo-rg \
  --name metlo-backup-vault \
  --location eastus
2

Enable backup for VM

az backup protection enable-for-vm \
  --resource-group metlo-rg \
  --vault-name metlo-backup-vault \
  --vm Metlo-Manager \
  --policy-name DefaultPolicy
3

Trigger on-demand backup

az backup protection backup-now \
  --resource-group metlo-rg \
  --vault-name metlo-backup-vault \
  --container-name Metlo-Manager \
  --item-name Metlo-Manager \
  --retain-until 01-02-2026

Create VM Snapshots

# Create OS disk snapshot
az snapshot create \
  --resource-group metlo-rg \
  --name metlo-snapshot-$(date +%Y%m%d) \
  --source $(az vm show -g metlo-rg -n Metlo-Manager --query storageProfile.osDisk.managedDisk.id -o tsv)

Monitoring with Azure Monitor

Enable diagnostic settings

az monitor diagnostic-settings create \
  --resource $(az vm show -g metlo-rg -n Metlo-Manager --query id -o tsv) \
  --name metlo-diagnostics \
  --logs '[{"category":"Administrative","enabled":true}]' \
  --metrics '[{"category":"AllMetrics","enabled":true}]'

Set up alerts

# Alert on high CPU usage
az monitor metrics alert create \
  --name metlo-high-cpu \
  --resource-group metlo-rg \
  --scopes $(az vm show -g metlo-rg -n Metlo-Manager --query id -o tsv) \
  --condition "avg Percentage CPU > 80" \
  --window-size 5m \
  --evaluation-frequency 1m

Cost Management

Estimated monthly costs (East US region):
  • VM (Standard_B2s): ~$30/month
  • OS Disk (30GB Standard HDD): ~$1.50/month
  • Public IP: ~$3/month
  • Bandwidth: Variable based on usage
  • Total baseline: ~$35-40/month
Use Azure Pricing Calculator for detailed estimates.

Cost-saving strategies:

  1. Use Azure Reserved VM Instances: Save up to 72% with 1 or 3-year reservations
  2. Enable auto-shutdown: Schedule VM shutdown during non-business hours
  3. Use Spot VMs: For non-production environments (up to 90% savings)
  4. Right-size VMs: Monitor metrics and adjust VM size accordingly

Troubleshooting

  • Check your subscription’s core quota limits
  • Request quota increase: Portal → Subscriptions → Usage + quotas
  • Try a different region or VM size
  • Verify NSG allows port 22 from your IP
  • Check that the VM is running: az vm get-instance-view
  • Verify SSH public key was correctly specified
  • Try password authentication if key fails (less secure)
  • Check extension logs: /var/log/azure/custom-script/handler.log
  • Manually run deployment script:
    wget https://raw.githubusercontent.com/metlo-labs/metlo/master/deploy/deploy_script.sh
    chmod +x deploy_script.sh
    sudo ./deploy_script.sh
    
  • Verify NSG rules allow ports 8000, 8080, 8081
  • Check that Metlo services are running: sudo metlo-deploy status
  • Ensure public IP is accessible
  • Check VM firewall: sudo ufw status

Next Steps

Configure Data Sources

Set up integrations to capture API traffic

Configure Alerts

Set up webhook alerts

Environment Variables

Configure environment settings

Security Configuration

Configure security settings

Build docs developers (and LLMs) love