My experience with MultiServer

Discussion in 'General' started by dghvoip, Apr 24, 2012.

  1. dghvoip

    dghvoip New Member

    Hi All,

    I just wanted to share my experience and tell you about my SPC3 setup on my machines as distributed servers.

    I run two identical physical servers with XEN Dom0 and some LVM based Debian Squeeze instances all of them the same setup, I have two load balancers with Keepalived and HAproxy listening for HTTP, SMTP, SMTPs, IMAP and all of the services which are being managed by ISPC 3. I followed the great guide at http://www.howtoforge.com/multiserv...se-servers-on-debian-squeeze-with-ispconfig-3. altho I made some modifications because I wanted a central database for the dbispconfig DB, so I run a separate server (w/o ISPC) and all of the DBs reside there.

    it looks like this, names are self explanatory, I hope you get it.

    Code:
    [B]xenmaster1 192.168.5.100
    xenmaster2 192.168.5.100
    ispnas 192.168.5.101
    isplb1 (XEN DomU) 192.168.5.70
    isplb2 (XEN DomU) 192.168.5.71
    ispweb1 (XEN DomU) 192.168.5.64 \ /var/www  is mounted via GlusterFS
    ispweb2 (XEN DomU) 192.168.5.60 /
    ispmx1 (XEN DomU) 192.168.5.61 \ /var/vmail is mounted via GlusterFS
    ispmx2 (XEN DomU) 192.168.5.65 /
    ispdb1 (XEN DomU) 192.168.5.62 \ This two servers are on a master-naster
    ispdb2 (XEN DomU) 192.168.5.66 / setup.
    ispns1 (XEN DomU) 192.168.5.63
    ispns2 (XEN DomU) 192.168.5.67[/B]
    
    All of these with the idea of easy escalability and server in different geographical location in mind.

    I installed the ISPC GUI as per the howto, and then the MX server, then DNS server a MySQL server for customers DBs; afterwards I just made a snapshot of all of the machines and dd'ed them and transferred them to the 2nd server where I dd'ed them back to LVs, I went on and changed IPs and now I have redundant services for _all_ of my ISPC managed services.

    MySQL servers are on a master to master replication schema and they're load balanced with HAProxy, so Joomla and all stuff accessing the DBs is connected to the front-end and requests are balanced between servers on the farm.

    I had to tweak the setup to make this work, for example when I was installing ISPC on each server I used the dame password for all of the ISPC instances so that I could duplicate the machines without having to reinstall ISPC on each server, this also helped me get rid of the "relay access denied" error from postfix, as I've discovered that ISPC ties the name of the server to the username and such, so when I tried to send/receive emails on the duplicated machine I got those errors.

    For dovecot I had to change the dovecot.conf to use a unique username I created manually to access the dbispconfig DB and get rid of the MySQL Access denied errors.

    Web content, MySQL DBS (customer's), Apache and Postfix config files are being mounted via GlusterFS shares on a NAS server, so that duplicated machines can load identical settings without having to keep scp'ing thwm between machines.

    It's working quite nicely now with the exception of mailing lists and whenever I cerate a new client as ISPC creates an unix user account for each client, I have to manually copy passwd and group files to keep web servers in sync and avoid Apache start up errors.

    That's basically it, when I grow up and have a job, I want to run a cosy Web Hosting company and offer those services, also adding XEN VMs, but that's out of the scope of this post/forum.

    Hope you find it interesting.

    That's a bit of what you can do with ISPConfig and asome imagination.

    Sky is the limit.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Thanks yor your post! :)

    ISPConfig does not create a new Linux user for each client. Clients are a virtual construct that exists only in the mysql database to group website and organize permissions. ISPConfig creates a new Linux system user for each website and thats required to run websites safely so that e.g. php scripts of different sites dont run under the same linux uid.

    The problem that you have is caused by a misconfiguration of your system, you missed to enable mirroring in ispconfig. If mirroring in ispconfig is enabled, then ispconfig will create the shell users on all webservers automatically. Please take a look at this guide, it explains the setup and required settings in ISPConfig:

    http://www.howtoforge.com/installin...tabase-cluster-on-debian-6.0-with-ispconfig-3

    It covers also mirroed mail setup etc. and can be used for more then 2 servers as well.
     

Share This Page