12/28/2021

Setup Traefik

26

The following command will install Traefik in the traefik namespace and with the configuration you created above:: helm install traefik traefik/traefik -namespace=traefik -values=traefik-chart-values.yaml Make the Dashboard Accessible. In order to access the Traefik dashboard, you’ll first need to create an HTTP basic auth middleware. Dduportal October 11, 2019, 1:40pm #2. Chrisn: traefik.http.services.bookstack.loadbalancer.server.port=6875. Hi @chrisn, you have to set the 'load balancer' port to 80. This is related to the following configuration element of the bookstack service: ports: - 6875:80. Which means that the public port 6875 is NAT-ed to the private port 80. Set up a traefik container to manage traffic for Business Central containers. Description: Set up a traefik container to manage traffic for Business Central containers. Parameter PublicDnsName: The externally reachable FQDN of your Docker host. Parameter ContactEMailForLetsEncrypt: The eMail address to use when requesting an SSL cert from Let's.

Setup Traefik 2

What is more exciting than staring at graphs? Nothing right. If you just love some system metrics or want to display the temperature in your home over time, a time series database like InfluxDB combined with Grafana is the way to go!

This guide will show you an easy way to get both of these systems up in no time with the help of Traefik and Docker. If you already have a server with Traefik running then continue. Otherwise I recommend you read my previous post and you'll be back here soon.

Setup

Let's make a directory for your data to live in, as sudo if needed

Then we need an internal docker network for the services to communicate on

docker-compose.yml

We'll put our services in a docker-compose file to be able to easily manage things. We'll put the basics in first.

InfluxDB

There are a number of environment variables available for the image of which we'll use a few.

If you want to send data to Influx from the outside world you need to have a frontend in Traefik with the port and hostname, if not then remove the labels section. You can also remove - web under networks.

We also need a user with write access and a database to write to. For some nice system metrics I use telegraf so here we'll have the InfluxDB image create that database and user initially. If you want to use something else as input just change the values accordingly.

☝️ Remember to replaceexample.com in traefik.frontend.rule.

Grafana

Now let's add the Grafana service so that we have something to display our future stats with. First let's add a volume for persistent storage.

Setup Traefik

Then add this to docker-compose.yml between influxdb and networks.

☝️ Remember to replacegrafana.example.com in the 2 places above.

Grafana UI

Now you should be able to run the services!

If everything looks alright, open up your Grafana URL and you should be greeted with a login screen. Use admin and the password you set as GF_SECURITY_ADMIN_PASSWORD. After logging in click 'Add data source' and fill out the fields like this.

The hostname influx_influxdb_1 in the Url setting is from the docker network influx, since the services are in separate containers you can't use localhost here.

If you're getting error messages when saving/testing the data source and using Safari, try another browser.

Traefik

Getting some data in there

If you already have a way to send data to Influx, then you're done! If not then previously mentioned telegraf is just as easy to set up.

Here's a very simple conf just to get up and running. Feel free to use the default one for more options.

Setup Traefik Twitter

Setup traefik tool

Start the service and you'll have some data coming in.

Now go back to your Grafana instance and create some dashboards!

Portainer Setup Traefik

☝️ Telegraf sysstats by broferek

Setup Trafik Google

The End

If you noticed any factual errors, spelling mistakes (yes), best practises I'm not aware of or run into any trouble please comment below or hit me up on Twitter 🙌

  • Most Viewed News

    • How To Download Shows On Netflix On Mac
    • Microsoft Word Torrent Mac
    • Run Linux In Docker