-
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
b3631f1
make docker compose logging configurable
mishaschwartz 3cbe3d8
update tests
mishaschwartz b5901c3
review updates
mishaschwartz dbff578
review suggestions
mishaschwartz dfd3101
Merge branch 'master' into configurable-logging
mishaschwartz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
birdhouse/components/cowbird/config/canarie-api/docker-compose-extra.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
|
|
||
| services: | ||
| canarie-api: &canarie-volumes | ||
| volumes: | ||
|
|
||
1 change: 0 additions & 1 deletion
1
birdhouse/components/cowbird/config/geoserver/docker-compose-extra.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
|
|
||
| services: | ||
| cowbird: | ||
| environment: | ||
|
|
||
1 change: 0 additions & 1 deletion
1
birdhouse/components/cowbird/config/magpie/docker-compose-extra.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
|
|
||
| services: | ||
| # extend Magpie permissions to grant access to Cowbird API via secured Twitcher proxy | ||
| magpie: | ||
|
|
||
1 change: 0 additions & 1 deletion
1
birdhouse/components/cowbird/config/proxy/docker-compose-extra.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
|
|
||
| services: | ||
| # extend proxy with endpoint and config for Cowbird API access | ||
| proxy: | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
birdhouse/components/dggs/config/magpie/docker-compose-extra.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
|
|
||
| services: | ||
| magpie: | ||
| volumes: | ||
|
|
||
1 change: 0 additions & 1 deletion
1
birdhouse/components/dggs/config/twitcher/docker-compose-extra.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
|
|
||
| services: | ||
| # extend twitcher with MagpieAdapter hooks employed for DGGS proxied requests | ||
| twitcher: | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
birdhouse/components/finch/config/wps_outputs-volume/docker-compose-extra.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
|
|
||
| services: | ||
| finch: | ||
| volumes: | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
birdhouse/components/hummingbird/config/data-volume/docker-compose-extra.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
|
|
||
| services: | ||
| hummingbird: | ||
| volumes: | ||
|
|
||
1 change: 0 additions & 1 deletion
1
birdhouse/components/hummingbird/config/wps_outputs-volume/docker-compose-extra.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
|
|
||
| services: | ||
| hummingbird: | ||
| volumes: | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| docker-compose-extra-defaults.yml | ||
| docker-compose-extra-services.yml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| export BIRDHOUSE_DOCKER_LOGGING_DEFAULT='{"driver": "json-file", "options": {"max-size": "50m", "max-file": 10}}' |
30 changes: 30 additions & 0 deletions
30
birdhouse/components/logging/pre-docker-compose-up.include
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| #!/usr/bin/env sh | ||
|
|
||
| # Note: filename is not docker-compose-extra.yml so that it won't get added prematurely to COMPOSE_CONF_LIST | ||
| DEFAULT_COMPOSE_FILE="${COMPOSE_DIR}/components/logging/docker-compose-extra-defaults.yml" | ||
| SERVICE_COMPOSE_FILE="${COMPOSE_DIR}/components/logging/docker-compose-extra-services.yml" | ||
| echo "services:" > "${DEFAULT_COMPOSE_FILE}" | ||
| echo "services:" > "${SERVICE_COMPOSE_FILE}" | ||
|
|
||
| SERVICES_ADDED= | ||
| for service in $(PROXY_HTTP_PORT=80 HOSTNAME=${BIRDHOUSE_FQDN} ${DOCKER_COMPOSE} ${COMPOSE_CONF_LIST} config --services 2> /dev/null); do | ||
| printf ' %s:\n logging: %s\n' "$service" "$BIRDHOUSE_DOCKER_LOGGING_DEFAULT" >> "${DEFAULT_COMPOSE_FILE}" | ||
| service_settings="$(eval "echo \$BIRDHOUSE_DOCKER_LOGGING_$(echo $service | tr '-' '_' | tr '[:lower:]' '[:upper:]')")" | ||
| [ -n "$service_settings" ] && SERVICES_ADDED=true && printf ' %s:\n logging: %s\n' "$service" "$service_settings" >> "${SERVICE_COMPOSE_FILE}" | ||
| done | ||
|
|
||
| # Insert DEFAULT_COMPOSE_FILE as the first docker compose file because we want to allow logging settings in later | ||
| # docker compose files to override the defaults. | ||
| # Append SERVICE_COMPOSE_FILE as the last docker compose file because we want settings in this file to take precedence | ||
| # over other options. | ||
| log INFO "adding ${DEFAULT_COMPOSE_FILE} to COMPOSE_CONF_LIST" | ||
| COMPOSE_CONF_LIST="-f docker-compose.yml -f "${DEFAULT_COMPOSE_FILE}" ${COMPOSE_CONF_LIST#-f[[:space:]]+docker-compose.yml}" | ||
|
|
||
| if [ -n "${SERVICES_ADDED}" ]; then | ||
| log INFO "adding ${SERVICE_COMPOSE_FILE} to COMPOSE_CONF_LIST" | ||
| COMPOSE_CONF_LIST="${COMPOSE_CONF_LIST} -f ${SERVICE_COMPOSE_FILE}" | ||
| fi | ||
|
|
||
| unset DEFAULT_COMPOSE_FILE | ||
| unset SERVICE_COMPOSE_FILE | ||
| unset SERVICES_ADDED |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
birdhouse/components/monitoring/config/magpie/docker-compose-extra.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
|
|
||
| services: | ||
| magpie: | ||
| volumes: | ||
|
|
||
1 change: 0 additions & 1 deletion
1
birdhouse/components/monitoring/config/proxy/docker-compose-extra.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
|
|
||
| services: | ||
| proxy: | ||
| volumes: | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
|
|
||
| services: | ||
| # https://github.com/google/cadvisor/blob/master/docs/running.md | ||
| # Collect per container metrics. | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.