Avoid ci-management archiving files twice
[csit.git] / resources / tools / terraform / 1n_nmd / prod_vpp_device / prod_csit_shim.nomad
1 job "prod-csit-shim" {
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 = [ "yul1" ]
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   # For more information, please see the online documentation at:
16   #
17   #     https://www.nomadproject.io/docs/jobspec/schedulers.html
18   #
19   type = "system"
20
21   # The "group" stanza defines a series of tasks that should be co-located on
22   # the same Nomad client. Any task within a group will be placed on the same
23   # client.
24   #
25   # For more information and examples on the "group" stanza, please see
26   # the online documentation at:
27   #
28   #     https://www.nomadproject.io/docs/job-specification/group.html
29   #
30   group "prod-group1-csit-shim-amd" {
31     # The "count" parameter specifies the number of the task groups that should
32     # be running under this group. This value must be non-negative and defaults
33     # to 1.
34     count       = 1
35
36     constraint {
37       attribute = "${node.class}"
38       value     = "csit"
39     }
40
41     restart {
42       interval  = "1m"
43       attempts  = 3
44       delay     = "15s"
45       mode      = "delay"
46     }
47
48     # The "task" stanza creates an individual unit of work, such as a Docker
49     # container, web application, or batch processing.
50     #
51     # For more information and examples on the "task" stanza, please see
52     # the online documentation at:
53     #
54     #     https://www.nomadproject.io/docs/job-specification/task.html
55     #
56     task "prod-task1-csit-shim-amd" {
57       # The "driver" parameter specifies the task driver that should be used to
58       # run the task.
59       driver         = "docker"
60
61       # The "config" stanza specifies the driver configuration, which is passed
62       # directly to the driver to start the task. The details of configurations
63       # are specific to each driver, so please see specific driver
64       # documentation for more information.
65       config {
66         image        = "csit_shim-ubuntu1804:local"
67         network_mode = "host"
68         pid_mode     = "host"
69         volumes      = [
70           "/var/run/docker.sock:/var/run/docker.sock"
71         ]
72         privileged   = true
73       }
74
75       # The "resources" stanza describes the requirements a task needs to
76       # execute. Resource requirements include memory, network, cpu, and more.
77       # This ensures the task will execute on a machine that contains enough
78       # resource capacity.
79       #
80       # For more information and examples on the "resources" stanza, please see
81       # the online documentation at:
82       #
83       #     https://www.nomadproject.io/docs/job-specification/resources.html
84       #
85       resources {
86         cpu          = 100
87         memory       = 128
88         network {
89           mbits      = 10
90           port "ssh" {
91               static = 6022
92           }
93           port "ssh2" {
94               static = 6023
95           }
96         }
97       }
98     }
99   }
100
101   group "prod-group1-csit-shim-arm" {
102     # The "count" parameter specifies the number of the task groups that should
103     # be running under this group. This value must be non-negative and defaults
104     # to 1.
105     count       = 1
106
107     constraint {
108       attribute = "${node.class}"
109       value     = "csitarm"
110     }
111
112     restart {
113       interval = "1m"
114       attempts = 3
115       delay    = "15s"
116       mode     = "delay"
117     }
118
119     # The "task" stanza creates an individual unit of work, such as a Docker
120     # container, web application, or batch processing.
121     #
122     # For more information and examples on the "task" stanza, please see
123     # the online documentation at:
124     #
125     #     https://www.nomadproject.io/docs/job-specification/task.html
126     #
127     task "prod-task1-csit-shim-arm" {
128       # The "driver" parameter specifies the task driver that should be used to
129       # run the task.
130       driver         = "docker"
131
132       # The "config" stanza specifies the driver configuration, which is passed
133       # directly to the driver to start the task. The details of configurations
134       # are specific to each driver, so please see specific driver
135       # documentation for more information.
136       config {
137         image        = "csit_shim-ubuntu1804:local"
138         network_mode = "host"
139         pid_mode     = "host"
140         volumes      = [
141           "/var/run/docker.sock:/var/run/docker.sock"
142         ]
143         privileged   = true
144       }
145
146       # The "resources" stanza describes the requirements a task needs to
147       # execute. Resource requirements include memory, network, cpu, and more.
148       # This ensures the task will execute on a machine that contains enough
149       # resource capacity.
150       #
151       # For more information and examples on the "resources" stanza, please see
152       # the online documentation at:
153       #
154       #     https://www.nomadproject.io/docs/job-specification/resources.html
155       #
156       resources {
157         cpu          = 100
158         memory       = 128
159         network {
160           mbits      = 10
161           port "ssh" {
162               static = 6022
163           }
164           port "ssh2" {
165               static = 6023
166           }
167         }
168       }
169     }
170   }
171 }