diff --git a/templates/eventstore/0/README.md b/templates/eventstore/0/README.md new file mode 100644 index 0000000..014f310 --- /dev/null +++ b/templates/eventstore/0/README.md @@ -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. + diff --git a/templates/eventstore/0/docker-compose.yml b/templates/eventstore/0/docker-compose.yml new file mode 100644 index 0000000..eb917dd --- /dev/null +++ b/templates/eventstore/0/docker-compose.yml @@ -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 + diff --git a/templates/eventstore/0/rancher-compose.yml b/templates/eventstore/0/rancher-compose.yml new file mode 100644 index 0000000..482d6c7 --- /dev/null +++ b/templates/eventstore/0/rancher-compose.yml @@ -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 " + 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 + diff --git a/templates/eventstore/catalogIcon-eventstore.png b/templates/eventstore/catalogIcon-eventstore.png new file mode 100644 index 0000000..fb33758 Binary files /dev/null and b/templates/eventstore/catalogIcon-eventstore.png differ diff --git a/templates/eventstore/config.yml b/templates/eventstore/config.yml new file mode 100644 index 0000000..b3eb1be --- /dev/null +++ b/templates/eventstore/config.yml @@ -0,0 +1,5 @@ +name: EventStore Cluster +description: | + EventStore Cluster +version: 0.0.2.0-ges +category: Database