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

fix: move go installation step #211

Merged
merged 1 commit into from
Feb 21, 2023
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
27 changes: 21 additions & 6 deletions hugo/content/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,19 @@ doctypes: ["task"]

Follow these steps to configure and run NGINX Agent and a mock interface ("control plane") to which the NGINX Agent will report.

## Install NGINX and NGINX Agent
## 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.md" >}}) section to download, install, and run NGINX.

## Clone the NGINX Agent Repository

Using your preferred method, clone the NGINX Agent repository into your development directory. See [Cloning a GitHub Repository](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository) for additional help.

## Start the Mock Control Plane
## Install Go

NGINX Agent and the Mock Control Plane are written in Go. Go 1.19 or higher is required to build and run either application from the source code directory. You can [download Go from the official website](https://go.dev/dl/).

## Start the gRPC Mock Control Plane

Start the mock control plane by running the following command from the `agent` source code root directory:

Expand All @@ -46,11 +50,11 @@ Create the `agent-dynamic.conf` file in the `/etc/nginx-agent/` directory, which
sudo touch /etc/nginx-agent/agent-dynamic.conf
```

### Enabling the gRPC interface
### Enable the gRPC interface

Add the the following settings to `/etc/nginx-agent/nginx-agent.conf`:

```nginx
```yaml
server:
host: 127.0.0.1 # mock control plane host
grpcPort: 54789 # mock control plane gRPC port
Expand All @@ -61,7 +65,9 @@ tls:
skip_verify: true
```

### Enabling the REST interface
For more information, see [Agent Protocol Definitions and Documentation](https://github.com/nginx/agent/tree/main/docs/proto/README.md)

### Enable the REST interface

The NGINX Agent REST interface can be exposed by validating the following lines in the `/etc/nginx-agent/nginx-agent.conf` file are present:

Expand All @@ -76,6 +82,15 @@ api:

The mock control plane can use either gRPC or REST protocols to communicate with NGINX Agent.

## Launch Swagger UI
Swagger UI requires goswagger be installed. See [instructions for installing goswagger](https://goswagger.io/install.html) for additional help.

To launch the Swagger UI for the REST interface run the following command

```bash
make launch-swagger-ui
```

## Start NGINX Agent

If already running, restart NGINX Agent to apply the new configuration. Alternatively, if NGINX Agent is not running, you may run it from the source code root directory.
Expand Down
4 changes: 0 additions & 4 deletions hugo/content/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ 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 Go

NGINX Agent is written in Go and requires Go 1.19 or higher to be installed. You can [download Go from the official website](https://go.dev/dl/).

## Install Agent from Package Files

To install NGINX Agent on your system, go to [Releases](https://github.com/nginx/agent/releases) and download `nginx-agent.tar.gz`. Create a new subdirectory and extract the archive into it. Change into the subdirectory matching the package manager format appropriate for your operating system distribution.
Expand Down