Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Nighthawk docs #181

Merged
merged 7 commits into from
Sep 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/_data/docs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
- name: Section 1
- name: Overview
number: One
- name: Section 2
- name: Getting Started
number: Two
- name: Section 3
- name: Performance Benchmarking with Nighthawk
number: Three
2 changes: 1 addition & 1 deletion docs/_data/footer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
- name: Features
link: /features
- name: Run GetNighthawk
link: /docs/really-using-getnighthawk
link: /docs/what-is-getnighthawk
new_window: false
- name: Docs
link: /docs
Expand Down
52 changes: 52 additions & 0 deletions docs/collections/_docs/building-nighthawk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
layout: docs
title: Building Nighthawk
section: "Getting Started"
---

# Building Nighthawk

While GetNighthawk distribution are a convenient way of using Nighthawk, you can also build Nighthawk and run it from source.

## Clone the Nighthawk repo

Using GitHub CLI:

```
gh repo clone envoyproxy/nighthawk
```

Using HTTPS:

```
git clone https://github.com/envoyproxy/nighthawk.git
```

## Install Dependencies

On Ubuntu, run the following:

```console
sudo apt-get install \
autoconf \
automake \
cmake \
curl \
libtool \
make \
ninja-build \
patch \
python3-pip \
unzip \
virtualenv
```

Install [Golang](https://golang.org/) on your machine. This is required as part of building [BoringSSL](https://boringssl.googlesource.com/boringssl/+/HEAD/BUILDING.md) and also for [Buildifer](https://github.com/bazelbuild/buildtools) which is used for formatting bazel BUILD files.

## Building Nighthawk

Run:

```
bazel build -c opt //:nighthawk
```
85 changes: 85 additions & 0 deletions docs/collections/_docs/performance-benchmarking.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
---
layout: docs
title: Running Performance Tests
section: "Performance Benchmarking with Nighthawk"
---

[Meshery](https://meshery.io/) uses Nighthawk as one of its load generators to run performance benchmarking. Meshery is the canonical implementation of [Service Mesh Performance](https://smp-spec.io/), CNCF's service mesh performance benchmarking specification.

# Performance Benchmarking Using mesheryctl

`mesheryctl` is the command line interface of Meshery. `mesheryctl` along with other load generators, `mesheryctl` can use Nighthawk to run performance benchmarks.


## Install mesheryctl

Check this [quick start guide](https://meshery.io/#getting-started) on how to install mesheryctl.

```
mesheryctl -h
```

```
Meshery is the service mesh management plane, providing lifecycle, performance, and configuration management of service meshes and their workloads.

Usage:
mesheryctl [command]

Available Commands:
app Service Mesh Apps Management
completion generate the autocompletion script for the specified shell
exp Experimental commands for mesheryctl
help Help about any command
mesh Service Mesh Lifecycle Management
pattern Service Mesh Patterns Management
perf Performance Management
system Meshery Lifecycle Management
version Version of mesheryctl

Flags:
--config string path to config file (default "/Users/navendu/.meshery/config.yaml")
-h, --help help for mesheryctl
-v, --verbose verbose output

Use "mesheryctl [command] --help" for more information about a command.
```

## Run a performance test

See [this guide](https://docs.meshery.io/reference/mesheryctl#service-mesh-performance-management) for reference to mesheryctl commands.

The command below runs a performance benchmark test with Nighthawk with the test configuration provided through flags.

```
mesheryctl perf apply --profile istio-soak-test --concurrent-requests 1 --duration 15s --load-generator nighthawk --mesh istio --url http://localhost:2323
```

You can also run performance tests with SMP compatible test configuration files like the one shown below.

```yaml
smp_version: v0.0.1
id: d3ac6bf7-e35e-40c0-8669-5e13c9657286
name: istio-soak-test
labels: {}
clients:
- internal: false
load_generator: nighthawk
protocol: 1
connections: 2
rps: 10
headers: {}
cookies: {}
body: ""
content_type: ""
endpoint_urls:
- http://localhost:2323
duration: "15s"
```

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need example of mesheryctl perf apply -f here.

You can then use `mesheryctl` to run the test using this configuration file as shown below.

```
mesheryctl perf apply -f perf-test.yaml
```

Check the [Meshery usage guides](https://docs.meshery.io/guides) for more information on running performance benchmarks.
7 changes: 0 additions & 7 deletions docs/collections/_docs/section2.md

This file was deleted.

7 changes: 0 additions & 7 deletions docs/collections/_docs/section3.md

This file was deleted.

13 changes: 10 additions & 3 deletions docs/collections/_docs/using-getnighthawk.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
---
layout: docs
title: GetNighthawk
section: "Section 1"
title: Using GetNighthawk
section: "Getting Started"
---
Test

GetNighthawk provides a [Go package](https://github.com/layer5io/getnighthawk/tree/master/pkg/client) which the users can leverage to use Nighthawk.

GetNighthawk also provides a gRPC Go stub which can be used to interact with a running service.

[Client and Server binaries](https://github.com/layer5io/getnighthawk/tree/master/apinighthawk/bin) of Nighthawk are also built and ready to be used.

GetNighthawk also provides a Docker image that can be pulled from here.
Loading