Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added unit section to status endpoint #928 #1089

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
2cb99ca
Add unit section to status endpoint
Pavlusha311245 Jan 25, 2024
6452ca1
Node.js: fixed "httpVersion" variable format
andrey-zelenkov Jan 25, 2024
37abe2e
HTTP: refactored out nxt_http_request_access_log().
hongzhidao Jan 23, 2024
4c91beb
HTTP: enhanced access log with conditional filtering.
hongzhidao Jan 23, 2024
dcbff27
Docs: Update changes.xml for conditional access logging
hongzhidao Jan 29, 2024
ad36450
Tests: "if" option in access logging.
andrey-zelenkov Jan 24, 2024
9919b50
Isolation: Add a new nxt_cred_t type
ac000 Jan 24, 2024
f7c9d3a
Isolation: Use an appropriate type for storing uid/gids
ac000 Jan 24, 2024
eba7378
Configuration: Use the NXT_CONF_VLDT_REQUIRED flag for procmap
ac000 Jan 24, 2024
990fbe7
Configuration: Remove procmap validation code
ac000 Jan 24, 2024
ecd5739
Configuration: Add nxt_conf_get_string_dup()
alejandro-colomar Feb 2, 2024
bb376c6
Simplify, by calling nxt_conf_get_string_dup()
alejandro-colomar Feb 2, 2024
46cef09
Configuration: Don't corrupt abstract socket names
alejandro-colomar Jan 31, 2024
9e98670
Configuration: Fix validation of "processes"
alejandro-colomar Feb 8, 2024
3a2687b
Packages: added Ubuntu 23.10 "mantic" support.
thresheek Oct 17, 2023
8ebe04f
contrib: Bump libunit-wasm to 0.3.0.
thresheek Oct 21, 2023
ca1bc06
contrib: updated njs to 0.8.2.
thresheek Oct 25, 2023
bad2c18
Packages: Added Fedora 39 support.
thresheek Nov 18, 2023
385df6d
Add unit section to status endpoint
Pavlusha311245 Jan 25, 2024
8efac48
Merge remote-tracking branch 'fork/feature/unit_about_section' into f…
Pavlusha311245 Oct 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 41 additions & 1 deletion docs/changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,43 @@
<change_log title="unit">


<changes apply="unit-jsc21" ver="1.32.0" rev="1"
date="2023-10-17" time="16:00:00 -0700"
packager="Nginx Packaging &lt;[email protected]&gt;">

<change>
<para>
Initial release of Java 21 module for NGINX Unit.
</para>
</change>

</changes>


<changes apply="unit-python3.12" ver="1.32.0" rev="1"
date="2023-10-17" time="16:00:00 -0700"
packager="Nginx Packaging &lt;[email protected]&gt;">

<change>
<para>
Initial release of Python 3.12 module for NGINX Unit.
</para>
</change>

</changes>


<changes apply="unit-php
unit-python unit-python2.7
unit-python3.4 unit-python3.5 unit-python3.6 unit-python3.7
unit-python3.8 unit-python3.9 unit-python3.10 unit-python3.11
unit-python3.12
unit-go
unit-perl
unit-ruby
unit-jsc-common unit-jsc8 unit-jsc10 unit-jsc11 unit-jsc13
unit-jsc14 unit-jsc15 unit-jsc16 unit-jsc17 unit-jsc18
unit-jsc19 unit-jsc20
unit-jsc19 unit-jsc20 unit-jsc21
unit-wasm"
ver="1.32.0" rev="1"
date="" time=""
Expand All @@ -26,6 +53,12 @@ NGINX Unit updated to 1.32.0.
</para>
</change>

<change type="feature">
<para>
conditional access logging.
</para>
</change>

<change type="feature">
<para>
$request_id variable contains a string that is formed using random data and
Expand All @@ -40,6 +73,13 @@ with Next.js.
</para>
</change>

<change type="bugfix">
<para>
ServerRequest.httpVersion variable format in Node.js module.
</para>
</change>


</changes>


Expand Down
4 changes: 2 additions & 2 deletions pkg/contrib/src/libunit-wasm/version
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
LIBUNIT_WASM_VERSION := 0.1.0
LIBUNIT_WASM_GITHASH := d6ed6a219b31a58526721f96195c80061d41ce54
LIBUNIT_WASM_VERSION := 0.3.0
LIBUNIT_WASM_GITHASH := 01c43784ec53aa1ff22aca7e7ae6f18b4591b514
2 changes: 1 addition & 1 deletion pkg/contrib/src/njs/SHA512SUMS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5038b4cd9e18de89c9cf7fe7b25a0a8a03c51cfb20b6ee5085e68f885113b104092baf5ac8fe80e9d1611b2f75e47448753e6b327bef2e706ea46f2d6299f927 njs-0.8.1.tar.gz
cc3110a0c6866dfc03d19c58745e5b75aa9792999db45bc55a752f7b04db8ae51322bfe0156b873109c8477c6c1a030c851c770697cf6791c6e89fb2fed0a2c5 njs-0.8.2.tar.gz
2 changes: 1 addition & 1 deletion pkg/contrib/src/njs/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
NJS_VERSION := 0.8.1
NJS_VERSION := 0.8.2
17 changes: 17 additions & 0 deletions pkg/deb/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,23 @@ BUILD_DEPENDS = $(BUILD_DEPENDS_unit)

