...
- cd into the root dir of our code repository
$ bundle exec cap [staging|production] deploy
- ssh to the ec2 machine as 'ubuntu' user (because you will need sudo). you can create a new ssh config entry if you want; either use the key you downloaded in the first step or if you have added your own key you can use that.
$ sudo service tomcat7 restart
$ sudo service apache2 restart
Building a new machine on AWS with Ansible
...