From 96889a6175867c8c08090dae17fca9b8e44c2291 Mon Sep 17 00:00:00 2001 From: Mike Purvis Date: Wed, 8 Jul 2020 13:42:33 -0400 Subject: [PATCH] Add volumed-out config directory for symbolicator. (#566) I would like to be able to customize the configuration for my Sentry 10 symbolicator instance, which this change allows me to easily do. See related: https://github.com/getsentry/symbolicator/issues/245 Co-authored-by: Burak Yigit Kaya --- .gitignore | 1 + docker-compose.yml | 6 +++++- install.sh | 4 +++- symbolicator/config.example.yml | 8 ++++++++ 4 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 symbolicator/config.example.yml diff --git a/.gitignore b/.gitignore index 5931ebe..3f2261c 100644 --- a/.gitignore +++ b/.gitignore @@ -79,3 +79,4 @@ sentry/config.yml sentry/*.bak sentry/requirements.txt relay/credentials.json +symbolicator/config.yml diff --git a/docker-compose.yml b/docker-compose.yml index c27cdbf..4000750 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -136,7 +136,11 @@ services: image: 'getsentry/symbolicator:$SYMBOLICATOR_VERSION' volumes: - 'sentry-symbolicator:/data' - command: run + - type: bind + read_only: true + source: ./symbolicator + target: /etc/symbolicator + command: run -c /etc/symbolicator/config.yml symbolicator-cleanup: << : *restart_policy image: symbolicator-cleanup-onpremise-local diff --git a/install.sh b/install.sh index bc92d7e..f9e91c4 100755 --- a/install.sh +++ b/install.sh @@ -14,6 +14,7 @@ MIN_RAM=2400 # MB SENTRY_CONFIG_PY='sentry/sentry.conf.py' SENTRY_CONFIG_YML='sentry/config.yml' +SYMBOLICATOR_CONFIG_YML='symbolicator/config.yml' RELAY_CONFIG_YML='relay/config.yml' RELAY_CREDENTIALS_JSON='relay/credentials.json' SENTRY_EXTRA_REQUIREMENTS='sentry/requirements.txt' @@ -95,6 +96,7 @@ echo "" ensure_file_from_example $SENTRY_CONFIG_PY ensure_file_from_example $SENTRY_CONFIG_YML ensure_file_from_example $SENTRY_EXTRA_REQUIREMENTS +ensure_file_from_example $SYMBOLICATOR_CONFIG_YML if grep -xq "system.secret-key: '!!changeme!!'" $SENTRY_CONFIG_YML ; then echo "" @@ -171,7 +173,7 @@ echo "" echo "Docker images built." ZOOKEEPER_SNAPSHOT_FOLDER_EXISTS=$($dcr zookeeper bash -c 'ls 2>/dev/null -Ubad1 -- /var/lib/zookeeper/data/version-2 | wc -l | tr -d '[:space:]'') -if [ "$ZOOKEEPER_SNAPSHOT_FOLDER_EXISTS" -eq "1" ]; then +if [ "$ZOOKEEPER_SNAPSHOT_FOLDER_EXISTS" -eq "1" ]; then ZOOKEEPER_LOG_FILE_COUNT=$($dcr zookeeper bash -c 'ls 2>/dev/null -Ubad1 -- /var/lib/zookeeper/log/version-2/* | wc -l | tr -d '[:space:]'') ZOOKEEPER_SNAPSHOT_FILE_COUNT=$($dcr zookeeper bash -c 'ls 2>/dev/null -Ubad1 -- /var/lib/zookeeper/data/version-2/* | wc -l | tr -d '[:space:]'') # This is a workaround for a ZK upgrade bug: https://issues.apache.org/jira/browse/ZOOKEEPER-3056 diff --git a/symbolicator/config.example.yml b/symbolicator/config.example.yml new file mode 100644 index 0000000..62cf9b8 --- /dev/null +++ b/symbolicator/config.example.yml @@ -0,0 +1,8 @@ +# See: https://getsentry.github.io/symbolicator/#configuration +cache_dir: "/data" +bind: "0.0.0.0:3021" +logging: + level: "warn" +metrics: + statsd: null +sentry_dsn: null # TODO: Automatically fill this with the internal project DSN