Skip to content

Setup drunc with Pocket's Kafka

Pierre Lasorak edited this page Sep 2, 2024 · 1 revision

The idea here is that you will need to start Kafka yourself and modify the drunc's configuration to point to your instance.

In which situations would you do this?

  • You are not at EHN1.

This is relatively easy with pocket, but you will need to have docker on your machine.

Setting up Kafka with pocket

Here are the steps you need to follow:

  1. Make sure docker works: docker run hello-world. It should say "Hello from Docker!" somewhere the lines printed.
  2. Clone pocket: git clone https://github.com/DUNE-DAQ/pocket
  3. Grab this particular commit:
cd pocket
git checkout 406b66a49b270a09305183e999418711ce1cf6cd

and ignore the detached head state warning.

  1. Start the monitoring facilities:
cd pocket
SERVICES=OPMON make setup.local # actually, this will also setup Opmon/Grafana, which could be useful for different reasons.
  1. Add the kubernetes facilities to your shell: eval $(make env)
  2. Wait for Kafka to start
kubectl get pods -n kafka-kraft -w
NAME      READY   STATUS    RESTARTS   AGE
kafka-0   1/1     Running   0          28d

Make sure that the status is "Running" before starting drunc. You can ctrl-c the kubectl command when that is the case.

Modify configurations to point to your Kafka

For the process manager, start it with

drunc-process-manager ssh-pocket-kafka

For the unified shell:

drunc-unified-shell ssh-pocket-kafka oks-conf.data.xml session-name

For the DAQ session, it's a bit more involved, you need to go inside oks configuration XML and all the included XML, and modify the broadcaster services to point to localhost:31014. Then recompile and run drunc.

Stopping Kafka

Go back to your pocket directory and do

make destroy.local