Using Attributes to Constrain Marathon Container Scheduling in DC/OS


26 students completed the lab in ~30m

Total available time: 50m

Be the first to rate this lab!

Lab Overview

Agents in a DC/OS cluster can be assigned attributes. Attributes are a kind of metadata that you can use to organize your infrastructure. Attributes can be used to indicate which physical server rack an agent resides in, what special hardware or software capabilities an agent has access to or anything else that can be useful in identifying agents. The Marathon container orchestration tool can incorporate attribute constraints when it schedules applications in the cluster. By using attributes to constrain Marathon container scheduling in DC/OS you will launch fault-tolerant, resource-aware container applications in this Lab.

Lab Objectives

Upon completion of this Lab you will be able to:

  • Assign attributes to agents in a DC/OS cluster
  • Write Marathon application definitions with constraints
  • Diagnose Marathon scheduling failures in the DC/OS GUI

Lab Prerequisites

You should be familiar with:

  • Basic DC/OS concepts including master nodes, agents, services, tasks, and Marathon
  • Working at the command-line in Linux
  • AWS services knowledge is useful in order to understand the architecture of the pre-created DC/OS cluster, but not required

Lab Environment

Before completing the Lab instructions, the environment will look as follows:

After completing the Lab instructions, the environment should look similar to:

Follow these steps to learn by building helpful cloud resources

Logging in to the Amazon Web Services Console

Your first step to start the Lab experience

Understanding the DC/OS Cluster Architecture

Understand the cluster architecture and the resources provisioned for this Lab

Connecting to the Virtual Machine using SSH with Agent Forwarding

Create a secure connection to a remote machine using SSH with authentication agent forwarding

Adding Agent Attributes to DC/OS Nodes

Connect to DC/OS agent nodes to add Mesos attributes to them

Using Attributes to Constrain Marathon Applications

Use constraints to control where Marathon schedules applications