added affinity rule and host_labels for each service
This commit is contained in:
parent
53b71f2205
commit
1898a90bcb
@ -3,12 +3,21 @@ services:
|
|||||||
nsqlookupd01:
|
nsqlookupd01:
|
||||||
image: nsqio/nsq:v1.0.0-compat
|
image: nsqio/nsq:v1.0.0-compat
|
||||||
command: /nsqlookupd
|
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:
|
nsqlookupd02:
|
||||||
image: nsqio/nsq:v1.0.0-compat
|
image: nsqio/nsq:v1.0.0-compat
|
||||||
command: /nsqlookupd
|
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:
|
nsqlookupd03:
|
||||||
image: nsqio/nsq:v1.0.0-compat
|
image: nsqio/nsq:v1.0.0-compat
|
||||||
command: /nsqlookupd
|
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:
|
nsqd:
|
||||||
image: nsqio/nsq:v1.0.0-compat
|
image: nsqio/nsq:v1.0.0-compat
|
||||||
command:
|
command:
|
||||||
@ -25,6 +34,9 @@ services:
|
|||||||
nsqadmin:
|
nsqadmin:
|
||||||
image: nsqio/nsq:v1.0.0-compat
|
image: nsqio/nsq:v1.0.0-compat
|
||||||
command: /nsqadmin --lookupd-http-address=nsqlookupd01:4161 --lookupd-http-address=nsqlookupd02:4161 --lookupd-http-address=nsqlookupd03:4161
|
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:
|
nsq-lb:
|
||||||
image: rancher/lb-service-haproxy:v0.7.9
|
image: rancher/lb-service-haproxy:v0.7.9
|
||||||
ports:
|
ports:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user