| 3 | | # A freshly built slice gives you the root account |
|---|
| 4 | | # This creates a user account with sudo access |
|---|
| 5 | | # The '_as_root' means 'log in as root to do this' |
|---|
| | 3 | Here are instructions that will take a fresh install of Ubuntu Dapper (6.06.1 server), create an SVN repository and trac installation for your project and deploy the application using apache, mongrel and mysql. |
|---|
| | 4 | |
|---|
| | 5 | All commands below are run on your local host. You will *never* be requested |
|---|
| | 6 | to log into the remote server manually. Capistrano does all the work. |
|---|
| | 7 | |
|---|
| | 8 | - Mike |
|---|
| | 9 | |
|---|
| | 10 | |
|---|
| | 11 | # Install deprec on workstation |
|---|
| | 12 | sudo gem install deprec --include-dependencies |
|---|
| | 13 | echo 'require "deprec/recipes"' >> ~/.caprc |
|---|
| | 14 | echo 'ssh_options[:keys] = %w(~/.ssh/id_dsa)' >> ~/.caprc |
|---|
| | 15 | echo 'ssh_options[:paranoid] = false' >> ~/.caprc |
|---|
| | 16 | echo 'ssh_options[:forward_agent] = true' >> ~/.caprc |
|---|
| | 17 | |
|---|
| | 18 | # Setup user account with sudo access on remote server |
|---|
| 12 | | cap install_rails_stack |
|---|
| 13 | | cap php_install |
|---|
| | 25 | # Install all required software on remote server |
|---|
| | 26 | cap install_rails_stack svn_install trac_install |
|---|
| | 27 | |
|---|
| | 28 | # Create rails project on workstation and configure for deprec |
|---|
| | 29 | rails example |
|---|
| | 30 | cd example |
|---|
| | 31 | ./script/generate scaffold_resource person name:string age:integer |
|---|
| | 32 | deprec --apply-to . --name example --domain www.example.com |
|---|
| | 33 | |
|---|
| | 34 | # Import application into subversion respository and setup trac |
|---|
| | 35 | cap svn_setup |
|---|
| | 36 | cap trac_setup |
|---|
| | 37 | cap trac_user_add |
|---|
| | 38 | cap trac_start # trac is now available on http://www.example.com:9000/ |
|---|
| | 39 | cap trac_stop # if you had the need |
|---|
| | 40 | |
|---|
| | 41 | # Deploy application |
|---|