Terraform scripts for digitalocean.com, based on packet-terraform
This repo holds Terraform scripts to create a
1, 3, or 5 master DCOS cluster on the digitalocean.com provider.
Clone or download repo.
Generate a do-key
keypair (with an empty passphrase):
ssh-keygen -t rsa -P '' -f ./do-key
Copy sample.terraform.tfvars
to terraform.tfvars
and insert your variables.
Initially, a Digital Ocean account only allows 5 Droplets, which is not sufficient for this experiment. It is possible to increase this limit to 10 on the Digital Ocean profile page.
Run terraform apply
In terraform.tfvars
provide the fingerprint for your public SSH key loaded into DigitalOcean.
This script will start the infrastructure machines (bootstrap and masters), then collect their IPs to build an installer package on the bootstrap machine with a static master list. All masters wait for an installation script to be generated on the localhost, then receive that script. This script, in turn, pings the bootstrap machine whilst waiting for the web server to come online and serve the install script itself.
When the install script is generated, the bootstrap completes and un-blocks the cadre of agent nodes, which are cut loose to provision metal and eventually install software.