Skip to content

Commit

Permalink
fix: move go installation step (#211)
Browse files Browse the repository at this point in the history
  • Loading branch information
JTorreG authored Feb 21, 2023
1 parent 03163a6 commit d74f5ef
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 10 deletions.
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

0 comments on commit d74f5ef

Please sign in to comment.