2 # The "region" parameter specifies the region in which to execute the job.
3 # If omitted, this inherits the default region name of "global".
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}"
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.
15 # https://www.nomadproject.io/docs/jobspec/schedulers
20 # The "max_parallel" parameter specifies the maximum number of updates to
21 # perform in parallel. In this case, this specifies to update a single task
25 health_check = "checks"
27 # The "min_healthy_time" parameter specifies the minimum time the allocation
28 # must be in the healthy state before it is marked as healthy and unblocks
29 # further allocations from being updated.
30 min_healthy_time = "10s"
32 # The "healthy_deadline" parameter specifies the deadline in which the
33 # allocation must be marked as healthy after which the allocation is
34 # automatically transitioned to unhealthy. Transitioning to unhealthy will
35 # fail the deployment and potentially roll back the job if "auto_revert" is
37 healthy_deadline = "3m"
39 # The "progress_deadline" parameter specifies the deadline in which an
40 # allocation must be marked as healthy. The deadline begins when the first
41 # allocation for the deployment is created and is reset whenever an allocation
42 # as part of the deployment transitions to a healthy state. If no allocation
43 # transitions to the healthy state before the progress deadline, the
44 # deployment is marked as failed.
45 progress_deadline = "10m"
48 # The "canary" parameter specifies that changes to the job that would result
49 # in destructive updates should create the specified number of canaries
50 # without stopping any previous allocations. Once the operator determines the
51 # canaries are healthy, they can be promoted which unblocks a rolling update
52 # of the remaining allocations at a rate of "max_parallel".
54 # Further, setting "canary" equal to the count of the task group allows
55 # blue/green deployments. When the job is updated, a full set of the new
56 # version is deployed and upon promotion the old version is stopped.
59 # Specifies if the job should auto-promote to the canary version when all
60 # canaries become healthy during a deployment. Defaults to false which means
61 # canaries must be manually updated with the nomad deployment promote
65 # The "auto_revert" parameter specifies if the job should auto-revert to the
66 # last stable job on deployment failure. A job is marked as stable if all the
67 # allocations as part of its deployment were marked healthy.
72 # The "group" stanza defines a series of tasks that should be co-located on
73 # the same Nomad client. Any task within a group will be placed on the same
76 # https://www.nomadproject.io/docs/job-specification/group
78 group "prod-group1-exporter-amd64" {
79 # The constraint allows restricting the set of eligible nodes. Constraints
80 # may filter on attributes or client metadata.
82 # https://www.nomadproject.io/docs/job-specification/constraint
85 attribute = "$${attr.cpu.arch}"
90 # The "task" stanza creates an individual unit of work, such as a Docker
91 # container, web application, or batch processing.
93 # https://www.nomadproject.io/docs/job-specification/task
95 task "prod-task1-${node_service_name}-amd64" {
96 # The "driver" parameter specifies the task driver that should be used to
100 # The "config" stanza specifies the driver configuration, which is passed
101 # directly to the driver to start the task. The details of configurations
102 # are specific to each driver, so please see specific driver
103 # documentation for more information.
105 command = "local/node_exporter-${node_version}.linux-amd64/node_exporter"
108 # The artifact stanza instructs Nomad to fetch and unpack a remote resource,
109 # such as a file, tarball, or binary. Nomad downloads artifacts using the
110 # popular go-getter library, which permits downloading artifacts from a
111 # variety of locations using a URL as the input source.
113 # https://www.nomadproject.io/docs/job-specification/artifact
116 source = "${node_url_amd64}"
119 # The service stanza instructs Nomad to register a service with Consul.
121 # https://www.nomadproject.io/docs/job-specification/service
124 name = "${node_service_name}"
125 port = "${node_service_name}"
127 name = "Node Exporter Check Live"
135 # The "resources" stanza describes the requirements a task needs to
136 # execute. Resource requirements include memory, network, cpu, and more.
137 # This ensures the task will execute on a machine that contains enough
140 # https://www.nomadproject.io/docs/job-specification/resources
144 # The network stanza specifies the networking requirements for the task
145 # group, including the network mode and port allocations. When scheduling
146 # jobs in Nomad they are provisioned across your fleet of machines along
147 # with other jobs and services. Because you don't know in advance what host
148 # your job will be provisioned on, Nomad will provide your tasks with
149 # network configuration when they start up.
151 # https://www.nomadproject.io/docs/job-specification/network
154 port "${node_service_name}" {
155 static = ${node_port}
160 task "prod-task2-${blackbox_service_name}-amd64" {
161 # The "driver" parameter specifies the task driver that should be used to
165 # The "config" stanza specifies the driver configuration, which is passed
166 # directly to the driver to start the task. The details of configurations
167 # are specific to each driver, so please see specific driver
168 # documentation for more information.
170 command = "local/blackbox_exporter-${blackbox_version}.linux-amd64/blackbox_exporter"
172 "--config.file=secrets/blackbox.yml"
176 # The "template" stanza instructs Nomad to manage a template, such as
177 # a configuration file or script. This template can optionally pull data
178 # from Consul or Vault to populate runtime configuration data.
180 # https://www.nomadproject.io/docs/job-specification/template
184 change_signal = "SIGINT"
185 destination = "secrets/blackbox.yml"
192 valid_http_versions: ["HTTP/1.1", "HTTP/2.0"]
193 no_follow_redirects: false
195 fail_if_not_ssl: true
197 insecure_skip_verify: false
198 preferred_ip_protocol: "ip4"
203 preferred_ip_protocol: "ip4"
208 query_name: "jenkins.fd.io"
215 # The artifact stanza instructs Nomad to fetch and unpack a remote resource,
216 # such as a file, tarball, or binary. Nomad downloads artifacts using the
217 # popular go-getter library, which permits downloading artifacts from a
218 # variety of locations using a URL as the input source.
220 # https://www.nomadproject.io/docs/job-specification/artifact
223 source = "${blackbox_url_amd64}"
226 # The service stanza instructs Nomad to register a service with Consul.
228 # https://www.nomadproject.io/docs/job-specification/service
231 name = "${blackbox_service_name}"
232 port = "${blackbox_service_name}"
233 tags = [ "${blackbox_service_name}$${NOMAD_ALLOC_INDEX}" ]
235 name = "Blackbox Exporter Check Live"
243 # The "resources" stanza describes the requirements a task needs to
244 # execute. Resource requirements include memory, network, cpu, and more.
245 # This ensures the task will execute on a machine that contains enough
248 # https://www.nomadproject.io/docs/job-specification/resources
252 # The network stanza specifies the networking requirements for the task
253 # group, including the network mode and port allocations. When scheduling
254 # jobs in Nomad they are provisioned across your fleet of machines along
255 # with other jobs and services. Because you don't know in advance what host
256 # your job will be provisioned on, Nomad will provide your tasks with
257 # network configuration when they start up.
259 # https://www.nomadproject.io/docs/job-specification/network
262 port "${blackbox_service_name}" {
263 static = ${blackbox_port}
269 task "prod-task3-${cadvisor_service_name}-amd64" {
270 # The "driver" parameter specifies the task driver that should be used to
274 # The "config" stanza specifies the driver configuration, which is passed
275 # directly to the driver to start the task. The details of configurations
276 # are specific to each driver, so please see specific driver
277 # documentation for more information.
279 image = "${cadvisor_image}"
282 "/var/run:/var/run:rw",
284 "/var/lib/docker/:/var/lib/docker:ro",
289 # The service stanza instructs Nomad to register a service with Consul.
291 # https://www.nomadproject.io/docs/job-specification/service
294 name = "${cadvisor_service_name}"
295 port = "${cadvisor_service_name}"
297 name = "cAdvisor Check Live"
305 # The "resources" stanza describes the requirements a task needs to
306 # execute. Resource requirements include memory, network, cpu, and more.
307 # This ensures the task will execute on a machine that contains enough
310 # https://www.nomadproject.io/docs/job-specification/resources
314 # The network stanza specifies the networking requirements for the task
315 # group, including the network mode and port allocations. When scheduling
316 # jobs in Nomad they are provisioned across your fleet of machines along
317 # with other jobs and services. Because you don't know in advance what host
318 # your job will be provisioned on, Nomad will provide your tasks with
319 # network configuration when they start up.
321 # https://www.nomadproject.io/docs/job-specification/network
324 port "${cadvisor_service_name}" {
325 static = ${cadvisor_port}
332 group "prod-group1-exporter-arm64" {
333 # The constraint allows restricting the set of eligible nodes. Constraints
334 # may filter on attributes or client metadata.
336 # https://www.nomadproject.io/docs/job-specification/constraint
339 attribute = "$${attr.cpu.arch}"
344 # The "task" stanza creates an individual unit of work, such as a Docker
345 # container, web application, or batch processing.
347 # https://www.nomadproject.io/docs/job-specification/task
349 task "prod-task1-${node_service_name}-arm64" {
350 # The "driver" parameter specifies the task driver that should be used to
354 # The "config" stanza specifies the driver configuration, which is passed
355 # directly to the driver to start the task. The details of configurations
356 # are specific to each driver, so please see specific driver
357 # documentation for more information.
359 command = "local/node_exporter-${node_version}.linux-arm64/node_exporter"
362 # The artifact stanza instructs Nomad to fetch and unpack a remote resource,
363 # such as a file, tarball, or binary. Nomad downloads artifacts using the
364 # popular go-getter library, which permits downloading artifacts from a
365 # variety of locations using a URL as the input source.
367 # https://www.nomadproject.io/docs/job-specification/artifact
370 source = "${node_url_arm64}"
373 # The service stanza instructs Nomad to register a service with Consul.
375 # https://www.nomadproject.io/docs/job-specification/service
378 name = "${node_service_name}"
379 port = "${node_service_name}"
381 name = "Node Exporter Check Live"
389 # The "resources" stanza describes the requirements a task needs to
390 # execute. Resource requirements include memory, network, cpu, and more.
391 # This ensures the task will execute on a machine that contains enough
394 # https://www.nomadproject.io/docs/job-specification/resources
398 # The network stanza specifies the networking requirements for the task
399 # group, including the network mode and port allocations. When scheduling
400 # jobs in Nomad they are provisioned across your fleet of machines along
401 # with other jobs and services. Because you don't know in advance what host
402 # your job will be provisioned on, Nomad will provide your tasks with
403 # network configuration when they start up.
405 # https://www.nomadproject.io/docs/job-specification/network
408 port "${node_service_name}" {
409 static = ${node_port}
415 task "prod-task2-${blackbox_service_name}-arm64" {
416 # The "driver" parameter specifies the task driver that should be used to
420 # The "config" stanza specifies the driver configuration, which is passed
421 # directly to the driver to start the task. The details of configurations
422 # are specific to each driver, so please see specific driver
423 # documentation for more information.
425 command = "local/blackbox_exporter-${blackbox_version}.linux-arm64/blackbox_exporter"
427 "--config.file=secrets/blackbox.yml"
431 # The "template" stanza instructs Nomad to manage a template, such as
432 # a configuration file or script. This template can optionally pull data
433 # from Consul or Vault to populate runtime configuration data.
435 # https://www.nomadproject.io/docs/job-specification/template
439 change_signal = "SIGINT"
440 destination = "secrets/blackbox.yml"
447 valid_http_versions: ["HTTP/1.1", "HTTP/2.0"]
448 no_follow_redirects: false
450 fail_if_not_ssl: true
452 insecure_skip_verify: false
453 preferred_ip_protocol: "ip4"
458 preferred_ip_protocol: "ip4"
463 query_name: "jenkins.fd.io"
470 # The artifact stanza instructs Nomad to fetch and unpack a remote resource,
471 # such as a file, tarball, or binary. Nomad downloads artifacts using the
472 # popular go-getter library, which permits downloading artifacts from a
473 # variety of locations using a URL as the input source.
475 # https://www.nomadproject.io/docs/job-specification/artifact
478 source = "${blackbox_url_arm64}"
481 # The service stanza instructs Nomad to register a service with Consul.
483 # https://www.nomadproject.io/docs/job-specification/service
486 name = "${blackbox_service_name}"
487 port = "${blackbox_service_name}"
488 tags = [ "${blackbox_service_name}$${NOMAD_ALLOC_INDEX}" ]
490 name = "Blackbox Exporter Check Live"
498 # The "resources" stanza describes the requirements a task needs to
499 # execute. Resource requirements include memory, network, cpu, and more.
500 # This ensures the task will execute on a machine that contains enough
503 # https://www.nomadproject.io/docs/job-specification/resources
507 # The network stanza specifies the networking requirements for the task
508 # group, including the network mode and port allocations. When scheduling
509 # jobs in Nomad they are provisioned across your fleet of machines along
510 # with other jobs and services. Because you don't know in advance what host
511 # your job will be provisioned on, Nomad will provide your tasks with
512 # network configuration when they start up.
514 # https://www.nomadproject.io/docs/job-specification/network
517 port "${blackbox_service_name}" {
518 static = ${blackbox_port}
524 task "prod-task3-${cadvisor_service_name}-arm64" {
525 # The "driver" parameter specifies the task driver that should be used to
529 # The "config" stanza specifies the driver configuration, which is passed
530 # directly to the driver to start the task. The details of configurations
531 # are specific to each driver, so please see specific driver
532 # documentation for more information.
534 # There is currently no official release for arm yet...using community.
535 image = "zcube/cadvisor:latest"
538 "/var/run:/var/run:rw",
540 "/var/lib/docker/:/var/lib/docker:ro",
545 # The service stanza instructs Nomad to register a service with Consul.
547 # https://www.nomadproject.io/docs/job-specification/service
550 name = "${cadvisor_service_name}"
551 port = "${cadvisor_service_name}"
553 name = "cAdvisor Check Live"
561 # The "resources" stanza describes the requirements a task needs to
562 # execute. Resource requirements include memory, network, cpu, and more.
563 # This ensures the task will execute on a machine that contains enough
566 # https://www.nomadproject.io/docs/job-specification/resources
570 # The network stanza specifies the networking requirements for the task
571 # group, including the network mode and port allocations. When scheduling
572 # jobs in Nomad they are provisioned across your fleet of machines along
573 # with other jobs and services. Because you don't know in advance what host
574 # your job will be provisioned on, Nomad will provide your tasks with
575 # network configuration when they start up.
577 # https://www.nomadproject.io/docs/job-specification/network
580 port "${cadvisor_service_name}" {
581 static = ${cadvisor_port}