Slide 1

Slide 1 text

Consul use case Apr 4, 2019 Koichi Yanagimoto EC Incubation Development Dept. Rakuten, Inc.

Slide 2

Slide 2 text

Today’s Topic Today’s topic

Slide 3

Slide 3 text

Who am I ? Koichi Yanagimoto @kyanagimoto Application Engineer Rakuten, Inc.

Slide 4

Slide 4 text

4 Consul? Service Discovery Service Segmentation Service Configuration

Slide 5

Slide 5 text

5 Consul?

Slide 6

Slide 6 text

6 Our use case

Slide 7

Slide 7 text

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

Slide 8

Slide 8 text

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"

Slide 9

Slide 9 text

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

Slide 10

Slide 10 text

10 Our use case Kubernetes

Slide 11

Slide 11 text

11 DEMO

Slide 12

Slide 12 text

No content