Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Consul use case

Consul use case

Share about Hashicorp Consul in our group.

k.yanagimoto

April 04, 2019
Tweet

More Decks by k.yanagimoto

Other Decks in Technology

Transcript

  1. 7 Our use case consul agent consul agent { "service":

    { "name": "varnish" } } consul_service.json consul agent -data-dir=/consul/data -retry-join=consul.server.ip -client=0.0.0.0
  2. 8 Our use case consul agent consul agent consul template

    consul-template \ -template "squid.ctmpl:/etc/squid.conf:/etc/squid/sbin/squid -f /etc/squid.conf -k reconfigure"
  3. 9 Squid.ctmpl http_port 80 accel http_port 81 accel vport=80 {{

    range service "varnish" }} cache_peer {{ .Address }} parent 8080 0 carp proxy-only no-digest no-query no-netdb-exchange weight=100 originserver {{ end }} include /etc/squid/image_space_common.conf cache_access_log /var/log/squid/access_image_space.log access_log_format cache_log /var/log/squid/response_image_space.log responce_log_format cache_swap_log /var/log/squid/cache_swap_image_space.log pid_filename /var/run/squid_image.pid