MODULES=

# Ubuntu 23.10
ifeq ($(CODENAME),mantic)
include Makefile.php
include Makefile.python311
include Makefile.python312
include Makefile.go
include Makefile.perl
include Makefile.ruby
include Makefile.jsc-common
include Makefile.jsc11
include Makefile.jsc17
include Makefile.jsc19
include Makefile.jsc20
include Makefile.jsc21
include Makefile.wasm
endif

# Ubuntu 23.04
ifeq ($(CODENAME),lunar)
include Makefile.php
Expand Down
71 changes: 71 additions & 0 deletions pkg/deb/Makefile.jsc21
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
MODULES+= jsc21
MODULE_SUFFIX_jsc21= jsc21

MODULE_SUMMARY_jsc21= Java 21 module for NGINX Unit

MODULE_VERSION_jsc21= $(VERSION)
MODULE_RELEASE_jsc21= 1

MODULE_CONFARGS_jsc21= java --module=java21 --home=/usr/lib/jvm/java-21-openjdk-$$\(DEB_HOST_ARCH\) --jars=/usr/share/unit-jsc-common/
MODULE_MAKEARGS_jsc21= java21
MODULE_INSTARGS_jsc21= java21-install

MODULE_SOURCES_jsc21= unit.example-jsc-app \
unit.example-jsc21-config

BUILD_DEPENDS_jsc21= openjdk-21-jdk-headless openjdk-21-jre-headless
BUILD_DEPENDS+= $(BUILD_DEPENDS_jsc21)

MODULE_BUILD_DEPENDS_jsc21=,openjdk-21-jdk-headless
MODULE_DEPENDS_jsc21=,openjdk-21-jre-headless,unit-jsc-common (= $(MODULE_VERSION_jsc_common)-$(MODULE_RELEASE_jsc_common)~$(CODENAME))

define MODULE_PREINSTALL_jsc21
mkdir -p debian/unit-jsc21/usr/share/doc/unit-jsc21/examples/jsc-app
install -m 644 -p debian/unit.example-jsc-app debian/unit-jsc21/usr/share/doc/unit-jsc21/examples/jsc-app/index.jsp
install -m 644 -p debian/unit.example-jsc21-config debian/unit-jsc21/usr/share/doc/unit-jsc21/examples/unit.config
install -m 644 -p src/java/README.JSR-340 debian/unit-jsc21/usr/share/doc/unit-jsc21/
endef
export MODULE_PREINSTALL_jsc21

define MODULE_POSTINSTALL_jsc21
cd $$\(BUILDDIR_unit\) \&\& \
DESTDIR=$$\(INSTALLDIR\) make java-shared-uninstall
endef
export MODULE_POSTINSTALL_jsc21

define MODULE_POST_jsc21
cat <<BANNER
----------------------------------------------------------------------

The $(MODULE_SUMMARY_jsc21) has been installed.

To check out the sample app, run these commands:

sudo service unit restart
cd /usr/share/doc/unit-$(MODULE_SUFFIX_jsc21)/examples
sudo curl -X PUT --data-binary @unit.config --unix-socket /var/run/control.unit.sock http://localhost/config
curl http://localhost:8800/

Online documentation is available at https://unit.nginx.org

NOTICE:

This version of Unit code is made available in support of the open source
development process. This is an intermediate build made available for
testing purposes only. This Unit code is untested and presumed incompatible
with the JSR 340 Java Servlet 3.1 specification. You should not deploy or
write to this code. You should instead deploy and write production
applications on pre-built binaries that have been tested and certified
to meet the JSR-340 compatibility requirements such as certified binaries
published for the JSR-340 reference implementation available at
https://javaee.github.io/glassfish/.

Redistribution of any Intermediate Build must retain this notice.

Oracle and Java are registered trademarks of Oracle and/or its affiliates.
Other names may be trademarks of their respective owners.

----------------------------------------------------------------------
BANNER
endef
export MODULE_POST_jsc21
46 changes: 46 additions & 0 deletions pkg/deb/Makefile.python312
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
MODULES+= python312
MODULE_SUFFIX_python312= python3.12

