added traefik catalog package

This commit is contained in:
Raul Sanchez
2016-05-09 20:21:42 +02:00
parent 19c33d9bb3
commit ee8090e0f9
5 changed files with 449 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
# 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:
- http_port = 8080 # Port exposed to get access to the published services.
- admin_port = 8000 # Port exposed to get admin access to the traefik service.
- 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>
- traefik.domain = < domainname to route rule >
- traefik.port = < port to expose throught traefik >
### Usage:
Select Traefik from catalog.
Enter the http_port, admin_port and refresh_interval.
Click deploy.
Services will be accessed throught hosts whith traefik_lb=true at http://${service_name}.${service_name}.${traefik.domain}:${http_port}
+31
View File
@@ -0,0 +1,31 @@
traefik:
ports:
- ${admin_port}:${admin_port}/tcp
- ${http_port}:${http_port}/tcp
log_driver: ''
labels:
io.rancher.scheduler.global: 'true'
io.rancher.scheduler.affinity:host_label: traefik_lb=true
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.0-beta.555-6
environment:
- TRAEFIK_HTTP_PORT=${http_port}
- TRAEFIK_ADMIN_PORT=${admin_port}
- CONF_INTERVAL=${refresh_interval}
volumes_from:
- traefik-conf
traefik-conf:
log_driver: ''
labels:
io.rancher.scheduler.global: 'true'
io.rancher.scheduler.affinity:host_label: traefik_lb=true
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.0.1-10
net: none
+36
View File
@@ -0,0 +1,36 @@
.catalog:
name: Traefik
version: v1.0.0-beta.555-rancher1
description: |
(Experimental) Traefik active load balancer.
minimum_rancher_version: v0.59.0
maintainer: "Raul Sanchez <rawmind@gmail.com>"
uuid: traefik-0
questions:
- variable: "http_port"
description: "Traefik http public port to listen."
label: "Http port:"
required: true
default: 8080
type: "int"
- variable: "admin_port"
description: "Traefik admin public port to listen."
label: "Admin port:"
required: true
default: 8000
type: "string"
- 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: ${admin_port}
interval: 5000
unhealthy_threshold: 3
request_line: 'GET /dashboard/# HTTP/1.0'
healthy_threshold: 2
response_timeout: 5000