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