diff --git a/templates/eventstore/0/README.md b/templates/eventstore/0/README.md new file mode 100644 index 0000000..0104d27 --- /dev/null +++ b/templates/eventstore/0/README.md @@ -0,0 +1,13 @@ +# Event Store cluster in rancher + + +### Info: + +This template creates an eventstore cluter of 3 containers. +Those nodes are made reachable by a load balancer container. +Http & Tcp external ports exposed by the load balancer can be configured. + + +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..0f92d65 --- /dev/null +++ b/templates/eventstore/0/docker-compose.yml @@ -0,0 +1,26 @@ +version: '2' +services: + eventstore: + image: eventstore/eventstore + entrypoint: /bin/bash + command: ['-c', 'grep -q -F "IntIpAdvertiseAs: $$(hostname --ip-address)" /etc/eventstore/eventstore.conf || echo "IntIpAdvertiseAs: $$(hostname --ip-address)" >> /etc/eventstore/eventstore.conf && grep -q -F "ExtIpAdvertiseAs: $$(hostname --ip-address)" /etc/eventstore/eventstore.conf || echo "ExtIpAdvertiseAs: $$(hostname --ip-address)" >> /etc/eventstore/eventstore.conf && /entrypoint.sh'] + environment: + - EVENTSTORE_CLUSTER_SIZE=3 + - EVENTSTORE_CLUSTER_DNS=eventstore + - EVENTSTORE_CLUSTER_GOSSIP_PORT=2112 + + eventstore-lb: + image: rancher/lb-service-haproxy:v0.5.9 + ports: + - ${load_balancer_external_http_port}:2113/tcp + - ${load_balancer_external_tcp_port}:1113/tcp + labels: + io.rancher.container.agent.role: environmentAdmin + io.rancher.container.create_agent: 'true' + io.rancher.scheduler.global: 'true' + + +#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..d99bc1d --- /dev/null +++ b/templates/eventstore/0/rancher-compose.yml @@ -0,0 +1,53 @@ +version: '2' +.catalog: + name: GES + version: 0.0.1.0-ges + description: | + (Experimental) GES Cluster. + minimum_rancher_version: v0.59.0 + maintainer: "Jérôme Rx " + uuid: ges-0 + questions: + - variable: "load_balancer_external_http_port" + description: "External load balancer http port" + label: "LB http port" + required: true + default: 2113 + type: "int" + - variable: "load_balancer_external_tcp_port" + description: "External load balancer tcp port" + label: "LB tcp port" + required: true + default: 1113 + type: "int" + +services: + eventstore: + scale: 3 + start_on_create: true + eventstore-lb: + start_on_create: true + lb_config: + certs: [] + port_rules: + - hostname: '' + path: '' + priority: 1 + protocol: http + service: eventstore + source_port: 2113 + target_port: 2113 + - hostname: '' + path: '' + priority: 2 + protocol: tcp + service: eventstore + source_port: 1113 + target_port: 1113 + health_check: + response_timeout: 2000 + healthy_threshold: 2 + port: 42 + unhealthy_threshold: 3 + interval: 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..1b07bc8 --- /dev/null +++ b/templates/eventstore/config.yml @@ -0,0 +1,5 @@ +name: EventStore Cluster +description: | + EventStore Cluster +version: 0.0.1.0-ges +category: Database