|
1 | 1 | --- |
2 | | -sidebar_position: 3 |
| 2 | +sidebar_position: 4 |
3 | 3 | --- |
4 | | -# Running a node |
| 4 | +# Running a TEN Validator Node on Azure |
5 | 5 |
|
6 | | -Thank you for your interest in running a node on the Ten testnet. |
| 6 | +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. |
7 | 7 |
|
8 | | -Reasons for running a node on testnet: |
9 | | -- The best performers will receive rewards as per the [FAQ](../faq.md) |
10 | | -- The top performers in this group will be invited to run nodes on mainnet |
| 8 | +--- |
| 9 | + |
| 10 | +## Overview |
| 11 | + |
| 12 | +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. |
| 13 | + |
| 14 | +- **Terraform**: Automates the creation of Azure resources for a TEN Validator Node. |
| 15 | +- **Ansible**: Configures and deploys node software on the provisioned infrastructure. |
| 16 | + |
| 17 | +--- |
| 18 | + |
| 19 | +## Requirements |
| 20 | + |
| 21 | +Before starting, ensure the following dependencies are installed on your local machine: |
| 22 | + |
| 23 | +- [**Terraform**](https://www.terraform.io/downloads.html) (version >= 0.12) |
| 24 | + - [Terraform Installation Guide](https://learn.hashicorp.com/tutorials/terraform/install-cli) |
| 25 | +- [**Ansible**](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html) |
| 26 | + - [Ansible Installation guide](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html) |
| 27 | + - **Required Ansible Collections**: Install with: |
| 28 | + ```sh |
| 29 | + ansible-galaxy collection install community.docker community.crypto |
| 30 | + ``` |
| 31 | +- [**Azure CLI**](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli): For authenticating and managing Azure resources. |
| 32 | +- [**Docker**](https://docs.docker.com/get-docker/): Required for node deployment. |
| 33 | +- [**Docker Compose**](https://docs.docker.com/compose/install/): Used for managing containerized services. |
| 34 | +- [**Git**](https://git-scm.com/downloads): For repository cloning and version control. |
| 35 | + |
| 36 | +--- |
| 37 | +## Clone the TEN Validator Repository |
| 38 | +``` |
| 39 | +git clone https://github.com/ten-protocol/ten-validator.git |
| 40 | +cd ten-validator |
| 41 | +``` |
| 42 | +## Azure Setup Instructions (Terraform) |
| 43 | +
|
| 44 | +### Step 1: Authenticate and Configure Azure |
| 45 | +
|
| 46 | +1. **Log into Azure**: |
| 47 | + ```sh |
| 48 | + az login |
| 49 | +2. Set Your Azure Subscription: Specify the Azure subscription for deploying the resources: |
| 50 | + ```sh |
| 51 | + az account set --subscription <your-subscription-id> |
| 52 | + ``` |
| 53 | + |
| 54 | +### Step 2: Configure Terraform Variables (optional) |
| 55 | +``` |
| 56 | +cp terraform.tfvars.example terraform.tfvars |
| 57 | +``` |
| 58 | + |
| 59 | +### Step 3: Deploy the Terraform Script |
| 60 | +``` |
| 61 | +terraform init |
| 62 | +terraform apply |
| 63 | +``` |
| 64 | + |
| 65 | +### Step 4: Access the Validator Node (Optional) |
| 66 | +1. ```chmod +x get-key.sh ./get-key.sh``` |
| 67 | +2. ```ssh -i <path-to-key> <username>@<public-ip>``` |
| 68 | + |
| 69 | +## TEN Validator Setup Instructions (Ansible) |
| 70 | +1. 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. |
| 71 | +2. Run the Installation Script: Use Ansible to configure and deploy the TEN Validator Node: |
| 72 | + ``` |
| 73 | + chmod +x install-ten.sh |
| 74 | + ./install-ten.sh |
| 75 | + ``` |
| 76 | + During deployment, you will be prompted to enter: |
| 77 | +
|
| 78 | + - Host ID: Public key of the validator node wallet |
| 79 | +
|
| 80 | + - Private Key: Private key of the validator node wallet |
| 81 | +
|
| 82 | + - Host Public P2P Address: Public IP or DNS of the node |
| 83 | +
|
| 84 | + - SSH Details: Username and key path (or password if applicable) |
| 85 | +
|
| 86 | + - L1 WS URL: WebSocket URL for the Layer 1 node (e.g., Infura) |
| 87 | +
|
| 88 | + - Postgres DB Host: Leave blank to provision a new database |
| 89 | +
|
| 90 | + Note: If Terraform provisioned the VM, default values are often applicable—just press Enter to accept. |
11 | 91 |
|
12 | | -Applications to run a node on testnet will be open at a later stage in the campaign. Join the Ten [Discord](https://discord.gg/tenprotocol) to stay up to date. |
| 92 | +## Managing the Validator Node |
| 93 | +Coming soon! (monitoring, backups, tear down, etc.) |
0 commit comments