有没有办法用游牧者将任务分配给特定节点?
Is there any way to assign a task to a specific node with nomad?
我想在我们的项目中使用 Nomad。但是从文档中我无法得到答案,是否有任何正确的方法可以将任务分配给特定节点,而忽略调度。有这样的机会吗?
抱歉英语不好。
是的,您可以使用 constraint
stanza:
The constraint allows restricting the set of eligible nodes. Constraints may filter on attributes or client metadata. Additionally constraints may be specified at the job, group, or task levels for ultimate flexibility.
constraint {
attribute = "${meta.my_custom_value}"
operator = ">"
value = "3"
}
我想在我们的项目中使用 Nomad。但是从文档中我无法得到答案,是否有任何正确的方法可以将任务分配给特定节点,而忽略调度。有这样的机会吗? 抱歉英语不好。
是的,您可以使用 constraint
stanza:
The constraint allows restricting the set of eligible nodes. Constraints may filter on attributes or client metadata. Additionally constraints may be specified at the job, group, or task levels for ultimate flexibility.
constraint {
attribute = "${meta.my_custom_value}"
operator = ">"
value = "3"
}