Update VPP_STABLE_VER files
[csit.git] / fdio.infra.terraform / terraform-nomad-vpp-device / conf / nomad / vpp-device.hcl.tftpl
1 job "${job_name}" {
2   # The "region" parameter specifies the region in which to execute the job.
3   # If omitted, this inherits the default region name of "global".
4   # region = "global"
5   #
6   # The "datacenters" parameter specifies the list of datacenters which should
7   # be considered when placing this task. This must be provided.
8   datacenters = "${datacenters}"
9
10   # The "type" parameter controls the type of job, which impacts the scheduler's
11   # decision on placement. This configuration is optional and defaults to
12   # "service". For a full list of job types and their differences, please see
13   # the online documentation.
14   #
15   type        = "system"
16
17   # The "group" stanza defines a series of tasks that should be co-located on
18   # the same Nomad client. Any task within a group will be placed on the same
19   # client.
20   #
21   # https://www.nomadproject.io/docs/job-specification/group
22   #
23   group "csit-shim-amd-group-1" {
24     # The "count" parameter specifies the number of the task groups that should
25     # be running under this group. This value must be non-negative.
26     count = ${group_count}
27
28     # The constraint allows restricting the set of eligible nodes. Constraints
29     # may filter on attributes or client metadata.
30     #
31     # https://www.nomadproject.io/docs/job-specification/constraint
32     #
33     constraint {
34       attribute = "$${node.class}"
35       value     = "csit"
36     }
37
38     # The restart stanza configures a tasks's behavior on task failure. Restarts
39     # happen on the client that is running the task.
40     #
41     # https://www.nomadproject.io/docs/job-specification/restart
42     #
43     restart {
44       interval = "1m"
45       attempts = 3
46       delay    = "15s"
47       mode     = "delay"
48     }
49
50     # The network stanza specifies the networking requirements for the task
51     # group, including the network mode and port allocations. When scheduling
52     # jobs in Nomad they are provisioned across your fleet of machines along
53     # with other jobs and services. Because you don't know in advance what host
54     # your job will be provisioned on, Nomad will provide your tasks with
55     # network configuration when they start up.
56     #
57     # https://www.nomadproject.io/docs/job-specification/network
58     #
59     network {
60       port "ssh" {
61           static = 6022
62       }
63       port "ssh2" {
64           static = 6023
65       }
66     }
67
68     # The "task" stanza creates an individual unit of work, such as a Docker
69     # container, web application, or batch processing.
70     #
71     # https://www.nomadproject.io/docs/job-specification/task
72     #
73     task "csit-shim-amd-task-1" {
74       # The "driver" parameter specifies the task driver that should be used to
75       # run the task.
76       driver = "docker"
77
78       # The "config" stanza specifies the driver configuration, which is passed
79       # directly to the driver to start the task. The details of configurations
80       # are specific to each driver, so please see specific driver
81       # documentation for more information.
82       config {
83         image        = "${image_x86_64}"
84         network_mode = "host"
85         pid_mode     = "host"
86         volumes      = [
87           "/var/run/docker.sock:/var/run/docker.sock"
88         ]
89         privileged   = true
90       }
91
92       # The "resources" stanza describes the requirements a task needs to
93       # execute. Resource requirements include memory, network, cpu, and more.
94       # This ensures the task will execute on a machine that contains enough
95       # resource capacity.
96       #
97       # https://www.nomadproject.io/docs/job-specification/resources
98       #
99       resources {
100         cpu    = ${cpu}
101         memory = ${memory}
102       }
103     }
104   }
105
106   group "csit-shim-arm-group-1" {
107     # The "count" parameter specifies the number of the task groups that should
108     # be running under this group. This value must be non-negative.
109     count = ${group_count}
110
111     # The constraint allows restricting the set of eligible nodes. Constraints
112     # may filter on attributes or client metadata.
113     #
114     # https://www.nomadproject.io/docs/job-specification/constraint
115     #
116     constraint {
117       attribute = "$${node.class}"
118       value     = "csitarm"
119     }
120
121     # The restart stanza configures a tasks's behavior on task failure. Restarts
122     # happen on the client that is running the task.
123     #
124     # https://www.nomadproject.io/docs/job-specification/restart
125     #
126     restart {
127       interval = "1m"
128       attempts = 3
129       delay    = "15s"
130       mode     = "delay"
131     }
132
133     # The network stanza specifies the networking requirements for the task
134     # group, including the network mode and port allocations. When scheduling
135     # jobs in Nomad they are provisioned across your fleet of machines along
136     # with other jobs and services. Because you don't know in advance what host
137     # your job will be provisioned on, Nomad will provide your tasks with
138     # network configuration when they start up.
139     #
140     # https://www.nomadproject.io/docs/job-specification/network
141     #
142     network {
143       port "ssh" {
144           static = 6022
145       }
146       port "ssh2" {
147           static = 6023
148       }
149     }
150
151     # The "task" stanza creates an individual unit of work, such as a Docker
152     # container, web application, or batch processing.
153     #
154     # https://www.nomadproject.io/docs/job-specification/task
155     #
156     task "csit-shim-arm-task-1" {
157       # The "driver" parameter specifies the task driver that should be used to
158       # run the task.
159       driver = "docker"
160
161       # The "config" stanza specifies the driver configuration, which is passed
162       # directly to the driver to start the task. The details of configurations
163       # are specific to each driver, so please see specific driver
164       # documentation for more information.
165       config {
166         image        = "${image_aarch64}"
167         network_mode = "host"
168         pid_mode     = "host"
169         volumes      = [
170           "/var/run/docker.sock:/var/run/docker.sock"
171         ]
172         privileged   = true
173       }
174
175       # The "resources" stanza describes the requirements a task needs to
176       # execute. Resource requirements include memory, network, cpu, and more.
177       # This ensures the task will execute on a machine that contains enough
178       # resource capacity.
179       #
180       # https://www.nomadproject.io/docs/job-specification/resources
181       #
182       resources {
183         cpu    = ${cpu}
184         memory = ${memory}
185       }
186     }
187   }
188 }