2019-04-29 17:15:12 +00:00
|
|
|
job "foo" {
|
|
|
|
datacenters = ["dc1"]
|
2019-09-23 18:30:48 +00:00
|
|
|
|
2019-04-29 17:15:12 +00:00
|
|
|
group "bar" {
|
2019-11-18 16:16:25 +00:00
|
|
|
count = 3
|
|
|
|
shutdown_delay = "14s"
|
2019-09-23 18:30:48 +00:00
|
|
|
|
2019-04-29 17:15:12 +00:00
|
|
|
network {
|
|
|
|
mode = "bridge"
|
2019-09-23 18:30:48 +00:00
|
|
|
|
2019-04-29 17:15:12 +00:00
|
|
|
port "http" {
|
2020-06-16 15:53:10 +00:00
|
|
|
static = 80
|
|
|
|
to = 8080
|
|
|
|
host_network = "public"
|
2019-04-29 17:15:12 +00:00
|
|
|
}
|
2020-04-28 03:11:06 +00:00
|
|
|
|
|
|
|
dns {
|
|
|
|
servers = ["8.8.8.8"]
|
|
|
|
options = ["ndots:2", "edns0"]
|
|
|
|
}
|
2019-04-29 17:15:12 +00:00
|
|
|
}
|
2019-08-09 19:18:53 +00:00
|
|
|
|
2019-07-30 22:40:45 +00:00
|
|
|
service {
|
|
|
|
name = "connect-service"
|
|
|
|
tags = ["foo", "bar"]
|
|
|
|
canary_tags = ["canary", "bam"]
|
|
|
|
port = "1234"
|
|
|
|
|
|
|
|
connect {
|
|
|
|
sidecar_service {
|
2019-10-08 19:19:09 +00:00
|
|
|
tags = ["side1", "side2"]
|
2019-10-30 13:37:18 +00:00
|
|
|
|
2019-07-30 22:40:45 +00:00
|
|
|
proxy {
|
2019-09-23 18:30:48 +00:00
|
|
|
local_service_port = 8080
|
|
|
|
|
2019-07-30 22:40:45 +00:00
|
|
|
upstreams {
|
|
|
|
destination_name = "other-service"
|
|
|
|
local_bind_port = 4567
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-09-23 18:30:48 +00:00
|
|
|
|
2019-08-09 19:18:53 +00:00
|
|
|
sidecar_task {
|
|
|
|
resources {
|
2019-09-23 18:30:48 +00:00
|
|
|
cpu = 500
|
2019-08-09 19:18:53 +00:00
|
|
|
memory = 1024
|
|
|
|
}
|
|
|
|
|
|
|
|
env {
|
|
|
|
FOO = "abc"
|
|
|
|
}
|
2019-08-20 05:22:46 +00:00
|
|
|
|
|
|
|
shutdown_delay = "5s"
|
2019-08-09 19:18:53 +00:00
|
|
|
}
|
2019-07-30 22:40:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-04-29 17:15:12 +00:00
|
|
|
task "bar" {
|
|
|
|
driver = "raw_exec"
|
2019-09-23 18:30:48 +00:00
|
|
|
|
2019-04-29 17:15:12 +00:00
|
|
|
config {
|
2019-09-23 18:30:48 +00:00
|
|
|
command = "bash"
|
|
|
|
args = ["-c", "echo hi"]
|
2019-04-29 17:15:12 +00:00
|
|
|
}
|
2019-09-23 18:30:48 +00:00
|
|
|
|
2019-04-29 17:15:12 +00:00
|
|
|
resources {
|
|
|
|
network {
|
2019-09-23 18:30:48 +00:00
|
|
|
mbits = 10
|
2019-04-29 17:15:12 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|