Onpremise: config.yml settings not taken into account.

Created on 27 Oct 2016  Â·  18Comments  Â·  Source: getsentry/onpremise

the config.yml redis (and probably others, based on the code in sentry.conf.py) are not taken into account when running.

Enhancement

Most helpful comment

@csawyerYumaed this work for me!
After you make changes in config.yml, you must remove existing sentry containers. And when you rerun docker-compose, it will build new images with updated config.
docker-compose stop
docker-compose down
docker images
docker rmi -f <image_ids>
docker-compose up -d

All 18 comments

the secret key is not taken from config.yml either.

Yeah, this is true. So this is a weird mix right now of configuration styles. With docker, we want to leverage some environment variables to configure things, which requires sourcing them in Python. Which means we have to ignore the config.yml settings for some of them.

I'll spend some time and think about a better solution here. But I think it might end up with using a preprocessor to spit out a config.yml based on environment variables instead and remove the python stuff to avoid the confusion.

I agree it's weird right now :) I think ultimately, the goal should be in order of importance:
command line arguments(if any)
ENV variables(if any)
config file(s).

This seems to be the least element of surprise, to me anyway. Why can't sentry.conf.py just load the config.yml, apply any ENV variables, and then wander on down the road? Why do you need a pre-processor and write out a new config.yml?

This seems to be the least element of surprise, to me anyway. Why can't sentry.conf.py just load the config.yml, apply any ENV variables, and then wander on down the road? Why do you need a pre-processor and write out a new config.yml?

Because sentry itself doesn't work this way. :) It's significantly more complicated than that.

@mattrobenolt I'd like to set the DEFAULT_EMAIL_FROM because now it's by default set to root@localhost . In /manage/status/environemnt it's listed as DEFAULT_EMAIL_FROM. But setting this directly in sentry.conf.py doesn't work.

From the config.yml I figured out it's actually the mail.from setting, so I've added SENTRY_OPTIONS['mail.from'] = '[email protected]' and this does work.

This is freakin' confusing to figure out these sentry_options to env variable mappings. Or is the config.yml authorative for that?

each time you make a config.yml edit you have to stop and remove all containers, then rebuild.

@fredvd configuration files are the authorative format. We only support certain env variables for Docker.

@alucard0134 how can I stop all containers and rebuild sentry? Sorry, I am quite new to docker....

I found it from http://88.99.227.254:9000/sentry/

Its

make build

then one can call

docker-compose run up

@mojovski , can you please point out the exact steps? The URL you mention is not alive anymore, whereas the commands you gave don't have the desired effect.

docker-compose run up does not seem to be valid syntax, though each command in part starts correctly (i.e. docker-compose up or docker-compose run). However, Sentry still does not load the email settings from the configuration file.

We are seeing that same issue. Settings for neither the config.yml or sentry.config.py are reflecting within the Sentry UI.

Running an on-prem Docker Container, setup on an Ubuntu EC2 instance.

@csawyerYumaed @mojovski @bmadsen85 If I'm not mistaken, the config-files config.yml and sentry.config.py are not used by the Dockerfile nor the docker-compose.yml in this repo.

Did you try to build your own sentry:8.22 and sentry:8.22-onbuild images?

config.yml and sentry.config.py are used here.

I did not build my own Sentry images, except to add configuration. Our plan was to replace our home-grown solution and avoid NIH, and switch to Sentry, but that didn't work out. We have stopped using Sentry, after our test period. It bought us very little over our home-grown solution we already had in place, and was not very reliable. After the response here, that the story around configuration is complex/broken, made us have zero hope for how the rest of the software works, and we have stayed with our home-grown solution. So I'm not really helpful anymore around this issue, I haven't used Sentry since 2016, when I initially filed the issue. Perhaps it's better now, I have no idea.

In general Sentry works fine though as with all monitoring the standard advice you’re going to get is “don’t host it yourself”. I can’t comment in the specific issues you are all having but Sentry does a lot and there’s no magic in docker that avoids having to understand a chunk of that complexity while running it. If the (mind you, completely free) docker support doesn’t work for what you’re trying to do you can always build an image yourself or simply install it outside of a container per the standard docs. We don’t always do the best job of supporting new features in this image, but again, it’s completely free.

@csawyerYumaed this work for me!
After you make changes in config.yml, you must remove existing sentry containers. And when you rerun docker-compose, it will build new images with updated config.
docker-compose stop
docker-compose down
docker images
docker rmi -f <image_ids>
docker-compose up -d

You can use docker-compose rebuild instead of docker images and docker rmi ....

I'm not quite sure where the config for mail need to go. Into the config.yml file or the sentry.conf.py, I have been working with the config.yml which as far as what I have read is the correct. But not working yet.
I have the docker configuration and trying to configure the SES to work with AWS.

@angelicaortega-natgeo SMTP config lives in sentry.conf.py as documented in https://docs.sentry.io/server/config/#config-smtp-server

Closing this issue as this looks like a user configuration issue and not something we can fix in the repo. I'm hoping we'll have better basic support for mailing out of the box for SMTP tho, so stay tuned for that if you are interested.

If you still have questions, feel free to use our forums and leverage the knowledge of our community: https://forum.sentry.io/c/on-premise

Was this page helpful?
0 / 5 - 0 ratings

Related issues

WoLpH picture WoLpH  Â·  3Comments

TheRatG picture TheRatG  Â·  4Comments

rmisyurev picture rmisyurev  Â·  4Comments

eandersons picture eandersons  Â·  5Comments

marbon87 picture marbon87  Â·  5Comments