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 docs for installing nginx-agent from repository #309

Merged
merged 18 commits into from
May 25, 2023
Merged
Show file tree
Hide file tree
Changes from 7 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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ NGINX Agent allows a gRPC connected control system to register a listener for a

| Event | Description |
| -------------------------------- | -------------------------------------------- |
| AGENT_START_MESSAGE | NGINX Agent process started |
| AGENT_STOP_MESSAGE | NGINX Agent process stopped |
| AGENT_START_MESSAGE | NGINX Agent process started |
| AGENT_STOP_MESSAGE | NGINX Agent process stopped |
| NGINX_FOUND_MESSAGE | NGINX master process detected on system |
| NGINX_STOP_MESSAGE | NGINX master process stopped |
| NGINX_RELOAD_SUCCESS_MESSAGE | NGINX master process reloaded successfully |
Expand Down
2 changes: 1 addition & 1 deletion hugo/content/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Changelog"
draft: false
description: "NGINX Agent updates changelog."
weight: 700
weight: 900
toc: true
tags: [ "docs" ]
docs: "DOCS-1093"
Expand Down
2 changes: 1 addition & 1 deletion hugo/content/community.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Contributing and Support"
draft: false
description: "Learn about the NGINX Agent community."
weight: 600
weight: 800
toc: true
tags: [ "docs" ]
docs: "DOCS-1087"
Expand Down
6 changes: 3 additions & 3 deletions hugo/content/dev-environment-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Development Environment Setup"
draft: false
description: "Learn how to setup a Development Environment for NGINX Agent."
weight: 400
weight: 600
toc: true
tags: [ "docs" ]
docs: "DOCS-1088"
Expand All @@ -16,7 +16,7 @@ While most Linux or FreeBSD operating systems can be used to contribute to the N

## Install NGINX

Follow the steps in the [Installation]({{< relref "/installation.md" >}}) section to download, install, and run NGINX and NGINX Agent.
Follow the steps in the [Installation]({{< relref "/installation-github.md" >}}) section to download, install, and run NGINX and NGINX Agent.

## Clone the NGINX Agent Repository

Expand Down Expand Up @@ -56,7 +56,7 @@ make install-tools deps

Run the following commands to build and run NGINX Agent:

```
```bash
make build
sudo make run
```
28 changes: 24 additions & 4 deletions hugo/content/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Getting Started"
draft: false
description: "Learn how to configure and run NGINX Agent."
weight: 300
weight: 500
toc: true
tags: [ "docs" ]
docs: "DOCS-1089"
Expand All @@ -14,7 +14,7 @@ Follow these steps to configure and run NGINX Agent and a mock interface ("contr

## Install NGINX

Follow the steps in the [Installation]({{< relref "/installation.md" >}}) section to download, install, and run NGINX.
Follow the steps in the [Installation]({{< relref "/installation-github.md" >}}) section to download, install, and run NGINX.

## Clone the NGINX Agent Repository

Expand All @@ -38,12 +38,12 @@ INFO[0000] grpc listening at 54789 # grpc control plane port which NGINX Agent w

## NGINX Agent Settings
If it doesn't already exist, create the `/etc/nginx-agent/` directory and copy the `nginx-agent.conf` file into it from the project root directory.
```
```bash
sudo mkdir /etc/nginx-agent
sudo cp <project_root_directory>/nginx-agent.conf /etc/nginx-agent/
```
Create the `agent-dynamic.conf` file in the `/var/lib/nginx-agent/` directory, which is required for NGINX Agent to run.
```
```bash
sudo touch /var/lib/nginx-agent/agent-dynamic.conf
```

Expand Down Expand Up @@ -139,3 +139,23 @@ Open a web browser to view the mock control plane at [http://localhost:54790](ht
- **metrics** - shows a buffer of metrics sent to the management plane (similar to what will be sent back in the REST API)

For more NGINX Agent use cases, refer to the [NGINX Agent SDK examples](https://github.com/nginx/agent/tree/main/sdk/examples).

## Start and Enable Start on Boot

To start the NGINX Agent on `systemd` systems, run the following command:

```bash
sudo systemctl start nginx-agent
```

To enable the NGINX Agent to start on boot, run the following command:

```bash
sudo systemctl enable nginx-agent
```

## Logs

NGINX Agent uses formatted log files to collect metrics. Expanding log formats and instance counts will also increase the size of the NGINX Agent log files. We recommend adding a separate partition for `/var/log/nginx-agent`.

{{< important >}}Without log rotation or storage on a separate partition, log files could use up all the free drive space and cause your system to become unresponsive to certain services.{{< /important >}}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Installation"
title: "Installation from GitHub Release"
draft: false
description: "Learn how to install NGINX Agent."
description: "Learn how to install NGINX Agent from a GitHub Release."
weight: 200
toc: true
tags: [ "docs" ]
Expand All @@ -14,9 +14,9 @@ doctypes: ["task"]

NGINX Agent interfaces directly with an NGINX server process installed on the same system. If you don't have it already, follow these steps to install [NGINX Open Source](https://www.nginx.com/resources/wiki/start/topics/tutorials/install/) or [NGINX Plus](https://docs.nginx.com/nginx/admin-guide/installing-nginx/installing-nginx-plus/). Once installed, ensure the NGINX instance is running.

## Install Agent from Package Files
## Install NGINX Agent from Package Files

To install NGINX Agent on your system, go to [Releases](https://github.com/nginx/agent/releases) and download the latest package supported by your OS distribution and CPU architecture.
To install NGINX Agent on your system, go to [GitHub Releases](https://github.com/nginx/agent/releases) and download the latest package supported by your OS distribution and CPU architecture.

Use your system's package manager to install the package. Some examples:

Expand Down Expand Up @@ -49,23 +49,3 @@ Use your system's package manager to install the package. Some examples:
```
sudo pkg add nginx-agent-<agent-version>.pkg
```

## Start and Enable Start on Boot

To start the NGINX Agent on `systemd` systems, run the following command:

```
sudo systemctl start nginx-agent
```

To enable the NGINX Agent to start on boot, run the following command:

```
sudo systemctl enable nginx-agent
```

## Logs

NGINX Agent uses formatted log files to collect metrics. Expanding log formats and instance counts will also increase the size of the NGINX Agent log files. We recommend adding a separate partition for `/var/log/nginx-agent`.

{{< important >}}Without log rotation or storage on a separate partition, log files could use up all the free drive space and cause your system to become unresponsive to certain services.{{< /important >}}
Loading