|
| 1 | +--- |
| 2 | +layout: default |
| 3 | +title: Building Nighthawk |
| 4 | +permalink: /docs/build-nighthawk/ |
| 5 | +--- |
| 6 | + |
| 7 | +<h1>Building Nighthawk (Beginner Guide)</h1> |
| 8 | + |
| 9 | +<p> |
| 10 | + This guide helps new contributors build <strong>Nighthawk</strong> locally. |
| 11 | + No prior experience with Envoy or Bazel is required. |
| 12 | +</p> |
| 13 | + |
| 14 | +<hr /> |
| 15 | + |
| 16 | +<h2>Prerequisites</h2> |
| 17 | +<ul> |
| 18 | + <li>OS: Linux (Ubuntu / Arch tested)</li> |
| 19 | + <li>RAM: Minimum 8 GB (16 GB recommended)</li> |
| 20 | + <li>CPU: 4 cores or more</li> |
| 21 | +</ul> |
| 22 | + |
| 23 | +<h2>Required Tools</h2> |
| 24 | + |
| 25 | +<pre><code> |
| 26 | + sudo pacman -S --needed git base-devel curl python jdk11-openjdk bazel |
| 27 | + </code></pre> |
| 28 | + |
| 29 | +<h2>Clone Nighthawk</h2> |
| 30 | + |
| 31 | +<pre><code> |
| 32 | + git clone https://github.com/envoyproxy/nighthawk.git |
| 33 | + cd nighthawk |
| 34 | + </code></pre> |
| 35 | + |
| 36 | +<h2>Build Nighthawk</h2> |
| 37 | + |
| 38 | +<pre><code> |
| 39 | + bazel build //:nighthawk |
| 40 | + </code></pre> |
| 41 | + |
| 42 | +<p> |
| 43 | + The first build may take 15–30 minutes as dependencies are downloaded. |
| 44 | +</p> |
| 45 | + |
| 46 | +<h2>Verify the Build</h2> |
| 47 | + |
| 48 | +<pre><code> |
| 49 | + ./bazel-bin/nighthawk --help |
| 50 | + </code></pre> |
| 51 | + |
| 52 | +<p> |
| 53 | + If the help menu appears, the build was successful. |
| 54 | +</p> |
| 55 | + |
| 56 | +<hr /> |
| 57 | + |
| 58 | +<h2>Common Issues</h2> |
| 59 | + |
| 60 | +<h3>Bazel build fails due to memory</h3> |
| 61 | +<p> |
| 62 | + Bazel is memory-intensive. Close other applications or use a machine |
| 63 | + with at least 16 GB RAM. |
| 64 | +</p> |
| 65 | + |
| 66 | +<h3>Java version errors</h3> |
| 67 | +<p> |
| 68 | + Ensure Java 11 is installed: |
| 69 | +</p> |
| 70 | + |
| 71 | +<pre><code> |
| 72 | + java -version |
| 73 | + </code></pre> |
| 74 | + |
| 75 | +<p> |
| 76 | + Install OpenJDK 11 if missing. |
| 77 | +</p> |
| 78 | + |
| 79 | +<hr /> |
| 80 | + |
| 81 | +<h2>Next Steps</h2> |
| 82 | +<ul> |
| 83 | + <li>Try running a simple HTTP load test</li> |
| 84 | + <li>Explore GetNighthawk Docker images</li> |
| 85 | + <li>Join the Layer5 Slack and ask questions</li> |
| 86 | +</ul> |
0 commit comments