January 2017
Intermediate to advanced
284 pages
6h 8m
English
A Mesos cluster is managed with the dcos tool and the web interface. Applications in Mesos are handled by the Marathon scheduler and are defined in JSON format.
Let's start with a simple container that runs Nginx. Create a file named nginx.json that contains the following definition:
{
"id" : "simple-nginx",
"instances" : 1,
"cpus" : 0.25,
"mem" : 64.0,
"container" : {
"type" : "DOCKER",
"docker" : {
"image" : "nginx:1.11",
"network" : "HOST"
}
}
}
The id tag is the name of the service. It is displayed in the service list. The instances tag tells Marathon that only one instance is needed. It can be increased or decreased as needed later.
The cpus and mem tags are hints to Marathon as to what percentage ...
Read now
Unlock full access