You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Greg Szabo 07baf56cde Typo fixes and enhancements to README.md 7 years ago
..
cluster tendermint+basecoin configuration fixes 7 years ago
README.md Typo fixes and enhancements to README.md 7 years ago
main.tf tendermint+basecoin configuration fixes 7 years ago

README.md

Terraform for Digital Ocean

This is a generic Terraform configuration that sets up DigitalOcean droplets.

Prerequisites

DO_API_TOKEN="<The API token received from DigitalOcean>"
curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer $DO_API_TOKEN" "https://api.digitalocean.com/v2/account/keys"

How to run

Initialization

If this is your first time using terraform, you have to initialize it by running the below command. (Note: initialization can be run multiple times)

terraform init

After initialization it's good measure to create a new Terraform environment for the droplets so they are always managed together.

TESTNET_NAME="testnet-servers"
terraform env new "$TESTNET_NAME"

Execution

The below command will create 4 nodes in DigitalOcean. They will be named testnet-servers-node0 to testnet-servers-node3 and they will be tagged as testnet-servers.

DO_API_TOKEN="<The API token received from DigitalOcean>"
SSH_ID="<The SSH ID received from the curl call above.>"
terraform apply -var TESTNET_NAME="testnet-servers" -var servers=4 -var DO_API_TOKEN="$DO_API_TOKEN" -var ssh_keys=[$SSH_ID]

Alternatively you can use the default settings. The number of default servers is 4 and the testnet name is tf-testnet1. Variables can also be defined as environment variables instead of the command-line. Environment variables that start with TF_VAR_ will be translated into the Terraform configuration. For example the number of servers can be overriden by setting the TF_VAR_servers variable.

TF_VAR_DO_API_TOKEN="<The API token received from DigitalOcean>"
TF_VAR_TESTNET_NAME="testnet-servers"
terraform-apply

What's next

After setting up the nodes, head over to the ansible folder to set up tendermint and basecoin.