Skip to content

Commit c64ca91

Browse files
Remove proxy component's dependency on scheduler and scheduler-job-logrotate-nginx (#631)
## Overview Creates new settings in `optional-components/proxy-log-volume` that create the `proxy-logs` docker volume as well as instructing Nginx to write access logs to an additional log file (specified by `PROXY_LOG_PATH`). These settings are included as a `COMPONENT_DEPENDENCY` in components that require access to the the `proxy` access logs as a regular file. If no components require access to these logs as a regular file then the `proxy` component will only write access logs to the stdout stream for that container. Right now, the only components that require access to logs in this way are `components/canarie-api` and `optional-components/prometheus-log-parser`. Both of these now include `optional-components/proxy-log-volume` as a `COMPONENT_DEPENDENCY`. Note: this means that if no optional components require `optional-components/proxy-log-volume` as a dependency then logs from the `proxy` container will only be written to stdout/stderr. This means that there is no need for any additional custom log rotation handling since the logs are handled directly by docker. This means that the `proxy` service itself no longer need to be dependant on the `scheduler` and `scheduler-job-logrotate-nginx` components. Note: a previous discussion suggested that logs could be parsed directly from the stdout stream of the `proxy` container. However, there is no way to do so that doesn't require very hacky workarounds. Possible solutions that were explored and rejected include: - Mounting the log file from the `proxy` container from the host to the relevant containers. Rejected because this practice is highly discouraged by docker as the actual storage location of log files is not standardized and may be changed in future versions. - Writing logs to a named pipe or socket within the `proxy` container. Rejected because this is very difficult to set up and is untested when then mounted to other containers. Also, a different named pipe would be required for each consumer which is currently very difficult to set up using birdhouse's deployment tools. **Breaking Change**: if a custom component (not included in this repository) uses the `proxy-logs` named volume. It must now include `optional-components/proxy-log-volume` as a `COMPONENT_DEPENDENCY` for that custom component. **Breaking Change**: if `SCHEDULER_JOB_BACKUP_ARGS` specifies `-l proxy` explicitly (not `-l '*'`) then this should be changed to `-l proxy-log-volume` since the backup script has been moved. Note that it is not necessary to specify `-l proxy-log-volume` if `--birdhouse-logs` is also specified because the log data is identical in both. ## Changes **Non-breaking changes** - create new volume component **Breaking changes** - see above ## Related Issue / Discussion - Resolves #618 ## Additional Information ## CI Operations <!-- The test suite can be run using a different DACCS config with ``birdhouse_daccs_configs_branch: branch_name`` in the PR description. To globally skip the test suite regardless of the commit message use ``birdhouse_skip_ci`` set to ``true`` in the PR description. Using ``[<cmd>]`` (with the brackets) where ``<cmd> = skip ci`` in the commit message will override ``birdhouse_skip_ci`` from the PR description. Such commit command can be used to override the PR description behavior for a specific commit update. However, a commit message cannot 'force run' a PR which the description turns off the CI. To run the CI, the PR should instead be updated with a ``true`` value, and a running message can be posted in following PR comments to trigger tests once again. --> birdhouse_daccs_configs_branch: master birdhouse_skip_ci: false
2 parents 0be62de + 78fb779 commit c64ca91

File tree

25 files changed

+157
-45
lines changed

25 files changed

+157
-45
lines changed

.bumpversion.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tool.bumpversion]
2-
current_version = "2.20.4"
2+
current_version = "2.21.0"
33
commit = true
44
tag = false
55
tag_name = "{new_version}"

