Discussion:
[Ispman-developers] ispman mysql/postgres database module
Atif Ghaffar
2007-12-09 21:28:00 UTC
Permalink
Hello all,

I see that there are still requests for this intergration.
If no one is already working on it, i will start.
--
best regards
Atif Ghaffar
http://atif.ghaffar.googlepages.com
Atif Ghaffar
2007-12-09 21:50:39 UTC
Permalink
I am doing the following. (rough draft)
Please let me know your thoughts.

Adding a "cn" attribute as required in ispmanDatabaseData class.

Getting rid of ispmanDBPrefix.
Ignoring the ispmanDB*Priv attributes.

Making the name of the database match the name of the user. (so we dont have
to look in two different places for uniqueness).

A db is just that. A database.

It has just a username and a password from which it can be accessed.

It is not part of a domain. (We can put some information in the record to
say which domain it belongs to so that we can purge it when the domain is
deleted)



The record we will have will be something like this.

# Database tree (outside of domain tree)
dn: ou=databases,o=ispman
objectClass: top
objectClass: organizationalUnit
ou: databases

dn: cn=db012345, ou=databases,o=ispman
objectClass: top
objectClass: ispmanDatabaseData
cn: db012345
ispmanDBUser: db012345
ispmanDBPass: someclearpass
ispmanDBHost: dbserver01
ispmanDBType: mysql

dn: cn=db012346, ou=databases,o=ispman
objectClass: top
objectClass: ispmanDatabaseData
cn: db012346
ispmanDBUser: db012346
ispmanDBPass: someclearpass
ispmanDBHost: dbserver02
ispmanDBType: postgres

dn: cn=db012347, ou=databases,o=ispman
objectClass: top
objectClass: ispmanDatabaseData
cn: db012347
ispmanDBUser: db012347
ispmanDBPass: someclearpass
ispmanDBHost: dbserver03
ispmanDBType: oracle
Post by Atif Ghaffar
Hello all,
I see that there are still requests for this intergration.
If no one is already working on it, i will start.
--
best regards
Atif Ghaffar
http://atif.ghaffar.googlepages.com
--
best regards
Atif Ghaffar
http://atif.ghaffar.googlepages.com
Hans Martin
2007-12-10 12:46:01 UTC
Permalink
Hi Atif et al,

it might be usefull to introduce a hostgroup "database" or maybe
"MySqlgroup", "Oracle", "Sybase".. just to follow the configuration for
the other services.
Moreover I suggest just to store the username and password for the
(user)db and store the root password of the databases in the ispman.conf
on the database servers.
I really like the idea of using the username for the database name, but
as this can be very long, I suggest to use just the uid of the user
(e.g. prefixed with db_), so we wont get into trouble with naming
conventions.
As you stated a db is just a db - so it should be in an own tree. But
looking on the customers side I guess many of the ispman-driven hosters
provide something like "one database per vhost". Doesn't it make sense
to just add an option to the vhost add/edit/delete for one db (depending
on the hostgroup oracle/mysql/whatever)?

Kind Regards,

Hans
Post by Atif Ghaffar
I am doing the following. (rough draft)
Please let me know your thoughts.
Adding a "cn" attribute as required in ispmanDatabaseData class.
Getting rid of ispmanDBPrefix.
Ignoring the ispmanDB*Priv attributes.
Making the name of the database match the name of the user. (so we dont
have to look in two different places for uniqueness).
A db is just that. A database.
It has just a username and a password from which it can be accessed.
It is not part of a domain. (We can put some information in the record
to say which domain it belongs to so that we can purge it when the
domain is deleted)
The record we will have will be something like this.
# Database tree (outside of domain tree)
dn: ou=databases,o=ispman
objectClass: top
objectClass: organizationalUnit
ou: databases
dn: cn=db012345, ou=databases,o=ispman
objectClass: top
objectClass: ispmanDatabaseData
cn: db012345
ispmanDBUser: db012345
ispmanDBPass: someclearpass
ispmanDBHost: dbserver01
ispmanDBType: mysql
dn: cn=db012346, ou=databases,o=ispman
objectClass: top
objectClass: ispmanDatabaseData
cn: db012346
ispmanDBUser: db012346
ispmanDBPass: someclearpass
ispmanDBHost: dbserver02
ispmanDBType: postgres
dn: cn=db012347, ou=databases,o=ispman
objectClass: top
objectClass: ispmanDatabaseData
cn: db012347
ispmanDBUser: db012347
ispmanDBPass: someclearpass
ispmanDBHost: dbserver03
ispmanDBType: oracle
Hello all,
I see that there are still requests for this intergration.
If no one is already working on it, i will start.
--
best regards
Atif Ghaffar
http://atif.ghaffar.googlepages.com
--
best regards
Atif Ghaffar
http://atif.ghaffar.googlepages.com
------------------------------------------------------------------------
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
------------------------------------------------------------------------
_______________________________________________
Ispman-developers mailing list
https://lists.sourceforge.net/lists/listinfo/ispman-developers
Hans Martin
2007-12-10 13:31:25 UTC
Permalink
Hi Atif,
Post by Hans Martin
I really like the idea of using the username for the database name, but
as this can be very long, I suggest to use just the uid of the user
(e.g. prefixed with db_), so we wont get into trouble with naming
conventions.
I mentioned that the name of the db and name of the user will be the
same. This
does not mean that it will point to some existing user's name.
ok, I missed that point. Sorry.
However it might be a good idea to just add the uid of the
(domain/vhost)-user to the db-name (e.g. randomname_uid). Doing it this
way, it is possible to run e.g. a backup script, which dumps all db's in
the correspondending directories. With this naming convention, the
script can get the homedir of the user without connecting to the ldap
directly (which saves some loc).

[..]
Post by Hans Martin
*You may need more than one database within one vhost.
*
ok, agreed :-)
Thanks for your work!

Kind Regards,

Hans
Pedro Algarvio, aka, s0undt3ch
2007-12-10 16:15:02 UTC
Permalink
Post by Hans Martin
Hi Atif,
ok, I missed that point. Sorry.
However it might be a good idea to just add the uid of the
(domain/vhost)-user to the db-name (e.g. randomname_uid). Doing it
this
way, it is possible to run e.g. a backup script, which dumps all db's
in
the correspondending directories. With this naming convention, the
script can get the homedir of the user without connecting to the ldap
directly (which saves some loc).
[..]
ok, agreed :-)
Thanks for your work!
Kind Regards,
Hans
Let me point you guys to this rough graph of what I started:
http://wiki.ispman.net/index.php/PostgreSqlIntegration
--
Pedro Algarvio
__ ___ ___ _______ ___ __
| Y .' _| _ .-----.' _| |_ .-----.----.-----.
|. | | _| 1___| _ | _| _|__| _ | _| _ |
|. | |__| |____ |_____|__| |____|__|_____|__| |___ |
|: 1 | |: 1 | |_____|
|::.. . | |::.. . | ufs [AT] ufsoft [DOT] org
`-------' `-------' ufs [AT] sapo [DOT] pt
Loading...