added affinity rule and host_labels for each service
This commit is contained in:
parent
53b71f2205
commit
1898a90bcb
@ -3,12 +3,21 @@ services:
|
||||
nsqlookupd01:
|
||||
image: nsqio/nsq:v1.0.0-compat
|
||||
command: /nsqlookupd
|
||||
labels:
|
||||
io.rancher.scheduler.affinity:host_label_soft: nsqlookupd=true
|
||||
io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=$${stack_name}/nsqlookupd02,io.rancher.stack_service.name=$${stack_name}/nsqlookupd03
|
||||
nsqlookupd02:
|
||||
image: nsqio/nsq:v1.0.0-compat
|
||||
command: /nsqlookupd
|
||||
labels:
|
||||
io.rancher.scheduler.affinity:host_label_soft: nsqlookupd=true
|
||||
io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=$${stack_name}/nsqlookupd01,io.rancher.stack_service.name=$${stack_name}/nsqlookupd03
|
||||
nsqlookupd03:
|
||||
image: nsqio/nsq:v1.0.0-compat
|
||||
command: /nsqlookupd
|
||||
labels:
|
||||
io.rancher.scheduler.affinity:host_label_soft: nsqlookupd=true
|
||||
io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=$${stack_name}/nsqlookupd01,io.rancher.stack_service.name=$${stack_name}/nsqlookupd02
|
||||
nsqd:
|
||||
image: nsqio/nsq:v1.0.0-compat
|
||||
command:
|
||||
@ -25,6 +34,9 @@ services:
|
||||
nsqadmin:
|
||||
image: nsqio/nsq:v1.0.0-compat
|
||||
command: /nsqadmin --lookupd-http-address=nsqlookupd01:4161 --lookupd-http-address=nsqlookupd02:4161 --lookupd-http-address=nsqlookupd03:4161
|
||||
labels:
|
||||
io.rancher.scheduler.affinity:host_label_soft: nsqadmin=true
|
||||
io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name}
|
||||
nsq-lb:
|
||||
image: rancher/lb-service-haproxy:v0.7.9
|
||||
ports:
|
||||
|
Loading…
x
Reference in New Issue
Block a user