Skip to content

Commit

Permalink
Merge pull request #1 from dexter816/Issue/#472
Browse files Browse the repository at this point in the history
Issue/#472
  • Loading branch information
ideepika committed Oct 21, 2017
2 parents d69b82d + 15883de commit f9c720f
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 50 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ If you are adding a new file it should have a header like below. The easiest
way to add such header is to run `make fmt`.

```
// Copyright (c) 2017 Uber Technologies, Inc.
// Copyright (c) 2017 The Jaeger Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
44 changes: 25 additions & 19 deletions docs/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,28 @@ There are orchestration templates for running Jaeger with:

## 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.
Collectors require a persistent storage backend. Cassandra 3.4+ (default) and ElasticSearch are primary supported storage backends.

### Cassandra

A script is provided to initialize Cassandra keyspace and schema
using Cassandra's interactive shell [`cqlsh`][cqlsh],
clone the source repository following [getting
started](https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING.md#getting-started) and then run:
A script is provided to initialize Cassandra keyspace and schema using Cassandra's interactive shell [`cqlsh`][cqlsh],clone the source repository following [getting started](https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING.md#getting-started) and run:

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

Instead of starting it locally, one option is to start via Docker, so that it can be completely destroyed after use, like this:

```
docker run --rm -it --name cassandra -p 9042:9042 cassandra
```

to create the schema. From the root of the Jaeger’s source repository,this can be executed:

```
MODE=test KEYSPACE=jaeger_v1_local ./plugin/storage/cassandra/schema/create.sh plugin/storage/cassandra/schema/v001.cql.tmpl | docker exec -i cassandra 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.

Expand All @@ -37,15 +45,12 @@ 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).
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.
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

Expand All @@ -54,6 +59,7 @@ Collectors require almost no configuration, except for the location of Cassandra
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
```
Expand All @@ -63,12 +69,13 @@ 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 -p14267:14267 -p14268:14268
jaegertracing/jaeger-collector /go/bin/collector-linux
--cassandra.keyspace=jaeger_v1_test --cassandra.servers=192.168.0.183
docker run -it --rm -p14267:14267 -p14268:14268 jaegertracing/jaeger-collector /go/bin/collector-linux --cassandra.keyspace=jaeger_v1_test --cassandra.servers=192.168.0.183
```

At default settings the collector exposes the following ports:

Port | Protocol | Function
Expand All @@ -77,7 +84,6 @@ Port | Protocol | Function
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 Down Expand Up @@ -132,11 +138,11 @@ across several collectors ([issue 213](https://github.com/uber/jaeger/issues/213
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 jaegertracing/jaeger-query:latest
/go/bin/query-linux --cassandra.keyspace=jaeger_v1_test
--cassandra.servers=192.168.0.183
docker run -it -p16686:16686 jaegertracing/jaeger-query:latest /go/bin/query-linux --cassandra.keyspace=jaeger_v1_test --cassandra.servers=192.168.0.183
```

At default settings the query service exposes the following port(s):

Port | Protocol | Function
Expand Down
31 changes: 1 addition & 30 deletions scripts/updateLicense.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,7 @@

CURRENT_YEAR = datetime.today().year

MIT_LICENSE_BLOB = """Copyright (c) %d Uber Technologies, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.""" % CURRENT_YEAR

LICENSE_BLOB = """Copyright (c) %d Uber Technologies, Inc.
LICENSE_BLOB = """Copyright (c) %d The Jaeger Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -46,10 +26,6 @@
See the License for the specific language governing permissions and
limitations under the License.""" % CURRENT_YEAR

MIT_LICENSE_BLOB_LINES_GO = [
('// ' + l).strip() + '\n' for l in MIT_LICENSE_BLOB.split('\n')
]

LICENSE_BLOB_LINES_GO = [
('// ' + l).strip() + '\n' for l in LICENSE_BLOB.split('\n')
]
Expand All @@ -62,11 +38,6 @@ def update_go_license(name, force=False):
orig_lines = list(f)
lines = list(orig_lines)

current_header = ''.join(lines[0:len(MIT_LICENSE_BLOB_LINES_GO)])
mit_header = ''.join(MIT_LICENSE_BLOB_LINES_GO)
if current_header == mit_header:
lines = lines[len(MIT_LICENSE_BLOB_LINES_GO)+1:]

found = False
changed = False
for i, line in enumerate(lines[:5]):
Expand Down

0 comments on commit f9c720f

Please sign in to comment.