【发布时间】:2020-07-01 07:16:27
【问题描述】:
我想运行 raw_exec 来安装一个 nginx ,这可能吗?或者如何仅由 raw_exec 完成。因为这段代码不会启动/运行。
job "raw-exec" {
datacenters = ["dc1"]
type = "service"
group "exec" {
count = 1
update {
max_parallel = 1
min_healthy_time = "10s"
healthy_deadline = "5m"
progress_deadline = "10m"
auto_revert = true
}
task "raw-exec-test" {
driver = "raw_exec"
config {
command = "/bin/apt"
args = ["-y", "install", "nginx.service"]
}
resources {
cpu = 100
memory = 125
}
}
}
}
【问题讨论】:
-
运行规范时的输出是什么?请注意,
raw_exec驱动程序默认未启用。它已在 Nomad 配置中明确启用。
标签: nginx driver ubuntu-18.04 nomad