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

feature(kafka-localstack): introducing docker-compose base kafka setup #6946

Merged
merged 3 commits into from
May 27, 2024

Conversation

fruch
Copy link
Contributor

@fruch fruch commented Dec 14, 2023

Since we want to be able to run scylla kafka connectors with scylla clusters create by SCT, we are introducing here the first of kafka backend that would be used for local development (with SCT docker backend)

  • include a way to configure the connector as needed (also multi ones)
  • get it install from hub or by url

Testing

@fruch fruch requested a review from Bouncheck December 14, 2023 12:37
@fruch fruch added the test-integration Enable running the integration tests suite label Dec 14, 2023
sdcm/sct_config.py Outdated Show resolved Hide resolved
@fruch fruch force-pushed the kafka-localstack branch 2 times, most recently from 5180b59 to bb0382b Compare December 14, 2023 23:12
@fruch fruch force-pushed the kafka-localstack branch 4 times, most recently from c19d5f9 to 7b51aeb Compare February 6, 2024 10:14
sdcm/tester.py Outdated Show resolved Hide resolved
sdcm/kafka/kafka_cluster.py Outdated Show resolved Hide resolved
sdcm/kafka/kafka_cluster.py Outdated Show resolved Hide resolved
test-cases/kafka/longevity-kafka-cdc-docker.yaml Outdated Show resolved Hide resolved
test-cases/kafka/longevity-kafka-cdc-docker.yaml Outdated Show resolved Hide resolved
@soyacz
Copy link
Contributor

soyacz commented Feb 12, 2024

are there kafka metrics worth to add to monitoring? If yes, can be done in followup task.

@fruch
Copy link
Contributor Author

fruch commented Feb 12, 2024

are there kafka metrics worth to add to monitoring? If yes, can be done in followup task.

this one is a local setup of kafka, I don't think monitoring is needed, as least not yet. (we have monitoring data of the sct-runner)

@soyacz
Copy link
Contributor

soyacz commented Feb 12, 2024

are there kafka metrics worth to add to monitoring? If yes, can be done in followup task.

this one is a local setup of kafka, I don't think monitoring is needed, as least not yet. (we have monitoring data of the sct-runner)

they look nice: https://grafana.com/docs/grafana-cloud/monitor-infrastructure/integrations/integration-reference/integration-kafka/
It could help us when there are issues with kafka-connector

@fruch
Copy link
Contributor Author

fruch commented Feb 12, 2024

are there kafka metrics worth to add to monitoring? If yes, can be done in followup task.

this one is a local setup of kafka, I don't think monitoring is needed, as least not yet. (we have monitoring data of the sct-runner)

they look nice: https://grafana.com/docs/grafana-cloud/monitor-infrastructure/integrations/integration-reference/integration-kafka/ It could help us when there are issues with kafka-connector

JMX never looks nice...

it's too early for this, once we'll have VMs and a full cluster, we might consider installation of those.

now I care more on the functional side of things, and how this setup integrates with a longevity test.
and the real missing part is reading/writing to kafka for the actual test/verification

@fruch fruch force-pushed the kafka-localstack branch 2 times, most recently from 362b307 to e3cbcac Compare February 13, 2024 18:53
@fruch fruch force-pushed the kafka-localstack branch 4 times, most recently from b5c99c5 to 5030786 Compare May 8, 2024 14:20
@fruch
Copy link
Contributor Author

fruch commented May 8, 2024

So the longevity code we have basically works

But it hangs cause we don't have code to stop the Kafka reading thread, might use the idea of teardown validator to validate and stop the reading thread

@fruch fruch force-pushed the kafka-localstack branch 3 times, most recently from 59d17ac to 0dae67c Compare May 12, 2024 15:00
@soyacz
Copy link
Contributor

soyacz commented May 14, 2024

So the longevity code we have basically works

But it hangs cause we don't have code to stop the Kafka reading thread, might use the idea of teardown validator to validate and stop the reading thread

I don't understand why we cannot add this verification to teardown itself? Why teardown validator is required?

@fruch
Copy link
Contributor Author

fruch commented May 14, 2024

So the longevity code we have basically works

But it hangs cause we don't have code to stop the Kafka reading thread, might use the idea of teardown validator to validate and stop the reading thread

I don't understand why we cannot add this verification to teardown itself? Why teardown validator is required?

It was an idea, validators seemed like a natural place for it

I'm now trying a different approach of adding this logic to the reader thread itself.

sdcm/kafka/kafka_cluster.py Show resolved Hide resolved
sdcm/tester.py Outdated Show resolved Hide resolved
test-cases/kafka/longevity-kafka-cdc.yaml Show resolved Hide resolved


class LocalKafkaCluster(cluster.BaseCluster):
def __init__(self, remoter=LOCALRUNNER):
Copy link
Contributor

Choose a reason for hiding this comment

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

will sct_runner survive high load on kafka?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It might, we can scale the runner as needed.

The idea is to have a setup that can work completely locally with docker backed for development

The next stage is building a cluster of kafka instead of the docker compose setup, and then some Kafka SaaS.

So for this initial step we can about building functionally, not yet about scale. scaling would be tested on VMs or on SaaS.

Copy link
Contributor

Choose a reason for hiding this comment

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

worth adding a note that it's on sct runner and its size should be increased.
Generally small docstring would be great.

test-cases/kafka/longevity-kafka-cdc.yaml Outdated Show resolved Hide resolved
sdcm/kafka/kafka_consumer.py Outdated Show resolved Hide resolved
sdcm/kafka/kafka_consumer.py Show resolved Hide resolved
sdcm/kafka/kafka_consumer.py Outdated Show resolved Hide resolved
sdcm/kafka/kafka_consumer.py Show resolved Hide resolved
@fruch fruch force-pushed the kafka-localstack branch 3 times, most recently from 8388aa2 to 15dc9ec Compare May 27, 2024 13:02
@fruch
Copy link
Contributor Author

fruch commented May 27, 2024

Two Jobs introduced are passing now

One small pre-commit issue, and it's good to go

@fruch fruch force-pushed the kafka-localstack branch 3 times, most recently from 6892f33 to 8c64e87 Compare May 27, 2024 22:37
fruch added 3 commits May 28, 2024 01:41
Since we want to be able to run scylla kafka connectors with scylla clusters
create by SCT, we are introducing here the first of kafka backend that
would be used for local development (with SCT docker backend)

* inculde a way to configure the connector as needed (also multi ones)
* get it intsall from hub or by url

**Note**: this doesn't yet include any code that can read out of kafka
with this thread we'll be able to read the data written
by the connector, and validate we are getting the information
we expect (number of rows as the first validation)
first pipelines, based on docker and aws backends
@fruch fruch force-pushed the kafka-localstack branch from 8c64e87 to 37f3d8c Compare May 27, 2024 22:42
@fruch
Copy link
Contributor Author

fruch commented May 27, 2024

@Bouncheck

I would recommend you try it again, to get familiar with it.

@fruch fruch merged commit f0c6945 into scylladb:master May 27, 2024
1 check was pending
fruch added a commit to fruch/scylla-cluster-tests that referenced this pull request May 28, 2024
name of a property was changed from `version` to `source`
and was missed on one of the configurtion files introduce in scylladb#6946

and it started failing on test case linting right after the merge
soyacz pushed a commit that referenced this pull request May 28, 2024
name of a property was changed from `version` to `source`
and was missed on one of the configurtion files introduce in #6946

and it started failing on test case linting right after the merge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test-integration Enable running the integration tests suite test-provision-aws Run provision test on AWS test-provision-docker test-provision-gce Run provision test on GCE
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants