Skip to content

Instantly share code, notes, and snippets.

@bboyle1234
Last active July 26, 2018 02:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bboyle1234/07ad0d223fa57f0548bb0666097c545f to your computer and use it in GitHub Desktop.
Save bboyle1234/07ad0d223fa57f0548bb0666097c545f to your computer and use it in GitHub Desktop.
EventStore Test Cluster
version: '2'
services:
eventstore1:
image: eventstore/eventstore
ports:
- 12113:2113/tcp
- 11113:1113/tcp
environment:
EVENTSTORE_CLUSTER_DNS: eventstore1
EVENTSTORE_CLUSTER_GOSSIP_PORT: '2112'
EVENTSTORE_CLUSTER_SIZE: '3'
EVENTSTORE_EXT_HTTP_PORT_ADVERTISE_AS: '12113'
EVENTSTORE_EXT_TCP_PORT_ADVERTISE_AS: '11113'
EVENTSTORE_EXT_IP_ADVERTISE_AS: '127.0.0.1'
EVENTSTORE_RUN_PROJECTIONS: 'All'
EVENTSTORE_START_STANDARD_PROJECTIONS: 'True'
entrypoint:
- /bin/bash
command:
- -c
- 'sed -i "/IntIpAdvertiseAs\:/d" /etc/eventstore/eventstore.conf
&& echo "IntIpAdvertiseAs: $$(hostname -i)" >> /etc/eventstore/eventstore.conf
&& /entrypoint.sh'
eventstore2:
image: eventstore/eventstore
ports:
- 22113:2113/tcp
- 21113:1113/tcp
environment:
EVENTSTORE_CLUSTER_DNS: eventstore1
EVENTSTORE_CLUSTER_GOSSIP_PORT: '2112'
EVENTSTORE_CLUSTER_SIZE: '3'
EVENTSTORE_EXT_HTTP_PORT_ADVERTISE_AS: '22113'
EVENTSTORE_EXT_TCP_PORT_ADVERTISE_AS: '21113'
EVENTSTORE_EXT_IP_ADVERTISE_AS: '127.0.0.1'
EVENTSTORE_RUN_PROJECTIONS: 'All'
EVENTSTORE_START_STANDARD_PROJECTIONS: 'True'
entrypoint:
- /bin/bash
command:
- -c
- 'sed -i "/IntIpAdvertiseAs\:/d" /etc/eventstore/eventstore.conf
&& echo "IntIpAdvertiseAs: $$(hostname -i)" >> /etc/eventstore/eventstore.conf
&& /entrypoint.sh'
eventstore3:
image: eventstore/eventstore
ports:
- 32113:2113/tcp
- 31113:1113/tcp
environment:
EVENTSTORE_CLUSTER_DNS: eventstore1
EVENTSTORE_CLUSTER_GOSSIP_PORT: '2112'
EVENTSTORE_CLUSTER_SIZE: '3'
EVENTSTORE_EXT_HTTP_PORT_ADVERTISE_AS: '32113'
EVENTSTORE_EXT_TCP_PORT_ADVERTISE_AS: '31113'
EVENTSTORE_EXT_IP_ADVERTISE_AS: '127.0.0.1'
EVENTSTORE_RUN_PROJECTIONS: 'All'
EVENTSTORE_START_STANDARD_PROJECTIONS: 'True'
entrypoint:
- /bin/bash
command:
- -c
- 'sed -i "/IntIpAdvertiseAs\:/d" /etc/eventstore/eventstore.conf
&& echo "IntIpAdvertiseAs: $$(hostname -i)" >> /etc/eventstore/eventstore.conf
&& /entrypoint.sh'
version: '2'
services:
eventstore3:
image: eventstore/eventstore:release-4.0.3
environment:
EVENTSTORE_CLUSTER_DNS: eventstore1
EVENTSTORE_CLUSTER_GOSSIP_PORT: '2112'
EVENTSTORE_CLUSTER_SIZE: '3'
EVENTSTORE_EXT_HTTP_PORT: '2113'
EVENTSTORE_EXT_HTTP_PREFIXES: http://*:2113/
EVENTSTORE_EXT_TCP_PORT: '1113'
EVENTSTORE_INT_HTTP_PORT: '2112'
EVENTSTORE_INT_HTTP_PREFIXES: http://*:2112/
EVENTSTORE_INT_TCP_PORT: '1112'
EVENTSTORE_RUN_PROJECTIONS: All
EVENTSTORE_START_STANDARD_PROJECTIONS: 'True'
entrypoint:
- /bin/bash
volumes:
- /backup/eventstore3/data:/var/lib/eventstore
- /backup/eventstore3/log:/var/log/eventstore
ports:
- 2113:2113/tcp
- 1113:1113/tcp
command:
- -c
- 'apt-get install curl && export HOST_PUBLIC_IP=$$(curl http://rancher-metadata/2015-12-19/self/host/agent_ip)
&& grep -q -F "IntIpAdvertiseAs: $$(hostname -i)" /etc/eventstore/eventstore.conf ||
echo "IntIpAdvertiseAs: $$(hostname -i)" >> /etc/eventstore/eventstore.conf &&
grep -q -F "ExtIpAdvertiseAs: $$HOST_PUBLIC_IP" /etc/eventstore/eventstore.conf ||
echo "ExtIpAdvertiseAs: $$HOST_PUBLIC_IP" >> /etc/eventstore/eventstore.conf
&& /entrypoint.sh'
labels:
io.rancher.scheduler.affinity:host_label: eventstore=eventstore3
io.rancher.scheduler.global: 'true'
eventstore1:
image: eventstore/eventstore:release-4.0.3
environment:
EVENTSTORE_CLUSTER_DNS: eventstore1
EVENTSTORE_CLUSTER_GOSSIP_PORT: '2112'
EVENTSTORE_CLUSTER_SIZE: '3'
EVENTSTORE_EXT_HTTP_PORT: '2113'
EVENTSTORE_EXT_HTTP_PREFIXES: http://*:2113/
EVENTSTORE_EXT_TCP_PORT: '1113'
EVENTSTORE_INT_HTTP_PORT: '2112'
EVENTSTORE_INT_HTTP_PREFIXES: http://*:2112/
EVENTSTORE_INT_TCP_PORT: '1112'
EVENTSTORE_RUN_PROJECTIONS: All
EVENTSTORE_START_STANDARD_PROJECTIONS: 'True'
entrypoint:
- /bin/bash
volumes:
- /backup/eventstore1/data:/var/lib/eventstore
- /backup/eventstore1/log:/var/log/eventstore
ports:
- 2113:2113/tcp
- 1113:1113/tcp
command:
- -c
- 'apt-get install curl && export HOST_PUBLIC_IP=$$(curl http://rancher-metadata/2015-12-19/self/host/agent_ip)
&& grep -q -F "IntIpAdvertiseAs: $$(hostname -i)" /etc/eventstore/eventstore.conf ||
echo "IntIpAdvertiseAs: $$(hostname -i)" >> /etc/eventstore/eventstore.conf &&
grep -q -F "ExtIpAdvertiseAs: $$HOST_PUBLIC_IP" /etc/eventstore/eventstore.conf ||
echo "ExtIpAdvertiseAs: $$HOST_PUBLIC_IP" >> /etc/eventstore/eventstore.conf
&& /entrypoint.sh'
labels:
io.rancher.scheduler.affinity:host_label: eventstore=eventstore1
io.rancher.scheduler.global: 'true'
eventstore2:
image: eventstore/eventstore:release-4.0.3
environment:
EVENTSTORE_CLUSTER_DNS: eventstore1
EVENTSTORE_CLUSTER_GOSSIP_PORT: '2112'
EVENTSTORE_CLUSTER_SIZE: '3'
EVENTSTORE_EXT_HTTP_PORT: '2113'
EVENTSTORE_EXT_HTTP_PREFIXES: http://*:2113/
EVENTSTORE_EXT_TCP_PORT: '1113'
EVENTSTORE_INT_HTTP_PORT: '2112'
EVENTSTORE_INT_HTTP_PREFIXES: http://*:2112/
EVENTSTORE_INT_TCP_PORT: '1112'
EVENTSTORE_RUN_PROJECTIONS: All
EVENTSTORE_START_STANDARD_PROJECTIONS: 'True'
entrypoint:
- /bin/bash
volumes:
- /backup/eventstore2/data:/var/lib/eventstore
- /backup/eventstore2/log:/var/log/eventstore
ports:
- 2113:2113/tcp
- 1113:1113/tcp
command:
- -c
- 'apt-get install curl && export HOST_PUBLIC_IP=$$(curl http://rancher-metadata/2015-12-19/self/host/agent_ip)
&& grep -q -F "IntIpAdvertiseAs: $$(hostname -i)" /etc/eventstore/eventstore.conf ||
echo "IntIpAdvertiseAs: $$(hostname -i)" >> /etc/eventstore/eventstore.conf &&
grep -q -F "ExtIpAdvertiseAs: $$HOST_PUBLIC_IP" /etc/eventstore/eventstore.conf ||
echo "ExtIpAdvertiseAs: $$HOST_PUBLIC_IP" >> /etc/eventstore/eventstore.conf
&& /entrypoint.sh'
labels:
io.rancher.scheduler.affinity:host_label: eventstore=eventstore2
io.rancher.scheduler.global: 'true'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment