You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is also possible to run smoke tests on a locally built image. Here is an example of targeting a local image `customImageName:myTag`. The image name (-i) is optional, the default value is `opensearch-data-prepper`.
@@ -43,69 +43,3 @@ The values for `-t` are `opensearch-data-prepper` or `opensearch-data-prepper-jd
If the script is stuck repeating the message "Waiting for Data Prepper to start" try the following steps
49
-
50
-
### 1. Confirm all containers are running with `docker ps`. Your output should be similar to the following:
51
-
```
52
-
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
53
-
f3d476e2676d smoke-tests_otel-span-exporter "/bin/sh -c 'python3…" 5 minutes ago Restarting (0) 54 seconds ago smoke-tests_otel-span-exporter_1
54
-
360db2978df1 otel/opentelemetry-collector:0.40.0 "/otelcol --config=/…" 5 minutes ago Up 5 minutes 0.0.0.0:4317->4317/tcp, :::4317->4317/tcp, 55678-55679/tcp smoke-tests_otel-collector_1
55
-
b012352c7593 opensearchproject/data-prepper:latest "/bin/sh -c 'java $J…" 5 minutes ago Up 5 minutes 0.0.0.0:2021->2021/tcp, :::2021->2021/tcp smoke-tests_data-prepper_1
56
-
539741e51931 opensearchproject/opensearch:1.0.0 "./opensearch-docker…" 5 minutes ago Up 5 minutes 9300/tcp, 9600/tcp, 0.0.0.0:9200->9200/tcp, :::9200->9200/tcp, 9650/tcp node-0.example.com
57
-
3b5b1f974174 alpine "/bin/sh -c 'set -x;…" 5 minutes ago Up 5 minutes smoke-tests_http-log-generation_1
58
-
```
59
-
### 2. Check the container logs, these commands should be executed from ./release/smoke-test.
60
-
Tail all container logs:
61
-
```
62
-
docker-compose logs -f
63
-
```
64
-
65
-
Follow specific container logs:
66
-
```
67
-
docker-compose logs -f data-prepper
68
-
```
69
-
70
-
The Data Prepper container should show events being processed:
71
-
```
72
-
...
73
-
data-prepper_1 | 2021-12-03T19:57:30,488 [service-map-pipeline-prepper-worker-3-thread-1] INFO org.opensearch.dataprepper.pipeline.ProcessWorker - service-map-pipeline Worker: No records received from buffer
74
-
data-prepper_1 | 2021-12-03T19:57:31,925 [grok-pipeline-prepper-worker-7-thread-1] INFO org.opensearch.dataprepper.pipeline.ProcessWorker - grok-pipeline Worker: Processing 8 records from buffer
If in your results the JSON path `.hits.total.value` has a value of 0 Open Search is not receiving log data. Confirm with the Data Prepper logs records are being processed from the buffer and no error messages are displayed.
96
-
97
-
**To confirm if Open Search is receiving trace data run**
98
-
Use the following cURL command to query the `otel-v1-apm-span-000001` index for documents containing **PythonService**. These documents will be generated by the **otel-span-exporter**, sent to **otel-collector**, then sent to **data-prepper**, then sent to **opensearch**.
If in your results the JSON path `.hits.total.value` has a value of 0 Open Search is not receiving trace data. Confirm OTel opentelemetry-collector logs are continueally displaying metrics and no errors are printing. Next confirm with the Data Prepper logs records are being processed from the buffer and no error messages are displayed.
103
-
104
-
### 4. Manually send data to Data Prepper
105
-
The following cURL command will send a JSON formatted HTTP log to Data Prepper:
Copy file name to clipboardExpand all lines: release/smoke-tests/run-smoke-tests.sh
+8-104Lines changed: 8 additions & 104 deletions
Original file line number
Diff line number
Diff line change
@@ -3,26 +3,10 @@
3
3
# Copyright OpenSearch Contributors
4
4
# SPDX-License-Identifier: Apache-2.0
5
5
6
-
set -e
7
-
8
6
export IMAGE_NAME="opensearch-data-prepper"
9
-
REPO_ROOT=$(git rev-parse --show-toplevel)
10
-
export OPENSEARCH_VERSION="1.3.6"
11
-
OPENSEARCH_HOST="localhost:9200"
12
-
OPENSEARCH_GROK_INDEX="test-grok-index"
13
-
OPENSEARCH_OTEL_INDEX="otel-v1-apm-span-000001"
14
-
15
-
spin[0]="-"
16
-
spin[1]="\\"
17
-
spin[2]="|"
18
-
spin[3]="/"
19
-
20
-
cd"${REPO_ROOT}/release/smoke-tests"
21
7
22
8
functionend_tests () {
23
9
local EXIT_CODE=$1
24
-
docker-compose down
25
-
cd"${REPO_ROOT}"
26
10
27
11
if [ "${EXIT_CODE}"-ne 0 ]
28
12
then
@@ -35,7 +19,7 @@ function end_tests () {
35
19
36
20
functionusage() {
37
21
echo""
38
-
echo"This script is used to build the Docker image. It prepares the files required by the Dockerfile in a temporary directory, then builds and tags the Docker image. Script expects to be run from the project root directory."
22
+
echo"This script runs specific Data Prepper end-to-end tests to smoke test a release. Script expects to be run from the project root directory."
echo -e "-r REPOSITORY\tSpecify the docker repository name (ex: opensearchstaging or opensearchproject). The tag name will be pointed to '-v' value and 'latest'"
48
31
echo -e "-i IMAGE_NAME\tOverride the docker image name name (ex: opensearch-data-prepper or data-prepper)."
49
-
echo -e "-o OPENSEARCH_VERSION\tOverride the default Open Search version used in smoke tests"
0 commit comments