Capistrano vs Terraform: What are the differences?
Capistrano: A remote server automation and deployment tool written in Ruby. Capistrano is a remote server automation tool. It supports the scripting and execution of arbitrary tasks, and includes a set of sane-default deployment workflows; Terraform: Describe your complete infrastructure as code and build resources across providers. With Terraform, you describe your complete infrastructure as code, even as it spans multiple service providers. Your servers may come from AWS, your DNS may come from CloudFlare, and your database may come from Heroku. Terraform will build all these resources across all these providers in parallel.
Capistrano can be classified as a tool in the "Server Configuration and Automation" category, while Terraform is grouped under "Infrastructure Build Tools".
Some of the features offered by Capistrano are:
- Reliably deploy web application to any number of machines simultaneously, in sequence or as a rolling set
- Automate audits of any number of machines (checking login logs, enumerating uptimes, and/or applying security patches)
- Script arbitrary workflows over SSH
On the other hand, Terraform provides the following key features:
- Infrastructure as Code: Infrastructure is described using a high-level configuration syntax. This allows a blueprint of your datacenter to be versioned and treated as you would any other code. Additionally, infrastructure can be shared and re-used.
- Execution Plans: Terraform has a "planning" step where it generates an execution plan. The execution plan shows what Terraform will do when you call apply. This lets you avoid any surprises when Terraform manipulates infrastructure.
- Resource Graph: Terraform builds a graph of all your resources, and parallelizes the creation and modification of any non-dependent resources. Because of this, Terraform builds infrastructure as efficiently as possible, and operators get insight into dependencies in their infrastructure.
"Automated deployment with several custom recipes" is the primary reason why developers consider Capistrano over the competitors, whereas "Infrastructure as code" was stated as the key factor in picking Terraform.
Capistrano and Terraform are both open source tools. It seems that Terraform with 17.4K GitHub stars and 4.77K forks on GitHub has more adoption than Capistrano with 11.1K GitHub stars and 1.72K GitHub forks.
Uber Technologies, DigitalOcean, and 9GAG are some of the popular companies that use Terraform, whereas Capistrano is used by Tilt, Gauges, and New Relic. Terraform has a broader approval, being mentioned in 490 company stacks & 298 developers stacks; compared to Capistrano, which is listed in 295 company stacks and 81 developer stacks.