马拉松:Mesosphere 工作中的安置限制
Marathon: Placement Constraints in Mesosphere Jobs
如何在中间层作业中添加放置约束?
我知道有 GUI way to add this to Services and what I need is how can I do the same to JOBS?
这是可能的,但可能不会在 GUI 中公开。请参阅 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"
}
]
}
如何在中间层作业中添加放置约束?
我知道有 GUI way to add this to Services and what I need is how can I do the same to JOBS?
这是可能的,但可能不会在 GUI 中公开。请参阅 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"
}
]
}