Skip to content

Commit 0678bb9

Browse files
committed
Merge remote-tracking branch 'origin/main' into update-unit-file
2 parents 4b94342 + fb7c546 commit 0678bb9

File tree

95 files changed

+1332
-617
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+1332
-617
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
proxy-sanity-check:
2727
name: Proxy Sanity Check
2828
runs-on: ubuntu-22.04
29-
if: ${{ !github.event.pull_request.head.repo.fork }}
29+
if: ${{ !github.event.pull_request.head.repo.fork && !startsWith(github.head_ref, 'dependabot-') }}
3030
env:
3131
GOPROXY: "https://${{ secrets.ARTIFACTORY_USER }}:${{ secrets.ARTIFACTORY_TOKEN }}@azr.artifactory.f5net.com/artifactory/api/go/f5-nginx-go-dev"
3232
steps:
@@ -145,7 +145,7 @@ jobs:
145145
official-oss-image-integration-tests:
146146
name: Integration Tests - Official OSS Images
147147
needs: build-unsigned-snapshot
148-
if: ${{ !github.event.pull_request.head.repo.fork && !startsWith(github.ref_name, 'dependabot/') }}
148+
if: ${{ !github.event.pull_request.head.repo.fork && !startsWith(github.head_ref, 'dependabot-') }}
149149
runs-on: ubuntu-22.04
150150
strategy:
151151
matrix:
@@ -184,7 +184,7 @@ jobs:
184184
official-plus-image-integration-tests:
185185
name: Integration Tests - Official Plus Images
186186
needs: build-unsigned-snapshot
187-
if: ${{ !github.event.pull_request.head.repo.fork && !startsWith(github.ref_name, 'dependabot/') }}
187+
if: ${{ !github.event.pull_request.head.repo.fork && !startsWith(github.head_ref, 'dependabot-') }}
188188
runs-on: ubuntu-22.04
189189
strategy:
190190
matrix:
@@ -265,7 +265,7 @@ jobs:
265265
run: git push 'https://github-actions:${{ secrets.GITHUB_TOKEN }}@github.com/nginx/agent.git' benchmark-results:benchmark-results
266266
load-tests:
267267
name: Load Tests
268-
if: ${{ !github.event.pull_request.head.repo.fork && !startsWith(github.ref_name, 'dependabot/') }}
268+
if: ${{ !github.event.pull_request.head.repo.fork && !startsWith(github.head_ref, 'dependabot-') }}
269269
permissions:
270270
contents: write
271271
runs-on: ubuntu-22.04

.github/workflows/mend.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ permissions:
2525

2626
jobs:
2727
mend:
28-
if: ${{ (github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false) || (github.event_name == 'push' && github.event.repository.fork == false) }}
28+
if: >-
29+
${{
30+
(github.event_name == 'pull_request' && !github.event.pull_request.head.repo.fork && !startsWith(github.head_ref, 'dependabot-')) ||
31+
(github.event_name == 'push' && !github.event.repository.fork)
32+
}}
2933
uses: nginxinc/compliance-rules/.github/workflows/mend.yml@a27656f8f9a8748085b434ebe007f5b572709aad # v0.2
3034
secrets: inherit
3135
with:

.golangci.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ linters:
3939
- nilnil
4040
- nlreturn
4141
- noctx
42-
# - nolintlint
42+
- nolintlint
4343
- nosprintfhostport
4444
- perfsprint
4545
- prealloc
@@ -66,7 +66,7 @@ linters:
6666
- zerologlint
6767
settings:
6868
cyclop:
69-
max-complexity: 10
69+
max-complexity: 12
7070
package-average: 0
7171
errorlint:
7272
errorf: true
@@ -216,19 +216,19 @@ linters:
216216
- chan
217217
nlreturn:
218218
block-size: 2
219-
# nolintlint:
220-
# # Disable to ensure that all nolint directives actually have an effect.
221-
# # Default: false
222-
# allow-unused: true
223-
# # Exclude following linters from requiring an explanation.
224-
# # Default: []
225-
# allow-no-explanation: [ ]
226-
# # Enable to require an explanation of nonzero length after each nolint directive.
227-
# # Default: false
228-
# require-explanation: true
229-
# # Enable to require nolint directives to mention the specific linter being suppressed.
230-
# # Default: false
231-
# require-specific: true
219+
nolintlint:
220+
# Disable to ensure that all nolint directives actually have an effect.
221+
# Default: false
222+
allow-unused: true
223+
# Exclude following linters from requiring an explanation.
224+
# Default: []
225+
allow-no-explanation: [ ]
226+
# Enable to require an explanation of nonzero length after each nolint directive.
227+
# Default: false
228+
require-explanation: true
229+
# Enable to require nolint directives to mention the specific linter being suppressed.
230+
# Default: false
231+
require-specific: true
232232
prealloc:
233233
simple: true
234234
range-loops: true
@@ -285,7 +285,7 @@ linters:
285285
disabled: false
286286
- name: cognitive-complexity
287287
arguments:
288-
- 10
288+
- 12
289289
severity: warning
290290
disabled: false
291291
- name: comment-spacings
@@ -310,7 +310,7 @@ linters:
310310
disabled: false
311311
- name: cyclomatic
312312
arguments:
313-
- 10
313+
- 12
314314
severity: warning
315315
disabled: false
316316
- name: datarace

Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,8 @@ official-image-integration-test: $(SELECTED_PACKAGE) build-mock-management-plane
173173
go test -v ./test/integration/managementplane ./test/integration/auxiliarycommandserver
174174

