I want to run raw_exec to install an nginx , is this possible? or how can this be done by raw_exec only. since this code will not start/run.
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
}
}
}
}