Merge pull request #448 from Bee-Htcpcp/master
Added EventStore cluster
This commit is contained in:
commit
ff140fc6ba
11
templates/eventstore/0/README.md
Normal file
11
templates/eventstore/0/README.md
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# Event Store cluster in rancher
|
||||||
|
|
||||||
|
|
||||||
|
### Info:
|
||||||
|
|
||||||
|
Best practice is to create a cluster of 3 nodes, but for this, you'll need at least 3 machines on your rancher cluster since the same external host port is used for each EventStore container.
|
||||||
|
|
||||||
|
|
||||||
|
This template is not maintained by the EventStore team (https://geteventstore.com/) so do not buzz Greg Y.
|
||||||
|
If it's not working, blame to commiter of this lines : Jérôme Rx, and make a pull request to improve this template.
|
||||||
|
|
38
templates/eventstore/0/docker-compose.yml
Normal file
38
templates/eventstore/0/docker-compose.yml
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
version: '2'
|
||||||
|
services:
|
||||||
|
eventstore:
|
||||||
|
image: eventstore/eventstore:release-4.0.3
|
||||||
|
entrypoint: /bin/bash
|
||||||
|
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'
|
||||||
|
|
||||||
|
environment:
|
||||||
|
- EVENTSTORE_CLUSTER_SIZE=${number_of_nodes}
|
||||||
|
- EVENTSTORE_CLUSTER_DNS=eventstore
|
||||||
|
- EVENTSTORE_CLUSTER_GOSSIP_PORT=${internal_http_port}
|
||||||
|
- EVENTSTORE_INT_HTTP_PREFIXES=http://*:${internal_http_port}/
|
||||||
|
- EVENTSTORE_EXT_HTTP_PREFIXES=http://*:${external_http_port}/
|
||||||
|
- EVENTSTORE_INT_HTTP_PORT=${internal_http_port}
|
||||||
|
- EVENTSTORE_INT_TCP_PORT=${internal_tcp_port}
|
||||||
|
- EVENTSTORE_EXT_HTTP_PORT=${external_http_port}
|
||||||
|
- EVENTSTORE_EXT_TCP_PORT=${external_tcp_port}
|
||||||
|
|
||||||
|
ports:
|
||||||
|
- ${external_http_port}:${external_http_port}/tcp
|
||||||
|
- ${external_tcp_port}:${external_tcp_port}/tcp
|
||||||
|
|
||||||
|
|
||||||
|
# ==> Some debug commands :
|
||||||
|
|
||||||
|
# more /etc/eventstore/eventstore.conf
|
||||||
|
# more /var/log/eventstore/20*/*.log
|
||||||
|
# rm more /var/log/eventstore/20*/*.log
|
||||||
|
|
51
templates/eventstore/0/rancher-compose.yml
Normal file
51
templates/eventstore/0/rancher-compose.yml
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
version: '2'
|
||||||
|
.catalog:
|
||||||
|
name: GES
|
||||||
|
version: 0.0.2.0-ges
|
||||||
|
description: |
|
||||||
|
(Experimental) GES
|
||||||
|
minimum_rancher_version: v0.59.0
|
||||||
|
maintainer: "Jérôme Rx <jerome@rouaix.eu>"
|
||||||
|
uuid: ges-0
|
||||||
|
questions:
|
||||||
|
- variable: "internal_http_port"
|
||||||
|
label: "Internal http (and gossip) port"
|
||||||
|
required: true
|
||||||
|
default: 2112
|
||||||
|
type: "int"
|
||||||
|
- variable: "internal_tcp_port"
|
||||||
|
label: "Internal tcp port"
|
||||||
|
required: true
|
||||||
|
default: 1112
|
||||||
|
type: "int"
|
||||||
|
- variable: "external_http_port"
|
||||||
|
label: "External http port"
|
||||||
|
required: true
|
||||||
|
default: 2113
|
||||||
|
type: "int"
|
||||||
|
- variable: "external_tcp_port"
|
||||||
|
label: "External tcp port"
|
||||||
|
required: true
|
||||||
|
default: 1113
|
||||||
|
type: "int"
|
||||||
|
- variable: "number_of_nodes"
|
||||||
|
label: "Number of nodes"
|
||||||
|
required: true
|
||||||
|
default: 1
|
||||||
|
type: "int"
|
||||||
|
|
||||||
|
services:
|
||||||
|
eventstore:
|
||||||
|
scale: ${number_of_nodes}
|
||||||
|
start_on_create: true
|
||||||
|
health_check:
|
||||||
|
port: ${external_http_port}
|
||||||
|
request_line: OPTIONS /gossip HTTP/1.0
|
||||||
|
interval: 2000
|
||||||
|
initializing_timeout: 60000
|
||||||
|
reinitializing_timeout: 60000
|
||||||
|
unhealthy_threshold: 3
|
||||||
|
strategy: none
|
||||||
|
healthy_threshold: 2
|
||||||
|
response_timeout: 2000
|
||||||
|
|
BIN
templates/eventstore/catalogIcon-eventstore.png
Normal file
BIN
templates/eventstore/catalogIcon-eventstore.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
5
templates/eventstore/config.yml
Normal file
5
templates/eventstore/config.yml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
name: EventStore Cluster
|
||||||
|
description: |
|
||||||
|
EventStore Cluster
|
||||||
|
version: 0.0.2.0-ges
|
||||||
|
category: Database
|
Loading…
x
Reference in New Issue
Block a user