CHANGES.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,50 @@
1515
[Unreleased](https://github.com/bird-house/birdhouse-deploy/tree/master) (latest)
1616
------------------------------------------------------------------------------------------------------------------
1717

18+
[//]: # (list changes here, using '-' for each new entry, remove this when items are added)
19+
20+
[2.21.0](https://github.com/bird-house/birdhouse-deploy/tree/2.21.0) (2026-01-27)
21+
------------------------------------------------------------------------------------------------------------------
22+
1823
## Changes
1924

25+
- Remove `proxy` component's dependency on `scheduler` and `scheduler-job-logrotate-nginx`
26+
27+
Creates new settings in `optional-components/proxy-log-volume` that create the `proxy-logs` docker volume as well
28+
as instructing Nginx to write access logs to an additional log file (specified by `PROXY_LOG_PATH`). These settings
29+
are included as a `COMPONENT_DEPENDENCY` in components that require access to the the `proxy` access logs as a
30+
regular file. If no components require access to these logs as a regular file then the `proxy` component will only
31+
write access logs to the stdout stream for that container.
32+
33+
Right now, the only components that require access to logs in this way are `components/canarie-api` and
34+
`optional-components/prometheus-log-parser`. Both of these now include `optional-components/proxy-log-volume` as a
35+
`COMPONENT_DEPENDENCY`.
36+
37+
Note: this means that if no optional components require `optional-components/proxy-log-volume` as a dependency
38+
then logs from the `proxy` container will only be written to stdout/stderr. This means that there is no need
39+
for any additional custom log rotation handling since the logs are handled directly by docker. This means that
40+
the `proxy` service itself no longer need to be dependant on the `scheduler` and `scheduler-job-logrotate-nginx`
41+
components.
42+
43+
Note: a previous discussion suggested that logs could be parsed directly from the stdout stream of the `proxy`
44+
container. However, there is no way to do so that doesn't require very hacky workarounds. Possible solutions that
45+
were explored and rejected include:
46+
47+
- Mounting the log file from the `proxy` container from the host to the relevant containers.
48+
Rejected because this practice is highly discouraged by docker as the actual storage location of log files
49+
is not standardized and may be changed in future versions.
50+
- Writing logs to a named pipe or socket within the `proxy` container.
51+
Rejected because this is very difficult to set up and is untested when then mounted to other containers.
52+
Also, a different named pipe would be required for each consumer which is currently very difficult to set up
53+
using birdhouse's deployment tools.
54+
55+
**Breaking Change**: if a custom component (not included in this repository) uses the `proxy-logs` named volume.
56+
It must now include `optional-components/proxy-log-volume` as a `COMPONENT_DEPENDENCY` for that custom component.
57+
58+
**Breaking Change**: if `SCHEDULER_JOB_BACKUP_ARGS` specifies `-l proxy` explicitly (not `-l '*'`) then this should
59+
be changed to `-l proxy-log-volume` since the backup script has been moved. Note that it is not necessary to
60+
specify `-l proxy-log-volume` if `--birdhouse-logs` is also specified because the log data is identical in both.
61+
2062
- Make docker compose logging options configurable
2163

2264
Introduce a new component `components/logging` that sets default logging options for all docker

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ override BIRDHOUSE_MAKE_DIR := $(shell realpath -P $$(dirname $(BIRDHOUSE_MAKE_C
88
# Generic variables
99
override SHELL := bash
1010
override APP_NAME := birdhouse-deploy
11-
override APP_VERSION := 2.20.4
11+
override APP_VERSION := 2.21.0
1212

1313
# utility to remove comments after value of an option variable
1414
override clean_opt = $(shell echo "$(1)" | $(_SED) -r -e "s/[ '$'\t'']+$$//g")

README.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ for a full-fledged production platform.
1818
* - citation
1919
- | |citation|
2020

21-
.. |commits-since| image:: https://img.shields.io/github/commits-since/bird-house/birdhouse-deploy/2.20.4.svg
21+
.. |commits-since| image:: https://img.shields.io/github/commits-since/bird-house/birdhouse-deploy/2.21.0.svg
2222
:alt: Commits since latest release
23-
:target: https://github.com/bird-house/birdhouse-deploy/compare/2.20.4...master
23+
:target: https://github.com/bird-house/birdhouse-deploy/compare/2.21.0...master
2424

25-
.. |latest-version| image:: https://img.shields.io/badge/tag-2.20.4-blue.svg?style=flat
25+
.. |latest-version| image:: https://img.shields.io/badge/tag-2.21.0-blue.svg?style=flat
2626
:alt: Latest Tag
27-
:target: https://github.com/bird-house/birdhouse-deploy/tree/2.20.4
27+
:target: https://github.com/bird-house/birdhouse-deploy/tree/2.21.0
2828

2929
.. |readthedocs| image:: https://readthedocs.org/projects/birdhouse-deploy/badge/?version=latest
3030
:alt: ReadTheDocs Build Status (latest version)

RELEASE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.20.4 2026-01-16T16:40:32Z
1+
2.21.0 2026-01-27T20:49:01Z

birdhouse/components/canarie-api/config/proxy/docker-compose-extra.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@ services:
22
proxy:
33
volumes:
44
- ./components/canarie-api/config/proxy/conf.extra-service.d:/etc/nginx/conf.extra-service.d/canarie-api:ro
5-
- proxy-logs:${PROXY_LOG_DIR}

birdhouse/components/canarie-api/default.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ export DELAYED_EVAL="
1212

1313
# add any component that this component requires to run
1414
COMPONENT_DEPENDENCIES="
15-
./components/proxy
15+
./optional-components/proxy-log-volume
1616
"

birdhouse/components/canarie-api/docker-compose-extra.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@ services:
3636
restart: always
3737
entrypoint: /entrypoint
3838

39+
# Note: proxy-logs volume is defined in the proxy-logs-volume component
3940
volumes:
4041
canarie-data:
41-
proxy-logs:

birdhouse/components/canarie-api/docker_configuration.py.template

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ SERVICES = {
108108
# NOTE:
109109
# Below version and release time auto-managed by 'make VERSION=x.y.z bump'.
110110
# Do NOT modify it manually. See 'Tagging policy' in 'birdhouse/README.rst'.
111-
'version': '2.20.4',
112-
'releaseTime': '2026-01-16T16:40:32Z',
111+
'version': '2.21.0',
112+
'releaseTime': '2026-01-27T20:49:01Z',
113113
'institution': '${BIRDHOUSE_INSTITUTION}',
114114
'researchSubject': '${BIRDHOUSE_SUBJECT}',
115115
'supportEmail': '${BIRDHOUSE_SUPPORT_EMAIL}',
@@ -141,8 +141,8 @@ PLATFORMS = {
141141
# NOTE:
142142
# Below version and release time auto-managed by 'make VERSION=x.y.z bump'.
143143
# Do NOT modify it manually. See 'Tagging policy' in 'birdhouse/README.rst'.
144-
'version': '2.20.4',
145-
'releaseTime': '2026-01-16T16:40:32Z',
144+
'version': '2.21.0',
145+
'releaseTime': '2026-01-27T20:49:01Z',
146146
'institution': '${BIRDHOUSE_INSTITUTION}',
147147
'researchSubject': '${BIRDHOUSE_SUBJECT}',
148148
'supportEmail': '${BIRDHOUSE_SUPPORT_EMAIL}',

birdhouse/components/proxy/default.env

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,9 @@ export PROXY_INCLUDE_FOR_PORT_80='$([ x"$BIRDHOUSE_ALLOW_UNSECURE_HTTP" = x"True
3535
export PROXY_LISTEN_443_PARAMS=""
3636
export PROXY_LISTEN_80_PARAMS=""
3737

38-
export PROXY_LOG_DIR="/var/log/nginx/"
39-
export PROXY_LOG_FILE="access_file.log"
40-
export PROXY_LOG_PATH='${PROXY_LOG_DIR}/${PROXY_LOG_FILE}'
4138

4239
export DELAYED_EVAL="
4340
$DELAYED_EVAL
44-
PROXY_LOG_PATH
4541
BIRDHOUSE_PROXY_SCHEME
4642
BIRDHOUSE_ALLOW_UNSECURE_HTTP
4743
PROXY_INCLUDE_HTTPS
@@ -65,15 +61,7 @@ export OPTIONAL_VARS="
6561
\$PROXY_INCLUDE_FOR_PORT_80
6662
\$PROXY_READ_TIMEOUT_VALUE
6763
\$BIRDHOUSE_PROXY_ROOT_LOCATION
68-
\$PROXY_LOG_FILE
69-
\$PROXY_LOG_PATH
7064
\$PROXY_INCLUDE_HTTPS
7165
\$PROXY_LISTEN_443_PARAMS
7266
\$PROXY_LISTEN_80_PARAMS
7367
"
74-
75-
# TODO: remove this dependency once https://github.com/bird-house/birdhouse-deploy/issues/618 is resolved
76-
COMPONENT_DEPENDENCIES="
77-
./components/scheduler
78-
./optional-components/scheduler-job-logrotate-nginx
79-
"

0 commit comments

Comments
 (0)