175175
performance-test:
176-
@mkdir -p $(TEST_BUILD_DIR)
177-
@CGO_ENABLED=0 $(GOTEST) -count 10 -timeout 6m -bench=. -benchmem -run=^$$ ./... > $(TEST_BUILD_DIR)/benchmark.txt
178-
@cat $(TEST_BUILD_DIR)/benchmark.txt
176+
mkdir -p $(TEST_BUILD_DIR)
177+
bash -c 'CGO_ENABLED=0 $(GOTEST) -count 10 -timeout 6m -bench=. -benchmem -run=^$$ ./... | tee $(TEST_BUILD_DIR)/benchmark.txt; test $${PIPESTATUS[0]} -eq 0'
179178

180179
compare-performance-benchmark-results:
181180
@$(GORUN) $(BENCHSTAT) $(OLD_BENCHMARK_RESULTS_FILE) $(TEST_BUILD_DIR)/benchmark.txt

README.md

Lines changed: 23 additions & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -1,131 +1,40 @@
11
![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/nginx/agent)
2+
![GitHub Release](https://img.shields.io/github/v/release/nginx/agent)
23
![GitHub License](https://img.shields.io/github/license/nginx/agent)
34
![Contributions Welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)
4-
[![Slack](https://img.shields.io/badge/slack-join%20us-brightgreen.svg?logo=slack)](https://nginxcommunity.slack.com/channels/nginx-agent)
55
![coverage](https://raw.githubusercontent.com/nginx/agent/badges/.badges/v3/coverage.svg)
66

7-
# NGINX Agent
7+
# F5 NGINX Agent
88

9-
NGINX Agent is a companion daemon for your NGINX Open Source or NGINX Plus instance. It enables:
9+
F5 NGINX Agent is a companion application designed to efficiently manage NGINX instances. Key features include:
1010

11-
- Remote management of NGINX configurations
12-
- Collection and reporting of real-time NGINX performance and operating system metrics
13-
- Notifications of NGINX events
11+
- Remote management: Easily control and configure NGINX instances remotely.
12+
- Real-time metrics: Monitor and analyze performance data for NGINX and the underlying operating system.
1413

15-
## Development Environment Setup
14+
Discover more advanced features and capabilities by visiting [Try NGINX One: Free Enterprise Trial](https://www.f5.com/trials/nginx-one).
1615

17-
### Installing Prerequisite Packages
1816

19-
The following packages need to be installed:
17+
## Installation
2018

21-
- make
22-
- golang (<https://go.dev/doc/install>)
23-
- protoc (<https://grpc.io/docs/protoc-installation/>)
24-
- mdatagen (There is currently an [issue installing mdatagen](https://github.com/open-telemetry/opentelemetry-collector/issues/9281). See instructions below for workaround.)
19+
You can install **NGINX Agent** using one of the following methods:
2520

26-
#### Workaround to install mdatagen
21+
1. **Official documentation**
22+
Follow the step-by-step guide to add and configure instances:
23+
[How to add an instance](https://docs.nginx.com/nginx-one/how-to/nginx-configs/add-instance/)
2724

28-
```console
29-
git clone https://github.com/open-telemetry/opentelemetry-collector.git
30-
cd opentelemetry-collector
31-
git checkout v0.124.0
32-
cd cmd/mdatagen
33-
go install
34-
```
25+
2. **GitHub releases**
26+
Download the latest binaries or packages directly from the GitHub releases page:
27+
[NGINX Agent GitHub releases](https://github.com/nginx/agent/releases)
3528

36-
Before starting development on the NGINX Agent, it is important to download and install the necessary tool and dependencies required by the NGINX Agent. You can do this by running the following `make` command:
29+
3. **Installation and upgrade guide**
30+
Access detailed instructions to install or upgrade NGINX Agent from the official NGINX documentation:
31+
[NGINX Agent Installation Guide](https://docs.nginx.com/nginx-agent/installation-upgrade/)
3732

38-
```console
39-
make install-tools
40-
```
33+
## Useful links
4134

42-
### Building NGINX Agent from Source Code
35+
* [v2 - Official NGINX Agent documentation](https://docs.nginx.com/nginx-agent/)
36+
* [v3 - Official NGINX Agent documentation](https://docs.nginx.com/nginx-one/agent/)
37+
* [F5 Support](https://my.f5.com/manage/s/)
4338

44-
Build NGINX Agent deb package:
45-
46-
```console
47-
OSARCH=<operating system archiecture> make local-deb-package
48-
```
49-
50-
Build NGINX Agent rpm package:
51-
52-
```console
53-
OSARCH=<operating system archiecture> make local-rpm-package
54-
```
55-
56-
Build NGINX Agent apk package:
57-
58-
```console
59-
OSARCH=<operating system archiecture> make local-apk-package
60-
```
61-
62-
### Testing NGINX Agent
63-
64-
#### Unit tests
65-
66-
To run unit tests and check that there is enough test coverage run the following
67-
68-
```console
69-
make unit-test coverge
70-
```
71-
72-
To check for race conditions, the unit tests can also be run with a race condition detector
73-
74-
```console
75-
make race-condition-test
76-
```
77-
78-
#### Integration tests
79-
80-
To run integration tests, run the following
81-
82-
```console
83-
make integration-test
84-
```
85-
86-
#### Testing with a mock management plane
87-
88-
For testing command operations, there is a mock management gRPC server that can be used. See here: [mock management gRPC server](test/mock/grpc/README.md) \
89-
For testing metrics, there is a mock management OTel collector that can be used. See here: [mock management OTel collector](test/mock/collector/README.md)
90-
91-
## NGINX Agent Technical Specifications
92-
93-
### Supported Distributions
94-
95-
NGINX Agent can run in most environments. For a list of supported distributions, see the [NGINX Technical Specs](https://docs.nginx.com/nginx/technical-specs/#supported-distributions) guide.
96-
97-
### Supported Deployment Environments
98-
99-
NGINX Agent can be deployed in the following environments:
100-
101-
- Bare Metal
102-
- Container
103-
- Public Cloud: AWS, Google Cloud Platform, and Microsoft Azure
104-
- Virtual Machine
105-
106-
### Supported NGINX Product Versions
107-
108-
NGINX Agent works with all supported versions of NGINX Open Source and NGINX Plus.
109-
110-
### Sizing Recommendations
111-
112-
Minimum system sizing recommendations for NGINX Agent:
113-
TBD
114-
115-
## Community
116-
117-
- Our [NGINX Community Forum ](https://community.nginx.org/tag/agent) is the go-to place to ask questions and share your thoughts.
118-
119-
- Our [GitHub issues page](https://github.com/nginx/agent/issues) offers space for a more technical discussion at your own pace.
120-
121-
## Contributing
122-
123-
Get involved with the project by contributing! Please see our [contributing guide](CONTRIBUTING.md) for details.
124-
125-
## Change Log
126-
127-
See our [release page](https://github.com/nginx/agent/releases) to keep track of updates.
128-
129-
## License
130-
131-
[Apache License, Version 2.0](LICENSE)
39+
## Community
40+
If you have any questions please reach out using the [NGINX Community](https://community.nginx.org/)

api/grpc/mpi/v1/command.pb.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/grpc/mpi/v1/common.pb.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/grpc/mpi/v1/files.pb.go

Lines changed: 14 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/grpc/mpi/v1/files.pb.validate.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/grpc/mpi/v1/files.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ message FileOverview {
120120
repeated File files = 1;
121121
// The configuration version of the current set of files
122122
ConfigVersion config_version = 2;
123+
// The config file path of an instance
124+
string config_path = 3;
123125
}
124126

125127
// Represents meta data about a file

0 commit comments

Comments
 (0)