2011年8月6日 星期六

AWS EC2, Simple Email Service, and Bugzilla

For a small scale software project such as iOS app, nothing adds more than a free bug tracking system. In this blog, I'll be sharing the experience of setting up Bugzilla on Amazon EC2 (AWS free tier), with Simple Email Service SES.

Since there are tons of websites showing how to set up EC2, Bugzilla, and SES, I would be just telling you the problems that I had after following those directions.


Amazon EC2

Signing up is a no brainer, just follow the link: http://aws.amazon.com.

Note:
- The last step is to enter the pin using your phone. If you don't live in the US, like me, then be careful not to enter country code in the phone number, as the system would prefix it with the country code already.
- I have picked up Amazon Machien Image (AMI): amzn-ami-2011.02.1.i386-ebs (ami-8c1fece5)
- Use a Linux if you want to use the tool scripts from AWS. My Mac OS X machine has problem setting up some dependency required by the scripts, so I ended up using Ubuntu, running on a VirtualBox VM.


Postfix

Just run sudo yum install postix

- I decide to use postfix instead of sendmail, as there is a simple tutorial on how to integrate SES with postfix, http://docs.amazonwebservices.com/ses/latest/DeveloperGuide/index.html?IntegratingWithServer.Postfix.html


Simple Email Service

Follow this link: http://docs.amazonwebservices.com/ses/latest/GettingStartedGuide/

Note:
- After verification, you need to request production access. In my case, it takes around 1 day for approval.
- SES doesn't like the AutoSubmitted header, so configure postfix to not insert this header. This http://posluns.com/guides/header-removal/ tells you how to add it. Make sure to have Auto-Submitted ignored. You might also want to check out what headers are currently supported by SES: http://docs.amazonwebservices.com/ses/2010-12-01/DeveloperGuide/index.html?AppendixHeaders.html
- Remember if you ever use SES from any machine other than EC2, than it's 0.01 per recipient.


Bugzilla

For installation, start with http://www.bugzilla.org/docs/tip/en/html/installation.html

Note:
- On EC2, Perl is already pre-installed.
- Mysql: sudo yum install mysql mysql-server
- Webserver (and PHP): sudo yum install httpd php
- In some installations of missing Perl modules, make and gcc are needed. So make sure to run sudo yum install make gcc.
- After finding out what Perl modules you need to install by running sudo ./checksetup.pl --check-modules, it's better to go with installation all by sudo /usr/bin/perl install-module.pl --all
- If you didn't install bugzilla in /var/www/html, In my case at /var/www/html/bugzilla, make sure to change urlbase to reflect the change. In my case, it has to be the url of the ec2 plus /bugzilla. This has plagued me for some days, as everything seems to be working and only when you sign in as a new user, then it tells you that indexcgi couldn't be found.