I want to use external redis on Sentry On-premise 20.x

Hello.

I want to use external redis on Sentry On-premise 20.x.

But I don’t know this issue…

I want to tell you where I need to modify it so I can use it. Thank you.

Hi @potter7050,

I’d advise against this but if you really want to do it I’d follow these steps:

  1. Modify the Redis hostname/port in the config: https://github.com/getsentry/onpremise/blob/f885eceaec93a04587026cfc40dea501b0257cab/sentry/sentry.conf.example.py#L75
  2. Modify the Redis hostname here: https://github.com/getsentry/onpremise/blob/f885eceaec93a04587026cfc40dea501b0257cab/docker-compose.yml#L45
    3.Remove every line that has redis in it from https://github.com/getsentry/onpremise/blob/f885eceaec93a04587026cfc40dea501b0257cab/docker-compose.yml (except for that specific line in item 2 above)

Hope this helps (and there’s no guarantee that these would be enough to make it run smoothly).

1 Like

Hi @BYK. I try to your guide.

But it doesn’t work. Looking at the log, snuba-api must be looking at port 6379 of redis. Can I modify this? And I want to insert password for redis.

“It doesnt work” - thats sad :frowning_face:
Did you change port-number on all the places needed? https://github.com/getsentry/onpremise/search?q=6379

Yes I changed everything, but it wasn’t. But when I added the following code, it works fine. But I don’t know why. I can’t see this environment variable applied in the getsentry repo. Do you know anything about this?

in https://github.com/getsentry/onpremise/blob/f885eceaec93a04587026cfc40dea501b0257cab/docker-compose.yml#L45

REDIS_PORT: ${port number}

REDIS_DB: ${db number}

REDIS_PASSWORD: ${password}

You can find all of this here: https://github.com/getsentry/snuba/blob/bdf2f5bc6e8540eb660558605718b1b8f1e6a587/snuba/settings_docker.py

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.