MODULE_SUMMARY_python312= Python 3.12 module for NGINX Unit

MODULE_VERSION_python312= $(VERSION)
MODULE_RELEASE_python312= 1

MODULE_CONFARGS_python312= python --config=python3.12-config
MODULE_MAKEARGS_python312= python3.12
MODULE_INSTARGS_python312= python3.12-install

MODULE_SOURCES_python312= unit.example-python-app \
unit.example-python3.12-config

BUILD_DEPENDS_python312= python3.12-dev
BUILD_DEPENDS+= $(BUILD_DEPENDS_python312)

MODULE_BUILD_DEPENDS_python312=,python3.12-dev

define MODULE_PREINSTALL_python312
mkdir -p debian/unit-python3.12/usr/share/doc/unit-python3.12/examples/python-app
install -m 644 -p debian/unit.example-python-app debian/unit-python3.12/usr/share/doc/unit-python3.12/examples/python-app/wsgi.py
install -m 644 -p debian/unit.example-python3.12-config debian/unit-python3.12/usr/share/doc/unit-python3.12/examples/unit.config
endef
export MODULE_PREINSTALL_python312

define MODULE_POST_python312
cat <<BANNER
----------------------------------------------------------------------

The $(MODULE_SUMMARY_python312) has been installed.

To check out the sample app, run these commands:

sudo service unit restart
cd /usr/share/doc/unit-$(MODULE_SUFFIX_python312)/examples
sudo curl -X PUT --data-binary @unit.config --unix-socket /var/run/control.unit.sock http://localhost/config
curl http://localhost:8400/

Online documentation is available at https://unit.nginx.org

----------------------------------------------------------------------
BANNER
endef
export MODULE_POST_python312
15 changes: 15 additions & 0 deletions pkg/deb/debian.module/unit.example-jsc21-config
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"applications": {
"example_java21": {
"processes": 1,
"type": "java 21",
"webapp": "/usr/share/doc/unit-jsc21/examples/jsc-app"
}
},

"listeners": {
"*:8800": {
"pass": "applications/example_java21"
}
}
}
16 changes: 16 additions & 0 deletions pkg/deb/debian.module/unit.example-python3.12-config
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"applications": {
"example_python": {
"type": "python 3.12",
"processes": 2,
"path": "/usr/share/doc/unit-python3.12/examples/python-app",
"module": "wsgi"
}
},

"listeners": {
"*:8400": {
"pass": "applications/example_python"
}
}
}
16 changes: 15 additions & 1 deletion pkg/rpm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ else ifeq ($(shell rpm --eval "%{?amzn}"), 2023)
OSVER = amazonlinux2023
else ifeq ($(shell test `rpm --eval '0%{?fedora} -ge 35 -a 0%{?fedora} -le 36'`; echo $$?),0)
OSVER = fedora
else ifeq ($(shell test `rpm --eval '0%{?fedora} -ge 37'`; echo $$?),0)
else ifeq ($(shell test `rpm --eval '0%{?fedora} -ge 37 -a 0%{?fedora} -le 38'`; echo $$?),0)
OSVER = fedora37
else ifeq ($(shell test `rpm --eval '0%{?fedora} -ge 39'`; echo $$?),0)
OSVER = fedora39
endif

BUILD_DEPENDS_unit = gcc rpm-build rpmlint
Expand Down Expand Up @@ -124,6 +126,18 @@ include Makefile.jsc11
include Makefile.wasm
endif

ifeq ($(OSVER), fedora39)
include Makefile.php
include Makefile.python312
include Makefile.go
include Makefile.perl
include Makefile.ruby
include Makefile.jsc-common
include Makefile.jsc17
include Makefile.wasm
endif


