-
Notifications
You must be signed in to change notification settings - Fork 6
/
consul.nomad
133 lines (109 loc) · 2.74 KB
/
consul.nomad
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
job "consul" {
datacenters = ["dc1"]
type = "service"
update {
canary = 2
max_parallel = 2
}
group "consul" {
count = 3
task "consul" {
driver = "triton"
resources {
cpu = 20
memory = 10
}
template {
destination = "local/file.yml"
env = true
data = <<EOH
SUMESH="{{ env "NOMAD_TASK_DIR" }}"
FRUSTRATED="{{ env "node.unique.id" }}"
EOH
}
service {
name = "consul-ssh"
tags = ["ssh", "moore"]
port = "22"
address_mode = "driver"
check {
type = "tcp"
port = "22"
interval = "10s"
timeout = "2s"
address_mode = "driver"
check_restart {
limit = 3
grace = "90s"
ignore_warnings = false
}
}
}
service {
name = "consul-ui"
tags = ["consul", "brent"]
port = "8500"
address_mode = "driver"
check {
type = "http"
port = "8500"
path = "/ui"
interval = "5s"
timeout = "2s"
address_mode = "driver"
check_restart {
limit = 3
grace = "90s"
ignore_warnings = false
}
}
}
config {
package {
name = "sample-512M"
}
#deletion_protection = true
api_type = "cloud_api"
cloud_api {
image {
name = "img-consul-master"
#uuid = "50719951-4dab-4fc0-9549-b36466614324"
#version = "1554100930"
version = "1554126304"
#most_recent = true
}
networks = [
{
name = "sdc_nat"
},
{
name = "consul"
},
]
}
#fwenabled = true
cns = [
"consul",
]
tags = {
consul = "true"
}
fwrules = {
anytoconsului = "FROM any TO tag consul ALLOW tcp (PORT 22 AND PORT 8500)"
consultcp = "FROM tag consul TO tag consul ALLOW tcp PORT all"
consuludp = "FROM tag consul TO tag consul ALLOW udp PORT all"
}
exit_strategy = "stopped"
}
env {
CONTAINERPILOT = "/etc/containerpilot.json5"
CONSUL_AGENT = "1"
CONSUL_BOOTSTRAP_EXPECT = "3"
CONSUL = "consul.svc.bruce-dev.us-east-1.cns.bdf-cloud.iqvia.net"
}
meta {
my-key = "my-value"
}
}
}
}