github.com/bigcommerce/nomad@v0.9.3-bc/terraform/examples/spark/spark-history-server-hdfs.nomad (about) 1 job "spark-history-server" { 2 datacenters = ["dc1"] 3 type = "service" 4 5 group "server" { 6 count = 1 7 8 task "history-server" { 9 driver = "docker" 10 11 config { 12 image = "barnardb/spark" 13 command = "/spark/spark-2.1.0-bin-nomad/bin/spark-class" 14 args = [ "org.apache.spark.deploy.history.HistoryServer" ] 15 port_map { 16 ui = 18080 17 } 18 network_mode = "host" 19 } 20 21 env { 22 "SPARK_HISTORY_OPTS" = "-Dspark.history.fs.logDirectory=hdfs://hdfs.service.consul/spark-events/" 23 "SPARK_PUBLIC_DNS" = "spark-history.service.consul" 24 } 25 26 resources { 27 cpu = 500 28 memory = 500 29 network { 30 mbits = 250 31 port "ui" { 32 static = 18080 33 } 34 } 35 } 36 37 service { 38 name = "spark-history" 39 tags = ["spark", "ui"] 40 port = "ui" 41 } 42 } 43 44 } 45 }