blob: f044b32fa8d87a271bc1fc3fa86235a66af5e7af (
plain) (
blame)
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
|
job "albatros" {
datacenters = ["neptune", "jupiter", "corrin", "bespin"]
type = "service"
priority = 90
constraint {
attribute = "${attr.cpu.arch}"
value = "amd64"
}
constraint {
attribute = "${attr.unique.hostname}"
operator = "!="
value = "caribou"
}
group "main" {
network {
port "http" { to = 8080 }
}
task "controller" {
driver = "docker"
config {
image = "dxflrs/albatros:750015b3fff91af8b9b86869411216a06bd13614"
ports = [ "http" ]
volumes = [
"secrets/certs:/var/run/secrets/albatros"
]
}
env {
ALBATROS_URL = "https://albatros.staging.deuxfleurs.org"
NOMAD_ADDR = "https://nomad.service.staging.consul:4646"
NOMAD_CACERT = "/var/run/secrets/albatros/nomad-ca.crt"
NOMAD_CLIENT_CERT = "/var/run/secrets/albatros/nomad-client.crt"
NOMAD_CLIENT_KEY = "/var/run/secrets/albatros/nomad-client.key"
CONSUL_HTTP_ADDR = "https://consul.service.staging.consul:8501"
CONSUL_CACERT = "/var/run/secrets/albatros/consul-ca.crt"
CONSUL_CLIENT_CERT = "/var/run/secrets/albatros/consul-client.crt"
CONSUL_CLIENT_KEY = "/var/run/secrets/albatros/consul-client.key"
}
template {
data = "{{ key \"secrets/consul/consul-ca.crt\" }}"
destination = "secrets/certs/consul-ca.crt"
}
template {
data = "{{ key \"secrets/consul/consul-client.crt\" }}"
destination = "secrets/certs/consul-client.crt"
}
template {
data = "{{ key \"secrets/consul/consul-client.key\" }}"
destination = "secrets/certs/consul-client.key"
}
template {
data = "{{ key \"secrets/nomad/nomad-ca.crt\" }}"
destination = "secrets/certs/nomad-ca.crt"
}
template {
data = "{{ key \"secrets/nomad/nomad-client.crt\" }}"
destination = "secrets/certs/nomad-client.crt"
}
template {
data = "{{ key \"secrets/nomad/nomad-client.key\" }}"
destination = "secrets/certs/nomad-client.key"
}
resources {
cpu = 200
memory = 200
}
service {
name = "albatros"
tags = [
"albatros",
"tricot albatros.staging.deuxfleurs.org",
"d53-cname albatros.staging.deuxfleurs.org",
]
port = "http"
check {
type = "tcp"
port = "http"
interval = "60s"
timeout = "5s"
check_restart {
limit = 3
grace = "90s"
ignore_warnings = false
}
}
}
}
}
}
|