From 693bd7e1102c4f578a33b02f4748d10d73ddce87 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Doumenjou Date: Fri, 19 Jul 2019 09:24:04 +0200 Subject: [PATCH] Add a basic Traefik install guide --- .../getting-started/install-traefik.md | 70 +++++++++++++++++++ docs/mkdocs.yml | 1 + 2 files changed, 71 insertions(+) create mode 100644 docs/content/getting-started/install-traefik.md diff --git a/docs/content/getting-started/install-traefik.md b/docs/content/getting-started/install-traefik.md new file mode 100644 index 000000000..b468bc6d0 --- /dev/null +++ b/docs/content/getting-started/install-traefik.md @@ -0,0 +1,70 @@ +# Install Traefik + +You can install Traefik with the following flavors: + +* [Use the official Docker image](./#use-the-official-docker-image) +* [Use the binary distribution](./#use-the-binary-distribution) +* [Compile your binary from the sources](./#compile-your-binary-from-the-sources) + +## Use the Official Docker Image + +Choose one of the [official Docker images](https://hub.docker.com/_/traefik) and run it with the [sample configuration file](https://raw.githubusercontent.com/containous/traefik/master/traefik.sample.toml): + +```shell +docker run -d -p 8080:8080 -p 80:80 \ + -v $PWD/traefik.toml:/etc/traefik/traefik.toml traefik:v2.0 +``` + +For more details, go to the [Docker provider documentation](../providers/docker.md) + +!!! tip + + * Prefer a fixed version than the latest that could be an unexpected version. + ex: `traefik:v2.0.0` + * Docker images comes in 2 flavors: scratch based or alpine based. + * All the orchestrator using docker images could fetch the official Traefik docker image. + +## Use the Binary Distribution + +Grab the latest binary from the [releases](https://github.com/containous/traefik/releases) page. + +??? tip "Check the integrity of the downloaded file" + + ```bash tab="Linux" + # Compare this value to the one found in traefik-${traefik_version}_checksums.txt + sha256sum ./traefik_${traefik_version}_linux_${arch}.tar.gz + ``` + + ```bash tab="macOS" + # Compare this value to the one found in traefik-${traefik_version}_checksums.txt + shasum -a256 ./traefik_${traefik_version}_darwin_amd64.tar.gz + ``` + + ```powershell tab="Windows PowerShell" + # Compare this value to the one found in traefik-${traefik_version}_checksums.txt + Get-FileHash ./traefik_${traefik_version}_windows_${arch}.zip -Algorithm SHA256 + ``` + +??? tip "Extract the downloaded archive" + + ```bash tab="Linux" + tar -zxvf traefik_${traefik_version}_linux_${arch}.tar.gz + ``` + + ```bash tab="macOS" + tar -zxvf ./traefik_${traefik_version}_darwin_amd64.tar.gz + ``` + + ```powershell tab="Windows PowerShell" + Expand-Archive traefik_${traefik_version}_windows_${arch}.zip + ``` + +And run it: + +```bash +./traefik --help +``` + +## Compile your Binary from the Sources + +All the details are available in the [Contributing Guide](../contributing/building-testing.md) diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index 3ed6b287d..a0426176b 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -71,6 +71,7 @@ nav: - 'Concepts' : 'getting-started/concepts.md' - 'Quick Start': 'getting-started/quick-start.md' - 'Configuration Introduction': 'getting-started/configuration-overview.md' + - 'Install Traefik': 'getting-started/install-traefik.md' - 'Configuration Discovery': - 'Overview': 'providers/overview.md' - 'Docker': 'providers/docker.md'