CONFIGURE_ARGS_COMMON=\
--prefix=/usr \
--statedir=%{_sharedstatedir}/unit \
Expand Down
5 changes: 4 additions & 1 deletion pkg/rpm/Makefile.jsc-common
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,19 @@ JAVA_ARCH_jsc_common= $(shell /usr/lib/jvm/java-1.8.0/bin/java -XshowSettings 2>

ifeq ($(OSVER),amazonlinux2023)
MODULE_CONFARGS_jsc_common= java --home=/usr/lib/jvm/java-17-amazon-corretto --lib-path=/usr/lib/jvm/java-17-amazon-corretto/lib --jars=/usr/share/unit-jsc-common/
else ifeq ($(OSVER),fedora39)
MODULE_CONFARGS_jsc_common= java --home=/usr/lib/jvm/java-17-openjdk --lib-path=/usr/lib/jvm/java-17-openjdk/lib --jars=/usr/share/unit-jsc-common/
else
MODULE_CONFARGS_jsc_common= java --home=/usr/lib/jvm/java-1.8.0 --lib-path=/usr/lib/jvm/jre-1.8.0/lib/$(JAVA_ARCH_jsc_common) --jars=/usr/share/unit-jsc-common/
endif
MODULE_MAKEARGS_jsc_common= java
MODULE_INSTARGS_jsc_common= java-shared-install

MODULE_SOURCES_jsc_common= COPYRIGHT.unit-jsc-common

ifeq ($(OSVER),amazonlinux2023)
BUILD_DEPENDS_jsc_common= java-17-amazon-corretto-devel curl
else ifeq ($(OSVER),fedora39)
BUILD_DEPENDS_jsc_common= java-17-openjdk-devel curl
else
BUILD_DEPENDS_jsc_common= java-1.8.0-openjdk-devel curl
endif
Expand Down
13 changes: 13 additions & 0 deletions pkg/rpm/Makefile.jsc17
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,32 @@ MODULE_SUMMARY_jsc17= Java 17 module for NGINX Unit
MODULE_VERSION_jsc17= $(VERSION)
MODULE_RELEASE_jsc17= 1

ifeq ($(OSVER),amazonlinux2023)
MODULE_CONFARGS_jsc17= java --module=java17 --home=/usr/lib/jvm/java-17-amazon-corretto --lib-path=/usr/lib/jvm/java-17-amazon-corretto/lib --jars=/usr/share/unit-jsc-common/
else ifeq ($(OSVER),fedora39)
MODULE_CONFARGS_jsc17= java --module=java17 --home=/usr/lib/jvm/java-17-openjdk --lib-path=/usr/lib/jvm/java-17-openjdk/lib --jars=/usr/share/unit-jsc-common/
endif
MODULE_MAKEARGS_jsc17= java17
MODULE_INSTARGS_jsc17= java17-install

MODULE_SOURCES_jsc17= unit.example-jsc-app \
unit.example-jsc17-config

ifeq ($(OSVER),amazonlinux2023)
BUILD_DEPENDS_jsc17= java-17-amazon-corretto-devel
else ifeq ($(OSVER),fedora39)
BUILD_DEPENDS_jsc17= java-17-openjdk-devel
BUILD_DEPENDS+= $(BUILD_DEPENDS_jsc17)
endif

define MODULE_DEFINITIONS_jsc17
Requires: unit-jsc-common == $(MODULE_VERSION_jsc_common)-$(MODULE_RELEASE_jsc_common)%{?dist}.ngx
%if (0%{?amzn} == 2023)
Requires: java-17-amazon-corretto-headless
%endif
%if (0%{?fedora} >= 39)
Requires: java-17-openjdk-headless
%endif
endef
export MODULE_DEFINITIONS_jsc17

Expand Down
53 changes: 53 additions & 0 deletions pkg/rpm/Makefile.python312
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
MODULES+= python312
MODULE_SUFFIX_python312= python3.12

MODULE_SUMMARY_python312= Python 3.12 module for NGINX Unit

MODULE_VERSION_python312= $(VERSION)
MODULE_RELEASE_python312= 1

MODULE_CONFARGS_python312= python --config=python3.12-config
MODULE_MAKEARGS_python312= python3.12
MODULE_INSTARGS_python312= python3.12-install

MODULE_SOURCES_python312= unit.example-python-app \
unit.example-python312-config

BUILD_DEPENDS_python312= python3-devel

BUILD_DEPENDS+= $(BUILD_DEPENDS_python312)

define MODULE_PREINSTALL_python312
%{__mkdir} -p %{buildroot}%{_datadir}/doc/unit-python312/examples/python-app
%{__install} -m 644 -p %{SOURCE100} \
%{buildroot}%{_datadir}/doc/unit-python312/examples/python-app/wsgi.py
%{__install} -m 644 -p %{SOURCE101} \
%{buildroot}%{_datadir}/doc/unit-python312/examples/unit.config
endef
export MODULE_PREINSTALL_python312

define MODULE_FILES_python312
%{_libdir}/unit/modules/*
%{_libdir}/unit/debug-modules/*
endef
export MODULE_FILES_python312

define MODULE_POST_python312
cat <<BANNER
----------------------------------------------------------------------

The $(MODULE_SUMMARY_python312) has been installed.

To check the sample app, run these commands:

sudo service unit start
cd /usr/share/doc/%{name}/examples
sudo curl -X PUT --data-binary @unit.config --unix-socket /var/run/unit/control.sock http://localhost/config
curl http://localhost:8400/

Online documentation is available at https://unit.nginx.org

----------------------------------------------------------------------
BANNER
endef
export MODULE_POST_python312
Loading