https://github.com/ligato/vpp-probe
Examine VPP instances running anywhere
https://github.com/ligato/vpp-probe
debugging docker kind kubernetes terminal-ui tracing vpp
Last synced: 5 months ago
JSON representation
Examine VPP instances running anywhere
- Host: GitHub
- URL: https://github.com/ligato/vpp-probe
- Owner: ligato
- License: apache-2.0
- Created: 2020-08-13T18:21:18.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-08-30T14:19:31.000Z (almost 3 years ago)
- Last Synced: 2024-12-29T18:07:56.987Z (over 1 year ago)
- Topics: debugging, docker, kind, kubernetes, terminal-ui, tracing, vpp
- Language: Go
- Homepage:
- Size: 1.01 MB
- Stars: 10
- Watchers: 4
- Forks: 8
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
vpp-probe
---
## Intro
VPP-probe is a command-line tool for inspecting and monitoring of VPP instances running in any kind of environment (_Kubernetes_, _Docker_, _Local_). It aims to help during debugging of issues that occur in the distributed systems containing several VPP instances.
### Features
- **Instance Discovery** - discover VPP instances in the target system environment
- **Packet Tracing** - trace packets from multiple VPP instances while executing arbitrary command
- **Command Execution** - execute commands on multiple VPP instances at once
- **Topology Auto-Correlation** - automatic correlation of connections across VPP instances
## Install
You can get vpp-probe by downloading a pre-compiled binary, using the official Docker image or building it from source.
### Download a pre-compiled binary
Go to [GitHub Releases](https://github.com/ligato/vpp-probe/releases) and download a binary pre-compiled for your system.
### Get Docker image
Go to [DockerHub Tags](https://hub.docker.com/r/ligato/vpp-probe/tags) for list of available tags.
##### Prerequisites
- [Docker](https://docs.docker.com/get-docker/) is required
```sh
# Pull the latest image
docker pull ligato/vpp-probe
# Print version
docker run --rm -it ligato/vpp-probe version
```
### Build from source
Go to [GitHub](https://github.com/ligato/vpp-probe) to get the source code.
##### Prerequisites
- [Go 1.15+](https://golang.org/doc/install) is required
To install vpp-probe from source simply run:
```sh
# Clone the repository
git clone https://github.com/ligato/vpp-probe.git
# if you use git with ssh: git clone git@github.com:ligato/vpp-probe.git
# Install the latest version
go install go.ligato.io/vpp-probe@latest
# if you have Go 1.15 and older: GO111MODULE=on go get go.ligato.io/vpp-probe
# Print version
vpp-probe version
```
## Quick Start
Where is your VPP running?
Kubernetes
---
Basic commands for VPP running in a Kubernetes pod
```sh
# Discover VPP instances in a cluster
vpp-probe --env=kube discover
# Execute a command on all VPP instances
vpp-probe --env=kube exec -- "vppctl show counters"
# Trace packets on all VPP instances for the duration of ping command
vpp-probe --env=kube trace "kubectl exec -it mypod -- ping -c 1 10.10.1.1"
```
Specify target cluster(s) (kubeconfig/context)
```sh
# Run on different cluster by providing custom kubeconfig and/or context
vpp-probe --kubeconfig="my.kubeconfig"
vpp-probe --kubecontext="kind-2"
# Run on multiple clusters by adding another kubeconfig/context separated by comma
vpp-probe --kubeconfig="kubeconfig1,kubeconfig2"
vpp-probe --kubecontext="kind-2,kind-3"
```
When running vpp-probe from Docker image
```sh
# Run from Docker image
docker run -it --net=host --volume "$HOME/.kube/config:/.kube/config" ligato/vpp-probe --env=kube
```
---
Docker
---
Basic commands for VPP running in a Docker container
```sh
# Discover VPP instances in Docker
vpp-probe --env=docker discover
# Execute a command on all VPP instances
vpp-probe --env=docker exec -- "vppctl show counters"
# Trace packets on all VPP instances for the duration of ping command
vpp-probe --env=docker trace "docker exec -it mycontainer ping -c 1 172.17.0.3"
```
Specify a different Docker daemon
```sh
# Run on different docker host
vpp-probe --dockerhost="/var/run/docker2.sock"
```
When running vpp-probe from Docker image
```sh
# Run from Docker image
docker run -it --net=host --volume "/var/run/docker.sock:/var/run/docker.sock" ligato/vpp-probe --env=docker
```
---
💻 Host
---
Basic commands for VPP running locally on the host
```sh
# Discover VPP instances running as local process
vpp-probe --env=local discover
# Execute a command on all VPP instances
vpp-probe --env=local exec -- "vppctl show counters"
# Trace packets on all VPP instances for the duration of ping command
vpp-probe --env=local trace "ping -c 1 192.168.1.1"
```
When running vpp-probe from Docker image
```sh
# Run from Docker image
docker run -it --net=host --pid=host --volume "/run/vpp:/run/vpp" ligato/vpp-probe --env=local
```
---
For more detailed usage information, read [docs/USAGE.md](docs/USAGE.md)
## Testing
```sh
# Run integration tests
go test ./test/integration
# Run e2e tests
go test ./test/e2e
```
For more information about testing, read [docs/TESTING.m](docs/TESTING.md)
## Development
Read [docs/DEVELOP.md](docs/DEVELOP.md) for information about vpp-probe development.