mirror of
https://github.com/lldap/lldap.git
synced 2026-04-25 08:15:52 +03:00
[GH-ISSUE #87] Support for MySQL/PostgreSQL #38
Labels
No labels
backend
blocked
bug
cleanup
dependencies
docker
documentation
duplicate
enhancement
enhancement
frontend
github_actions
good first issue
help wanted
help wanted
integration
invalid
ldap
pull-request
question
rust
rust
tests
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/lldap-lldap#38
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @JaneJeon on GitHub (Nov 24, 2021).
Original GitHub issue: https://github.com/lldap/lldap/issues/87
Originally assigned to: @nitnelave on GitHub.
Hi, first of all, thanks for the project!
And I just want to clarify - this isn't an immediate feature request, but rather me asking would this be something you'd be okay putting on the roadmap?
Right now, LLDAP apparently stores everything in
/datadirectory. But using SQL databases to back all of LLDAP's data could be so versatile:/datadirectory, you can! Just use SQLite as the backing storeAnd I believe most of the SQL queries should be portable as well (with the only exception being DDLs). Thoughts?
@nitnelave commented on GitHub (Nov 24, 2021):
Hi!
As it turns out, I'm several months ahead of you :) The problem is that SQL queries are not quite portable, so I would need to be able to detect the engine at runtime, and that required https://github.com/launchbadge/sqlx/pull/1228. It was only recently merged, so as soon as there's a release with it, I can update (potentially non-trivial process) and get to work on multi-DB support.
@JaneJeon commented on GitHub (Nov 24, 2021):
LOL, that’s actually hilarious. I wasn’t aware that you were working on it. TYSM and best of luck w/ the implementation!
@nitnelave commented on GitHub (Apr 26, 2022):
Just a quick update on the issue, there's still a blocker on the SQL query builder, but it should be resolved with https://github.com/SeaQL/sea-query/pull/275
@alexanderadam commented on GitHub (Jul 14, 2022):
The blocker was fixed. 🎉
@nitnelave commented on GitHub (Jul 15, 2022):
Before I address this one, I want to do a bit more work on the database schema to hopefully avoid having to migrate schemas for three different DB engines. I'll try to work on https://github.com/nitnelave/lldap/issues/67 before.
@kaislaoja commented on GitHub (Jul 18, 2022):
If support for an extermal SQL database will be implemented, does that also mean that then high-availability LLDAP cluster can be created? (shared persistent storage for configuration files and LDAP data in extexternal SQL database)
@nitnelave commented on GitHub (Jul 18, 2022):
Yes, each instance is stateless, so as long as they share the same configuration file/private keys and write to the same DB you can have multiple instances.
@kaislaoja commented on GitHub (Aug 30, 2022):
Is there some sort of estimate that how hard is migrate an existing SQLite instance to the PostgreSQL/MariaDB one?
I would like to start using LLDAP in my lab-environment, but I'm hesitating do that, because I would like to run my instance on an external database at some point.
@nitnelave commented on GitHub (Aug 30, 2022):
Migrating should be very easy, since I intentionally don't use advanced
features. I haven't tried it, but you should be able to dump SQLite to an
SQL file and load it from the other DB.
On Tue, 30 Aug 2022, 18:29 Toni Kaislaoja, @.***> wrote:
@kaislaoja commented on GitHub (Aug 30, 2022):
okay, thanks 👍
@nitnelave commented on GitHub (Nov 25, 2022):
Sorry for the long wait! It's now implemented in the latest version :)
@alexanderadam commented on GitHub (Nov 25, 2022):
Thank you so much!
So will this published to the next container image release?
It it should work then with setting
DATABASE_URL=postgres://postgres-user:password@postgres-server/my-databaseas mentioned in the code, right?@nitnelave commented on GitHub (Nov 25, 2022):
Yes, it should work. Feel free to try, and tell me if it doesn't!
@ajgon commented on GitHub (Nov 25, 2022):
Hey! First of all - thank you for this! This will finally introduce HA to LLDAP in my cluster 😍
Tried this today, however I have problems connecting to postgresql :(
My database_url is as follows:
Any hints will be very welcome :)
@martadinata666 commented on GitHub (Nov 26, 2022):
Tried both, seems not easy as it said. ☕
On mysql
On postgress
@nitnelave commented on GitHub (Nov 28, 2022):
Re-opening since it was a very optimistic close :)
There's various problems that mostly stem from the fact that I haven't tested it with PG or MySQL at all.
@JaneJeon commented on GitHub (Nov 28, 2022):
e2e w/ mysql/pg containers should do the trick, though I guess you're probably already planning on that.
@naturalethic commented on GitHub (Dec 14, 2022):
https://github.com/nitnelave/lldap/pull/396
@lucat1 commented on GitHub (Jan 7, 2023):
I have attempted to use the
0.4.2-alpha8release from martadinata666/lldap with PSQL and I get an error aboutu8being unsupported on postgres.@onedr0p commented on GitHub (Mar 27, 2023):
To anyone using LLDAP with an external database is the
/datadirectory not needed anymore? Would it be possible to scale LLDAP to N number of replicas all using the same external database?@nitnelave commented on GitHub (Mar 27, 2023):
You still need a place to put the configuration file, and server key, but these can be read-only.
You can run multiple instances connected to the same DB, the server is stateless.
@onedr0p commented on GitHub (Mar 27, 2023):
Thanks for confirming @nitnelave . This release looks very nice. I have opened an issue to discuss some of those points you make here. https://github.com/nitnelave/lldap/issues/502