From 06ed3e33cd7c7e55b29d399e01f1148514c2407c Mon Sep 17 00:00:00 2001 From: Lee Avital Date: Mon, 30 Mar 2020 15:27:25 -0400 Subject: [PATCH] Remove dev_setup.sh script (#5206) --- pkg/ebpf/README.md | 10 +--- tools/ebpf/dev_setup.sh | 121 ---------------------------------------- 2 files changed, 2 insertions(+), 129 deletions(-) delete mode 100755 tools/ebpf/dev_setup.sh diff --git a/pkg/ebpf/README.md b/pkg/ebpf/README.md index f610b3462d069..1774be9850672 100644 --- a/pkg/ebpf/README.md +++ b/pkg/ebpf/README.md @@ -1,5 +1,5 @@ ## Note -This package is a fork of the [weaveworks tcptracer-bpf](https://github.com/weaveworks/tcptracer-bpf) package which focused on tracing TCP state events (connect, accept, close) without kernel specific runtime dependencies. +This package is a fork of the [weaveworks tcptracer-bpf](https://github.com/weaveworks/tcptracer-bpf) package which focused on tracing TCP state events (connect, accept, close) without kernel specific runtime dependencies. This fork adds support for UDP, as well as collection of metrics like bytes sent/received. It also opts for event collection via polling (using BPF maps) instead of being pushed event updates via perf buffers. @@ -17,11 +17,5 @@ To adapt to the currently running kernel at run-time, tracer-bpf creates a serie ## Development -The easiest way to build and test is inside a Vagrant VM. You can provision -the VM by running `./tools/dev_setup.sh` and SSHing into the VM with `vagrant -ssh` (`vagrant` must be installed.) - -The VM will mount your local `$GOPATH`, so you can edit source code with your editor of choice. - `make nettop` will run a small testing program which -periodically prints statistics about TCP/UDP traffic inside the VM. +periodically prints statistics about TCP/UDP traffic. diff --git a/tools/ebpf/dev_setup.sh b/tools/ebpf/dev_setup.sh deleted file mode 100755 index 29a1308eef6ab..0000000000000 --- a/tools/ebpf/dev_setup.sh +++ /dev/null @@ -1,121 +0,0 @@ -#!/usr/bin/env bash - -cwd="$(dirname "$0")" -cd "$cwd" - -set -ex - -VAGRANT_CWD="$(pwd)" -export VAGRANT_CWD - -if [[ -f Vagrantfile ]]; then - echo "detected vagrant file; will clean up" - vagrant destroy -f - rm Vagrantfile -fi - -cat < Vagrantfile -Vagrant.configure("2") do |config| - config.vm.box = "hashicorp-vagrant/ubuntu-16.04" - config.vbguest.auto_update = false - config.vm.synced_folder "$GOPATH/src/github.com/DataDog", "/home/vagrant/go/src/github.com/DataDog" -end -EOD - -vagrant up - - -echo "installing tools (invoke, clang format, jq, vim, python3dev)" -cat < ~/.bashrc -echo 'export PATH=/opt/go/bin:/home/vagrant/go/bin:\$PATH' >> ~/.bashrc -sudo wget https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-386 -O /usr/local/bin/dep -q -sudo chmod +x /usr/local/bin/dep -EOD - -echo "protobuf setup" -cat <> ~/.bashrc -go get github.com/gogo/protobuf/protoc-gen-gogofaster -EOD - -echo "docker setup" -cat <> ~/.bashrc -echo 'alias curl_agent="curl -s --unix-socket /opt/datadog-agent/run/sysprobe.sock"' -echo 'echo "---------------------------------------------- -Hi and welcome in the ebpf dev env, quick help: -- \`goforit\` to go to the datadog-agent root dir -- \`invoke -e deps\` to retrieve the required dependencies -- \`invoke -e system-probe.build\` to build a system-probe (will be in ./bin/system-probe/system-probe) -- \`invoke -e system-probe.nettop\` to run nettop (a simple eBPF connection logger) -- \`curl_agent\` http://unix/debug/stats to query endpoints on the system-probe -----------------------------------------------"' >> ~/.profile -EOD - -# necessary to get group membership to be respected -vagrant reload - - echo "your development environment is ready; use \`VAGRANT_CWD=$cwd vagrant ssh\` to ssh in"