oncall icon indicating copy to clipboard operation
oncall copied to clipboard

Add postgresql support

Open sergeyshevch opened this issue 2 years ago • 6 comments

As Django is used in the core of oncall. It will be perfect for adding the ability to use PostgreSQL as the optional database engine.

For example, some teams prefer PostgreSQL over MySQL or already have production-ready PostgreSQL clusters.

sergeyshevch avatar Jun 14 '22 18:06 sergeyshevch

Hey, thanks for the feedback, we are planning to extend list of supported databases and give opportunity to connect to the existing db servers.

Konstantinov-Innokentii avatar Jun 21 '22 11:06 Konstantinov-Innokentii

We added this task to the core team's backlog. @matiasb and @Konstantinov-Innokentii will work on it.

Matvey-Kuk avatar Jul 06 '22 06:07 Matvey-Kuk

I propose to keep mysql as a default type supported by the core team Also we can add the env variable DB_TYPE to switch to the other DB such as Postgresql or even SQLLite right in our settings file. All the other DB types will be supported by community and we'll reflect that in the comments for this setting

iskhakov avatar Jul 07 '22 15:07 iskhakov

@matiasb @Konstantinov-Innokentii Can you give us any estimates about it? This issue can prevent multiple companies from testing and adopting grafana oncall. For example, we want to try it and have grafana set up on PostgreSQL. But we have no MySQL databases in our company and we don't want to set up it only for oncall

sergeyshevch avatar Aug 08 '22 08:08 sergeyshevch

hey @sergeyshevch, there is a WIP branch where I have been doing some initial work. There are still a few decisions to be made on how we should document/how much support should be provided, but it would be great to read if you have any thoughts about that.

matiasb avatar Aug 08 '22 12:08 matiasb

@matiasb It looks great! I also guess that we need to ensure that no MySQL or PgSQL-specific fields will be used in the code. Or they have API compatible alternatives

sergeyshevch avatar Aug 08 '22 18:08 sergeyshevch

I believe this issue can be closed since https://github.com/grafana/oncall/pull/660 was merged which solved the problems with using PostgreSQL. I'm using PostgreSQL in combination with the helm changes from https://github.com/grafana/oncall/pull/661 and the Zalando operator for a production setup (the built-in postgres in the chart also works).

davidspek avatar Oct 20 '22 09:10 davidspek