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

Replace command line args in deployment doc #751

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
178 changes: 42 additions & 136 deletions content/docs/next-release-v2/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ children:

The main Jaeger backend components are released as Docker images on [Docker Hub](https://hub.docker.com/r/jaegertracing) and [Quay](https://quay.io/organization/jaegertracing):

!!!UPDATE HERE

!!!UPDATE THE TABLE BELOW
Component | Docker Hub | Quay
--------------------- | -------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------
**jaeger-all-in-one** | [hub.docker.com/r/jaegertracing/all-in-one/](https://hub.docker.com/r/jaegertracing/all-in-one/) | [quay.io/repository/jaegertracing/all-in-one](https://quay.io/repository/jaegertracing/all-in-one)
Expand All @@ -37,109 +36,55 @@ There are orchestration templates for running Jaeger with:

## Configuration Options

Jaeger binaries are configured via configuration YAML file.

!!!NEED TO WORK BELOW HERE

## All-in-one

Jaeger all-in-one is a special distribution that combines Jaeger components, [agent](#agent), [collector](#collector), and [query service/UI](#query-service--ui), in a single binary or container image. It is useful for single-node deployments where your trace volume is light enough to be handled by a single instance. By default, all-in-one starts with `memory` storage, meaning it will lose all data upon restart. All other [span storage backends](#span-storage-backends) can also be used with all-in-one, but `memory` and `badger` are exclusive to all-in-one because they cannot be shared between instances.

All-in-one listens to the same ports as the components it contains (described below), with the exception of the admin port.

**jaeger** binaries are configured via configuration YAML file. The following ports are exposed by default:
Port | Protocol | Function
----- | ------- | ---
14269 | HTTP | admin port: health check at `/` and metrics at `/metrics`

```bash
## make sure to expose only the ports you use in your deployment scenario!
docker run -d --name jaeger \
-e COLLECTOR_OTLP_ENABLED=true \
-e COLLECTOR_ZIPKIN_HOST_PORT=:9411 \
-p 5775:5775/udp \
-p 6831:6831/udp \
-p 6832:6832/udp \
-p 5778:5778 \
-p 16686:16686 \
-p 14250:14250 \
-p 14268:14268 \
-p 14269:14269 \
-p 4317:4317 \
-p 4318:4318 \
-p 9411:9411 \
jaegertracing/all-in-one:{{< currentVersion >}}
```

You can navigate to `http://localhost:16686` to access the Jaeger UI.

## Agent

{{< warning >}}
**jaeger-agent** is [deprecated](https://github.com/jaegertracing/jaeger/issues/4739). The OpenTelemetry data can be sent from the OpenTelemetry SDKs (equipped with OTLP exporters) directly to **jaeger-collector**. See the [Architecture](../architecture) page for alternative deployment options.
{{< /warning >}}
2777 | HTTP | expvar port for process level metrics per the Go standards
8888 | HTTP | metrics port for exposing metrics which can be scraped with Prometheus compatible systems at `/metrics`
8889 | HTTP | ingester port for reading data from Kafka topics and writing to a supported backend
13133 | HTTP | Healthcheck port via the `healthcheckv2` extension

**jaeger-agent** is designed to receive tracing data in Thrift format over UDP and run locally on each host, either as a host agent / daemon or as an application sidecar. **jaeger-agent** exposes the following ports:
**jaeger** is stateless and thus many instances of **jaeger** can be run in parallel. **jaeger** instances require almost no configuration, except for storage location, such as:

Port | Protocol | Function
----- | ------- | ---
6831 | UDP | Accepts [jaeger.thrift][jaeger-thrift] in `compact` Thrift protocol used by most current Jaeger clients.
6832 | UDP | Accepts [jaeger.thrift][jaeger-thrift] in `binary` Thrift protocol used by Node.js Jaeger client (because [thriftrw][thriftrw] npm package does not support `compact` protocol).
5778 | HTTP | Serves SDK configs, namely sampling strategies at `/sampling` (see [Remote Sampling](../sampling/#remote-sampling)).
5775 | UDP | Accepts [zipkin.thrift][zipkin-thrift] in `compact` Thrift protocol (deprecated; only used by very old Jaeger clients, circa 2016).
14271 | HTTP | Admin port: health check at `/` and metrics at `/metrics`.

It can be executed directly on the host or via Docker, as follows:

```sh
## make sure to expose only the ports you use in your deployment scenario!
docker run \
--rm \
-p6831:6831/udp \
-p6832:6832/udp \
-p5778:5778/tcp \
-p5775:5775/udp \
jaegertracing/jaeger-agent:{{< currentVersion >}}
Cassandra:
```

### Discovery System Integration

**jaeger-agent**s can connect point-to-point to a single **jaeger-collector** address, which could be
load balanced by another infrastructure component (e.g. DNS) across multiple **jaeger-collector**s.
**jaeger-agent** can also be configured with a static list of **jaeger-collector** addresses.

On Docker, a command like the following can be used:

```sh
docker run \
--rm \
-p5775:5775/udp \
-p6831:6831/udp \
-p6832:6832/udp \
-p5778:5778/tcp \
jaegertracing/jaeger-agent:{{< currentVersion >}} \
--reporter.grpc.host-port=jaeger-collector.jaeger-infra.svc:14250
jaeger_storage:
Copy link
Member

Choose a reason for hiding this comment

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

We have dedicated pages for each storage backend now, I would rather consolidate everything about that backend there, including config examples. This page could be just about different deployment roles, how they are different, the ports, the APIs exposed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I put the snippets here just to provide some guidance. If you want me to just point to the storage pages, I can do that. Please clarify.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, I would put them in the storage pages and link from here. I don't think we should focus so much on the backends in this top page.

backends:
some_storage:
cassandra:
schema:
keyspace: "jaeger_v1_dc1"
connection:
auth:
basic:
username: "cassandra"
password: "cassandra"
tls:
insecure: true
```

When using gRPC, you have several options for load balancing and name resolution:

* Single connection and no load balancing. This is the default if you specify a single `host:port`. (example: `--reporter.grpc.host-port=jaeger-collector.jaeger-infra.svc:14250`)
* Static list of hostnames and round-robin load balancing. This is what you get with a comma-separated list of addresses. (example: `reporter.grpc.host-port=jaeger-collector1:14250,jaeger-collector2:14250,jaeger-collector3:14250`)
* Dynamic DNS resolution and round-robin load balancing. To get this behavior, prefix the address with `dns:///` and gRPC will attempt to resolve the hostname using SRV records (for [external load balancing](https://github.com/grpc/grpc/blob/master/doc/load-balancing.md)), TXT records (for [service configs](https://github.com/grpc/grpc/blob/master/doc/service_config.md)), and A records. Refer to the [gRPC Name Resolution docs](https://github.com/grpc/grpc/blob/master/doc/naming.md) and the [dns_resolver.go implementation](https://github.com/grpc/grpc-go/blob/master/resolver/dns/dns_resolver.go) for more info. (example: `--reporter.grpc.host-port=dns:///jaeger-collector.jaeger-infra.svc:14250`)

### Agent level tags

Jaeger supports agent level tags, that can be added to the process tags of all spans passing through **jaeger-agent**. This is supported through the command line flag `--agent.tags=key1=value1,key2=value2,...,keyn=valuen`. Tags can also be set through an environment flag like so - `--agent.tags=key=${envFlag:defaultValue}` - The tag value will be set to the value of the `envFlag` environment key and `defaultValue` if not set.

## Collector

**jaeger-collector**s are stateless and thus many instances of **jaeger-collector** can be run in parallel.
**jaeger-collector**s require almost no configuration, except for storage location, such as
`--cassandra.keyspace` and `--cassandra.servers` options, or the location of Elasticsearch cluster,
via `--es.server-urls`, depending on which storage is specified. See the [CLI Flags](../cli/) for all
command line options.
OpenSearch:
```
jaeger_storage:
backends:
some_storage:
opensearch:
index_prefix: "jaeger-main"
```

At default settings **jaeger-collector** exposes the following ports:
ElasticSearch:
```
jaeger_storage:
backends:
some_storage:
elasticsearch:
index_prefix: "jaeger-main"
another_storage:
elasticsearch:
index_prefix: "jaeger-archive"
```

!!! MAYBE NOT NEEDED ANYMORE?
| Port | Protocol | Endpoint | Function
| ----- | ------- | -------- | ----
| 4317 | gRPC | n/a | Accepts traces in [OpenTelemetry OTLP format][otlp] (Protobuf).
Expand All @@ -151,46 +96,7 @@ At default settings **jaeger-collector** exposes the following ports:
| 9411 | HTTP | `/api/v1/spans` and `/api/v2/spans` | Accepts Zipkin spans in Thrift, JSON and Proto (disabled by default).
| 14250 | gRPC | n/a | Used by **jaeger-agent** to send spans in [model.proto][] Protobuf format.

## Ingester

**jaeger-ingester** is a service which reads span data from Kafka topic and writes it to another storage backend (Elasticsearch or Cassandra).

Port | Protocol | Function
----- | ------- | ---
14270 | HTTP | admin port: health check at `/` and metrics at `/metrics`

To view all exposed configuration options run the following command:
```sh
docker run \
-e SPAN_STORAGE_TYPE=cassandra \
jaegertracing/jaeger-ingester:{{< currentVersion >}}
--help
```

## 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, such as [**NGINX**](https://www.nginx.com/).

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

Port | Protocol | Function
----- | ------- | ---
16685 | gRPC | Protobuf/gRPC [QueryService](https://github.com/jaegertracing/jaeger-idl/blob/master/proto/api_v2/query.proto)
16686 | HTTP | `/api/*` endpoints and Jaeger UI at `/`
16687 | HTTP | admin port: health check at `/` and metrics at `/metrics`

### Minimal deployment example (Elasticsearch backend):
```sh
docker run -d --rm \
-p 16685:16685 \
-p 16686:16686 \
-p 16687:16687 \
-e SPAN_STORAGE_TYPE=elasticsearch \
-e ES_SERVER_URLS=http://<ES_SERVER_IP>:<ES_SERVER_PORT> \
jaegertracing/jaeger-query:{{< currentVersion >}}
```

!!! NEED TO FIX 2 sections BELOW
### Clock Skew Adjustment
Copy link
Member

Choose a reason for hiding this comment

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

need to move elsewhere, this is not a "deployment" section. Technically it belongs to query/UI role, so could move there.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Do you want me to put an example UI/query role here for the deployment instead? I can add the snippets.

Copy link
Member

Choose a reason for hiding this comment

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

we need to mention the UI/query role on this page, but the actual configuration details can go to its own dedicated paged.


Jaeger backend combines trace data from applications that are usually running on different hosts. The hardware clocks on the hosts often experience relative drift, known as the [clock skew effect](https://en.wikipedia.org/wiki/Clock_skew). Clock skew can make it difficult to reason about traces, for example, when a server span may appear to start earlier than the client span, which should not be possible. **jaeger-query** service implements a clock skew adjustment algorithm ([code](https://github.com/jaegertracing/jaeger/blob/master/model/adjuster/clockskew.go)) to correct for clock drift, using the knowledge about causal relationships between spans. All adjusted spans have a warning displayed in the UI that provides the exact clock skew delta applied to their timestamps.
Expand Down
Loading