Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 3rd March 2009, 18:17
letezo letezo is offline
Junior Member
 
Join Date: Mar 2009
Posts: 17
Thanks: 1
Thanked 0 Times in 0 Posts
Send a message via Skype™ to letezo
Question ISPConfig installation into multiple OpenVZ containers

I've installation problems with ISPConfig 3.0.0.9 RC2 in a "multiserver" setup. I had to tweak ISPConfig's installer to overcome difficulties and I need to know whether it is a bug in ISPConfig or I did something wrong.

Installation details:

I tried to install ISPConfig 3.0.0.9 RC2 on Ubuntu Linux 8.04 LTS Server in a way, that each service have its own OpenVZ container for scalability and online migration.

I've set up "virtual environments" (so called VEs) for each service first: mysql, mail, www, ftp, dns. We can treat them as separate machines, basically. I used the same Ubuntu version in all of them.

I've forwarded the ports for each service into the corresponding VEs using firewall DNAT rules, including 8080 for the ISPConfig Web UI. I've set up the required name=>IP mappings in the hosts files as well and enabled access for the root MySQL user from all the VEs.

A single /var/clients directory has been "bind mounted" into both the www and ftp VEs using <veid>.mount scripts in order to allow uploading content. All the required packages are installed into each VM (only the ones required for the service implemented by each VE). Finally all the VEs are saved in order something goes wrong with the ISPConfig installation. I was careful enough to do this, fortunately...

Then I tried ISPConfig's "multiserver" installation process: Installed a "master" ISPConfig into the mysql VE with all the other components disabled. It created a master dbispconfig DB and added a single server record as usual, but the Web UI was disabled in this installation (no Apache2 in the mysql VE).

Please note: I do have only one MySQL server in the mysql VE and I don't want the overhead of installing a MySQL server into each VE. So it is not a real replicated multiserver installation, only a "split by service" one.

The problem

Then I installed ISPConfig as a multiserver slave on the www VM with Web server and ISPConfig UI support enabled, all the others disabled. I had to repeat this installation step (after restoring the VEs each time) due to severe confusion caused by ISPConfig's multiserver setup. I also couldn't find usable documentation or relevant forum posts on the subject helping me out, so writing here.

First try:

I installed ISPConfig into the www VE as a regular slave by specifying a new database (like dbispconfig_www) first, then the master second as requested by the installer.

(You will get a "Database already contains some tables" error if you try to reuse the existing ispconfig master DB as "the database" of the slave.)

Repeating this for each service resulted in a set of working, but completely disjunct ISPConfig installations without central management. The Web UI showed only the www VE.

I tried to figure out why it did not work. Finally I managed to tweak the config.inc.php database configuration files and fixed the MySQL access rights manually to overcome this and join it into a centrally managed system, but I guess that's not a standard way of installation, which would prevent future upgrade to the final version of ISPConfig 3.

So I reverted this.

Second try:

I've realized, that it needs to use a single database on my mysql VE instead of using many replicated ones, but reusing that single master database for all the slaves was prohibited by the ISPConfig installer.

So I searched for "Database already contains some tables" in the installer and - after analyzing the source code - simply commented out the following line in the ispconfig3_install/install/lib/installer_base.lib.php file:

$this->error('Stopped: Database already contains some tables.');

(Just entered a // before the line to comment it out.)

Commenting out the above line disables the error message and simply prevents the ISPConfig installer from trying to overwrite the master database, which would result in an error message otherwise.

Then I installed ISPConfig in the default "master" mode to each service VEs (www, ftp, etc.) specifying the single master dbispconfig database served by the mysql VE. It entered the server records into that single database.

This setup seems to work without further tweaking or manually editing the configuration. (Make soure that the VE names are resolved to IP addresses by the mysql VE's /etc/hosts file, otherwise MySQL doesn't allow connections from the service VEs.)

Questions:

* Is it a bug in the ISPConfig installer preventing to install multiple ISPConfig instances reusing a single MySQL database?

* Would it be a new "mode" of ISPConfig installation not officially supported?

* Will such an installation sharing a single database supported during upgrades to the final ISPConfig 3 release?

Suggestions:

The ISPConfig installer and documentation should clarify the "mode" of installation: E.g.: single server, shared database multiserver or replicated multiserver.

Clear examples should be provided for each possible installation mode.

Thanks in advance and sorry for the very long post. - Viktor
Reply With Quote
Sponsored Links
  #2  
Old 3rd March 2009, 20:26
letezo letezo is offline
Junior Member
 
Join Date: Mar 2009
Posts: 17
Thanks: 1
Thanked 0 Times in 0 Posts
Send a message via Skype™ to letezo
Unhappy It seems to not work at all

It seems to not work.

For example the FTP service cannot be separated easily:

* ISPConfig creates the users (like web1) and groups (like client1) in the Web server's VE (www) as normal system users (/etc/passwd and /etc/group), so they can't be used by pure-ftpd in the ftp VE easily. There are tricks, certainly, but we would get an unsupported configuration then. (ISPConfig does not use PAM for the actual system users.)

* ISPConfig stores the server_id of the Web server into the ftp_user record, so it cannot login through FTP without hacking the pure-ftpd configuration files or ISPConfig.

I've failed to separate the services while preserving ISPConfig's central management.
Reply With Quote
  #3  
Old 3rd March 2009, 20:44
Justin Albstmeijer Justin Albstmeijer is offline
Member
 
Join Date: Dec 2007
Posts: 75
Thanks: 1
Thanked 5 Times in 5 Posts
Default

separation of services has work fine up till now using ispconfig3.
There seems to be an installer issue.
I reported a bug similar to your report

http://bugtracker.ispconfig.org/inde...=574&project=3
Reply With Quote
  #4  
Old 3rd March 2009, 21:34
letezo letezo is offline
Junior Member
 
Join Date: Mar 2009
Posts: 17
Thanks: 1
Thanked 0 Times in 0 Posts
Send a message via Skype™ to letezo
Default Thanks for your note

Thanks for your note about the reported bug. :-)

