Skip to content

Instantly share code, notes, and snippets.

@scarolan
Last active August 28, 2018 17:02
Show Gist options
  • Save scarolan/2a8c7c89bdebb88f330d61550b72753d to your computer and use it in GitHub Desktop.
Save scarolan/2a8c7c89bdebb88f330d61550b72753d to your computer and use it in GitHub Desktop.
job "java" {
datacenters = ["dc1"]
type = "service"
# This is broken for some reason.
# constraint {
# attribute = "$attr.kernel.name"
# value = "linux"
# }
update {
stagger = "10s"
max_parallel = 1
}
group "java" {
count = 1
task "java" {
driver = "java"
config {
jar_path = "local/nomad-java-job.jar"
jvm_options = ["-Xmx200m", "-Xms200m"]
}
artifact {
source = "https://s3.amazonaws.com/clstokes-public/bin/nomad-java-job.jar"
options {
checksum = "md5:66d0dd209b394a7345009dbd1b05b8c3"
}
}
resources {
cpu = 500
memory = 256
network {
mbits = 10
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment