O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Capistrano and the Rails Application Lifecycle

Book Description

Learn how to make your Rails deployments pain-free with Capistrano! This Short Cut shows you how to use Capistrano to automate the deployment of your Rails applications. It teaches you the basics, but also goes far beyond. It shows you realistic deployment scenarios, including some with complex server farms. It includes a quick reference to Capistrano. As your Rails applications grow, it becomes increasingly important to automate deployment and to keep your development environment well organized. Capistrano is the right tool for the job, and this PDF shows you how to use it effectively.

Table of Contents

  1. Capistrano and the Rails Application Lifecycle
    1. A Basic Deployment
      1. Prerequisites
        1. Development box requirements
        2. Deployment box requirements
        3. Other requirements
      2. Installing Capistrano
      3. Deploying
        1. Deployment commands
        2. Your first migration
        3. Verifying your deployment
        4. Pushing the next release
    2. It’s All About the Farm
      1. Farms and Uptime
      2. Divisions of Functionality
      3. Successful Farms Grow
        1. Load balancing
        2. Server requirements
    3. Environments
      1. Development and Testing
        1. The Rails test environment
        2. The Rails development environment
      2. Staging, Quality Assurance, Integration Test, and System Test
      3. Production
      4. Configuration File Management
        1. Database configuration and new environments
      5. Capistrano and Environments
    4. Using Capistrano
      1. Built-in Tasks
        1. cleanup
        2. cold_deploy
        3. deploy
        4. deploy_with_migrations
        5. diff_from_last_deploy
        6. disable_web
        7. enable_web
        8. invoke
        9. migrate
        10. restart
        11. rollback
        12. rollback_code
        13. setup
        14. shell
        15. show_tasks
        16. spinner
        17. symlink
        18. update_code
        19. update_current
      2. Moving the Code
        1. Long updates
        2. Farm installs and updates
        3. Cluster updates
      3. Security
      4. Maintenance
        1. Logs
        2. Using script/runner
    5. Extending Capistrano
      1. Simple Tasks
      2. Extending Tasks
      3. Baking Your Own Recipes
        1. Roles
        2. Variables
        3. Tasks
        4. Transactions
    6. Capistrano Reference
      1. cap Command Reference
      2. Capistrano Deployment Variables
      3. Environment Variables
      4. Other References
    7. Appendices
      1. Subversion
        1. Creating a respository
        2. Accessing your repository
        3. Importing your project
        4. Checking out your project
        5. Common development-cycle commands
      2. SSH
        1. Local SSH
        2. Local SSH configuration
        3. Remote SSH configuration
        4. Local SSH options on Windows
        5. Server-side sshd
        6. Windows sshd
    8. About the Authors