对于码头编排,我们正在使用mesos和chronos来安排作业运行。如何在DC操作系统中强制执行docker镜像?
现在,我们放下了chronos并尝试通过DCO设置它,使用mesos和节拍器。
在克罗诺斯,我能激活力通过其阳明配置拉着泊坞窗图像:现在
container:
type: docker
image: registry.example.com:5001/the-app:production
forcePullImage: true
,使用节拍器和mesos在DC/OS,我也希望它迫使它总是拉起来来自注册表的最新映像,而不是依赖于其缓存版本。
然而,对于泊坞窗json的配置似乎有限:
"docker": {
"image": "registry.example.com:5001/the-app:production"
},
如果我推到production
标签的新形象,旧的图像被用于在mesos作业运行。
只是为了它的缘故,我尝试添加的标志:在PUT请求
"docker": {
"image": "registry.example.com:5001/my-app:staging",
"forcePullImage": true
},
然而,我得到一个错误:
http PUT example.com/service/metronome/v1/jobs/the-app < app-config.json
HTTP/1.1 422 Unprocessable Entity
Connection: keep-alive
Content-Length: 147
Content-Type: application/json
Date: Fri, 12 May 2017 09:57:55 GMT
Server: openresty/1.9.15.1
{
"details": [
{
"errors": [
"Additional properties are not allowed but found 'forcePullImage'."
],
"path": "/run/docker"
}
],
"message": "Object is not valid"
}
我怎样才能做到这一点的DC OS总是拉取最新的图像?还是必须始终通过独特的图像标签更新作业定义?
我在DCOS问题跟踪器上打开了一个关于此问题的文档(https://jira.mesosphere.com/browse/MARATHON-7346)。 – k0pernikus