Slide 1

Slide 1 text

Deploying Elasticsearch on Docker with Weave Ilya Dmitrichenko @weaveworks

Slide 2

Slide 2 text

Docker is great! • Highly portable delivery framework • Fuelling CI/CD/DevOps with • tight and transparent dependency packaging • good isolation, without virtualisation overhead • easy to setup, manage and automate

Slide 3

Slide 3 text

Ok, I want Docker! • I surely want to use Docker for next-gen microservices architecture, it looks just right. • I also see many other great tools that are related, e.g.: • Kubernetes/Mesos/Marathon/Swarm • Terraform/Brooklyn/fleet/Machine • etcd/Consul/Zookeeper • OK, may be I should start with something basic

Slide 4

Slide 4 text

Can I run Elasticsearch on Docker out-of-the-box? • Yes, there is an official image: > docker run -d elasticsearch

Slide 5

Slide 5 text

…and what about clustering? • I don’t see how to do it with the official image, but there seems to be another one by @itgz > docker run -d \ -p 9200:9200 -p 9300:9300 itzg/elasticsearch > docker run -d \ -p 9200:9201 -p 9300:9301 itzg/elasticsearch > docker run -d \ -p 9200:9202 -p 9300:9302 itzg/elasticsearch • That’s not “official”, right?

Slide 6

Slide 6 text

I am still not sure how clustering will work ;’( • What are `-p 9200:9201 -p 9300:9301`? • How do I run the instances on different hosts? • Which port should my client use? • What is the “ambassador patter”? • May be I need a kind of orchestrator tool?

Slide 7

Slide 7 text

I found a few examples of what others did… • Mesos + HAProxy + Marathon + Ansible • This one uses Ubuntu in EC2 and I really should be using RedHat in Azure, I am also not sure about switching to Ansible from Puppet, and still need to learn more about all the Mesos stuff… • CoreOS + fleet + etcd • I like the idea of CoreOS, but not sure if my boss likes it and, it still looks a bit complicated… • Kubernetes • Looks also interesting, but I am not sure we can introduce Kubernetes either… I just want to demo proof-of-concept next week

Slide 8

Slide 8 text

Introducing Weave • Easiest way to build portable Docker app clusters • You won't have to change your app • Lean service discovery which doesn't in your way • Simple to use on its own or with an orchestrator

Slide 9

Slide 9 text

Install Weave sudo curl -L git.io/weave \ -o /usr/local/bin/weave sudo chmod +x /usr/local/bin/weave weave launch \ -iprange \ weave launch-dns

Slide 10

Slide 10 text

Run Containers weave run --with-dns \ —h myapp.weave.local \ [docker_args] \ \ [app_args]

Slide 11

Slide 11 text

WeaveDNS rocks! > curl es-1.weave.local:9200/_cat/nodes es-1.weave.local 10.2.3.1 4 18 0.50 d * Shuma-Gorath es-3.weave.local 10.2.3.192 4 17 0.04 d m Frankie and Victoria es-2.weave.local 10.2.3.128 3 17 0.02 d m Lady Jacqueline Falsworth Crichton

Slide 12

Slide 12 text

WeaveDNS rocks! var es = new elasticsearch.Client({ hosts: [ 'es-1.weave.local:9200' , 'es-2.weave.local:9200' , 'es-3.weave.local:9200' ] });

Slide 13

Slide 13 text

Demo Let's go! Based on previous blog post: http://blog.weave.works/2015/01/20/elasticsearch-and-weave/

Slide 14

Slide 14 text

Other benefits • No host port mapping or NAT • Encryption on network layer • Multiple ES clusters on same hosts • Cross-datacenter connectivity • Multicast works anywhere

Slide 15

Slide 15 text

New features • distributed IP address allocator (out today) • native Docker plugin • fast in-kernel data path

Slide 16

Slide 16 text

Container visibility • Weave Scope automatically generates a map of your containers, enabling you to intuitively understand, monitor, and control your applications. • weave.works/scope

Slide 17

Slide 17 text

Questions?