-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #590 from Capgemini/573-traefik
#573 - traefik - replacement for haproxy and registrator
- Loading branch information
Showing
40 changed files
with
214 additions
and
397 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,12 @@ | ||
--- | ||
# handlers file for consul | ||
# @todo - handle restarts properly (choose one approach here) | ||
- name: restart consul | ||
service: | ||
name: consul | ||
state: restarted | ||
sudo: yes | ||
notify: | ||
- wait for consul to listen | ||
|
||
- name: wait for consul to listen | ||
wait_for: | ||
host: "{{ consul_bind_addr }}" | ||
port: 8500 | ||
|
||
- name: restart consul systemd | ||
- name: restart consul | ||
sudo: yes | ||
command: systemctl restart consul | ||
notify: | ||
- wait for consul to listen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
[Unit] | ||
Description=Dnsmasq | ||
PartOf=consul.service | ||
Requires=docker.service | ||
After=consul.service | ||
After=docker.service | ||
|
||
[Service] | ||
EnvironmentFile=/etc/environment | ||
Restart=on-failure | ||
ExecStartPre=/usr/bin/mkdir -p /etc/systemd/resolved.conf.d | ||
ExecStartPre=-/bin/sh -c 'rm /etc/systemd/resolved.conf.d/00-consul-dns.conf && systemctl restart systemd-resolved' | ||
ExecStartPre=-/usr/bin/docker kill dnsmasq | ||
ExecStartPre=-/usr/bin/docker rm dnsmasq | ||
ExecStartPre=/usr/bin/docker pull andyshinn/dnsmasq | ||
ExecStart=/bin/sh -c '/usr/bin/docker run --rm \ | ||
--name dnsmasq \ | ||
--net=host \ | ||
--cap-add=NET_ADMIN \ | ||
--env SERVICE_IGNORE=true \ | ||
andyshinn/dnsmasq -S /consul/${COREOS_PRIVATE_IPV4}#8600' | ||
|
||
ExecStartPost=/bin/sh -c '\ | ||
echo -e "[Resolve]\nDNS=${COREOS_PRIVATE_IPV4}" > /etc/systemd/resolved.conf.d/00-consul-dns.conf && \ | ||
systemctl restart systemd-resolved;' | ||
|
||
ExecStop=/usr/bin/docker stop dnsmasq | ||
ExecStopPost=/bin/sh -c 'rm /etc/systemd/resolved.conf.d/00-consul-dns.conf && systemctl restart systemd-resolved' | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
- name: reload systemd | ||
sudo: yes | ||
command: systemctl daemon-reload | ||
|
||
- name: restart consul | ||
service: | ||
name: consul | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.