Skip to content

Commit

Permalink
EticaAI/aguia-pescadora#32 teste com kibatic.traefik
Browse files Browse the repository at this point in the history
  • Loading branch information
fititnt committed Jul 21, 2019
1 parent d755a29 commit 34c726e
Show file tree
Hide file tree
Showing 4 changed files with 190 additions and 7 deletions.
44 changes: 38 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
# aguia-pescadora-docker-ansible-playbook
Veja https://github.com/EticaAI/aguia-pescadora/issues/32
# aguia-pescadora-docker-ansible-playbook-poc (Prova de Conceito)
**[rascunho-publico] Veja https://github.com/EticaAI/aguia-pescadora/issues/32**

> _Nota: ainda que este repositório esteja público, **não use este playbook**.
Ele serve apenas como prova de conceito e provavelmente serviria apenas
para ver o que pode ou não ser aproveitado em outros repositórios
(fititnt, 2019-07-21 03:53 BRT)_

## Instalação

```bash
cp hosts.dist hosts

# Configure qual servidor quer fazer a instalação
# Configure qual servidor quer fazer a instalação no arquivo hosts
vi hosts

# Dependências
ansible-galaxy install nickjj.docker
ansible-galaxy install kibatic.traefik

# Execute o playbook
ansible-playbook -i hosts aguia-pescadora-docker.yml
```

Expand All @@ -20,10 +30,32 @@ ansible-playbook -i hosts aguia-pescadora-docker.yml

#### Roles usados pelo Ansible

O usa o [nickjj/ansible-docker](https://github.com/nickjj/ansible-docker).
(Testado com a versão v1.8.0 (2018-12-19) do nickjj/ansible-docker, porém
Dica: para opções mais avançadas **inclusive procedimento de atualizações e/ou
downgrade de versões** você pode olhar documentação específica dos
desenvolvedores dos roles do ansible.

##### nickjj.docker
O usa o [nickjj.docker](https://github.com/nickjj/ansible-docker).
(Testado com a versão v1.8.0 (2018-12-19) do nickjj.docker, porém
versões mais novas possivelmente devem permanecer funcionando).

```
Você pode instalar usando

```bash
ansible-galaxy install nickjj.docker
```

##### kibatic.traefik

O usa o Usa o [kibatic.traefik](https://github.com/kibatic/ansible-traefik).
(Testado com a versão v1.7.6 (2019-01-07) do kibatic.traefik, porém
versões mais novas possivelmente devem permanecer funcionando).

Você pode instalar usando

```bash
ansible-galaxy install kibatic.traefik
```

# Licença
Domínio Público
4 changes: 3 additions & 1 deletion aguia-pescadora-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@

roles:
- role: "nickjj.docker"
tags: ["docker"]
tags: ["docker"]
- role: "kibatic.traefik"
tags: ["traefik"]
1 change: 1 addition & 0 deletions group_vars/all.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
traefik_template: templates/traefik.toml
148 changes: 148 additions & 0 deletions templates/traefik.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
################################################################
#
# Configuration sample for Traefik v2
# For Traefik v1: https://github.com/containous/traefik/blob/v1.7/traefik.sample.toml
#
################################################################

################################################################
# Global configuration
################################################################
[global]
checkNewVersion = true
sendAnonymousUsage = true

################################################################
# Entrypoints configuration
################################################################

# Entrypoints definition
#
# Optional
# Default:
[entryPoints]
[entryPoints.web]
address = ":80"

################################################################
# Traefik logs configuration
################################################################

# Traefik logs
# Enabled by default and log to stdout
#
# Optional
#
[log]

# Log level
#
# Optional
# Default: "ERROR"
#
# level = "DEBUG"

# Sets the filepath for the traefik log. If not specified, stdout will be used.
# Intermediate directories are created if necessary.
#
# Optional
# Default: os.Stdout
#
# filePath = "log/traefik.log"

# Format is either "json" or "common".
#
# Optional
# Default: "common"
#
# format = "common"

################################################################
# Access logs configuration
################################################################

# Enable access logs
# By default it will write to stdout and produce logs in the textual
# Common Log Format (CLF), extended with additional fields.
#
# Optional
#
# [accessLog]

# Sets the file path for the access log. If not specified, stdout will be used.
# Intermediate directories are created if necessary.
#
# Optional
# Default: os.Stdout
#
# filePath = "/path/to/log/log.txt"

# Format is either "json" or "common".
#
# Optional
# Default: "common"
#
# format = "common"

################################################################
# API and dashboard configuration
################################################################

# Enable API and dashboard
[api]

# Name of the related entry point
#
# Optional
# Default: "traefik"
#
# entryPoint = "traefik"

# Enabled Dashboard
#
# Optional
# Default: true
#
# dashboard = false

################################################################
# Ping configuration
################################################################

# Enable ping
[ping]

# Name of the related entry point
#
# Optional
# Default: "traefik"
#
# entryPoint = "traefik"

################################################################
# Docker configuration backend
################################################################

# Enable Docker configuration backend
[providers.docker]

# Docker server endpoint. Can be a tcp or a unix socket endpoint.
#
# Required
# Default: "unix:///var/run/docker.sock"
#
# endpoint = "tcp://10.10.10.10:2375"

# Default host rule.
#
# Optional
# Default: ""
#
# DefaultRule = "Host(`{{ normalize .Name }}.docker.localhost`)"

# Expose containers by default in traefik
#
# Optional
# Default: true
#
# exposedByDefault = true

0 comments on commit 34c726e

Please sign in to comment.