Reputation: 88499
How can I add Placement Constraints in mesosphere jobs?
I know there a GUI way to add this to Services and what I need is how can I do the same to JOBS?
Upvotes: 0
Views: 286
Reputation: 6371
This is possible but maybe not exposed in GUI. See below example from readme
{
"id": "sample-job",
"description": "A sample job that sleeps",
"run": {
"cmd": "sleep 1000",
"cpus": 0.01,
"mem": 32,
"disk": 0,
"placement": {
"constraints": [
{
"attribute": "hostname",
"operator": "LIKE",
"value": "<host-name>"
}
]
}
},
"schedules": [
{
"id": "sample-schedule",
"enabled": true,
"cron": "0 0 * * *",
"concurrencyPolicy": "ALLOW"
}
]
}
Upvotes: 1