Upgrade zookeeper and traefik packages (#185)

* Upgrade zookeeper to version 3.4.8

* Updated traefik version to v1.0.0. Added new features: ssl, multidomain, import key/cert from metadata, run as traefik user.

* Upgrade kafka to version 0.10.0

* Updated traefik version to v1.0.1. ssl key and crt set as required.

* Updated traefik version to v1.0.1. ssl working modes available.
This commit is contained in:
Raúl Sánchez
2016-07-26 18:37:38 +02:00
committed by Bill Maxwell
parent 2881ae2839
commit e8f86f188b
14 changed files with 454 additions and 7 deletions
+4 -1
View File
@@ -1,7 +1,9 @@
traefik:
ports:
- ${admin_port}:${admin_port}/tcp
- ${http_port}:${http_port}/tcp
- ${https_port}:${https_port}/tcp
log_driver: ''
labels:
io.rancher.scheduler.global: 'true'
@@ -11,9 +13,10 @@ traefik:
io.rancher.container.hostname_override: container_name
tty: true
log_opt: {}
image: rawmind/alpine-traefik:1.0.0-beta.555-6
image: rawmind/alpine-traefik:1.0.0-beta.771
environment:
- TRAEFIK_HTTP_PORT=${http_port}
- TRAEFIK_HTTPS_PORT=${https_port}
- TRAEFIK_ADMIN_PORT=${admin_port}
- CONF_INTERVAL=${refresh_interval}
volumes_from:
+14 -1
View File
@@ -13,20 +13,33 @@
required: true
default: 8080
type: "int"
- variable: "https_port"
description: "Traefik https public port to listen."
label: "Https port:"
required: true
default: 8443
type: "int"
- variable: "admin_port"
description: "Traefik admin public port to listen."
label: "Admin port:"
required: true
default: 8000
type: "string"
type: "int"
- variable: "refresh_interval"
description: "Interval to poll/apply configuration changes."
label: "Refresh Interval (s):"
required: true
default: 60
type: "int"
- variable: "ssl_cert"
description: "SSL certificate"
label: "SSL certificate:"
required: false
default: ""
type: "certificate"
traefik:
retain_ip: true
default_cert: ${ssl_cert}
health_check:
port: ${admin_port}
interval: 5000
+47
View File
@@ -0,0 +1,47 @@
# Traefik active load balancer (Experimental)
### Info:
This template deploys traefik active load balancers on top of Rancher. The configuration is generated and updated with confd from Rancher metadata.
It would be deployed in hosts with label traefik_lb=true.
### Config:
- host_label = "traefik_lb=true" # Host label where to run traefik service.
- http_port = 8080 # Port exposed to get access to the published services.
- https_port = 8443 # Port exposed to get secured access to the published services.
- admin_port = 8000 # Port exposed to get admin access to the traefik service.
- https_enable = <false | true | only>
- false: Enable http enpoints and disable https ones.
- true: Enable http and https endpoints.
- only: Disable http endpoints and enable https ones.
- ssl_key # Paste your ssl key. Defaul value a test one
- ssl_crt # Paste your ssl crt. Defaul value a test one
- refresh_interval = 60s # Interval to refresh traefik rules.toml from rancher-metadata.
### Service configuration labels:
Traefik labels has to be added in your services, in order to get included in traefik dynamic config.
- traefik.enable = <true | false>
- true: the service will be published as *service_name.stack_name.traefik_domain*
- stack: the service will be published as *stack_name.domain*. WARNING: You can have collisions inside services within yout stack
- false: the service will not be published
- traefik.domain = < domain names to route rule. Multiple values separated by "," >
- traefik.port = < port to expose throught traefik >
### Usage:
Select Traefik from catalog.
Set the params.
Click deploy.
Services will be accessed throught hosts whith traefik_lb=true at:
- http://${service_name}.${stack_name}.${traefik.domain}:${http_port}
- https://${service_name}.${stack_name}.${traefik.domain}:${https_port}
or
- http://${stack_name}.${traefik.domain}:${http_port}
- https://${stack_name}.${traefik.domain}:${https_port}
+32
View File
@@ -0,0 +1,32 @@
traefik:
ports:
- ${admin_port}:8000/tcp
- ${http_port}:8080/tcp
- ${https_port}:8443/tcp
log_driver: ''
labels:
io.rancher.scheduler.global: 'true'
io.rancher.scheduler.affinity:host_label: ${host_label}
io.rancher.scheduler.affinity:container_label_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name}
io.rancher.sidekicks: traefik-conf
io.rancher.container.hostname_override: container_name
tty: true
log_opt: {}
image: rawmind/alpine-traefik:1.0.1-1
environment:
- CONF_INTERVAL=${refresh_interval}
- TRAEFIK_HTTPS_ENABLE=${https_enable}
volumes_from:
- traefik-conf
traefik-conf:
log_driver: ''
labels:
io.rancher.scheduler.global: 'true'
io.rancher.scheduler.affinity:host_label: ${host_label}
io.rancher.scheduler.affinity:container_label_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name}
io.rancher.container.start_once: 'true'
tty: true
log_opt: {}
image: rawmind/rancher-traefik:0.3.4
net: none
+77
View File
@@ -0,0 +1,77 @@
.catalog:
name: traefik
version: v1.0.1-rancher1
description: |
(Experimental) Traefik load balancer.
minimum_rancher_version: v0.59.0
maintainer: "Raul Sanchez <rawmind@gmail.com>"
uuid: traefik-0
questions:
- variable: "host_label"
description: "Host label where to run traefik service."
label: "Host label:"
required: true
default: "traefik_lb=true"
type: "string"
- variable: "http_port"
description: "Traefik http public port to listen."
label: "Http port:"
required: true
default: 8080
type: "int"
- variable: "https_port"
description: "Traefik https public port to listen."
label: "Https port:"
required: true
default: 8443
type: "int"
- variable: "admin_port"
description: "Traefik admin public port to listen."
label: "Admin port:"
required: true
default: 8000
type: "int"
- variable: "https_enable"
label: "Enable HTTPS:"
description: |
Enable https working mode. If you activate, you need to fill SSL key and SSL crt in order to work.
default: false
required: true
type: enum
options:
- false
- true
- only
- variable: "ssl_key"
description: "SSL key to secure the service"
label: "SSL key"
type: "multiline"
required: false
default: ""
- variable: "ssl_crt"
description: "SSL cert to secure the service"
label: "SSL crt"
type: "multiline"
required: false
default: ""
- variable: "refresh_interval"
description: "Interval to poll/apply configuration changes."
label: "Refresh Interval (s):"
required: true
default: 60
type: "int"
traefik:
retain_ip: true
health_check:
port: 8000
interval: 5000
unhealthy_threshold: 3
request_line: 'GET /dashboard/# HTTP/1.0'
healthy_threshold: 2
response_timeout: 5000
metadata:
traefik:
ssl_key: |
${ssl_key}
ssl_crt: |
${ssl_crt}
+1 -1
View File
@@ -1,7 +1,7 @@
name: Traefik
description: |
(Experimental) Traefik active load balancer
version: v1.0.0-beta.555-rancher1
version: v1.0.1-rancher1
category: Load Balancing
maintainer: "Raul Sanchez <rawmind@gmail.com>"
minimum_rancher_version: v0.59.0