Home

Awesome

rancherterraformdigitalocean

Rancher Terraform DigitalOcean

Terraform module for a rancher server on Digitalocean.

What you will get?

Features

What you will need?

How to use it

Clone this repository

git clone git@github.com:lunagt/rancher-terraform-digitalocean.git

Inside the repository folder create a copy of the example tfvars file

cp terraform.example.tfvars terraform.tfvars

Edit this new file with the variables you want (see variables section at the end).

Runing it

   terraform apply     If you don't need your server anymore, just destroy it

terraform destroy #and type 'yes' after this command

Variables

Mandatory DigitalOcean API Variables

VariableDefaultDescription
do_tokenemptyDigitalOcean Personal Access Token
pub_keyemptyPublic key location, so it can be installed into new droplets
pvt_keyemptyPrivate key location, so Terraform can connect to new droplets
ssh_fingerprintemptyFingerprint of SSH key

Mandatory Host Variables

VariableDefaultDescription
domainemptyExisting DigitalOcean DNS in which the host will be added e.g. example.com

Optional Host Variables

VariableDefaultDescription
host_namerancher-serverName of the host to be created
imagedocker-16-04Base image for the host
regionsfo1Digital Ocean region for the host
size1gbDigital Ocean size of the host (512mb, 1gb, 2gb)
private_networkingfalseEnable/Disable private networking
domain_namerancher.Domain name, for example "rancher." (note the dot at the end), so you will have rancher.example.com
userrancherUsername to be used to login to the host and for the home folder.