Please note, that the setup I described above is not a regular multiserver installation, but a group of ISPConfig managed virtual machines with a single shared MySQL database and server.
Reply With Quote
  #5  
Old 3rd March 2009, 21:54
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,774
Thanks: 821
Thanked 5,332 Times in 4,184 Posts
Default

There is no such bug.

Quote:
* Is it a bug in the ISPConfig installer preventing to install multiple ISPConfig instances reusing a single MySQL database?
No.

Quote:
* Would it be a new "mode" of ISPConfig installation not officially supported
no.

Quote:
* Will such an installation sharing a single database supported during upgrades to the final ISPConfig 3 release?
no.

Quote:
It seems to not work.

For example the FTP service cannot be separated easily:

* ISPConfig creates the users (like web1) and groups (like client1) in the Web server's VE (www) as normal system users (/etc/passwd and /etc/group), so they can't be used by pure-ftpd in the ftp VE easily. There are tricks, certainly, but we would get an unsupported configuration then. (ISPConfig does not use PAM for the actual system users.)

* ISPConfig stores the server_id of the Web server into the ftp_user record, so it cannot login through FTP without hacking the pure-ftpd configuration files or ISPConfig.

I've failed to separate the services while preserving ISPConfig's central management.
This works all perfectly and is used already by several providers on production systems. It does not work for you because you entered wrong mysql details. The setup is really simple:

1) Install the first server in standard mode.
2) Install the second server in expert mode, enter the mysql root login details for the local mysql server and then the details of the master server.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #6  
Old 3rd March 2009, 21:55
Justin Albstmeijer Justin Albstmeijer is offline
Member
 
Join Date: Dec 2007
Posts: 75
Thanks: 1
Thanked 5 Times in 5 Posts
Default

Well that was exactly how my setup was till now..
Multiple openvz servers sharing one master sql/panel server for dbispconfig.
But looking at the replies on my bugreport.. somekind of mysql replication has been inplemented in later ipsconfig3 versions.. whereby the local database server gets it's own replicated dbispconfig database.

I wonder if there is a global design overview somewhere....
Reply With Quote
  #7  
Old 3rd March 2009, 21:56
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,774
Thanks: 821
Thanked 5,332 Times in 4,184 Posts
Default

Quote:
Please note, that the setup I described above is not a regular multiserver installation, but a group of ISPConfig managed virtual machines with a single shared MySQL database and server.
Such a setup is not supported. For performance reasons ISPConfig requires a local mysql databse on every server. What you did is basically to install serveral instances of ispconfig on the same server which will not result in a services separation of course.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #8  
Old 3rd March 2009, 22:02
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,774
Thanks: 821
Thanked 5,332 Times in 4,184 Posts
Default

Quote:
Originally Posted by Justin Albstmeijer View Post
I wonder if there is a global design overview somewhere....
No. But the setup is really simple. One master database and a unlimited number of slave databases which replicates only the data needed for a psecific server.

The reasons for this setup are:

1) The access to the local DB is much faster and can also use sockets.
2) You would reach a max. connection limit very fast if you had just one central db.
3) Security: the slave databases contain only the data for the local node.

we started with a central Db setup in the first betas of ISPConfig 3 and the approach was not scalable enough. The current setup has been implemented by several providers already in production systems and it works very well.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #9  
Old 3rd March 2009, 22:09
Justin Albstmeijer Justin Albstmeijer is offline
Member
 
Join Date: Dec 2007
Posts: 75
Thanks: 1
Thanked 5 Times in 5 Posts
Default

Thanks for your reply.
Is there a way I can get my servers without their own mysql server, using the central now, in line with this change?
Just install a local mysql server and run an upgrade will get all OLD mysql data currently in the central mysql server synced to the local mysql servers?
Reply With Quote
  #10  
Old 3rd March 2009, 22:16
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,774
Thanks: 821
Thanked 5,332 Times in 4,184 Posts
 
Default

Quote:
Just install a local mysql server and run an upgrade will get all OLD mysql data currently in the central mysql server synced to the local mysql servers?
No, this will not work as the data is synced from the datalog and most likely your datalog does not contain all needed data.

What you can try is that you install a exact copy of master database on every slave. Then use a config.inc.php file from the latest version (not your old version) and replace your config.inc.php file with it. Then you will have to set the correct login details for local and remote database in this file.

But I never tested this so it might be that it does not work.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
letezo (3rd March 2009)
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
ISPConfig 3.0.0.5 Beta Released till General 77 23rd July 2008 12:14
CentOS 5.1 - ISPConfig Installation completed but init.d/ispconfig_server not found?? tozden Installation/Configuration 1 15th May 2008 10:21
ISPconfig after installation cannot reach www.xyz.de:81 Figth4Linux Installation/Configuration 23 6th March 2008 22:38
Multiple ISPConfig & DNS Questions and Problems bfriend Installation/Configuration 3 6th January 2007 06:14
Multiple IPs on a single ISPConfig install? Craig Installation/Configuration 4 14th December 2006 18:22


All times are GMT +2. The time now is 12:15.


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