Using Mesos DNS for Service Discovery in DC/OS


29 students completed the lab in ~30m

Total available time: 50m

Be the first to rate this lab!

Lab Overview

In DC/OS, Mesos DNS provides service discovery facilities for applications and services to find each other via the domain name system (DNS) and a REST API. Mesos DNS is a DC/OS component that runs on master nodes in the cluster. Whenever applications are deployed in the cluster, Mesos DNS records for application instances are automatically created. This Lab takes you through using Mesos DNS for service discovery in DC/OS.

Lab Objectives

Upon completion of this Lab you will be able to:

  • Discover applications by issuing DNS lookup requests to Mesos DNS
  • Discover applications by issuing HTTP requests to Mesos DNS REST API

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

Installing the DC/OS CLI on Linux

Install the DC/OS command-line interface (CLI) on Linux.

Discovering a Marathon Application with Mesos DNS

Create an application and discover how to access it using Mesos DNS

Discovering a Marathon Application with the Mesos DNS REST API

Use the Mesos DNS HTTP interface to discover a Marathon application

Discovering Marathon Applications with Multiple Instances

Use Mesos DNS to discover a Marathon application with multiple instances