Capistrano is a framework for automated deployment scripts built on Ruby, Rake, and SSH. The cap command connects to servers and runs repeatable deploy steps for any language or stack.
Overview
Capistrano automates what teams already do over SSH: connect to application servers and run deployment steps in a repeatable, scalable way. Although written in Ruby, it deploys Rails, Java, PHP, and other projects. After installation, deployments are driven from the command line with the cap tool.
The framework defines conventional deployment structure so teams do not reinvent layout, remote paths, or common task patterns. One deployment definition can parameterize multiple stages such as QA, staging, and production by varying only what differs, like host addresses. Tasks can run in parallel across a fleet of servers with connection pooling, and servers can carry roles so work runs only where it belongs.
Extensibility comes through Rubygems and community task libraries; many frameworks ship built-in Capistrano tasks. Under the hood everything reduces to non-interactive SSH commands, which keeps behavior explicit but expects comfort with remote shell administration.
Capistrano deploys code but does not by itself know how to restart your app server or process manager; those steps are custom tasks or gems. It expects key-based SSH, a POSIX shell on targets, and provisioning of runtimes and databases outside Capistrano. Projects are "capified" to generate stage templates that you then tailor to your servers and SCM.
Key features
- Standard deployment conventions
- Multi-stage environment parameterization
- Parallel multi-server execution
- Server role tagging
- Community gem task libraries
- Language-agnostic deploy targets
- Rake-based custom tasks
- Git, Mercurial, Subversion SCM support
Use cases
- Repeatable application deploys over SSH
- Staging and production stage workflows
- Fleet-wide parallel release tasks
- Role-based database and web server steps
- Rails and PHP framework deploy automation