Skip to content

Commit

Permalink
reordered storage,collector,agent,UI&Query services subtopics in
Browse files Browse the repository at this point in the history
docs/deployment.md

Changes made:
- replaced ElasticSearch to Elasticsearch
- updated example commands for better readibilty
- minor updates in docs/deployment.md

Closes: #472
Signed-off-by: Deepika Upadhyay <deepikaupadhyay01@gmail.com>
  • Loading branch information
ideepika committed Oct 21, 2017
1 parent 897831a commit 5109edc
Showing 1 changed file with 100 additions and 58 deletions.
158 changes: 100 additions & 58 deletions docs/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,96 @@ 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).

## Storage Backend

Collectors require a persistent storage backend. Cassandra 3.4+ (default) and Elasticsearch are
primary supported storage backends.

Collectors require a persistent storage backend. Cassandra 3.x (default) and Elasticsearch are the
primary supported storage backends. There is ongoing work to add support for MySQL and ScyllaDB.

### Cassandra

A script is provided to initialize Cassandra keyspace and schema
using Cassandra's interactive shell [`cqlsh`][cqlsh]

```sh
MODE=test sh ./plugin/storage/cassandra/schema/create.sh | cqlsh
```
or if you don't have the source code
```
docker run -e MODE=... jaegertracing/jaeger-cassandra-schema
```

For production deployment, pass `MODE=prod DATACENTER={datacenter}` arguments to the script,
where `{datacenter}` is the name used in the Cassandra configuration / network topology.

The script also allows overriding TTL, keyspace name, replication factor, etc.
Run the script without arguments to see the full list of recognized parameters.

### Elasticsearch

Elasticsearch does not require initialization other than
[installing and running Elasticsearch](https://www.elastic.co/downloads/elasticsearch).
Once it is running, pass the correct configuration values to the Jaeger collector and query service.

#### Shards and Replicas for Elasticsearch indices

For production deployment, pass `MODE=prod DATACENTER={datacenter}` arguments to the script,
where `{datacenter}` is the name used in the Cassandra configuration / network topology.

The script also allows overriding TTL, keyspace name, replication factor, etc.
Run the script without arguments to see the full list of recognized parameters.

### Elasticsearch

Elasticsearch does not require initialization other than
[installing and running Elasticsearch](https://www.elastic.co/downloads/elasticsearch).
Once it is running, pass the correct configuration values to the Jaeger collector and query service.

#### Shards and Replicas for Elasticsearch indices

Shards and replicas are some configuration values to take special attention to, because this is decided upon
index creation. [This article](https://qbox.io/blog/optimizing-elasticsearch-how-many-shards-per-index) goes into
more information about choosing how many shards should be chosen for optimization.

## Collectors

Many instances of **jaeger-collector** can be run in parallel.
Collectors require almost no configuration, except for the location of Cassandra cluster,
via `--cassandra.keyspace` and `--cassandra.servers` options, or the location of Elasticsearch cluster, via
`--es.server-urls`, depending on which storage is specified. To see all command line options run

```
go run ./cmd/collector/main.go -h
```

or, if you don't have the source code

```
docker run -it --rm jaegertracing/jaeger-collector /go/bin/collector-linux -h
```
Example:
```
docker run -it \
--rm \
--name jaeger-collector \
-p14267:14267 \
-p14268:14268 \
-e CASSANDRA_KEYSPACE=jaeger_v1_local \
-e CASSANDRA_SERVERS=cassandra \
--link cassandra:cassandra \
jaegertracing/jaeger-collector
```
At default settings the collector exposes the following ports:

Port | Protocol | Function
----- | ------- | ---
14267 | TChannel | used by **jaeger-agent** to send spans in jaeger.thrift format
14268 | HTTP | can accept spans directly from clients in jaeger.thrift format
9411 | HTTP | can accept Zipkin spans in JSON or Thrift (disabled by default)


## Agent

Jaeger client libraries expect **jaeger-agent** process to run locally on each host.
Expand All @@ -36,6 +126,7 @@ docker run \
-p6832:6832/udp \
-p5778:5778/tcp \
jaegertracing/jaeger-agent
/go/bin/agent-linux --collector.host-port=jaeger-collector.jaeger-infra.svc:14267
```

### Discovery System Integration
Expand All @@ -60,69 +151,20 @@ docker run \
In the future we will support different service discovery systems to dynamically load balance
across several collectors ([issue 213](https://github.com/uber/jaeger/issues/213)).

## Collectors

Many instances of **jaeger-collector** can be run in parallel.
Collectors require almost no configuration, except for the location of Cassandra cluster,
via `--cassandra.keyspace` and `--cassandra.servers` options, or the location of ElasticSearch cluster, via
`--es.server-urls`, depending on which storage is specified. To see all command line options run

```
go run ./cmd/collector/main.go -h
```

or, if you don't have the source code

```
docker run -it --rm jaegertracing/jaeger-collector /go/bin/collector-linux -h
```

At default settings the collector exposes the following ports:

Port | Protocol | Function
----- | ------- | ---
14267 | TChannel | used by **jaeger-agent** to send spans in jaeger.thrift format
14268 | HTTP | can accept spans directly from clients in jaeger.thrift format
9411 | HTTP | can accept Zipkin spans in JSON or Thrift (disabled by default)


## Storage Backend

Collectors require a persistent storage backend. Cassandra 3.x (default) and ElasticSearch are the
primary supported storage backends. There is ongoing work to add support for MySQL and ScyllaDB.

### Cassandra

A script is provided to initialize Cassandra keyspace and schema
using Cassandra's interactive shell [`cqlsh`][cqlsh]:

```sh
MODE=test sh ./plugin/storage/cassandra/schema/create.sh | cqlsh
```

For production deployment, pass `MODE=prod DATACENTER={datacenter}` arguments to the script,
where `{datacenter}` is the name used in the Cassandra configuration / network topology.

The script also allows overriding TTL, keyspace name, replication factor, etc.
Run the script without arguments to see the full list of recognized parameters.

### ElasticSearch

ElasticSearch does not require initialization other than
[installing and running ElasticSearch](https://www.elastic.co/downloads/elasticsearch).
Once it is running, pass the correct configuration values to the Jaeger collector and query service.

#### Shards and Replicas for ElasticSearch indices

Shards and replicas are some configuration values to take special attention to, because this is decided upon
index creation. [This article](https://qbox.io/blog/optimizing-elasticsearch-how-many-shards-per-index) goes into
more information about choosing how many shards should be chosen for optimization.

## Query Service & UI

**jaeger-query** serves the API endpoints and a React/Javascript UI.
The service is stateless and is typically run behind a load balancer, e.g. nginx.

An example to test Query Service:
```
docker run -it \
-p16686:16686 \
-e CASSANDRA_KEYSPACE=jaeger_v1_local \
-e CASSANDRA_SERVERS=cassandra \
--link cassandra:cassandra \
jaegertracing/jaeger-query:latest
```
At default settings the query service exposes the following port(s):

Port | Protocol | Function
Expand Down

0 comments on commit 5109edc

Please sign in to comment.