Created
July 21, 2020 13:56
-
-
Save eveld/e897f7385168bbf250122104390fd5f7 to your computer and use it in GitHub Desktop.
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 "api" { | |
datacenters = ["dc1"] | |
type = "service" | |
group "api" { | |
count = 3 | |
network { | |
mode = "bridge" | |
} | |
task "api" { | |
driver = "docker" | |
config { | |
image = "nicholasjackson/fake-service:v0.14.1" | |
} | |
env { | |
NAME = "api (${NOMAD_ALLOC_ID})" | |
MESSAGE = "ok" | |
LISTEN_ADDR = "0.0.0.0:9090" | |
} | |
resources { | |
cpu = 50 | |
memory = 64 | |
} | |
} | |
} | |
} |
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
data_dir = "/etc/nomad.d/data" | |
client { | |
enabled = true | |
server_join { | |
retry_join = ["server.dc1.nomad_cluster.shipyard.run"] | |
} | |
# Also tried it without this..no luck | |
network_interface = "eth0" | |
} | |
plugin "raw_exec" { | |
config { | |
enabled = true | |
} | |
} |
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
data_dir = "/etc/nomad.d/data" | |
server { | |
enabled = true | |
bootstrap_expect = 1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment