【问题标题】:Marathon: Placement Constraints in Mesosphere Jobs马拉松:中间层作业中的放置约束
【发布时间】:2018-03-09 07:17:17
【问题描述】:

如何在中间层作业中添加放置约束
我知道有一个GUI way 可以将其添加到服务,我需要的是如何对JOBS 执行相同操作?

【问题讨论】:

    标签: mesos mesosphere dcos


    【解决方案1】:

    这是可能的,但可能不会在 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"
            }
        ]
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-05-14
      相关资源
      最近更新 更多