Home > saruby-cloud

saruby-cloud

Saruby-cloud is a project mainly written in RUBY and JAVASCRIPT, based on the MIT license.

The "pictr" demo app from the SA Ruby presentation. A completely cloud based app, using (almost) all of the AWS services

This is the application that I demoed at the 4/28/2009 SARuby meeting. It is a picture uploading/converting application that is completely run in the Amazon cloud: EC2/S3/CloudFront/SQS/SimpleDB.

The application has a web component, which is where you upload your pictures, and a async processing component that converts these images to different sizes, applies effects, etc.

This is very much a demonstration application.

Slides used for the presentation can be found here:http://www.slideshare.net/iwarshak/rails-in-the-cloud-1363459

There are a few things you need to do to get this app running

1 - Setup your AWS keys in either your environment (development mode), or 2) put them in the proper txt files (production mode - see production.rb)

2 - Install the proper gems. rake install:gems should do the trick.

3 - Using the right_aws tools, you need to setup several things.

  • Setup the s3 bucket. See Picture::UPLOAD_BUCKET
  • Setup your sqs queue named "convert". See picture.rb
  • Ensure that you are signed up for SDB, and create the pictures domain. You can do that with: RightAws::ActiveSdb.establish_connection; Picture.create_domain

    -Setup your cloud front distribution acf = RightAws::AcfInterface.new dist = acf.create_distribution 'UPLOAD_BUCKET.s3.amazonaws.com', 'desc'

4 - Substitute YOUR_CLOUDFRONT_DISTRIBUTION_NAME in picture.rb with your new distribution name

5 - If running in production, edit application_controller.rb and replace pictr.yourdomain.com with the proper name

6 - Install a Georgia.ttf font in files/ See convert_job.rb (this was used for the text overlay in the pictures)

Previous:Hash-Server