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

Opmon protobuf microservice #115

Merged
merged 40 commits into from
Jul 25, 2024
Merged

Opmon protobuf microservice #115

merged 40 commits into from
Jul 25, 2024

Conversation

mroda88
Copy link
Collaborator

@mroda88 mroda88 commented Jul 11, 2024

This PR creates a new microservice that uses the new protobuf opmon stream and puts it into influxdb. Eventually this will replace the old stream, but for now this only deploys the new one.

@mroda88 mroda88 self-assigned this Jul 11, 2024
@jcpunk
Copy link
Contributor

jcpunk commented Jul 15, 2024

I'd be tempted to run the python code through the black autoformatter.

@mroda88
Copy link
Collaborator Author

mroda88 commented Jul 15, 2024

Format with black is done

@jcfreeman2
Copy link
Contributor

Basic code structure in opmon-protobuf-dbwriter/ looks correct. There's a trailing whitespace in the string passed to opmon-protobuf-dbwriter/entrypoint.sh's ensure_required_variables, but it shouldn't matter.

@jcfreeman2
Copy link
Contributor

If I want to actually try running this microservice, what are some reasonable values to set OPMON_DBWRITER_KAFKA_GROUP , etc., to? And are these documented anywhere?

Possibly relevant here is Issue #104

@mroda88
Copy link
Collaborator Author

mroda88 commented Jul 15, 2024

Hi John, so good values for this micro service are set in the yaml file in the same directory. Those are working values based on previous tests with opmon and influx.

But running it effectively outside the kubernetes cluster is impossible. The influx server is configured in such a way that it has to be contacted from within the cluster. That's why for now this is the initial PR only and the test will be done once beam is off next week and we can tamper with the cluster freely.

But if you want to, we can sit down tomorrow and see what we can do.

@mroda88
Copy link
Collaborator Author

mroda88 commented Jul 16, 2024

ok, I think I addressed all the comments. Now if you do something like

docker run --rm -e MICROSERVICE=opmon-protobuf-dbwriter -e OPMON_DBWRITER_KAFKA_BOOTSTRAP_SERVER=dummyval -e OPMON_DBWRITER_KAFKA_GROUP=dummyval -e OPMON_DBWRITER_SUBSCRIBER_TIMEOUT_MS=10000  -e OPMON_DBWRITER_TOPIC=dummyval -e OPMON_DBWRITER_INFLUX_HOST=dummyval -e OPMON_DBWRITER_INFLUX_PORT=12345 -e OPMON_DBWRITER_TABLE=dummyval -e OPMON_DBWRITER_BATCH_SIZE_MS=1000 ghcr.io/dune-daq/microservices:mroda-opmon_protobuf

You get the correct failures due to connecting issues to the database.

@jcpunk
Copy link
Contributor

jcpunk commented Jul 16, 2024

Cool! Do you have a snippet I could use to create the missing database?

@mroda88
Copy link
Collaborator Author

mroda88 commented Jul 17, 2024

Ah, but that's the nice thing. This micro service will create the database if not already available. So we don't have to do anything. When we will test, we just deploy this and that's it. 😉

…ny use in the microservice, but it would be odd to keep using an old version
pod-security.kubernetes.io/enforce-version: latest
pod-security.kubernetes.io/warn: baseline
pod-security.kubernetes.io/warn-version: latest
name: ers
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this be opmon?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Indeed!

@mroda88 mroda88 merged commit 999ac29 into develop Jul 25, 2024
@mroda88 mroda88 deleted the mroda/opmon_protobuf branch July 25, 2024 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants