Running DC/OS on AWS EC2 Basic

ENTERPRISE

Creating a DC/OS cluster for AWS using DC/OS templates

You can create a DC/OS cluster for Amazon Web Services (AWS) by using the DC/OS templates on AWS CloudFormation.

These instructions provide a basic AWS CloudFormation template that creates a DC/OS cluster that is suitable for demonstrations and POCs. This is the fastest way to get started with the DC/OS templates for AWS CloudFormation.

For a complete set of DC/OS configuration options, see the Advanced AWS Install Guide.

Important: Upgrades are not supported with this installation method.

System requirements

Hardware

An AWS EC2 m3.xlarge instance. Selecting smaller-sized VMs is not recommended, and selecting fewer VMs will likely cause certain resource-intensive services, such as distributed datastores, to not work properly.

  • You have the option of 1 or 3 Mesos master nodes.
  • 5 private Mesos agent nodes is the default.
  • 1 public Mesos agent node is the default.

Software

  • DC/OS Enterprise AWS templates. Contact your sales representative or sales@mesosphere.com to obtain these files.
  • An AWS account.
  • An AWS EC2 key pair for the same region as your cluster. Key pairs cannot be shared across regions. The AWS key pair uses public-key cryptography to provide secure login to your AWS cluster. For more information about creating an AWS EC2 key pair, see the documentation.
  • SSH installed and configured. This is required for accessing nodes in the DC/OS cluster.

Create DC/OS cluster stack

  1. Launch AWS CloudFormation.

  2. Click Create Stack.

  3. On the Select Template page, in the Choose a template field, click the Specify an Amazon S3 template URL radio button and paste in the template URL you received from sales.

Important: Do not click the View/Edit template in Designer link and edit the template. The DC/OS template is configured for running DC/OS. If you modify the template you might be unable to run certain packages on your DC/OS cluster.

![Launch stack](/1.11/img/dcos-aws-step2b.png)
  1. Click Next.

  2. On the Specify Details page, specify a cluster name (Stack name), key pair (KeyName), public agent (PublicSlaveInstanceCount), private agent (SlaveInstanceCount), and click Next. Depending on the DC/OS services that you install, you might need to change the number of agent nodes after cluster creation. For more information, see Scaling the DC/OS cluster in AWS.

    Create stack

  3. On the Options page, accept the defaults and click Next.

    Tip: In the Advanced section you can choose whether to rollback on failure. By default this option is set to Yes.

  4. On the Review page, check the acknowledgement box and then click Create.

    Tip: If the Create New Stack page is shown, either AWS is still processing your request or you’re looking at a different region. Navigate to the correct region and refresh the page to see your stack.

Monitor cluster stack launch

In AWS CloudFormation you should see:

  • The cluster stack spins up over a period of 10 to 15 minutes.
  • The status changes from CREATE_IN_PROGRESS to CREATE_COMPLETE.

Troubleshooting: A ROLLBACK_COMPLETE status means the deployment has failed. See the Events tab for useful information about failures.

Open and log into the DC/OS GUI

  1. In AWS CloudFormation, check the box next to your stack.

  2. Click the Outputs tab and copy the Mesos Master hostname.

    Monitor stack creation

  3. Paste the hostname 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. Your browser may show a warning that your connection is not secure. This is because DC/OS uses self-signed certificates. You can ignore this error and click to proceed to the login screen.

    DC/OS GUI auth

  4. Enter the username and password of the superuser account. The default username is bootstrapuser and default password is deleteme. Click LOG IN.

Install the DC/OS CLI

You must install the DC/OS Command-Line Interface (CLI) to administer your DCOS cluster.

  1. Click the dropdown menu on the upper-left of the DC/OS GUI and select Install CLI.

  2. Copy the code snippet and run in a terminal. Provide the sudo password, accept the fingerprint of the cluster certificate, and provide the superuser name and password to authenticate the CLI.

Next steps