What's the best way to run beanstalkd on an instance of Amazon Linux in EC2? Beanstalkd doesn't exist in the yum repository and the upstart script included with beanstalkd doesn't seem to work out of the box. I'm wondering if someone has already solved this problem, or if I need to go and muck around with a custom EC2 user-data script + beanstalkd upstart script.
Amazon Linux instance running beanstalkd
amazon ec2amazon-linuxamazon-web-services
Best Answer
I ended up writing a user data script that runs when an ec2 instance is created. The script pulls down the latest source for beanstalkd, compiles, and installs the binary. The script uses a modified upstart script to control the lifecycle of the beanstalkd process.
Here's the user data script:
The two scripts it's downloading from gist is the upstart beanstalkd script and a configuration file which sets the options used when running the program.
Here's the upstart beanstalkd.conf script:
Here's the configuration file copied into /etc/default/beanstalkd: