-
Notifications
You must be signed in to change notification settings - Fork 925
Run soak tests from EC2 #1908
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
base: master
Are you sure you want to change the base?
Run soak tests from EC2 #1908
Changes from all commits
51b9e03
cd7c1e1
23f01ee
6b7f3e0
60d3b48
d950ba5
9d6f6b3
259f510
29a6538
11ba42e
7712e2d
8db7640
3554d29
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,58 +2,40 @@ | |
# | ||
# | ||
|
||
# Bootstrap EC2 instance (Ubuntu 18.04) for soak client use | ||
# Bootstrap EC2 instance (Ubuntu) for soak client use | ||
# | ||
# Usage: | ||
# $0 <python-branch/tag> <librdkafka-branch/tag> | ||
|
||
set -e | ||
|
||
if [[ $# != 2 ]]; then | ||
echo "Usage: $0 <python-client-branch/tag> <librdkafka-branch/tag>" | ||
echo "Usage: $0 <librdkafka-branch/tag> <python-client-branch/tag>" | ||
exit 1 | ||
fi | ||
|
||
python_branch=$1 | ||
librdkafka_branch=$2 | ||
venv=$PWD/venv | ||
|
||
sudo apt update | ||
sudo apt install -y git curl make gcc g++ zlib1g-dev libssl-dev libzstd-dev \ | ||
python3-dev python3-pip python3-venv | ||
|
||
if [[ ! -d confluent-kafka-python ]]; then | ||
git clone https://github.com/confluentinc/confluent-kafka-python | ||
fi | ||
|
||
pushd confluent-kafka-python | ||
|
||
git checkout $python_branch | ||
|
||
echo "Installing librdkafka $librdkafka_branch" | ||
tools/bootstrap-librdkafka.sh --require-ssl $librdkafka_branch /usr | ||
rm -rf tmp-build | ||
librdkafka_branch=$1 | ||
python_branch=$2 | ||
otel_collector_version=0.130.0 | ||
otel_collector_package_url="https://github.com/open-telemetry/"\ | ||
"opentelemetry-collector-releases/releases/download/"\ | ||
"v${otel_collector_version}/otelcol-contrib_${otel_collector_version}_linux_amd64.deb" | ||
|
||
# echo "Installing interceptors" | ||
# tools/install-interceptors.sh | ||
|
||
echo "Setting up virtualenv in $venv" | ||
if [[ ! -d $venv ]]; then | ||
python3 -m venv $venv | ||
fi | ||
source $venv/bin/activate | ||
|
||
pip install -U pip | ||
|
||
pip install -v .[soaktest] | ||
|
||
popd # ..python | ||
|
||
echo "Verifying python client installation" | ||
python -c "import confluent_kafka; print(confluent_kafka.version(), confluent_kafka.libversion())" | ||
|
||
deactivate | ||
sudo apt update | ||
sudo apt install -y git curl wget make gcc g++ zlib1g-dev libssl-dev \ | ||
libzstd-dev python3-dev python3-pip python3-venv | ||
wget -O otel_collector_package.deb $otel_collector_package_url | ||
sudo dpkg -i otel_collector_package.deb | ||
rm otel_collector_package.deb | ||
sudo cp otel-config.yaml /etc/otelcol-contrib/config.yaml | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe add validation for otel config eg.
|
||
sudo systemctl restart otelcol-contrib | ||
cp setup_all_versions.py $HOME/setup_all_versions.py | ||
chmod +x $HOME/setup_all_versions.py | ||
|
||
./build.sh $librdkafka_branch $python_branch | ||
|
||
venv=$PWD/venv | ||
echo "All done, activate the virtualenv in $venv before running the client:" | ||
echo "source $venv/bin/activate" | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -11,25 +11,50 @@ fi | |||||
|
||||||
set -eu | ||||||
|
||||||
testdir=$PWD | ||||||
mkdir -p $testdir/librdkafka-installation | ||||||
|
||||||
if [[ ! -d confluent-kafka-python ]]; then | ||||||
git clone https://github.com/confluentinc/confluent-kafka-python | ||||||
fi | ||||||
|
||||||
venv=$PWD/venv | ||||||
if [[ ! -d $venv ]]; then | ||||||
echo "Setting up virtualenv in $venv" | ||||||
python3 -m venv $venv | ||||||
source $venv/bin/activate | ||||||
pip install -U pip | ||||||
pip install -r $testdir/../../requirements/requirements-soaktest.txt | ||||||
deactivate | ||||||
fi | ||||||
|
||||||
echo "Building and installing librdkafka $librdkafka_version" | ||||||
if [[ ! -d librdkafka ]]; then | ||||||
git clone https://github.com/confluentinc/librdkafka.git | ||||||
fi | ||||||
pushd librdkafka | ||||||
sudo make uninstall | ||||||
git fetch --tags | ||||||
git checkout $librdkafka_version | ||||||
./configure --reconfigure | ||||||
echo "Configuring librdkafka $librdkafka_version with prefix $testdir/librdkafka-installation" | ||||||
./configure --prefix=$testdir/librdkafka-installation | ||||||
sudo make uninstall | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
make clean | ||||||
make -j | ||||||
sudo make install | ||||||
make install | ||||||
popd | ||||||
|
||||||
export LIBRARY_PATH=$testdir/librdkafka-installation/lib | ||||||
export LD_LIBRARY_PATH=$testdir/librdkafka-installation/lib | ||||||
export CPLUS_INCLUDE_PATH=$testdir/librdkafka-installation/include | ||||||
export C_INCLUDE_PATH=$testdir/librdkafka-installation/include | ||||||
|
||||||
echo "Building confluent-kafka-python $cflpy_version" | ||||||
set +u | ||||||
source venv/bin/activate | ||||||
python3 -m pip uninstall -y confluent-kafka | ||||||
set -u | ||||||
pushd confluent-kafka-python | ||||||
rm -rf ./build | ||||||
git fetch --tags | ||||||
git checkout $cflpy_version | ||||||
python3 -m pip install . | ||||||
|
@@ -38,4 +63,3 @@ popd | |||||
echo "" | ||||||
echo "==============================================================================" | ||||||
(cd / ; python3 -c 'import confluent_kafka as c; print("python", c.version(), "librdkafka", c.libversion())') | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
bootstrap.servers=<add your bootstraps here> | ||
sasl.mechanisms=PLAIN | ||
security.protocol=SASL_SSL | ||
sasl.username=<your ccloud access key> | ||
sasl.password=<your ccloud secret> | ||
enable.idempotence=true | ||
debug=eos,generic,broker,security,consumer | ||
linger.ms=2 | ||
compression.type=lz4 |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we move out versions in script to common config file?