Thought I would share some useful info (before I ask for support help) on a few lessons I have learned for a Aegir multi-server configuration I have running at Linode (IMO the only Linux VPS for hardcore Drupal deployment). My ultimate goal is to be able deploy Drupal sites in a HA environment without having a complicated mess of more than 5 servers and running services like clustered MySQL.
The main problems I encountered in getting a multi-server configuration to the point where I could deploy a site and migrate it around to different nodes were;
- When setting up node server in hosting web interface, SQL errors with host resolution (lesson 1)
- When setting up node server in hosting web interface, SQL login error from host not allowed (lesson 2)
- When setting up node server in hosting web interface, errors out due to ssh not working between servers (lesson 3)
- When deploying a site to a node server (including Open Atrium) it would error out (lesson 4,5,6)
- I have not quite figured out cluster servers yet (asking that question over in the support forum)
- Installed Aegir version 04-alpha12 on Ubuntu 10.04 64bit and have two other node servers built per the multi-server section in doc wiki.
- Built server_master (hosting master) first with Linode Stackscript (https://www.linode.com/stackscripts/view/?StackScriptID=1027).
- Built other two servers with LAMP.
Server-1 Master (LAMP)
Server-2 node member (LAMP)
Server-3 node member (LAMP)
All servers have same aegir user and exact directory structure. Aegir home at /var/aegir/
Lesson 1: Add host names to /etc/hosts/ before installing LAMP and make sure the hostname of each server is in the hosts file
Lesson 2: Grant the correct permissions, on each node servers MySQL, for the MySQL user that will be used from Server-1 (user server-1@”%”)
Lesson 3: When setting-up ssh follow this simple process (main lesson here is to accept defaults when generating the key and to ssh with the aegir account into the node server, from Server-1, before adding it as a server in the hosting web interface).
1- Switch to the aegir user (su aegir) from root login
2- Run command ssh-keygen –t dsa on Server-1 (accept all defaults by hitting enter until done)
3- Copy pub key to Server-2 and 3 (scp id_dsa.pub root@server-1:/tmp
4- Login to Server-2 and 3 follow-steps 1 and 2 or just create a .ssh directory in aegir home
5- Change to /tmp on Server-2 and 3 and run command “cat id_dsa.pub ~/.ssh/authorized_keys”
6- It is not really necessary to copy the pub from Server-2 and 3 to Server-1, but will not hurt if you do so
Lesson 4: Increase memory for PHP and PHP-CLI to at least 96M (/etc/php/apache2/php.ini) and (/etc/php/cli/php.ini)
Lesson 5: make sure the directory structure, and platform, is same for each node server and Server-1 before creating a site that will live on a node server. What I am basically saying here is that even though you are using a node server as the platform (choosing Server-1 as database and node server as web) you still need the same platform on both servers.
Lesson 6: The only way I could get large install profiles like Open Atrium to install on a sever node was to:
1- Build the site completely on Server-1
2- Verify the site
3- Migrate the site to the node server
If you have any useful info to share on how to build and run a multi-server configuration that allows one to have the same copy of a site running on multiple web servers and near-time database replication, please comment here in the clearest of layman terms you can.
(the older I get…the more I just don’t know)