In this recipe, we will set different attributes for our agents. Attributes are extremely useful when our cluster is not homogeneous and we want to distinguish agents from each other.
Setting attributes for agents
How to do it...
Let's assume our cluster contains agents with SSD and HDD drives. Disk resources will unify SSD and HDD, but from the user's perspective they are different and some tasks need to be run on SSD. We can label agents with the disk attributes hdd or ssd, depending on the disk type, hence allowing the user to decide which disk should be used for the job.
To create an attribute, we need to place the file in /etc/mesos-slave/attributes. The following command will create this directory:
mkdir -p...