Add distinct_hosts constraints
This commit is contained in:
parent
cda2aad1c4
commit
d33d4d88b8
|
@ -2,12 +2,22 @@ job "lemonldap-ng" {
|
|||
|
||||
|
||||
datacenters = ["dc1"]
|
||||
region = "global"
|
||||
priority = 60
|
||||
|
||||
|
||||
group "lemonldap-ng" {
|
||||
|
||||
count = 1
|
||||
count = 1
|
||||
shutdown_delay = "6s"
|
||||
|
||||
|
||||
|
||||
constraint {
|
||||
operator = "distinct_hosts"
|
||||
value = "true"
|
||||
}
|
||||
|
||||
|
||||
network {
|
||||
mode = "bridge"
|
||||
|
|
|
@ -6,6 +6,9 @@ job "[[ .instance ]]" {
|
|||
[[- $c := merge .llng.engine .llng . ]]
|
||||
|
||||
count = [[ $c.count ]]
|
||||
shutdown_delay = "6s"
|
||||
|
||||
[[ template "common/constraints" $c ]]
|
||||
|
||||
network {
|
||||
mode = "bridge"
|
||||
|
|
|
@ -4,10 +4,14 @@ instance: lemonldap-ng
|
|||
|
||||
llng:
|
||||
|
||||
# A lot of services depends on lemonldap
|
||||
# so make it a bit higher priority than normal
|
||||
nomad:
|
||||
# A lot of services depends on lemonldap
|
||||
# so make it a bit higher priority than normal
|
||||
priority: 60
|
||||
# Ensure we run different alloc on different hosts
|
||||
constraints:
|
||||
- operator: distinct_hosts
|
||||
value: true
|
||||
|
||||
# The same engine can run portal, manager and handler
|
||||
# The settings below are for the uwsgi engine itself
|
||||
|
|
Loading…
Reference in New Issue