Update agent version to 1.8.3

Changes:
 - amplify.agent.common.runner migrated to latest PEP 3143 implementation,
 - added support for packaging Ubuntu 24.04 "noble",
 - fixed package building for RHEL 9.
pull/119/head
Andrei Belov 2025-01-09 12:33:40 +04:00
parent 0b04168a5f
commit df07725607
No known key found for this signature in database
GPG Key ID: E82C1118AF94DF6E
13 changed files with 73 additions and 14 deletions

View File

@ -2,8 +2,8 @@
The NGINX Amplify Agent is a Python application that provides system and NGINX metric collection. It is part of NGINX Amplify — a free configuration monitoring tool for NGINX.
Please check the list of the supported operating systems [here](https://docs.nginx.com/amplify/faq/nginx-amplify-agent/#what-operating-systems-are-supported).
Please check the list of the supported operating systems [here](https://docs.nginx.com/nginx-amplify/faq/nginx-amplify-agent/#what-operating-systems-are-supported).
This repository is not for installation purposes. To install the agent, please follow [this](https://docs.nginx.com/amplify/nginx-amplify-agent/install/installing-amplify-agent/) document.
This repository is not for installation purposes. To install the agent, please follow [this](https://docs.nginx.com/nginx-amplify/nginx-amplify-agent/install/installing-amplify-agent/) document.
For more information about NGINX Amplify, please check the official documentation [here](https://docs.nginx.com/nginx-amplify/).

View File

@ -37,7 +37,7 @@ class Context(Singleton):
# define vars
self.cpu_last_check = 0
self.version_semver = (1, 8, 2)
self.version_semver = (1, 8, 3)
self.version_build = 1
self.uuid = None
self.version = '%s-%s' % ('.'.join(map(str, self.version_semver)), self.version_build)

View File

@ -1,32 +1,42 @@
# -*- coding: utf-8 -*-
import signal
from daemon import runner
import daemon
from daemon.pidfile import PIDLockFile
from amplify.agent.common.context import context
__author__ = "Mike Belov"
__copyright__ = "Copyright (C) Nginx, Inc. All rights reserved."
__license__ = ""
__maintainer__ = "Mike Belov"
__email__ = "dedm@nginx.com"
__maintainer__ = "Andrei Belov"
__email__ = "a.belov@f5.com"
class Runner(runner.DaemonRunner):
class Runner:
def __init__(self, app):
super(Runner, self).__init__(app)
def cleanup(signum, frame):
app.stop()
self.daemon_context = daemon.DaemonContext()
self.app = app
self.daemon_context.detach_process = True
self.daemon_context.pidfile = PIDLockFile('/var/run/amplify-agent/amplify-agent.pid')
self.daemon_context.files_preserve = context.get_file_handlers()
self.daemon_context.signal_map = {
signal.SIGTERM: cleanup
}
self._open_streams_from_app_stream_paths(app)
def _open_streams_from_app_stream_paths(self, app):
self.daemon_context.stdin = open(app.stdin_path, 'rt')
self.daemon_context.stdout = open(app.stdout_path, 'w+t')
self.daemon_context.stderr = open(app.stderr_path, 'w+t')
def do_action(self):
"""
Stub function to mock old DaemonRunner behavior
"""
with self.daemon_context:
self.app.run()

View File

@ -467,7 +467,7 @@ case "$os" in
incr_step
case "$codename" in
buster|bullseye|bookworm|bionic|focal|jammy)
buster|bullseye|bookworm|bionic|focal|jammy|noble)
check_python 3
python_supported=3
;;

View File

@ -1,3 +1,9 @@
nginx-amplify-agent (1.8.3-1) stable; urgency=low
* migrated to the most recent daemonizing logic (PEP 3143)
-- Andrei Belov <a.belov@f5.com> Wed, 8 Jan 2025 16:08:40 +0400
nginx-amplify-agent (1.8.2-1) stable; urgency=low
* pyMySQL updated to 1.1.1

View File

@ -0,0 +1,34 @@
Source: nginx-amplify-agent
Homepage: https://github.com/nginxinc/nginx-amplify-agent
Maintainer: NGINX Packaging <nginx-packaging@f5.com>
Section: python
Priority: optional
Build-Depends: debhelper (>= 13),
dpkg-dev (>= 1.22),
python3,
dh-python
Standards-Version: 4.5.0
Package: nginx-amplify-agent
Description: Agent for NGINX Amplify monitoring platform
The NGINX Amplify Agent is a small, Python application that provides
system and NGINX metric collection. It is part of NGINX Amplify -
the monitoring and configuration assistance service for NGINX.
.
This package installs and runs NGINX Amplify Agent daemon.
.
See http://nginx.com/amplify for more information
Architecture: any
Depends: ${misc:Depends},
${python3:Depends},
python3-daemon,
python3-setproctitle,
python3-greenlet,
python3-gevent,
python3-requests,
python3-ujson,
python3-netifaces,
python3-pymysql,
python3-psutil,
lsb-release,
adduser

View File

@ -7,3 +7,4 @@ rstr==3.0.0
python-daemon==2.2.4
ujson==5.4.0
PyMySQL==1.1.1
setuptools<=70.3.0

View File

@ -0,0 +1,4 @@
netaddr==0.8.0
flup==1.0.3
crossplane==0.5.8
rstr==3.0.0

View File

@ -157,6 +157,10 @@ fi
%changelog
* Wed Jan 8 2025 Andrei Belov <a.belov@f5.com> 1.8.3-1
- 1.8.3-1
- migrated to the most recent daemonizing logic (PEP 3143)
* Mon May 27 2024 Andrei Belov <a.belov@f5.com> 1.8.2-1
- 1.8.2-1
- pyMySQL updated to 1.1.1

View File

@ -33,7 +33,7 @@ elif is_deb():
setup(
name="nginx-amplify-agent",
version="1.8.2",
version="1.8.3",
author="Mike Belov",
author_email="dedm@nginx.com",
description="NGINX Amplify Agent",

View File

@ -33,7 +33,7 @@ elif is_deb():
setup(
name="nginx-amplify-agent",
version="1.8.2",
version="1.8.3",
author="Mike Belov",
author_email="dedm@nginx.com",
description="NGINX Amplify Agent",

View File

@ -33,7 +33,7 @@ elif is_deb():
setup(
name="nginx-amplify-agent",
version="1.8.2",
version="1.8.3",
author="Mike Belov",
author_email="dedm@nginx.com",
description="NGINX Amplify Agent",

View File

@ -1 +1 @@
1.8.2-1
1.8.3-1