Running DC/OS on DigitalOcean

Install DC/OS cluster on DigitalOcean using Terraform

DISCLAIMER: This is a community driven project and not officially supported by Mesosphere. This installation method is used for fast demos and proofs of concept. This page explains how to install DC/OS cluster on DigitalOcean using Terraform. Terraform is intended for reference only and are not recommended for production use. Upgrades are not supported with the following installation methods.

The included Terraform templates are configured to run Mesosphere DC/OS on DigitalOcean. Depending on the DC/OS services that you install, or the amount of computing power your workload needs, you might have to modify the templates to suit your needs. You can modify the Terraform templates, but Mesosphere cannot assist in troubleshooting. If you require support with droplet creation or other related issues, email , visit the unofficial DigitalOcean IRC channel (#digitalocean on freenode) or consider DC/OS Enterprise.

Security

IMPORTANT: With this method, the network is open by default. Because of this, network security is a concern and should be addressed as soon as possible by the administrator.

Copy sample.terraform.tfvars to a new file named terraform.tfvars, and edit the new file, filling in the values as desired. The following fields are blank; if not filled in, you will be prompted by Terraform when necessary:

digitalocean_token - Your DigitalOcean API key

ssh_key_fingerprint - The key ID from above

dcos_installer_url - Where to get DC/OS
https://downloads.dcos.io/dcos/stable/dcos_generate_config.sh

The following have default values and may be changed depending on your requirements:

Also from that same directory, run terraform init and then terraform apply which will deploy the servers into your project at DigitalOcean, and run the DC/OS installation routine. When it completes, you will see output similar to the following, but with the IP addresses assigned to your servers:

Figure 1. Terraform apply output

You may need to wait a few minutes from this point for all the DC/OS services to become active and the control panel to become available on the master node. After 15 or 20 minutes, check out the troubleshooting documentation.

Launch DC/OS

Cut and paste the link provided by running terraform apply, or by running terraform output from the same directory, into your browser to open the DC/OS web interface. The interface runs on the standard HTTP port 80, so you do not need to specify a port number after the hostname.

Install the DC/OS Command-Line Interface (CLI). You can install the CLI to administer your DC/OS cluster. You can access the documentation at any time by clicking the cluster name in the upper-left side.

Figure 2. Installing the CLI

Next steps

Adding and removing nodes:

Run terraform apply -var ‘dcos_agent_count=N’ to change the private agent count to the number specified. (‘dcos_public_agent_count’ is also available)

Increasing node count is fast, safe, and fun!

We recommend against reducing the node count in production. Stateful DC/OS apps and services may suffer outages and failures if nodes are not put into maintenance mode, and their tasks rescheduled through their respective schedulers.