Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- version: '2'
- services:
- consul_server_1:
- image: consul
- ports:
- - '8510:8500'
- - '8610:8600'
- volumes:
- - /etc/timezone:/etc/timezone
- - /etc/localtime:/etc/localtime
- - ./etc/consul.d:/etc/consul.d
- command: [
- 'consul',
- 'agent',
- '-server',
- '-node=kallen-1',
- '-client=0.0.0.0',
- '-bind={{ GetInterfaceIP "eth0" }}',
- '-bootstrap-expect=3',
- '-data-dir=/tmp/consul/data',
- '-enable-script-checks=true',
- '-config-dir=/etc/consul.d',
- '-retry-join=consul_server_1:8301',
- '-ui'
- ]
- hostname: 'consul_server_1'
- #links:
- #- consul_server2
- consul_server_2:
- image: consul
- ports:
- - '8520:8500'
- - '8620:8600'
- volumes:
- - /etc/timezone:/etc/timezone
- - /etc/localtime:/etc/localtime
- - ./etc/consul.d:/etc/consul.d
- command: [
- 'consul',
- 'agent',
- '-server',
- '-node=kallen-2',
- '-client=0.0.0.0',
- '-bind={{ GetInterfaceIP "eth0" }}',
- '-bootstrap-expect=3',
- '-data-dir=/tmp/consul/data',
- '-enable-script-checks=true',
- '-config-dir=/etc/consul.d',
- '-retry-join=consul_server_1:8301',
- #'-ui'
- ]
- hostname: 'consul_server_2'
- links:
- - consul_server_1
- consul_server_3:
- image: consul
- ports:
- - '8530:8500'
- - '8630:8600'
- volumes:
- - /etc/timezone:/etc/timezone
- - /etc/localtime:/etc/localtime
- - ./etc/consul.d:/etc/consul.d
- command: [
- 'consul',
- 'agent',
- '-server',
- '-node=kallen-3',
- '-client=0.0.0.0',
- '-bind={{ GetInterfaceIP "eth0" }}',
- '-bootstrap-expect=3',
- '-data-dir=/tmp/consul/data',
- '-enable-script-checks=true',
- '-config-dir=/etc/consul.d',
- '-retry-join=consul_server_1:8301',
- #'-ui'
- ]
- hostname: 'consul_server_3'
- links:
- - consul_server_1
- consul_agent_1:
- image: consul
- ports:
- - '8540:8500'
- - '8640:8600'
- volumes:
- - /etc/timezone:/etc/timezone
- - /etc/localtime:/etc/localtime
- - ./etc/consul.d:/etc/consul.d
- command: [
- 'consul',
- 'agent',
- '-node=kallen-4',
- '-client=0.0.0.0',
- '-bind={{ GetInterfaceIP "eth0" }}',
- '-data-dir=/tmp/consul/data',
- '-enable-script-checks=true',
- '-config-dir=/etc/consul.d',
- '-retry-join=consul_server_1:8301',
- '-ui'
- ]
- hostname: 'consul_agent_1'
- links:
- - consul_server_1
- consul_agent_2:
- image: consul
- ports:
- - '8550:8500'
- - '8650:8600'
- volumes:
- - /etc/timezone:/etc/timezone
- - /etc/localtime:/etc/localtime
- - ./etc/consul.d:/etc/consul.d
- command: [
- 'consul',
- 'agent',
- '-node=kallen-5',
- '-client=0.0.0.0',
- '-bind={{ GetInterfaceIP "eth0" }}',
- '-data-dir=/tmp/consul/data',
- '-enable-script-checks=true',
- '-config-dir=/etc/consul.d',
- '-retry-join=consul_server_1:8301',
- '-ui'
- ]
- hostname: 'consul_agent_2'
- links:
- - consul_server_1
- consul_agent_3:
- image: consul
- ports:
- - '8560:8500'
- - '8660:8600'
- volumes:
- - /etc/timezone:/etc/timezone
- - /etc/localtime:/etc/localtime
- - ./etc/consul.d:/etc/consul.d
- command: [
- 'consul',
- 'agent',
- '-node=kallen-6',
- '-client=0.0.0.0',
- '-bind={{ GetInterfaceIP "eth0" }}',
- '-data-dir=/tmp/consul/data',
- '-enable-script-checks=true',
- '-config-dir=/etc/consul.d',
- '-retry-join=consul_server_1:8301',
- '-ui'
- ]
- hostname: 'consul_agent_3'
- links:
- - consul_server_1
Add Comment
Please, Sign In to add comment