2017-06-01 18 views
1

像Marathon或Chronos这样的Mesos框架有类似forcePull的选项,使mesos代理从注册表中提取图像。如何在使用mesos-execute时制作强制拉取图像?

mesos-execute可能相同吗?我是否必须在TaskInfo或TaskGroupInfo中指定一个选项?

我已经在mesos源文件中搜索过像“force pull”/“forcepull”或“c​​ached”但没有骰子的文字。

回答

3

您应该在TaskInfo中指定相应的选项来强制拉出图像。在哪里 - 取决于您使用的是哪种容器类型(读取:containerizer)。

如果您使用码头集装箱,即您的TaskInfo.container.type = DOCKER,然后看看ContainerInfo.DockerInfo.force_pull_image。你想在你的JSON中为TaskInfo设置的是TaskInfo.container.docker.force_pull_image = true

如果使用mesos containerizer,即你的TaskInfo.container.type = Mesos,那么你指定TaskInfo.container.mesos.image,这可能是一个码头工人或APPC容器,因此应该看看Image,其中有一个cached flag。你想在你的JSON中为TaskInfo设置的是TaskInfo.container.mesos.image.cached = false