-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathkv-sync.hcl.example
More file actions
48 lines (42 loc) · 1.3 KB
/
kv-sync.hcl.example
File metadata and controls
48 lines (42 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# This declares a job named "docs". There can be exactly one
# job declaration per job file.
job "kv-sync-service" {
# Spread the tasks in this job in these datacenters.
datacenters = ["dc1"]
# Run this job as a "service" type.
type = "service"
# Specify this job to have rolling updates, two-at-a-time, with
# 30 second intervals.
update {
stagger = "30s"
max_parallel = 1
}
# A group defines a series of tasks that should be co-located
# on the same client (host). All tasks within a group will be
# placed on the same host.
group "kv-sync-service" {
# Specify the number of these tasks we want.
count = 1
# Create an individual task (unit of work). This particular
# task utilizes a Docker container to front a web application.
task "kv-sync-service" {
# Specify the driver to be "docker". Nomad supports
# multiple drivers.
driver = "docker"
# Configuration is specific to each driver.
config {
image = "isurusiri91/kvsync:latest"
args = [
"-n", "NOMAD_HOST_URL",
"-c", "CONSUL_HOST_URL",
]
}
# Specify the maximum resources required to run the task,
# include CPU and memory.
resources {
cpu = 500 # MHz
memory = 128 # MB
}
}
}
}