Running a TEN Validator Node on Azure
This guide provides detailed instructions to set up and manage a TEN Validator Node on Azure using Terraform and Ansible. Due to TEN’s use of SGX architecture and cloud-specific security assurances, all current deployments are limited to cloud infrastructure to mitigate risks associated with physical attacks. A proof-of-cloud assertion, provided by TEN, certifies the security and reliability of each validator node running in the cloud.
Overview
The deployment process leverages Terraform for Azure infrastructure provisioning and Ansible for configuring the Validator Node. By following this guide, you’ll set up a secure, compliant environment that meets TEN’s standards for validator operations.
- Terraform: Automates the creation of Azure resources for a TEN Validator Node.
- Ansible: Configures and deploys node software on the provisioned infrastructure.
Requirements
Before starting, ensure the following dependencies are installed on your local machine:
- Terraform (version >= 0.12)
- Ansible
- Ansible Installation guide
- Required Ansible Collections: Install with:
ansible-galaxy collection install community.docker community.crypto
- Azure CLI: For authenticating and managing Azure resources.
- Docker: Required for node deployment.
- Docker Compose: Used for managing containerized services.
- Git: For repository cloning and version control.
Clone the TEN Validator Repository
git clone https://github.com/ten-protocol/ten-validator.git
cd ten-validator
Azure Setup Instructions (Terraform)
Step 1: Authenticate and Configure Azure
- Log into Azure:
az login
- Set Your Azure Subscription: Specify the Azure subscription for deploying the resources:
az account set --subscription <your-subscription-id>
Step 2: Configure Terraform Variables (optional)
cp terraform.tfvars.example terraform.tfvars
Step 3: Deploy the Terraform Script
terraform init
terraform apply
Step 4: Access the Validator Node (Optional)
chmod +x get-key.sh ./get-key.sh
ssh -i <path-to-key> <username>@<public-ip>
TEN Validator Setup Instructions (Ansible)
-
Network Configuration: Node network settings are located in
ansible/files/network_vars.yml
. These settings are typically not changed and are specific to the L2 network. One will be provided by the TEN team for ITN (testnet) and another for mainnet. -
Run the Installation Script: Use Ansible to configure and deploy the TEN Validator Node:
chmod +x install-ten.sh
./install-ten.shDuring deployment, you will be prompted to enter:
-
Host ID: Public key of the validator node wallet
-
Private Key: Private key of the validator node wallet
-
Host Public P2P Address: Public IP or DNS of the node
-
SSH Details: Username and key path (or password if applicable)
-
L1 WS URL: WebSocket URL for the Layer 1 node (e.g., Infura)
-
Postgres DB Host: Leave blank to provision a new database
Note: If Terraform provisioned the VM, default values are often applicable—just press Enter to accept.
-
Managing the Validator Node
Coming soon! (monitoring, backups, tear down, etc.)