Skip to content

Commit c5eb417

Browse files
girodavtheletterf
andauthored
Add Quickstart documentation for Docker deployments (#209)
* Add Quickstart documentation for Docker * Fix indentation * Add missing env variable * Remove extra lines * Update docs/quickstart/ech/docker.md Co-authored-by: Fabrizio Ferri-Benedetti <[email protected]> * Update docs/quickstart/ech/docker.md Co-authored-by: Fabrizio Ferri-Benedetti <[email protected]> * Update docs/quickstart/ech/docker.md Co-authored-by: Fabrizio Ferri-Benedetti <[email protected]> * Update docs/quickstart/ech/docker.md Co-authored-by: Fabrizio Ferri-Benedetti <[email protected]> * Update docs/quickstart/ech/docker.md Co-authored-by: Fabrizio Ferri-Benedetti <[email protected]> * Update docs/quickstart/self-managed/docker.md Co-authored-by: Fabrizio Ferri-Benedetti <[email protected]> * Update docs/quickstart/self-managed/docker.md Co-authored-by: Fabrizio Ferri-Benedetti <[email protected]> * Update docs/quickstart/self-managed/docker.md Co-authored-by: Fabrizio Ferri-Benedetti <[email protected]> * Update docs/quickstart/self-managed/docker.md Co-authored-by: Fabrizio Ferri-Benedetti <[email protected]> * Update docs/quickstart/serverless/docker.md Co-authored-by: Fabrizio Ferri-Benedetti <[email protected]> * Add pre-requisites * Fix link --------- Co-authored-by: Fabrizio Ferri-Benedetti <[email protected]>
1 parent 55f9d1c commit c5eb417

File tree

5 files changed

+223
-8
lines changed

5 files changed

+223
-8
lines changed

docs/_edot-sdks/java/migration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ The Elastic [`trace_methods`] option can be replaced by the [`OTEL_INSTRUMENTATI
154154
### `capture_jmx_metrics`
155155

156156
The Elastic [`capture_jmx_metrics`](https://www.elastic.co/guide/en/apm/agent/java/current/config-jmx.html#config-capture-jmx-metrics) option can be replaced by
157-
[OpenTelemetry JMX Insight](https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/instrumentation/jmx-metrics/javaagent/README.md) feature which is included in EDOT Java.
157+
[OpenTelemetry JMX Insight](https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/instrumentation/jmx-metrics/javaagent/) feature which is included in EDOT Java.
158158

159159
The JMX Insight feature provides the following benefits:
160160
- ability to define custom metrics using YAML

docs/quickstart/ech/docker.md

Lines changed: 74 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ title: Docker
33
layout: default
44
nav_order: 3
55
parent: Elastic Cloud Hosted
6-
nav_exclude: true
76
---
87

98
# Quickstart - Docker - Hosted
@@ -14,4 +13,77 @@ nav_exclude: true
1413
🗄️ Elastic Cloud Hosted
1514
{: .label .label-blue }
1615

17-
🚧 Coming soon
16+
Learn how to set up the EDOT Collector and EDOT SDKs in a Docker environment with Elastic Cloud Hosted to collect host metrics, logs and application traces.
17+
18+
## Prerequisites
19+
20+
Make sure the following requirements are present:
21+
22+
- Docker installed and running.
23+
- An Elastic Cloud deployment.
24+
25+
## Instructions
26+
27+
Follow these steps to deploy the EDOT Collector and EDOT OTel SDKs in Docker with ECH.
28+
29+
1. Create the `otel-collector-config.yml` file with your EDOT Collector configuration. Refer to the [configuration reference](../../_edot-collector/config/default-config-standalone.md).
30+
31+
2. Retrieve the **Elasticsearch Endpoint** and the **Elastic API Key** for your Elastic Cloud deployment by [following these instructions](./#retrieving-connection-details-for-your-elastic-cloud-deployment).
32+
33+
3. Create an `.env` file with the following content. Replace the placeholder values with your Elastic Cloud credentials:
34+
35+
```bash
36+
HOST_FILESYSTEM=/
37+
DOCKER_SOCK=/var/run/docker.sock
38+
ELASTIC_AGENT_OTEL=true
39+
COLLECTOR_CONTRIB_IMAGE=elastic/elastic-agent:9.0.0
40+
ELASTIC_API_KEY=<your_api_key_here>
41+
ELASTIC_ENDPOINT=<your_endpoint_here>
42+
OTEL_COLLECTOR_CONFIG=/path/to/otel-collector-config.yml
43+
```
44+
45+
4. Create a `compose.yml` file with the following content:
46+
47+
```yaml
48+
services:
49+
otel-collector:
50+
image: ${COLLECTOR_CONTRIB_IMAGE}
51+
container_name: otel-collector
52+
deploy:
53+
resources:
54+
limits:
55+
memory: 1.5G
56+
restart: unless-stopped
57+
command: ["--config", "/etc/otelcol-config.yml" ]
58+
network_mode: host
59+
user: 0:0
60+
volumes:
61+
- ${HOST_FILESYSTEM}:/hostfs:ro
62+
- ${DOCKER_SOCK}:/var/run/docker.sock:ro
63+
- ${OTEL_COLLECTOR_CONFIG}:/etc/otelcol-config.yml
64+
environment:
65+
- HOST_FILESYSTEM
66+
- ELASTIC_API_KEY
67+
- ELASTIC_ENDPOINT
68+
- ELASTIC_AGENT_OTEL
69+
- STORAGE_DIR=/usr/share/elastic-agent
70+
```
71+
72+
5. Start the Collector by running:
73+
74+
```bash
75+
docker compose up -d
76+
```
77+
78+
6. **(Optional) Instrument your applications**
79+
80+
To collect telemetry from applications running on the host where you installed the EDOT Collector,
81+
instrument your target applications following the setup instructions for the corresponding language:
82+
83+
- [.NET](../../edot-sdks/dotnet/setup)
84+
- [Java](../../edot-sdks/java/setup)
85+
- [Node.js](../../edot-sdks/nodejs/setup)
86+
- [PHP](../../edot-sdks/php/setup)
87+
- [Python](../../edot-sdks/python/setup)
88+
89+
Configure your SDKs to send the data to the local EDOT Collector using OTLP/gRPC (`http://localhost:4317`) or OTLP/HTTP (`http://localhost:4318`).

docs/quickstart/self-managed/docker.md

Lines changed: 74 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ title: Docker
33
layout: default
44
nav_order: 3
55
parent: Self-managed
6-
nav_exclude: true
76
---
87

98
# Quickstart
@@ -14,4 +13,77 @@ nav_exclude: true
1413
🆂 Self-managed Elastic Stack
1514
{: .label .label-yellow }
1615

17-
🚧 Coming soon
16+
Learn how to set up the EDOT Collector and EDOT SDKs in a Docker environment to collect host metrics, logs and application traces.
17+
18+
## Prerequisites
19+
20+
Make sure the following requirements are present:
21+
22+
- Docker installed and running.
23+
- A Self-Managed Elasticsearch cluster up and running.
24+
25+
## Instructions
26+
27+
Follow these steps to deploy the EDOT Collector and EDOT OTel SDKs in Docker.
28+
29+
1. Create the `otel-collector-config.yml` file with your EDOT Collector configuration. Refer to the [configuration reference](../../_edot-collector/config/default-config-standalone.md).
30+
31+
2. Retrieve your [Elasticsearch endpoint](https://www.elastic.co/guide/en/kibana/current/search-space-connection-details.html){:target="_blank"} and [API key](https://www.elastic.co/guide/en/kibana/current/api-keys.html){:target="_blank"}.
32+
33+
3. Create an `.env` file with the following content. Replace the placeholder values with your Elastic Cloud credentials:
34+
35+
```bash
36+
HOST_FILESYSTEM=/
37+
DOCKER_SOCK=/var/run/docker.sock
38+
ELASTIC_AGENT_OTEL=true
39+
COLLECTOR_CONTRIB_IMAGE=elastic/elastic-agent:9.0.0
40+
ELASTIC_API_KEY=<your_api_key_here>
41+
ELASTIC_ENDPOINT=<your_endpoint_here>
42+
OTEL_COLLECTOR_CONFIG=/path/to/otel-collector-config.yml
43+
```
44+
45+
4. Create a `compose.yml` file with the following content:
46+
47+
```yaml
48+
services:
49+
otel-collector:
50+
image: ${COLLECTOR_CONTRIB_IMAGE}
51+
container_name: otel-collector
52+
deploy:
53+
resources:
54+
limits:
55+
memory: 1.5G
56+
restart: unless-stopped
57+
command: ["--config", "/etc/otelcol-config.yml" ]
58+
network_mode: host
59+
user: 0:0
60+
volumes:
61+
- ${HOST_FILESYSTEM}:/hostfs:ro
62+
- ${DOCKER_SOCK}:/var/run/docker.sock:ro
63+
- ${OTEL_COLLECTOR_CONFIG}:/etc/otelcol-config.yml
64+
environment:
65+
- HOST_FILESYSTEM
66+
- ELASTIC_AGENT_OTEL
67+
- ELASTIC_API_KEY
68+
- ELASTIC_ENDPOINT
69+
- STORAGE_DIR=/usr/share/elastic-agent
70+
```
71+
72+
5. Start the Collector by running the following command:
73+
74+
```bash
75+
docker compose up -d
76+
```
77+
78+
6. (Optional) Instrument your applications
79+
80+
If you would like to collect telemetry from applications running on the host where you installed the EDOT Collector,
81+
you need to instrument your target applications according to the setup instructions for corresponding EDOT SDKs:
82+
83+
- [.NET](../../edot-sdks/dotnet/setup)
84+
- [Java](../../edot-sdks/java/setup)
85+
- [Node.js](../../edot-sdks/nodejs/setup)
86+
- [PHP](../../edot-sdks/php/setup)
87+
- [Python](../../edot-sdks/python/setup)
88+
89+
Configure your SDKs to send the data to the local EDOT Collector using OTLP/gRPC (`http://localhost:4317`) or OTLP/HTTP (`http://localhost:4318`).

docs/quickstart/serverless/docker.md

Lines changed: 73 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ title: Docker
33
layout: default
44
nav_order: 3
55
parent: Elastic Cloud Serverless
6-
nav_exclude: true
76
---
87

98
# Quickstart - Docker - Serverless
@@ -14,4 +13,76 @@ nav_exclude: true
1413
☁️ Elastic Cloud Serverless
1514
{: .label .label-green }
1615

17-
🚧 Coming soon
16+
The quick start for Docker with Elastic Cloud Serverless will guide you through setting up the EDOT Collector and EDOT SDKs to collect host metrics,
17+
logs and application traces and send the data through OTLP to your Elastic Serverless Project.
18+
19+
## Prerequisites
20+
21+
Make sure the following requirements are present:
22+
23+
- Docker installed and running.
24+
- An Elastic Serverless Project deployment.
25+
26+
## Instructions
27+
28+
1. Create a `otel-collector-config.yml` file with your EDOT collector configuration. See the [configuration reference](../../_edot-collector/config/default-config-standalone.md) for "Managed OTLP Endpoint" for more details.
29+
30+
2. Retrieve the `Elastic OTLP Endpoint` and the `Elastic API Key` for your Serverless Project by [following these instructions](./#retrieve-connection-details-for-your-project).
31+
32+
3. Create a `.env` file with the following content, replacing the placeholder values with your actual Elastic Cloud credentials:
33+
34+
```bash
35+
HOST_FILESYSTEM=/
36+
DOCKER_SOCK=/var/run/docker.sock
37+
ELASTIC_AGENT_OTEL=true
38+
COLLECTOR_CONTRIB_IMAGE=elastic/elastic-agent:9.0.0
39+
ELASTIC_API_KEY=<your_api_key_here>
40+
ELASTIC_OTLP_ENDPOINT=<your_endpoint_here>
41+
OTEL_COLLECTOR_CONFIG=/path/to/otel-collector-config.yml
42+
```
43+
44+
4. Create a `compose.yml` file with the following content:
45+
46+
```yaml
47+
services:
48+
otel-collector:
49+
image: ${COLLECTOR_CONTRIB_IMAGE}
50+
container_name: otel-collector
51+
deploy:
52+
resources:
53+
limits:
54+
memory: 1.5G
55+
restart: unless-stopped
56+
command: ["--config", "/etc/otelcol-config.yml" ]
57+
network_mode: host
58+
user: 0:0
59+
volumes:
60+
- ${HOST_FILESYSTEM}:/hostfs:ro
61+
- ${DOCKER_SOCK}:/var/run/docker.sock:ro
62+
- ${OTEL_COLLECTOR_CONFIG}:/etc/otelcol-config.yml
63+
environment:
64+
- HOST_FILESYSTEM
65+
- ELASTIC_AGENT_OTEL
66+
- ELASTIC_API_KEY
67+
- ELASTIC_OTLP_ENDPOINT
68+
- STORAGE_DIR=/usr/share/elastic-agent
69+
```
70+
71+
5. Start the collector by running:
72+
73+
```bash
74+
docker compose up -d
75+
```
76+
77+
6. **(Optional) Instrument your applications**
78+
79+
To collect telemetry from applications running on the host where you installed the EDOT Collector,
80+
instrument your target applications following the setup instructions for the corresponding language:
81+
82+
- [.NET](../../edot-sdks/dotnet/setup)
83+
- [Java](../../edot-sdks/java/setup)
84+
- [Node.js](../../edot-sdks/nodejs/setup)
85+
- [PHP](../../edot-sdks/php/setup)
86+
- [Python](../../edot-sdks/python/setup)
87+
88+
Configure your SDKs to send the data to the local EDOT Collector using OTLP/gRPC (`http://localhost:4317`) or OTLP/HTTP (`http://localhost:4318`).

docs/quickstart/serverless/hosts_vms.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ parent: Elastic Cloud Serverless
1414
{: .label .label-green }
1515

1616
The quick start for Hosts / VMs with Elastic Cloud Serverless will guide you through setting up the EDOT Collector and EDOT SDKs to collect host metrics,
17-
logs and application traces and send the data through OTLP to your Elastic Serverless Porject.
17+
logs and application traces and send the data through OTLP to your Elastic Serverless Project.
1818

1919
1. **Download the EDOT Collector**
2020

0 commit comments

Comments
 (0)