Notes on Installing Aegir on Amazons EC2

Update 1 - April 5th 2011:  I modified some user creation items, they were completely wack.

Yesterday I updated my main aegir site to 1.0-RC3 and about 10 minutes after I was done I got my monthly bill from Linode.  I had forgotten how big its grown.  I've been adding more and more sites to my server and needed more memory and hard drive space.  Linode makes it sooo stink'n easy to add on more stuff that its grown to the point that I should probably be doing something different.

I decided it was time to take a look at Amazon EC2.  Now I don't have time to do a full tutorial on how to install aegir on EC2 but here are my notes:

Setting up the EC2 instance

  • Start here: https://help.ubuntu.com/community/EC2StartersGuide
    • I did the 8.0.4 install.  Follow the link to http://uec-images.ubuntu.com/releases/8.04/release/ to get the ami.
  • Amazon AWS: http://aws.amazon.com - create an instance with the ami found at the link above.
    • Be sure to create a key pair, download the key and don't lose it.
  • Get your x.509 cert keys by going to:
    • http://aws.amazon.com/account/
    • then click on security credentials
    • there is a tab about half way down to download it.
    • you will get 2 keys a pk-XXXXXX.pem and cert-XXXXXX.pem
  • Back to ec2startsguide.
    • I only did step 1 - 4 on "Installing the API tools"since I already had my key's
    • NOTE: the "Installing the API tools" section is for your local computer, if your running ubuntu (I am...well linux mint anyways).
    • I skipped to 3 and 4 of "Using the Ubuntu Images" to login with ssh to my instance.
    • NOTE: you can get your "<external-host-name>" by clicking on your instance in the AWS console.  It will show down below where all the info shows.

Installing AEGIR

  • I followed the manual install here: http://community.aegirproject.org/installing/manual
  • You will have to use "sudo" in front of most of your commands to run them as root.
    • example: sudo apt-get install apache2 php5 php5-cli php5-gd php5-mysql postfix sudo rsync git-core unzip
  • At "3.2. DNS configuration" I could NOT get the stupid FQDN (fully qualified domain name) to stay after a reboot of the instance. 
    • I found this: http://www.lazytweet.com/post/6687864275
    • basically edit /etc/rc.local so that it says "hostname aegir.mydomain.com" (no quotes) before the exit 0.
    • Also you will need to edit your /etc/hosts file like normal
  • At "5.3. Running hostmaster-install" I had issues running hostmaster-install... I got the error "Dummy connection failed to fail".  I figured out I had to remove the anonymous users from mysql for some reason (I saw someone talk about it on drupal some place).  To do that I:
    • Added another user that I could login to webmin with (did I mension I installed webmin... its easy): 
      • Create the use and home directory: sudo useradd -d /home/myusername -m myusername
      • Set users password: sudo passwd myusername
      • add to sudo:  visudo
      • add this to the bottom of visudoers: myusername ALL=(ALL) ALL
    • Then I logined to webmin and enabled the mysql module
    • Then deleted the 2 anonymous users.I must have had my hostfile set funny because it created 2 servers: aegir.mydomain.com and localhost.
  • Lastly,  I must have had something funkey in my /etc/hosts file.  It showed "localhost" as a server having mysql only and aegir.mydomain.com as another server having onlyapache.  I set aegir.mydomain.com to have both server and mysql, verified it... then deleted localhost server.

Sorry its such a quick writeup but I hope it helps you out.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

We installed aegir successfully on amazon EC2 server. Site is successfully created on drupal5 platform with mail send failed warning. But on drupal 6 platform site creation fails due to mail send error. It works fine till we encounter the following error:

Unable to send e-mail. Please contact the site administrator if the problem persists.
An error occurred at function : drush_provision_drupal_provision_install

Then it undoes every task.

My question is on EC2 how to make successfully install a MTA for aegir to work ? Is there any separate setup needed for the same ? Please explain with some link or document guide.

Thanks a lot in advance

Post new comment