-
Notifications
You must be signed in to change notification settings - Fork 7
Make docker compose logging options configurable #636
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
Conversation
E2E Test ResultsDACCS-iac Pipeline ResultsBuild URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac-birdhouse/3977/Result 🆘 ABORTEDBIRDHOUSE_DEPLOY_BRANCH : configurable-logging DACCS_IAC_BRANCH : master DACCS_CONFIGS_BRANCH : master PAVICS_E2E_WORKFLOW_TESTS_BRANCH : master PAVICS_SDI_BRANCH : master DESTROY_INFRA_ON_EXIT : true PAVICS_HOST : https://host-140-91.rdext.crim.ca
|
E2E Test ResultsDACCS-iac Pipeline ResultsBuild URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac-birdhouse/3978/Result 🆘 ABORTEDBIRDHOUSE_DEPLOY_BRANCH : configurable-logging DACCS_IAC_BRANCH : master DACCS_CONFIGS_BRANCH : master PAVICS_E2E_WORKFLOW_TESTS_BRANCH : master PAVICS_SDI_BRANCH : master DESTROY_INFRA_ON_EXIT : true PAVICS_HOST : https://host-140-154.rdext.crim.ca
|
E2E Test ResultsDACCS-iac Pipeline ResultsBuild URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac-birdhouse/3981/Result ❌ FAILUREBIRDHOUSE_DEPLOY_BRANCH : configurable-logging DACCS_IAC_BRANCH : master DACCS_CONFIGS_BRANCH : master PAVICS_E2E_WORKFLOW_TESTS_BRANCH : master PAVICS_SDI_BRANCH : master DESTROY_INFRA_ON_EXIT : true PAVICS_HOST : https://host-140-91.rdext.crim.ca PAVICS-e2e-workflow-tests Pipeline ResultsTests URL : http://daccs-jenkins.crim.ca:80/job/PAVICS-e2e-workflow-tests/job/master/615/NOTEBOOK TEST RESULTS |
fmigneault
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the updates. All good
tlvu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice PR centralizing and customizing docker logging config.
Minor change requested.
|
FYI, my tests for this PR: Before this PR ( $ docker inspect -f '{{.Name}} - {{.HostConfig.LogConfig }}' proxy generic_bird finch
/proxy - {json-file map[max-file:10 max-size:50m]}
/generic_bird - {json-file map[]}
/finch - {json-file map[max-file:10 max-size:50m]}With the following added to export BIRDHOUSE_LOGGING_PROXY='{"options": {"max-file": 30}}'
export BIRDHOUSE_LOGGING_GENERIC_BIRD='{"options": {"max-file": 20}}'I have after this PR ( $ docker inspect -f '{{.Name}} - {{.HostConfig.LogConfig }}' proxy generic_bird finch
/proxy - {json-file map[max-file:30 max-size:50m]}
/generic_bird - {json-file map[max-file:20 max-size:50m]}
/finch - {json-file map[max-file:10 max-size:50m]}
$ cat components/logging/docker-compose-extra-services-ignore.yml
services:
proxy:
logging: {"options": {"max-file": 30}}
generic_bird:
logging: {"options": {"max-file": 20}}So great PR ! It also fixes any container that do not have logging configured ! Also tested this in autodeploy. |
E2E Test ResultsDACCS-iac Pipeline ResultsBuild URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac-birdhouse/3985/Result 🆘 ABORTEDBIRDHOUSE_DEPLOY_BRANCH : configurable-logging DACCS_IAC_BRANCH : master DACCS_CONFIGS_BRANCH : master PAVICS_E2E_WORKFLOW_TESTS_BRANCH : master PAVICS_SDI_BRANCH : master DESTROY_INFRA_ON_EXIT : true PAVICS_HOST : https://host-140-154.rdext.crim.ca
|
|
I'll go check what the error of #636 (comment) ⬆️ might be... Unsure why it aborted this time. edit: looks like false alarm. #636 (comment) ⬇️ booted correctly without problem ("SOS success" is because I skipped tests entirely, no problem) |
E2E Test ResultsDACCS-iac Pipeline ResultsBuild URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac-birdhouse/3987/Result 🆘 SUCCESSBIRDHOUSE_DEPLOY_BRANCH : configurable-logging DACCS_IAC_BRANCH : master DACCS_CONFIGS_BRANCH : master PAVICS_E2E_WORKFLOW_TESTS_BRANCH : master PAVICS_SDI_BRANCH : master DESTROY_INFRA_ON_EXIT : false PAVICS_HOST : https://host-140-91.rdext.crim.ca
|
|
I'm not bumping the version before merge because I'm including other open PRs in the version bump. |
E2E Test ResultsDACCS-iac Pipeline ResultsBuild URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac-birdhouse/3998/Result ❌ FAILUREBIRDHOUSE_DEPLOY_BRANCH : configurable-logging DACCS_IAC_BRANCH : master DACCS_CONFIGS_BRANCH : master PAVICS_E2E_WORKFLOW_TESTS_BRANCH : master PAVICS_SDI_BRANCH : master DESTROY_INFRA_ON_EXIT : true PAVICS_HOST : https://host-140-91.rdext.crim.ca PAVICS-e2e-workflow-tests Pipeline ResultsTests URL : http://daccs-jenkins.crim.ca:80/job/PAVICS-e2e-workflow-tests/job/master/626/NOTEBOOK TEST RESULTS |
Overview
Introduce a new component
components/loggingthat sets default logging options for all docker compose services started bybirdhouse-deploy. This component is enabled by default.The default value is set by the
BIRDHOUSE_LOGGING_DEFAULTenvironment variable. To change the default value, set theBIRDHOUSE_LOGGING_DEFAULTto a JSON string in the local environment file that contains a valid docker compose logging configuration.For example, to set the default driver to "local" set the following in your local environment file:
You can also override logging options for a single service using environment variables using a variable
BIRDHOUSE_LOGGING_<service_name>where<service_name>is the uppercase name of the docker compose service with hyphens replaced with underscores. For example, to set the default driver to "local" only for theweaver-workerservice:Logging options can can also be set directly in a component's
docker-compose-extra.ymlfile.The order of precedence for logging options are as follows:
BIRDHOUSE_LOGGING_<service_name>environment variabledocker-compose-extra.ymlfileBIRDHOUSE_LOGGING_DEFAULTenvironment variableChanges
Non-breaking changes
Breaking changes
Related Issue / Discussion
proxycomponent's dependency onschedulerandscheduler-job-logrotate-nginx#631 (comment)Additional Information
CI Operations
birdhouse_daccs_configs_branch: master
birdhouse_skip_ci: false