diff --git a/templates/consul/0/README.md b/templates/consul/0/README.md new file mode 100644 index 0000000..4459cea --- /dev/null +++ b/templates/consul/0/README.md @@ -0,0 +1,29 @@ +# Consul Cluster + + +### Info: + + This template creates 3 Consul nodes that uses RPC encryption with TLS and gossip encryption to secure connection between consul cluster nodes, configuration is generated with confd from Rancher metadata. + TLS is used to verify the authenticity of the servers and the clients using the verify_incoming and verify_outgoing options. + + The variables used in this template include: + +- Certificates and keys for Consul nodes. +- CA certificate. +- 16-bytes, Base64 encoded gossip encryption key. + + +The templates uses two Docker images one as the main image and the other one is the sidekick: + +- [consul](https://github.com/galal-hussein/consul-rancher). +- [consul-config](https://github.com/galal-hussein/consul-config). + +### Usage: + + Select Consul from catalog. + + Enter the certificates and keys for consul nodes, ca certificates, and the encryption key. + + Click deploy. + + The consul nodes will be bound to the Rancher managed network IPs. diff --git a/templates/consul/0/docker-compose.yml b/templates/consul/0/docker-compose.yml new file mode 100644 index 0000000..e727d53 --- /dev/null +++ b/templates/consul/0/docker-compose.yml @@ -0,0 +1,15 @@ +consul-conf: + image: husseingalal/consul-config + labels: + io.rancher.container.hostname_override: container_name + volumes_from: + - consul + net: "container:consul" +consul: + image: husseingalal/consul + labels: + io.rancher.sidekicks: consul-conf + volumes: + - /opt/rancher/ssl + - /opt/rancher/config + - /var/consul diff --git a/templates/consul/0/rancher-compose.yml b/templates/consul/0/rancher-compose.yml new file mode 100644 index 0000000..73a5330 --- /dev/null +++ b/templates/consul/0/rancher-compose.yml @@ -0,0 +1,56 @@ +.catalog: + name: "Consul" + description: "Secure Consul cluster" + version: "0.6-rancher1" + uuid: consul-0 + questions: + - variable: ca_crt + label: "CA certificate" + type: "multiline" + required: true + - variable: consul1_key + label: "First consul key" + type: "multiline" + required: true + - variable: consul1_crt + label: "First consul certificate" + type: "multiline" + required: true + - variable: consul2_key + label: "Second consul key" + type: "multiline" + required: true + - variable: consul2_crt + label: "Second consul certificate" + type: "multiline" + required: true + - variable: consul3_key + label: "Third consul key" + type: "multiline" + required: true + - variable: consul3_crt + label: "Third consul certificate" + type: "multiline" + required: true + - variable: gossip_key + label: "Communication gossip key" + type: "multiline" + required: true +consul: + scale: 3 + metadata: + ca.crt: | + ${ca_crt} + consul1.crt: | + ${consul1_crt} + consul1.key: | + ${consul1_key} + consul2.crt: | + ${consul2_crt} + consul2.key: | + ${consul2_key} + consul3.crt: | + ${consul3_crt} + consul3.key: | + ${consul3_key} + enc.key: "${gossip_key}" diff --git a/templates/consul/catalogIcon-consul.png b/templates/consul/catalogIcon-consul.png new file mode 100644 index 0000000..395b46f Binary files /dev/null and b/templates/consul/catalogIcon-consul.png differ diff --git a/templates/consul/config.yml b/templates/consul/config.yml new file mode 100644 index 0000000..6955566 --- /dev/null +++ b/templates/consul/config.yml @@ -0,0 +1,5 @@ +name: Consul Cluster +description: | + Consul cluster +version: 0.6-rancher1 +category: Clustering