1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Resolved How to run Plesk in a cluster environment

Discussion in 'Plesk 9.x for Linux Issues, Fixes, How-To' started by kclo, Jan 29, 2010.

  1. kclo

    kclo Guest

    0
     
    Dear all,

    I want to deploy Plesk control panel on Linux platform. I know that it is just running on a single server. If the server is failed, it will affect the service. Can it run on a RedHat Cluster? Or is Plesk to solve the single-point failure problem?

    Thanks!
     
  2. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,572
    Likes Received:
    1,243
    Location:
    Novosibirsk, Russia
    Plesk is not clustered system. You can just run mysql server on separate server, for example. Also you can try to use Virtozzo failover clustering solution based on Virtuozzo containers. More details you can find in Virtuozzo documentation.
     
  3. kclo

    kclo Guest

    0
     
    How about if I run RedHat Cluster File System so that both servers can read/write to the same disk partition?
    However, which directory will Plesk Control panel store information? If I know, I can soft link all these directories to the SAN or iSCSI disks. I know that it will create ftp accounts under /etc/passwd but I can use rsync or other methods to copy these information to the second node? Any hints on it?
     
  4. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,572
    Likes Received:
    1,243
    Location:
    Novosibirsk, Russia
    I have no any experience with Plesk clustering, therefore I have no any hints. I can only suggest you find all needed Plesk related directories in /etc/psa/psa.conf file.
     
  5. kclo

    kclo Guest

    0
     
    Thanks for your indication!

    My plan will setup a Red Hat Cluster File System(or just RedHat cluster is enough) which contains two Linux servers and share a common disk storage. Both servers will have read/write access to the partition. For two Linux servers, the virtual hosting service is running on the Virtual IP. I will install plesk in each server and only enable Web hosting service and ftp service. DNS and mail will not run. I will create a directory under this disk partition and softlink those configuration files and webpage contents to it. In case of the server failure, it will failover to the second node. If I use RedHat Cluster, only 1 node is active(In this case, I just need 1 Plesk license). If I use RedHat Cluster File System, both node can be active and running in load balanced mode. (In this case, I need two plesk license) Hopes this works....
     
  6. kclo

    kclo Guest

    0
     
    I have already setup a RedHat Cluster and a shared as separate partition(/userdata, /webconfig. As I explained, I will move those config files and user domain files to the shared driver. I have first tar all files under /etc/psa andcopy those files under /webconfig. Then I rename /etc/psa to /etc/psa.org and create a soft link "ln -s /webconfig/psa psa" under /etc. However, I can not login again. Any hints?

    On the other hand, what is the startup script and stop script to start and stop all Plesk control panel process. Is it /etc/init.d/psa?

    Thanks
     
  7. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,572
    Likes Received:
    1,243
    Location:
    Novosibirsk, Russia
    Yes, you are correct. It is /etc/init.d/psa
     
  8. kclo

    kclo Guest

    0
     
    Where is Plesk configuration information stored?

    Hi all,

    I have move the following configuration files to a shared partition so that it can used for server failover in the cluster environment : -

    1) /var/lib/mysql soft link to /shared1/mysql
    2) /etc/httpd/conf.d soft link to /shared/conf.d
    3) /etc/psa soft link to /shared/etc/psa
    4) /usr/local/psa soft link to /shared/psa
    5) /var/lib/mysql soft link to /shared/mysql
    6) /var/lib/pgsql soft link to /shared/pgsql
    7) /var/www soft link to /shared/www

    Most of the functions like admin login is function fine even in clustered environment. However, I found that the domain information created under the admin interface is not updated after failover to the other server. Where is the domain information stored during domain creation in admin interface? Is it stored inside mysql or other database directory. I need to move this information to the shared drive in order to make the cluster works.

    Any hints?
     
  9. surfichris

    surfichris Guest

    0
     
    It'll be in the "psa" database of your normal database server (so in the stock MySQL data directory)

    Good luck with what you're trying to accomplish. :)
     
  10. kclo

    kclo Guest

    0
     
    Thanks!

    I checked the softlink of /var/lib/mysqld again and it works now. How about postgresql? Does Plesk use any info from Postgresql?

    The problem is that for ftp user, the password and user accounts are created under /etc/passwd and /etc/shadow. After machine fail-over, these information will lose. Need to find out method to continuous copy changes of these two files to the standby server.

    Any method to make change of the creation of ftp users to mysql or ldap?

    Why Plesk is not setup to work in Cluster environment???
     
  11. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,572
    Likes Received:
    1,243
    Location:
    Novosibirsk, Russia
    There are no any system Plesk information in Postgresql database. It is used only for client's databases.

    It is very interesting question about running Plesk in cluster environment. As I see you have performed some useful tests. I will forward your idea and results to developers and management to the further investigation and discussion.
     
  12. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,572
    Likes Received:
    1,243
    Location:
    Novosibirsk, Russia
    kclo,

    Do you have any progress with your Plesk clusterization experiments?
    Could you please describe with details what was done and what is encountered problems?
     
  13. kclo

    kclo Guest

    0
     
    Hi all,

    First, my plesk cluster only used for Web Hosting service. We are not using Mail and DNS.

    I have setup two Linux servers running Redhat Cluster with a common disk storage.

    I have installed Plesk into these two servers and soft link the following directories to the shared folder(the common disk storage)

    1) /var/lib/mysql soft link to /shared1/mysql
    2) /etc/httpd/conf.d soft link to /shared/conf.d
    3) /etc/psa soft link to /shared/etc/psa
    4) /usr/local/psa soft link to /shared/psa
    5) /var/lib/mysql soft link to /shared/mysql
    6) /var/lib/pgsql soft link to /shared/pgsql
    7) /var/www soft link to /shared/www

    My problem is that the ftp accounts of websites are stored in the local Linux server "/etc/passwd". When the server failover to the other server, the httpd can not startup as it will look for the ftp account information. I have wrote a script to solve it. My script will look at the sys_user table of the psa database of Mysql. I will then compare with the /etc/passwd user, if any user missed, I will run "useradd" again to this server and httpd can startup

    This is what I have done!
     
  14. BOULAHBELH

    BOULAHBELH Guest

    0
     
    Question

    Hi,

    I want to do the same, does your cluster works fine ? Since how many time ?

    Thanks !
     
  15. kclo

    kclo Guest

    0
     
    Hi,

    Sorry for late reply!

    We have used the Plesk in cluster environment for our Web Hosting users. However, we only provide Web Hosting and no email or dns functions.

    In several cases, the fail-over success but it fail 1-2 times. The main problem is that the httpd can not be started after failover as some of the users does not exist in /etc/passwd. As I mentioned, I rely on the mysql db which store user password to recreate user. I have reviewed the case where the user or password does not exist in the mysql db which cause failover not working. One modification is to continuous copy info in /etc/passwd and /etc/shadow to the standby node
     
  16. abdi

    abdi Platinum Pleskian

    31
    18%
    Joined:
    May 14, 2006
    Messages:
    2,913
    Likes Received:
    60
  17. Amin Taheri

    Amin Taheri Golden Pleskian Plesk Certified Professional

    33
     
    Joined:
    Jul 5, 2007
    Messages:
    1,398
    Likes Received:
    1
    Location:
    Seattle Area
    Kind of - it still wont offer clustering of web customers or the panel itself. Its really just mail, dns and DB which you could have already done anyways with a little work. Until they actually get true clustering (web customers mostly but the panel as a close second) it may not be worth it for a lot of people.
     
  18. Hostasaurus.Com

    Hostasaurus.Com Regular Pleskian

    30
    68%
    Joined:
    Oct 8, 2009
    Messages:
    465
    Likes Received:
    8
    That scares me, knowing how many bugs are in the panel itself, and how much of a nightmare the billing system is, which was one of their more recent attempts at multi-server integration. The more complex it gets, the worse it gets, but we just keep getting new versions with more and more 'stuff' added in. I can't imagine them trying to bundle in application-level cluster support too.
     
  19. trialotto

    trialotto Golden Pleskian Plesk Guru

    37
     
    Joined:
    Sep 28, 2009
    Messages:
    1,446
    Likes Received:
    206
    @KCLO and @everyone,

    It is not a good idea to

    - use soft links to a clustered file system, (and)
    - use a clustered file system,

    for a number of evident reasons that I will not explain now, for the sake of convenience.

    In essence, one should use

    - a file share, which can a cloud based file share OR a separate disk space that can be made available to multiple machines
    - a persistent mount that can be attached to the servers of choice

    and note that I am NOT talking about a SAMBA file share: it is just a "file share", a common disk partition that can be shared across servers.

    From that starting point one has to make sure that specific default Plesk (data) directories are mounted and mapped properly on the file share.

    In essence, it is quite a simple solution, at least as far as it concerns the use of (shared) disk space.

    However, the databases are a whole different question with separate answers: it entirely depends on what one wants to achieve.

    In general, one has the options to use

    1 - one central database (disadvantage: the entire ecosystem is vulnerable to database failure)
    2 - a psa database per local machine, augmented with a central and clustered database for application databases
    3 - a clustered database system

    and it is highly recommend to use option 2, in order to have some additional performance AND security on critical data that is stored in the local psa and other databases.

    It is possible to cluster the psa database server, but that is not recommend at all.

    After all, when storing daily mysql dumps on the shared file system, one has all the tools to recreate a clean database system in minutes, given the fact that the daily dump contains the psa, mysql and mail databases (and ibdata1 and similar files are also stored on the file storage, so you can use those files to).

    In summary, one can suffice by simply using a file share.

    The exception to the above is the environment in which one has the desire to create a load-balanced, clustered Plesk eco-environment, which environment requires a more elaborate database server infrastructure (which I will not discuss now).

    Hope the above helps a bit.....

    Regards...........
     
Loading...