Skip to content

Basic Example

Felix edited this page Jun 5, 2021 · 2 revisions

example.nomad

job "example" {
  datacenters = ["dc1"]

  type = "service"

  group "database" {
      count = 1
      task "database" {
        driver = "docker"
        config {
            image = "hello-world:linux"
        }
      }
  }
  group "web" {
    count = 2

    task "web" {
      driver = "docker"
      config {
        image = "hello-world:linux"
      }
    }
  }
}

example-deployment.hcl

group "database" {
    weight = 25
}

Command

$ roamer deploy --config example-deployment.hcl example.nomad
Clone this wiki locally