I have been preparing an
Amazon Machine Image (AMI) with Adhearsion, Asterisk and all of the available components installed and pre-configur
ed to be made public soon. For the AMI I decided to get the
Sinatra web app included with the
Click To Call component up and running as a
daemon.
I used a combination of
Rack and
Passenger, since they make the process so easy and production ready. To this end I have updated the README and Click To Call component I covered in my
previous blog post to include the how to and Rack configuration file required.
To get this up and running do the following:
- Install the Apache Webserver
- sudo gem install rack
- sudo gem install passenger (follow instructions here for compiling the Apache module)
Copy the files and directories in ~ahn-project/components/restful_clicktocall/web directory to the appropriate file system location for your Apache web server. Add these virtual host settings to your Apache configuration (ie - /etc/httpd/conf/httpd.conf):
[sourcecode language='php']
ServerName ec2-174-129-89-20.compute-1.amazonaws.com
DocumentRoot /var/www/restful_clicktocall_web/public
[/sourcecode]
Change line three to reflect your configuration. Restart your Apache web server and then connect to the site you configured. For more options I recommend referring to the Passenger documentation found
here.
Stay tuned for the upcoming Amazon Machine Image!