Skip to content

Commit

Permalink
Bump documentation theme version
Browse files Browse the repository at this point in the history
  • Loading branch information
ADubhlaoich committed Sep 23, 2024
2 parents 095116e + f8f4443 commit fd1ab65
Show file tree
Hide file tree
Showing 107 changed files with 6,030 additions and 1,181 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: 'go.mod'
cache: false
- name: run install-tools
run: make install-tools
- name: run lint
Expand All @@ -39,6 +40,7 @@ jobs:
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: 'go.mod'
cache: false
- name: Run Unit Tests
run: make unit-test
- name: Check Coverage
Expand All @@ -57,6 +59,7 @@ jobs:
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: 'go.mod'
cache: false
- name: Run unit tests with race condition detection
run: make race-condition-test
build-unsigned-snapshot:
Expand All @@ -67,6 +70,7 @@ jobs:
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: 'go.mod'
cache: false
- name: Setup Build Environment
run: go install github.com/goreleaser/nfpm/v2/cmd/nfpm@${{ env.NFPM_VERSION }}
- name: Build Packages
Expand All @@ -88,6 +92,7 @@ jobs:
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: 'go.mod'
cache: false
- name: Download Packages
uses: actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe # v4.1.2
with:
Expand Down Expand Up @@ -117,6 +122,7 @@ jobs:
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: 'go.mod'
cache: false
- name: Download Packages
uses: actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe # v4.1.2
with:
Expand Down Expand Up @@ -153,6 +159,7 @@ jobs:
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: 'go.mod'
cache: false
- name: Download Packages
uses: actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe # v4.1.2
with:
Expand Down Expand Up @@ -180,11 +187,6 @@ jobs:
strategy:
matrix:
container:
- image: "alpine"
version: "3.18"
plus: "r30"
release: "alpine"
path: "/nginx-plus/agent"
- image: "alpine"
version: "3.20"
plus: "r32"
Expand All @@ -205,16 +207,12 @@ jobs:
plus: "r31"
release: "debian"
path: "/nginx-plus/agent"
- image: "debian"
version: "bookworm"
plus: "r30"
release: "debian"
path: "/nginx-plus/agent"
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: 'go.mod'
cache: false
- name: Download Packages
uses: actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe # v4.1.2
with:
Expand Down Expand Up @@ -244,6 +242,7 @@ jobs:
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: 'go.mod'
cache: false
- name: Run Performance Tests
run: |
make performance-test
Expand Down Expand Up @@ -274,6 +273,7 @@ jobs:
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: 'go.mod'
cache: false

- name: Download Packages
uses: actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe # v4.1.2
Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/f5-cla.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: F5 CLA

on:
issue_comment:
types:
- created
pull_request_target:
types:
- opened
- synchronize
- reopened

concurrency:
group: ${{ github.ref_name }}-cla

permissions:
contents: read

jobs:
f5-cla:
name: F5 CLA
runs-on: ubuntu-22.04
permissions:
actions: write
contents: read
pull-requests: write
statuses: write
steps:
- name: Run F5 Contributor License Agreement (CLA) assistant
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have hereby read the F5 CLA and agree to its terms') || github.event_name == 'pull_request_target'
uses: contributor-assistant/github-action@f41946747f85d28e9a738f4f38dbcc74b69c7e0e # v2.5.1
with:
# Any pull request targeting the following branch will trigger a CLA check.
branch: "main"
# Path to the CLA document.
path-to-document: "https://github.com/f5/.github/blob/main/CLA/cla-markdown.md"
# Custom CLA messages.
custom-notsigned-prcomment: "🎉 Thank you for your contribution! It appears you have not yet signed the F5 Contributor License Agreement (CLA), which is required for your changes to be incorporated into an F5 Open Source Software (OSS) project. Please kindly read the [F5 CLA](https://github.com/f5/.github/blob/main/CLA/cla-markdown.md) and reply on a new comment with the following text to agree:"
custom-pr-sign-comment: "I have hereby read the F5 CLA and agree to its terms"
custom-allsigned-prcomment: "✅ All required contributors have signed the F5 CLA for this PR. Thank you!"
# Remote repository storing CLA signatures.
remote-organization-name: "f5"
remote-repository-name: "f5-cla-data"
path-to-signatures: "signatures/beta/signatures.json"
# Comma separated list of usernames for maintainers or any other individuals who should not be prompted for a CLA.
allowlist: "bot*"
# Do not lock PRs after a merge.
lock-pullrequest-aftermerge: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PERSONAL_ACCESS_TOKEN: ${{ secrets.F5_CLA_TOKEN }}
1 change: 1 addition & 0 deletions .github/workflows/release-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ jobs:
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: 'go.mod'
cache: false

