Gotchas in ec2onrails setup

3 views
Skip to first unread message

whatcould

unread,
Sep 9, 2009, 12:11:16 PM9/9/09
to ec2-on-rails-discuss
First off, thanks to paul for putting so much work into this -- this
is my first time with ec2 and it's going remarkably smoothly (compared
to how i feared it would go after reading amazon's instructions!).

I did hit a number of snags... I would do some forking and pushing but
I'm not even sure where to change most of these things, short of
running the build scripts myself.

* the github gem is much more advanced than the rubygems version --
there were a few things that just did not work with the rubygems
version. The instructions should probably include "sudo gem install
pauldowman-ec2onrails" instead of just "sudo gem install ec2onrails".
* The AMI ids on the github readme seem to be behind the ones on the
ec2onrails.rubyforge.org readme -- 0_9_9 vs 0_9_9_1
* That said, even 0_9_9_1 seems to be behind what the github gem's
capistrano tasks need. For instance:
** A large chunk of c2onrails:setup requires changing the app user's
group to "rootequiv" and sudoing. But there is no group "rootequiv",
and the sudoers file is not the same as the github /server/files/etc/
sudoers
** Some of the scripts ec2onrails:setup needs are not in /usr/local/
ec2onrails/bin/.

I guess it's just a question of synching up the new github version to
the AMI setup? Seems like I could git clone the repository and run a
script, but I was unsuccessful in figuring that out.

Paul Dowman

unread,
Sep 9, 2009, 1:57:56 PM9/9/09
to ec2-on-rai...@googlegroups.com
If you're using the gem from RubyForge, then you need to use the released version of the AMI. "cap ec2onrails:ami_ids" will tell you the AMI id's.

If you're using the gem from GitHub, then build the AMI from the same GitHub repo.

Paul

whatcould

unread,
Sep 9, 2009, 11:44:39 PM9/9/09
to ec2-on-rails-discuss
> build the AMI from the same GitHub repo.

Ah yes, then i'd need to figure out how to do that! I see the
instructions now, maybe tomorrow.

When I run "cp ec2onrails:ami_ids" i get the same IDs that are in
version.rb; they don't seem very useful:

32-bit server image (US location) for EC2 on Rails 0.9.10.3: ami-xx
64-bit server image (US location) for EC2 on Rails 0.9.10.3: ami-xx
32-bit server image (EU location) for EC2 on Rails 0.9.10.3: ami-xx
64-bit server image (EU location) for EC2 on Rails 0.9.10.3: ami-xx


The RubyForge gem wasn't getting anywhere -- wouldn't read the db
config. I switched to the GH version, it worked, and eventually I
found the problem (I'd added ":ebs_vol_id => 'vol-6730c60e'" to my :db
role and it didn't like that... was fixed somewhere along the line).

Paul Dowman

unread,
Sep 10, 2009, 10:08:51 AM9/10/09
to ec2-on-rai...@googlegroups.com
The github gem (built from the master branch) doesn't have public AMI id's because it's unreleased, you need to build your own AMI if you're using that version.

Paul
Reply all
Reply to author
Forward
0 new messages