Weitere ähnliche Inhalte Ähnlich wie Open Sourcing NGINX Agent and Demo (20) Mehr von NGINX, Inc. (20) Kürzlich hochgeladen (20) Open Sourcing NGINX Agent and Demo2. ©2022 F5
2
Agenda
NGINX Agent Overview
NGINX Agent Architecture
Key NGINX Agent Features
NGINX Agent Repository and Releases
NGINX Agent Registration Demo
NGINX Agent NGINX Configuration Demo
NGINX Agent NGINX Metrics Demo
3. ©2022 F5
3
• The NGINX Agent is a lightweight piece of software that can be installed next to NGINX Open Source (OSS) and/or NGINX Plus
• It provides local interaction with NGINX instances to allow administrative actions to be carried out.
• The NGINX Agent provides the following information on a NGINX instance
• Management of NGINX instance configurations
• Metrics from Logs (OSS) or API (Plus)
• Gathering of a key set of dataplane events
• Written in Golang, uses protobuf for data contracts
NGINX Agent Overview
4. ©2022 F5
4
NGINX Agent Architecture
• NGINX Agent uses an event driven
architecture with a centralized
messaging system
• The MessagePipe uses an in-
memory message bus leveraging the
tailored plugin subscriptions
• The NGINX Agent has an SDK for
reuse of protobuf definitions and
helper functions in building your own
control plane
Messaging
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
type Plugin interface {
Init(MessagePipeInterface)
Process(*Message)
Subscriptions() []string
Close()
Info() *Info
}
type MessagePipeInterface interface {
Register(int, …Plugin)
Process(…*Message)
Run()
Context() context.Context
GetPlugins() []Plugin
}
type Message struct {
topic *string
data *Payload
}
5. ©2022 F5
5
Key NGINX Agent Features
Feature Description
Registration Registration of NGINX and Host / Dataplane Software Information
NGINX Config Management Manage NGINX configurations upstream and downstream
NGINX+ Counting R27+ NGINX Counting
Metrics Reporting Reporting of metrics information from NGINX OSS / Plus, Host (real and virtual)
Dataplane Health Status Report on the health of NGINX instances and dataplane information
6. ©2022 F5
6
Key NGINX Agent Features Continued
Feature Description
Process Watching Watch for NGINX process changes (including workers)
File Watching Watch for file changes on the dataplane, uploading NGINX configuration changes
Activity Events
Report on key events on the dataplane
• Agent Start / Stop
• Config Apply Success / Failure / Rollback
• NGINX Process and Worker Start / Stop / Reload
TLS Certificate Reporting Report on TLS Certificate Information
8. ©2022 F5
8
https://docs.nginx.com/nginx/releases
• NGINX Agentis supported on:
• Alpine Linux3.13,3.14,3.15,3.16
• AmazonLinux 2 LTS
• CentOS 7.4+
• Debian10,11
• FreeBSD12.1+,13
• Oracle Linux7.4+,8.1+
• RHEL7.4+,8.1+,9.0+
• SUSE Linux EnterpriseServer12 SP5,15 SP2
• Ubuntu 18.04LTS,20.04LTS,22.04LTS
• Available to downloadon,as of now
• Github
• https://pkgs.nginx.com/nginx-agent(requiresNGINX plus keys)
NGINX Agent Releases
Releases
1
2
3
4
5
6
7
8
9
1
0
1
1
1
2
1
3
1
4
1
5
1
6
1
7
1
8
1
9
2
0
2
1
2
2
2
3
2
4
curl --cert ./build/nginx-repo.crt --key ./build/nginx-repo.key
https://pkgs.nginx.com/nginx-agent/
<html>
<head><title>Index of /nginx-agent/</title></head>
<body>
<h1>Index of /nginx-agent/</h1><hr><pre><a href="../">../</a>
<a href="alpine/">alpine/</a>
13-Jul-2022 08:49 -
<a href="amzn2/">amzn2/</a>
13-Jul-2022 09:48 -
<a href="centos/">centos/</a>
13-Jul-2022 09:48 -
<a href="debian/">debian/</a>
05-Mar-2021 14:29 -
<a href="freebsd/">freebsd/</a>
13-Jul-2022 08:50 -
<a href="sles/">sles/</a>
13-Jul-2022 09:48 -
<a href="ubuntu/">ubuntu/</a>
13-Jul-2022 09:48 -
<a href="index.xml">index.xml</a>
13-Jul-2022 09:48 6805
</pre><hr></body>
</html>
10. ©2022 F5
10
Agent Registration Handshake (Simplified)
Agent Server
Step 1
Step 2
Step 3
Step 4
Agent Connect Request
Agent Connect Response
For Each Config Upload in Chunks
Populate
ConfigReport
Configs to request
all NGINX configs
to be uploaded
Assemble Data Chunks (DataChunk_Data)
Create HostInfo
Create NGINXDetails
Create NGINXConfig proto (optional)
12. ©2022 F5
12
NGINX Agent NGINX Metrics Demo
https://docs.nginx.com/nginx-management-suite/nim/reference/catalogs/metrics/