How to do it...

To create an attribute, we need to place the file in /etc/mesos-slave/attributes.

The following command will create this directory:

mkdir -p, and /etc/mesos-slave/attributes

The filename will be the attribute label and the content will be a value. To create the os:centos attribute, simply create a file with the following contents. We are going to create an attributes file with the following content: os:centos5, centos6, and centos7, respectively, on three slave agents.

Let's define the attributes by creating an attributes file inside /etc/mesos-slave. We already have the resources with us, so now, we will create our attributes file using the following command:

sudo vi attributes

In this file, we will define slave1 as centos5 ...

Get Learn Apache Mesos now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.