Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docker-compose file to work with ES #933

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ matrix:
- go: "1.10"
env:
- CROSSDOCK=true
- JAEGER_STORAGE_BACKEND=cassandra
- go: "1.10"
env:
- CROSSDOCK=true
- JAEGER_STORAGE_BACKEND=elasticsearch
- go: "1.10"
env:
- DOCKER=true
Expand Down
12 changes: 7 additions & 5 deletions crossdock/rules.mk
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
XDOCK_YAML=crossdock/docker-compose.yml
JAEGER_COMPOSE_YAML=docker-compose/jaeger-docker-compose.yml
JAEGER_STORAGE_BACKEND?=cassandra
JAEGER_COMPOSE_YAML=docker-compose/jaeger-docker-compose-$(JAEGER_STORAGE_BACKEND).yml

.PHONY: crossdock
crossdock:
crossdock: $(JAEGER_COMPOSE_YAML) $(XDOCK_YAML)
docker-compose -f $(JAEGER_COMPOSE_YAML) -f $(XDOCK_YAML) kill
docker-compose -f $(JAEGER_COMPOSE_YAML) -f $(XDOCK_YAML) rm -f test_driver
docker-compose -f $(JAEGER_COMPOSE_YAML) up -d $(JAEGER_STORAGE_BACKEND)
sleep 2
docker-compose -f $(JAEGER_COMPOSE_YAML) -f $(XDOCK_YAML) run crossdock 2>&1 | tee run-crossdock.log
grep 'Tests passed!' run-crossdock.log

.PHONE: crossdock-logs
crossdock-logs:
crossdock-logs: $(JAEGER_COMPOSE_YAML) $(XDOCK_YAML)
docker-compose -f $(JAEGER_COMPOSE_YAML) -f $(XDOCK_YAML) logs

.PHONE: crossdock-clean
crossdock-clean:
crossdock-clean: $(JAEGER_COMPOSE_YAML) $(XDOCK_YAML)
docker-compose -f $(JAEGER_COMPOSE_YAML) -f $(XDOCK_YAML) down

60 changes: 60 additions & 0 deletions docker-compose/jaeger-docker-compose-elasticsearch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
version: '2'

# Run elasticsearch first and wait a few seconds:
# docker-compose up -d elasticsearch
# This step is required to satisfy health check.
services:
jaeger-collector:
image: jaegertracing/jaeger-collector:1.6.0
command: ["--es.server-urls=http://elasticsearch:9200", "--es.num-shards=1", "--es.num-replicas=0"]
ports:
- "14269"
- "14268:14268"
- "14267"
- "9411:9411"
environment:
- SPAN_STORAGE_TYPE=elasticsearch
restart: on-failure
depends_on:
- elasticsearch

jaeger-query:
image: jaegertracing/jaeger-query:1.6.0
command: ["--es.server-urls=http://elasticsearch:9200", "--span-storage.type=elasticsearch"]
environment:
- SPAN_STORAGE_TYPE=elasticsearch
ports:
- "16686:16686"
- "16687"
restart: on-failure
depends_on:
- elasticsearch

jaeger-agent:
image: jaegertracing/jaeger-agent:1.6.0
command: ["--collector.host-port=jaeger-collector:14267"]
ports:
- "5775:5775/udp"
- "6831:6831/udp"
- "6832:6832/udp"
- "5778:5778"
restart: on-failure
environment:
- SPAN_STORAGE_TYPE=elasticsearch
depends_on:
- jaeger-collector

elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:5.4.0
ports:
- "127.0.0.1:9200:9200"
- "127.0.0.1:9300:9300"
restart: on-failure
environment:
- discovery.type=single-node
- network.host=0.0.0.0
- transport.host=127.0.0.1
# Set the minimum and maximum heap size to 1 GB.
# https://www.elastic.co/guide/en/elasticsearch/reference/5.4/heap-size.html
- "ES_JAVA_OPTS=-Xms1g -Xmx1g"
- xpack.security.enabled=false