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

added a docker-compose file to the main repo, and an explanation regarding its usage to the docs #306

Closed
wants to merge 1 commit 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
73 changes: 73 additions & 0 deletions cmd/jaeger-stack/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
version: '2'
services:
cassandra:
image: cassandra:3.11
networks:
- jaeger
ports:
- "7000:7000"
- "7001:7001"
- "7199:7199"
- "9042:9042"
- "9160:9160"
restart: unless-stopped
volumes:
- cassandra-data:/var/lib/cassandra
- cassandra-logs:/var/log/cassandra
logging:
options:
max-size: 5m
environment:
MAX_HEAP_SIZE: 512M
HEAP_NEWSIZE: 100M
CASSANDRA_CLUSTER_NAME: "jaeger"
CASSANDRA_DC: "dc1"
CASSANDRA_RACK: "rack1"
CASSANDRA_ENDPOINT_SNITCH: "GossipingPropertyFileSnitch"
CASSANDRA_START_RPC: "true"
cassandra-scheme:
image: jaegertracing/jaeger-cassandra-schema:0.5
networks:
- jaeger
depends_on:
- cassandra
jaeger-collector:
image: jaegertracing/jaeger-collector:0.5
networks:
- jaeger
ports:
- "14267:14267"
- "14268:14268"
depends_on:
- cassandra-scheme
restart: unless-stopped
command: /go/bin/collector-linux -cassandra.servers=cassandra -cassandra.keyspace=jaeger_v1_dc1 -cassandra.connections-per-host 2
jaeger-agent:
image: jaegertracing/jaeger-agent:0.5
Copy link
Member

@yurishkuro yurishkuro Aug 3, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

given that "compose" is unlikely to be used for production, perhaps latest image would be better here?

@pavolloffay but even with latest I don't think this can be used as a base for crossdock test since the crossdock should build the images from the current source code.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could simply override image configuration https://docs.docker.com/compose/extends/#adding-and-overriding-configuration.

Or crossdock target could compile images, and run the compose.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

think it could be altered to do a live build, https://docs.docker.com/compose/compose-file/compose-file-v2/#build for the image on the test infrastructure, but i'm not 100% aware of all build prerequisites for the jaeger components to build. For the purpose of handing it over to people who are interested in trying out the setup with all components (not the standalone way), i'd rather vote for fixed versions, but that would indeed be followed by regular updates. Given the test run properly, than "latest" wouldn't be an issue. But that's a bit out of scope for me. So probably two docker files? Or even more? There is a stack up and coming with ES, and most likely you won't have the agent on the collectors Infrastructure neither. So probably the jagertracing org would indeed be a better fit.

For production environments i'll soon setup a rancher catalog and add it to the rancher repo anyways.

networks:
- jaeger
ports:
- "5775:5775/udp"
- "5778:5778"
- "6831:6831/udp"
- "6832:6832/udp"
depends_on:
- cassandra-scheme
restart: unless-stopped
command: /go/bin/agent-linux -collector.host-port=jaeger-collector:14267
jaeger-query:
image: jaegertracing/jaeger-query:0.5
networks:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this network required?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, you need to name the network even if its configuration is basically an empty object. you could configure some stuff here, but we don't need anything beside the defaults. So we are just creating the network with the name we are using above.

Copy link
Author

@de-robat de-robat Aug 3, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you probably noticed my comment is intended to be for line 69 :) The correct answer for this line is: the query joins the network to reach the cassandra db as it will inject the name resolving for -cassandra.servers=cassandra

- jaeger
ports:
- "16686:16686"
depends_on:
- cassandra-scheme
restart: unless-stopped
command: /go/bin/query-linux -cassandra.servers=cassandra -cassandra.keyspace=jaeger_v1_dc1 --query.static-files=/go/jaeger-ui/
networks:
jaeger: #defaultnetwork
volumes:
cassandra-data: {}
cassandra-logs: {}

2 changes: 2 additions & 0 deletions docs/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ There are orchestration templates for running Jaeger with:
* Kubernetes: [github.com/jaegertracing/jaeger-kubernetes](https://github.com/jaegertracing/jaeger-kubernetes),
* OpenShift: [github.com/jaegertracing/jaeger-openshift](https://github.com/jaegertracing/jaeger-openshift).

As well as a [docker-compose.yml](./../cmd/jaeger-stack) for your convenience to start up the whole stack including the query interface, a Cassandra database, an agent and the collector on one machine. The compose-file will kick start the database (Cassandra) and a container that establishes the database-structure as soon as Cassandra is available. After Cassandras successful configuration, the collector and the query interface will become stable as well (while the schema setup is in progress you may see the collector and the query restart until eventually all their needs are satisfied).

## Agent

Jaeger client libraries expect **jaeger-agent** process to run locally on each host.
Expand Down