Create a three node cluster with a front end load balancer. Configure as a CouchDB cluster.
Partly based on this tutorial: How To Use Terraform with DigitalOcean.
export DO_PAT="digital ocean personal access token"
export COUCHDB_PASSWORD="secret admin password"
export COUCHDB_SECRET="cookie secret"
I created a new SSH key in the current directory using ssh-keygen
but you could
also use an existing key in the path below. DO needs to know about this key.
To validate the configuration and view the plan:
terraform plan \
-var "do_token=${DO_PAT}" \
-var "pvt_key=./id_rsa" \
-var "couchdb_password=${COUCHDB_PASSWORD}" \
-var "couchdb_secret=${COUCHDB_SECRET}"
To create the cluster substitute terraform apply
.