EC2OnRails setup
There are two machines:
Controller: Where you are running the capistrano commands
Server: The EC2 instance where the app will be running (potentially multiple)
- Controller: sudo gem install ec2onrails
- Controller: suso gem install capistrano
- Controller: svn checkout https://rsportzcvs.svn.cvsdude.com/Swooshdot/trunk
- Start Server instance(s) using ec2onrails AMI
- Controller: Edit config/deploy.rb
- Set scm_username/password
- set role :web,app,db,memcache to Server(s) public DNS name
- point ssh_options[:keys] to your ssh private key
- Controller: cap ec2onrails:get_public_key_from_server
- If this doesn’t work, you probably don’t have the right private key
- Controller: cap ec2onrails:setup
- Controller: cap ec2onrails:db:set_root_password
- Controller: cap deploy:cold
- Existing production: cd /mnt/app/shared rsync -azv avatars index files logos photos widgets pictures root@newinstance:/mnt/app/shared
Note you only need to do steps 1, 2 and 6 once on your staging server (if all your instances share the same key), then repeat the following for each new instance
For a simple server test, do the following:
$ RAILS_ENV=development ruby script/server webrick