Skip to content

AVENTER-UG/traefik-mesos

Repository files navigation

Traefik Provider for Apache Mesos

Issues Chat Docker Pulls

These provider will add the functionality to use traefik with Apache Mesos.

Issues

To open an issue, please use this place: https://github.com/m3scluster/traefik-mesos/issues

How to use the docker image?

docker run -p 80:80 -p 443:433 -p 9000:9000 -v <config_toml_directory>:/data:rw avhost/traefik_mesos:latest

How to add the Mesos Provider

Edit your traefik.toml and include these configuration:

[providers.mesos]
endpoint = "<your_mesos_master>"
principal = "<mesos_username>"
secret = "<mesos_password>"
SSL = true

Supported provider parameters

Parameter default value Description
Endpoint 127.0.0.1:5050 Mesos server endpoint. You can also specify multiple endpoint for Mesos
SSL false Enable Endpoint SSL
Principal Principal to authorize agains Mesos Manager
Secret Secret authorize agains Mesos Manager
PollInterval 10s Polling interval for endpoint
PollTimeout 10s Polling timeout for endpoint
ForceUpdateInterval 10m Intervall to force an update

How to add Traefik routes and services?

To tell traefik how it should handle the mesos tasks, we have to use traefik labels. As example:

    "traefik.enable": "true",
    "traefik.http.routers.homepage-ssl.tls": "true",
    "traefik.http.routers.homepage.entrypoints": "web",

    # The service object with the name "homepage-web" and "homepage-web-ssl" 
    # will be generated from the name of the Mesos Task (or Marathon) PortMapping object.
    "traefik.http.routers.homepage-ssl.service": "homepage-web-ssl",
    "traefik.http.routers.homepage.service": "homepage-web",

    "traefik.http.middlewares.homepage.redirectscheme.scheme": "https",
    "traefik.http.routers.homepage.rule": "Host(`your.example.com`)",
    "traefik.http.routers.homepage-ssl.rule": "Host(`your.example.com`)",
    "traefik.http.routers.homepage-ssl.entrypoints": "websecure"

Traefik

Special provider features

Dynamic Names

All "mesos_taskid" strings in the labels (key and value) will be replaced by the unique Mesos TaskID. All "mesos_portname" string in the labels (key and value) will be replace by the service name (without portnumber).

Doku and links to the official traefik

Build Status SemaphoreCI Docs Go Report Card License Join the community support forum at https://community.traefik.io/ Twitter

Traefik (pronounced traffic) is a modern HTTP reverse proxy and load balancer that makes deploying microservices easy. Traefik integrates with your existing infrastructure components (Docker, Swarm mode, Kubernetes, Marathon, Consul, Etcd, Rancher, Amazon ECS, ...) and configures itself automatically and dynamically. Pointing Traefik at your orchestrator should be the only configuration step you need.