This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
job "{{service_name}}" { | |
datacenters = [{{list_of_datacenters}}] | |
type = "service" | |
reschedule { | |
delay = "30s" | |
delay_function = "constant" | |
unlimited = true | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: snippet -*- | |
# name: Nomad job file | |
# key: nomad | |
# Generation of a basic nomad job file | |
# -- | |
# https://www.nomadproject.io/docs/job-specification/job.html | |
job "$1" { | |
datacenters = ["${2:public-services}"] | |
type = "service" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<snippet> | |
<tabTrigger>nomad-docker-service</tabTrigger> | |
<content><![CDATA[ | |
# https://www.nomadproject.io/docs/job-specification/job.html | |
job "${1:service-name}" { | |
datacenters = [${2:"public-services"}] | |
type = "service" | |
# https://www.nomadproject.io/docs/job-specification/reschedule.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'.source.hcl': | |
'NomadDockerJobSrv': | |
'prefix': 'nomad-docker-service' | |
'body': """ | |
# https://www.nomadproject.io/docs/job-specification/job.html | |
job \"${1:service-name}\" { | |
datacenters = [${2:\"public-services\"}] | |
type = \"service\" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"NomadDockerJobSrv": { | |
"prefix": "nomad-docker-service", | |
"body": [ | |
"# https://www.nomadproject.io/docs/job-specification/job.html", | |
"job \"${1:service-name}\" {", | |
" datacenters = [${2:\"public-services\"}]", | |
"", | |
" type = \"service\"", | |
"", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"NomadDockerJobSrv": { | |
"prefix": "nomad-docker-service", | |
"scope": "hcl", | |
"body": [ | |
"# https://www.nomadproject.io/docs/job-specification/job.html", | |
"job \"${1:service-name}\" {", | |
" datacenters = [${2:\"public-services\"}]", | |
"", | |
" type = \"service\"", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
job "fail-service" { | |
datacenters = ["public-services"] | |
type = "service" | |
reschedule { | |
delay = "30s" | |
delay_function = "constant" | |
unlimited = true | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
job "fail-service" { | |
datacenters = ["public-services"] | |
type = "service" | |
reschedule { | |
delay = "2m" | |
delay_function = "constant" | |
unlimited = true | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
job "fail-service" { | |
datacenters = ["public-services"] | |
type = "service" | |
# Documentation of the reshedule_stanza | |
# https://www.nomadproject.io/docs/job-specification/reschedule.html | |
reschedule { | |
delay = "2m" # Duration to wait before attempting to reschedule a failed task. | |
delay_function = "constant" # Function that is used to calculate subsequent reschedule delays. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
job "fail-service" { | |
datacenters = ["public-services"] | |
type = "service" | |
group "fail-service" { | |
count = 1 | |
restart { | |
interval = "10m" |
NewerOlder