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" {
|
|
|
|
count = 3
|
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" {
|
|
|
|
static = 80
|
2019-09-23 18:30:48 +00:00
|
|
|
to = 8080
|
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
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|