- name: Setup package build environment
run: |
Expand Down
2 changes: 1 addition & 1 deletion CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @nginx/nginx-agent-maintainers
* @nginx/nginx-agent
9 changes: 9 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@ To suggest a feature or enhancement, please create an issue on GitHub with the l

Note: if you'd like to implement a new feature, please consider creating a feature request issue first to start a discussion about the feature.

### F5 Contributor License Agreement (CLA)

F5 requires all external contributors to agree to the terms of the F5 CLA (available [here](https://github.com/f5/.github/blob/main/CLA/cla-markdown.md))
before any of their changes can be incorporated into an F5 Open Source repository.

If you have not yet agreed to the F5 CLA terms and submit a PR to this repository, a bot will prompt you to view and
agree to the F5 CLA. You will have to agree to the F5 CLA terms through a comment in the PR before any of your changes
can be merged. Your agreement signature will be safely stored by F5 and no longer be required in future PRs.

## Code Guidelines

<!-- ### Go Guidelines Here Linter-->
Expand Down
16 changes: 13 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ run-mock-management-grpc-server: ## Run mock management plane gRPC server
$(GORUN) test/mock/grpc/cmd/main.go -configDirectory=$(MOCK_MANAGEMENT_PLANE_CONFIG_DIRECTORY) -logLevel=$(MOCK_MANAGEMENT_PLANE_LOG_LEVEL) -grpcAddress=$(MOCK_MANAGEMENT_PLANE_GRPC_ADDRESS) -apiAddress=$(MOCK_MANAGEMENT_PLANE_API_ADDRESS)

.PHONY: build-test-plus-image
build-test-plus-image: local-deb-package
build-test-plus-image:
$(CONTAINER_BUILDENV) $(CONTAINER_CLITOOL) build -t nginx_plus_$(IMAGE_TAG) . \
--no-cache -f ./scripts/docker/nginx-plus/deb/Dockerfile \
--secret id=nginx-crt,src=$(CERTS_DIR)/nginx-repo.crt \
Expand All @@ -198,15 +198,25 @@ build-test-plus-image: local-deb-package
--build-arg BASE_IMAGE=$(BASE_IMAGE) \
--build-arg ENTRY_POINT=./scripts/docker/entrypoint.sh

.PHONY: build-test-oss-image
build-test-oss-image:
$(CONTAINER_BUILDENV) $(CONTAINER_CLITOOL) build -t nginx_oss_$(IMAGE_TAG) . \
--no-cache -f ./scripts/docker/nginx-oss/deb/Dockerfile \
--target install-agent-local \
--build-arg PACKAGE_NAME=$(PACKAGE_NAME) \
--build-arg PACKAGES_REPO=$(OSS_PACKAGES_REPO) \
--build-arg BASE_IMAGE=$(BASE_IMAGE) \
--build-arg ENTRY_POINT=./scripts/docker/entrypoint.sh

.PHONY: run-mock-management-otel-collector
run-mock-management-otel-collector: ## Run mock management plane OTel collector
@echo "🚀 Running mock management plane OTel collector"
AGENT_IMAGE=nginx_plus_$(IMAGE_TAG):latest $(CONTAINER_COMPOSE) -f ./test/mock/collector/docker-compose.yaml up -d
AGENT_IMAGE_WITH_NGINX_PLUS=nginx_plus_$(IMAGE_TAG):latest AGENT_IMAGE_WITH_NGINX_OSS=nginx_oss_$(IMAGE_TAG):latest $(CONTAINER_COMPOSE) -f ./test/mock/collector/docker-compose.yaml up -d

.PHONY: stop-mock-management-otel-collector
stop-mock-management-otel-collector: ## Stop running mock management plane OTel collector
@echo "Stopping mock management plane OTel collector"
AGENT_IMAGE=nginx_plus_$(IMAGE_TAG):latest $(CONTAINER_COMPOSE) -f ./test/mock/collector/docker-compose.yaml down
AGENT_IMAGE_WITH_NGINX_PLUS=nginx_plus_$(IMAGE_TAG):latest AGENT_IMAGE_WITH_NGINX_OSS=nginx_oss_$(IMAGE_TAG):latest $(CONTAINER_COMPOSE) -f ./test/mock/collector/docker-compose.yaml down

generate: ## Generate golang code
@echo "🗄️ Generating proto files"
Expand Down
7 changes: 7 additions & 0 deletions Makefile.packaging
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,13 @@ build-signed-packager:
gpg-key: ## Generate GPG public key
$$(gpg --import $(NFPM_SIGNING_KEY_FILE)); \
keyid=$$(gpg --list-keys NGINX | egrep -A1 "^pub" | egrep -v "^pub" | tr -d '[:space:]'); \
if [ -z "$$keyid" ]; then echo "Error: GPG key not found."; exit 1; fi; \
# Check if the key is expired \
# Look for the 'e' (expired) flag in the 'pub' or 'uid' lines \
if gpg --list-keys --with-colons "$$keyid" | grep -E '^pub:e:|^uid:e:'; then \
echo "Error: GPG key has expired."; \
exit 1; \
fi; \
expiry=1y; \
$$(gpg --quick-set-expire $$keyid $$expiry '*'); \
# we need to convert the private gpg key to rsa pem format for pkg signing \
Expand Down
8 changes: 1 addition & 7 deletions Makefile.tools
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,10 @@ NFPM = github.com/goreleaser/nfpm/v2/cmd/[email protected]
GOTESTCOVERAGE = github.com/vladopajic/go-test-coverage/[email protected]
BENCHSTAT = golang.org/x/perf/cmd/[email protected]
BUF = github.com/bufbuild/buf/cmd/[email protected]
MDATAGEN = go.opentelemetry.io/collector/cmd/mdatagen

install-tools: ## Install tool dependencies
@echo "Installing Tools"

// Workaround because of this issue https://github.com/open-telemetry/opentelemetry-collector/issues/9281
@go get $(MDATAGEN)
@$(GOINST) $(MDATAGEN)
@go mod tidy


@$(GOINST) $(OAPICODEGEN)
@$(GOINST) $(LEFTHOOK)
@$(GOINST) $(GOLANGCILINT)
Expand Down
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,27 @@ NGINX Agent is a companion daemon for your NGINX Open Source or NGINX Plus insta

> **Note**: There is a separate [README for Agent version 2](README_v2.md) and earlier.
## Development Environment Setup

### Installing Prerequisite Packages
The following packages need to be installed:
- make
- golang (https://go.dev/doc/install)
- protoc (https://grpc.io/docs/protoc-installation/)
- mdatagen (There is a workaround for installing mdatagen that can be found here: https://github.com/open-telemetry/opentelemetry-collector/issues/9281#issuecomment-2276407679)

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:
```
make install-tools
```

### Building NGINX Agent from Source Code
Run the following commands to build and run NGINX Agent:
```
make build
sudo make run
```

## NGINX Agent Technical Specifications

## Supported Distributions
Expand Down
Loading

0 comments on commit fd1ab65

Please sign in to comment.