Created
October 4, 2017 16:19
-
-
Save ericwestfall/a021d800d06c52b1ddc4e8fc9dd4a789 to your computer and use it in GitHub Desktop.
Levant Test Nomad Job
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
job "fabio" { | |
datacenters = ["dc1"] | |
region = "global" | |
type = "system" | |
group "fabio" { | |
update { | |
stagger = "60s" | |
max_parallel = 1 | |
} | |
task "fabio" { | |
constraint { | |
attribute = "${attr.kernel.name}" | |
value = "linux" | |
} | |
driver = "exec" | |
config { | |
command = "./[[.binary_name]]" | |
args = ["-metrics.target", "statsd", "-metrics.statsd.addr", "[[.statsd_address]]"] | |
} | |
artifact { | |
source = "https://github.com/eBay/fabio/releases/download/[[.version]]/[[.binary_name]]" | |
} | |
service { | |
name = "fabio" | |
tags = ["http", "load-balancer"] | |
port = "http" | |
check { | |
type = "tcp" | |
name = "CE18" | |
interval = "10s" | |
timeout = "2s" | |
} | |
} | |
service { | |
name = "fabio" | |
tags = ["ui", "load-balancer"] | |
port = "ui" | |
check { | |
type = "tcp" | |
name = "CE17" | |
interval = "10s" | |
timeout = "2s" | |
} | |
} | |
resources { | |
cpu = 250 | |
memory = 60 | |
network { | |
mbits = 1 | |
# Fabio acts as the routing layer therefore static ports are used for | |
# both the http and ui ports. | |
port "http" { | |
static = 9999 | |
} | |
port "ui" { | |
static = 9998 | |
} | |
} | |
} | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: 'v1.5.2' | |
statsd_address: '10.188.93.90:8125' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment