weaveworks-plugins / scope-http-statistics

Plugin for Weave Scope which implements various HTTP statistics
Apache License 2.0
40 stars 19 forks source link

Add eBPF compilation test #3

Open alepuccetti opened 7 years ago

alepuccetti commented 7 years ago

We need to test if the eBPF code compiles correctly. Because the eBPF program is compiled at runtime and it requires the kernel headers, they are provided by bind mount /sys/kernel/debug to the plugin at runtime by doing:

docker run --rm -it \
      --privileged --net=host --pid=host \
      -v /lib/modules:/lib/modules \
      -v /usr/src:/usr/src \
      -v /sys/kernel/debug/:/sys/kernel/debug/ \
      -v /var/run/scope/plugins:/var/run/scope/plugins \
      weaveworksplugins-scope-http-statistics

/cc @2opremio, @alban