aboutsummaryrefslogtreecommitdiffstats
path: root/fdio.infra.terraform/terraform-nomad-vpp-device/conf/nomad/device-shim.hcl.tftpl
blob: 28e38a2d0b623528e68356a30bafb2a67edd885d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
job "${job_name}" {
  datacenters = ["${datacenters}"]
  type        = "system"
  group "${job_name}-amd" {
    count = ${group_count}
    constraint {
      attribute = "$${node.class}"
      value     = "csit"
    }
    restart {
      interval = "1m"
      attempts = 3
      delay    = "15s"
      mode     = "delay"
    }
    network {
      port "ssh" {
          static = 6022
      }
      port "ssh2" {
          static = 6023
      }
    }
    task "${job_name}-amd" {
      driver = "docker"
      config {
        image        = "${image_x86_64}"
        network_mode = "host"
        pid_mode     = "host"
        volumes      = [
          "/var/run/docker.sock:/var/run/docker.sock"
        ]
        privileged   = true
      }
      resources {
        cpu    = ${cpu}
        memory = ${memory}
      }
    }
  }
  group "${job_name}-arm" {
    count = ${group_count}
    constraint {
      attribute = "$${node.class}"
      value     = "csitarm"
    }
    restart {
      interval = "1m"
      attempts = 3
      delay    = "15s"
      mode     = "delay"
    }
    network {
      port "ssh" {
          static = 6022
      }
      port "ssh2" {
          static = 6023
      }
    }
    task "${job_name}-arm" {
      driver = "docker"
      config {
        image        = "${image_aarch64}"
        network_mode = "host"
        pid_mode     = "host"
        volumes      = [
          "/var/run/docker.sock:/var/run/docker.sock"
        ]
        privileged   = true
      }
      resources {
        cpu    = ${cpu}
        memory = ${memory}
      }
    }
  }
}