Skip to content

Commit c24174e

Browse files
committed
Add otel collector installation to the bootstrap script
1 parent fe03cf5 commit c24174e

File tree

3 files changed

+34
-12
lines changed

3 files changed

+34
-12
lines changed

tests/soak/README.md

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,24 @@ OpenTelemetry reporting supported through OTLP.
1010

1111
# Installation
1212

13-
TESTID=normal \
14-
LK_VERSION=v2.2.0 \
15-
CKPY_VERSION=v2.2.0 \
16-
CC_BOOSTRAP_SERVERS=_ \
17-
CC_USERNAME=_ \
18-
CC_PASSWORD=_ \
19-
DOCKER_REPOSITORY=_ ./install.sh
13+
1. Edit `ccloud.config`
14+
15+
2. Edit `otel-config.yaml`
16+
17+
3. the first time:
18+
```bash
19+
./bootstrap.sh <python-branch/tag> <librdkafka-branch/tag>
20+
```
21+
4. next times:
22+
```bash
23+
./build.sh <python-branch/tag> <librdkafka-branch/tag>
24+
```
25+
26+
5.
27+
```bash
28+
. venv/bin/activate
29+
30+
5. Run some tests
31+
```bash
32+
TESTID=<testid> ./run.sh ccloud.config
33+
```

tests/soak/bootstrap.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,20 @@ fi
1616

1717
python_branch=$1
1818
librdkafka_branch=$2
19+
otel_collector_version=0.130.0
20+
otel_collector_package_url="https://github.com/open-telemetry/"\
21+
"opentelemetry-collector-releases/releases/download/"\
22+
"v${otel_collector_version}/otelcol-contrib_${otel_collector_version}_linux_amd64.deb"
1923
venv=$PWD/venv
2024

2125
sudo apt update
22-
sudo apt install -y git curl make gcc g++ zlib1g-dev libssl-dev libzstd-dev \
23-
python3-dev python3-pip python3-venv
26+
sudo apt install -y git curl wget make gcc g++ zlib1g-dev libssl-dev \
27+
libzstd-dev python3-dev python3-pip python3-venv
28+
wget -O otel_collector_package.deb $otel_collector_package_url
29+
sudo dpkg -i otel_collector_package.deb
30+
rm otel_collector_package.deb
31+
sudo cp otel-config.yaml /etc/otelcol-contrib/config.yaml
32+
sudo systemctl restart otelcol-contrib
2433

2534
if [[ ! -d confluent-kafka-python ]]; then
2635
git clone https://github.com/confluentinc/confluent-kafka-python

tests/soak/soakclient.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,11 @@
2626
#
2727

2828
from confluent_kafka import KafkaError, KafkaException, version
29-
from confluent_kafka import Producer
29+
from confluent_kafka import Producer, Consumer
3030
from confluent_kafka.admin import AdminClient, NewTopic
3131
from collections import defaultdict
3232
from builtins import int
3333
from opentelemetry import metrics
34-
from common import TestConsumer
3534
import argparse
3635
import threading
3736
import time
@@ -447,7 +446,7 @@ def filter_config(conf, filter_out, strip_prefix):
447446
cconf['error_cb'] = self.consumer_error_cb
448447
cconf['on_commit'] = self.consumer_commit_cb
449448
self.logger.info("consumer: using group.id {}".format(cconf['group.id']))
450-
self.consumer = TestConsumer(cconf)
449+
self.consumer = Consumer(cconf)
451450

452451
# Create and start producer thread
453452
self.producer_thread = threading.Thread(target=self.producer_thread_main)

0 commit comments

Comments
 (0)