Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Developers' Forum

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #11  
Old 2nd August 2013, 11:29
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,421
Thanks: 812
Thanked 5,205 Times in 4,081 Posts
Default

5) I guess 5.1 will be the easier option. Regarding 5.2, the encryption must be published as mysql is open source software, but I dont know how they encrypt the password in detail. ISPConfig uses the standard linux "crypt-md5" with salt for all passwords except of the mysql password as mysql does not support other encryptions except of their own one as far as I know.

Quote:
@till: Jup - will change (quelle ironie aprčs ma sujet )
Thanks
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Sponsored Links
  #12  
Old 2nd August 2013, 14:29
MaddinXx MaddinXx is offline
Senior Member
 
Join Date: Jul 2011
Location: Switzerland
Posts: 197
Thanks: 25
Thanked 60 Times in 44 Posts
Default

Here we go with the patch: http://drops.frontender.ch/nECh/kaDmJN2U
Hope this can be used with SVN (as it's from Git -- but I guess a patch is a patch). Sorry for the whitespace changes...will try to get control over my editor next time :/

Quickly summarized what needs to be done/may need review:

Not implemented
- MongoDB <-> MySQL switch (e.g. message in interface (if non-existing yet))
- change DB name (doesn't do anything)
- remote access control (not supported by Mongo)
- charset changing (BSON is always UTF-8)
- Monitor -> Services (where is it??? )
- upgrade.php (noting done...)

Needs work
- I've created the additional field in web_database_user but when only the username changes we would still need the old plain password as the MongoDB password is based on username -> we must update password but don't have the old one...resulting PW will be false. We may need to force to enter a password when changing something in user view....
- Credentials are hard-coded in plugin, cron_daily and backup plugin

Should work (Tested)
- CRUD DB/Users (expect user "Needs work")
- Backup & Restore
- Monitoring the service
- Monitoring log

Let me know if I can help further with this or you have any questions.

Thanks!

// edit: patch is based on 3.0.5.2 stable
__________________
Rackster Internet Services's presences:
Official | Open Source | Github | Facebook | Twitter
Reply With Quote
  #13  
Old 2nd August 2013, 15:32
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,421
Thanks: 812
Thanked 5,205 Times in 4,081 Posts
Default

Hi,

I just chcked the patch file, after some manual changes I was able to read it with the subversion patch editor but all paths of files in the patch file are wrong. e.g. the patch filecontains this path:

diff --git interface/wesites/lilang/en_database_list.lng interface/wesites/lilang/en_database_list.lng

while the correct path would be:

diff --git interface/sites/lang/en_database_list.lng interface/sites/lang/en_database_list.lng

basically git adds 2 additional chars in front of some folders.

Please try this patch command:

git --no-pager diff --no-prefix master..branch > somefile.diff

source: http://stackoverflow.com/questions/7...svn-compatible


I noticed that you added the sql changes in a file upd_0051.sql, but we have already sql file upd_0054.sql, so your sql patch file must use the next free number which is upd_0055.sql. Your current sql file overwrites or changes a existing sql patch which might not happen as it will cause system to fail due to missing database columns that install the next update.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #14  
Old 2nd August 2013, 16:20
MaddinXx MaddinXx is offline
Senior Member
 
Join Date: Jul 2011
Location: Switzerland
Posts: 197
Thanks: 25
Thanked 60 Times in 44 Posts
Default

Hi till

I've rebased to SVN revision 4068 and re-applied the patches: http://drops.frontender.ch/eIv9/1AmYLM5T

.... which makes me wondering when the Git repo will be ready
__________________
Rackster Internet Services's presences:
Official | Open Source | Github | Facebook | Twitter
Reply With Quote
The Following User Says Thank You to MaddinXx For This Useful Post:
till (2nd August 2013)
  #15  
Old 2nd August 2013, 16:58
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,421
Thanks: 812
Thanked 5,205 Times in 4,081 Posts
Default

Thanks for the new patch, it applied fine. I've uploaded it to svn trunk.

Can you write down which configuration steps the ispconfig installer has to do for mongodb? Or are there no config steps needed?

And we have to change the hardcoded credentials. I think we should add a file mongo_clientdb.conf in /usr/local/ispconfig/server/lib/ simlar to the one for mysql. It is important that you load the credentials from this file (include the file) right bfore you need them and not at the beginning of a php file and after you dont need the credentials anymore, unset() the php variables that contain the login data similra to the procedure used in the mysql parts.

I can add the code to the installer then. I just need to know how to reliably determine if mongodb is installed, therefor I need to know the name of the mongodb binary so that I can query it with "which" on the shell.

Regarding the git repo, its still in the works. I will start a small tools repo so that all core devs can get usedto git. As you use github already, do you know if their issue tracker can be deactivated? We have already one for ispconfig on our own servers which contains many feature requests and the whole bug history for so I dont want to abandon that.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.

Last edited by till; 2nd August 2013 at 17:00.
Reply With Quote
  #16  
Old 2nd August 2013, 17:21
MaddinXx MaddinXx is offline
Senior Member
 
Join Date: Jul 2011
Location: Switzerland
Posts: 197
Thanks: 25
Thanked 60 Times in 44 Posts
Default

Great

I've written down most config steps in the plugin:

Code:
/**
 * MongoDB
 * ------------------------------------------------------------------------
 * The following needs to be done before using this plugin:
 * - 1. install MongoDB server from 10gen sources (or another one with >= 2.4)
 * - 2. install php5-dev package (apt-get install php5-dev)
 * - 3. install mongo PECL extension (pecl install mongo)
 * - 4. enable mongo (echo "extension=mongo.so" > /etc/php5/mods-available/mongo.ini && php5enmod mongo)
 * - 5. create administrative user manager in Mongo (mongo -> use admin -> db.addUser({user: "root", pwd: "123456", roles: [ "userAdminAnyDatabase", "readWriteAnyDatabase", "dbAdminAnyDatabase", "clusterAdmin" ]}))
 * - 6. enable auth for Mongo (nano /etc/mongodb.conf -> auth = true)
 * - 7. restart MongoDB (service mongodb restart)
 *
 * Unlike MySQL, MongoDB manages users per database.
 * Therefor we cannot use one user for multiple databases. Instead, we have to add him each time via the admin user.
 */
while point 6 is missing that setParameter = enableLocalhostAuthBypass=0 should also be added to the config to prevent local users from being root.

To detect MongoDB you can search for the binary mongod which is the daemon. Config file is located at /etc/mongodb.conf (default).

Regarding credentials: I'll add the code in the plugin/cron/backup like MySQL and you take care of adding/filling this file then? That's good I'm going to implement this directly in SVN this time.

@Github: Ah great Yes, it can be deactivated (see here for example: https://github.com/Rackster/ispconfi...-reverse-proxy)

// edit: I've removed hard-coded credentials and used MySQL way: http://drops.frontender.ch/PMrY/bSHqeBlo

I'm wondering if it wouldn't be smarter to use one single file which contains associative arrays? Especially in files like cron_daily/backup where we need to include every file (who knows which DBs get supported sooner or later). That way there also won't be any problems with using the same variables (just change array "prefix" et voila)
__________________
Rackster Internet Services's presences:
Official | Open Source | Github | Facebook | Twitter

Last edited by MaddinXx; 2nd August 2013 at 18:06.
Reply With Quote
  #17  
Old 2nd December 2013, 16:06
bluebirdnet bluebirdnet is offline
Member
 
Join Date: Dec 2009
Location: Montreal, Canada
Posts: 50
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Hi Maddinx and Till,

Is there any development on this? How do we install this and can it be used in a production system ? Getting requests for this and want to setup shared hosting for developers.

If more development is needed I may be able to contribute, please advise.

When can we expect this to be included and supported in ISPConfig?

http://bugtracker.ispconfig.org/inde...s&task_id=1266

thanks for any help
__________________
Bluebird Hosting
Web Hosting, Domain Registration & SSL certificates
www.bluebirdhosting.ca
Web Hosting - simplified.
Reply With Quote
  #18  
Old 2nd December 2013, 16:09
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,421
Thanks: 812
Thanked 5,205 Times in 4,081 Posts
Default

Mongodb is already in our dev branch (see master branch on git,ispconfig.org). It will be released as part of ISPConfig 3.0.6 nextyear, which is the next major version. Before 3.0.6, there will be only one bugfix release (3.0.5.4) which is scheduled for end of december.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #19  
Old 2nd December 2013, 16:47
bluebirdnet bluebirdnet is offline
Member
 
Join Date: Dec 2009
Location: Montreal, Canada
Posts: 50
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Quote:
Originally Posted by till View Post
Mongodb is already in our dev branch (see master branch on git,ispconfig.org). It will be released as part of ISPConfig 3.0.6 nextyear, which is the next major version. Before 3.0.6, there will be only one bugfix release (3.0.5.4) which is scheduled for end of december.
Thanks for the quick update Till.

this is great news! So for now my understanding is that this is only available in a development version? How can we try it out?
__________________
Bluebird Hosting
Web Hosting, Domain Registration & SSL certificates
www.bluebirdhosting.ca
Web Hosting - simplified.
Reply With Quote
The Following User Says Thank You to bluebirdnet For This Useful Post:
feeninuoumn (17th December 2013)
  #20  
Old 2nd December 2013, 17:05
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,421
Thanks: 812
Thanked 5,205 Times in 4,081 Posts
 
Default

You can download the dev version here:

http://git.ispconfig.org/ispconfig/i...sitory/archive

But it is a dev version, I guess its not fully functional at the moment as we are currently doing some big changes un the underlaying libraries.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
3 Wan configuration problem bAnDiTu Installation/Configuration 1 14th December 2012 19:30
Courier Imap is not working HellMind General 5 12th April 2012 01:04
server.sh not starting up tuxillo Installation/Configuration 8 31st December 2010 14:14
Management/system config/settings & /server/settings not working!! dactor Installation/Configuration 9 6th February 2008 09:11
Empty Recycle Bin jon335 General 40 6th May 2006 11:56


All times are GMT +2. The time now is 04:41.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.