Skip to content

Running drunc with pocket kafka

Pawel Plesniak edited this page Aug 8, 2024 · 4 revisions

Setup

git clone git@github.com:DUNE-DAQ/drunc.git # This will clone the drunc repo into your working directory
cd drunc
pip install . # Installs the package

Execution

drunc-unified-shell file://data/process-manager-pocket.json
dummy_boot <OPTS>

In the above, file://data/process-manager-pocket.json contains the configuration without kafka. The options are as follows

  • -u/--user - assigns a username to the processes, defaults to $USER
  • -n/-n-processes - boots the defined number of processes, defaults to 1
  • -s/--sleep - sets the duration for sleeping, defaults to 10
  • --n_sleeps - sets the multiple of -s/--sleep the process will sleep for before exiting, defaults to 6 Note - once these commands have finished executing and you run ps they will still there, you can clean these from memory using flush.

To achieve the following with a containerized kafka

Note - you will need an instance of docker installed on your local host.

Setup

From your working directory

git clone https://github.com/DUNE-DAQ/pocket
cd pocket
git checkout 406b66a49b270a09305183e999418711ce1cf6cd
SERVICES=opmon make setup.local
eval $(make env)
kubectl get pods -n kafka-kraft -w # Note this step will take a few mins as there are a lot of containers here.

Once all the containers have started

cd ../drunc
drunc-unified-shell file://data/process-manager-pocket.json
dummy_boot <OPTS>

where <OPTS> is the same as above.