Scott's picture

BOA is great if you want an extremely well tuned Aegir Drupal from the getgo. Its a bit picky in its nature and is not made for every OS and DNS setup so you need to think through a few steps before you get going. Here is a quick guide on getting it working with Amazon AWS through EC2 and Route 53. Please note I am working from linux.

Lets start with Route 53:

1. Log in to your Amazon EC2 console at https://console.aws.amazon.com/ec2/home

2. Click on Elastic IPs and then on Allocate New Address. Choose EC2. Take note of your new elastic IP.

3. Log in to your Amazon Route 53 console at https://console.aws.amazon.com/route53/home

4. Click create hosted zone and put in a domain name that you wish to use for your BOA hosting system.

5. You will now see 4 name server addresses under "Delegation Set". Open up wherever you have your domain registered and put your 4 nameservers in to point at these addresses (this can take a while to propogate. I like using http://www.whatsmydns.net/ to check whether they are done or not).

6. Double click on the newly created hosted zone and you will see that the NS and SOA record sets are already done. You will now have to create some record sets for the following (replace 12.345.678.999 with the elastic IP from no.2):

yourdomain.com.
A
12.345.678.999

*.yourdomain.com.
A
12.345.678.999

@.yourdomain.com.
A
12.345.678.999

www.yourdomain.com.
A
12.345.678.999

You should now be pretty much done with the basics of the DNS. You can also add MX and SPF records for mail and such. Mine looks like this:

yourdomain.com.
MX
5 ALT1.ASPMX.L.GOOGLE.COM.
5 ALT2.ASPMX.L.GOOGLE.COM.
1 ASPMX.L.GOOGLE.COM.
10 ASPMX2.GOOGLEMAIL.COM.
10 ASPMX3.GOOGLEMAIL.COM.

yourdomain.com.
SPF
"v=spf1 include:_spf.google.com ~all"

yourdomain.com.
TXT
"v=spf1 include:_spf.google.com ~all"

Now, once your nameservers have propogated we can move on to setting up the BOA system:

1. Log in to your Amazon EC2 console at https://console.aws.amazon.com/ec2/home

2. Click "Launch Instance"

3. Name your instance something sensible like BOA.

4. Create new key pair BOA and download it.

5. You are probably tempted by the Free Tier for a year offer from Amazon. If you want to try this guide using the Amazon Linux AMI or Ubuntu Server then please feel free and post your comments below on how it went on a micro instance. I personally went with the 64 bit Debian_6.0.1_64_EBS_PVGRUB_AI image that you can find by clicking on "More amazon images" and then continue.

6. Edit details and choose m1.small type or higher. Click save and then launch.

7. Wait a minute while your instance is booted into action. Now click on Elastic IPs.

8. Right click the elastic IP you created earlier and associate it with your newly created instance.

9. You will see on the instances page that your instance will be associated with a security group. Take note of the group and click on Security Groups on the left. You will have to add 2 custom TCP rules. One for ports 80 and 443 by clicking on Inbound. Apply the rule changes.

10. Locate your downloaded key pair on your machine and cd into the directory where it is (ideally save it somewhere sensible like a hidden folder under your home directory as you will need it every time you want to connect to your server).

11.

$ ssh -i BOA.pem root@<your elastic ip>

12. You should now be in! Download and run BOA Meta Installer.

$ wget -q -U iCab http://files.aegir.cc/BOA.sh.txt
$ bash BOA.sh.txt
 
13. You are now going to run the BOA installer but it is going to fail on DNS check. This is ok. You can check here for full options with the installer but we are going to go with the most straightforward - http://drupalcode.org/project/barracuda.git/blob/HEAD:/docs/INSTALL.txt
Change server.mydomain.org and my@email!
$ boa in-stable public server.mydomain.org my@email o1
 
Let the installer do its thing and it should exit on error when it reaches dns checking.
 
14. To get it working you need to make one change to .barracuda.cnf.
 
$ nano .barracuda.cnf
 
Change _MY_OWNIP="12.34.56.78" <- this is where the dns fails as this is your instances internal IP. Change it to your elastic IP.
 
Ctrl + x to save and then time to run the installer again:
 
$ boa in-stable public server.mydomain.org my@email o1
 
Wait a while and it should eventually get to the bit where you choose what platforms to install on your Octopus instance. All done!
 
For more info once you are up and running check out:
 
12 comments to the "Installing high performance Drupal with BOA (Barracuda, Octopus, Aegir) on Amazon EC2 using Amazon Route 53 DNS"
romaingar's picture

many thanks for your post, very useful. The only thing who was a bit difficult for me with ec2 is to setup the ssh key...

Scott's picture

The key file should be enough to connect. What problem did you have exactly? Did you use Ubuntu or Debian? I think its a different user than root if its ubuntu.

Pixel Ninja's picture

Thank you!!!! It took a few tries because I was choosing an image that for whatever reason kept running out of disc space. Once I chose a different image everything worked great. This will, obviously, streamline things greatly.

Daniel Lewis's picture

This is of high interest to me. I've been on Linode for a while but there have been issues on Linode and AWS just opened in Sydney! I've unfamiliar with the Amazon terminology. Which distro of linux do you recommend? BOA recommends debian but ubuntu seems to be the norm on amazon...

Scott's picture

Well, funnily enough I tried with the latest debian 6.0.6 a couple of days ago but had problems with amazon key files so I used ubuntu 12.04 server instead on a small instance (I dont reccomend micro). Its working great!

Daniel Lewis's picture

Thank you that's very helpful to know. So the Free Tier (micro) option wasn't enough to run BOA? Too slow? I was hoping to use this as a development server and low traffic small sites.

Scott's picture

I tried it with a micro server and it worked but it was sluggish and max-ing out on the memory and cpu often (and that was with a new database server set up in octopus pointing at amazon rds to take some of the effort off). Same set up on a small instance works great though for small and dev sites.

Daniel Lewis's picture

EDIT - after a more thorough reading, I can see that you chose debian and would like to hear feedback. I'd like to hear how people go with Amazon Linux AMI or Ubuntu also.

Arthur R's picture

To make life easier for non commandline gurus would it also be possible to add PhPmyAdmin and Webmin (http://webmin.com) or preferably Virtualmin (www.virtualmin.com) admin/control panel to the above installation configuration with an Ubuntu 12.04 image on Amazon EC2 and how best do this?

I came across the following post on Amazon EC2 using an Ubuntu 64bits 12.04 image (ami-a29943cb):

http://serverfault.com/questions/401540/create-webmin-user-for-an-ec2-in...

This post tries to answer how to solve the Webmin log-in problem with a normal password (on the browser log in screen) not using SSH keys, which instructions are not detailed enough or fully clear to me ...

Looking for a suitable ami image I found on AWS Marketplace I found the following AMI with LAMP Stack plus Webmin (from www.codecreator.com):
https://aws.amazon.com/marketplace/pp/B008I5E90Q

The cost is a fixed monthly charge of US$ 5 plus 0.02 - 0.35 per hour over and above the usual EC2 Amazon server instance charges ?

Key is whether Webmin will nicely work together with with BOA Aegir ?

Found the following avialable ami's information on Webmin/Virtualmin ami's on EC2 at:
https://www.virtualmin.com/documentation/aws/virtualmin_gpl_ami

For available ami's in EC2 Europe more info at:
https://www.virtualmin.com/documentation/aws/virtualmin_gpl_ami#virtualm...

Looks like it's mostly CentOS or Debian ...

From the comments t's also not advised to run Virtualmin on a micro instance of 613 Mb of Ram ...

As of 2012-04-20 Webmin/Virtual offers a micro tier AMI, which uses Amazon Linux. The ID is : ami-5ae43f33 . The comments are alos confusing ...

Much look forward to learning your experiences or thoughts on the above or alternative ami's / installation solutions to getting PhPmyAdmin and Webmin/Virtual added to our Ubuntu 12.04 BOA installation stack (for EU/Ireland location !) ....

Arthur R's picture

Could we also add Webmin/Cloudmin (webmin/cloudmin.com) to the above installation pack in Ubuntu 12.04 ?

Codecreator.com seems to offer an ami (including phpmyadmin and webmin) on Amazon:

https://aws.amazon.com/marketplace/pp/B008I5E90Q

Alternatively Webmin/Virtual apparently also offer an ami:

https://www.virtualmin.com/documentation/aws/virtualmin_gpl_ami#virtualm...

"Good news - we (Webmin/Virtualmin) now have a micro tier AMI, which uses Amazon Linux. The ID is : ami-5ae43f33 !!

What would your advice or thoughts be on this ?

SolasArd's picture

Hi, I also tried installing BOA on a micro instance 3 times and it didn't install properly (Ubuntu 12.04 LTS x64), so I just installed it on a small instance, stopped it, created an AMI and ran this AMI on a micro instance to use the Amazon Free tier. As for Webmin, Scott mentioned it was possible to include Webmin into installation modifying the Barracuda install script (http://scottada.ms/article/getting-drupal-barracuda-boa-barracuda-octopu...). In BOA there are no such options, but it creates a .barracuda.cnf file, which allows for customization. Here's the list of Extras taken from the Barracuda.sh script:
### BDD --- SQL Buddy DB Manager
### BND --- Bind9 DNS Server
### CGP --- Collectd Graph Panel
### CHV --- Chive DB Manager
### CSF --- csf/lfd Firewall
### CSS --- Compass Tools
### FMG --- FFmpeg support
### FTP --- Pure-FTPd server with forced FTPS
### GIT --- Latest Git from sources
### PDS --- fast DNS cache server (pdnsd)
### SLR --- MultiCore Apache Solr Tomcat
### WMN --- Webmin Control Panel
### Examples:
###
### _XTRAS_LIST=""
### _XTRAS_LIST=ALL
### _XTRAS_LIST="PDS CSF CGP CHV FTP"

david's picture

hi,i am using aws and i am hanging on mariadb when install..do any1 have this problem?

Add new comment