Capistrano (software)

Last updated
Capistrano
Capistrano logo.svg
Original author(s) Jamis Buck, Lee Hambley
Stable release
3.16.0 [1]   OOjs UI icon edit-ltr-progressive.svg / 28 February 2021;13 months ago (28 February 2021)
Repository github.com/capistrano/capistrano
Written in Ruby
Operating system Linux, OpenBSD, macOS
Type Deployment tool
License MIT License
Website capistranorb.com

Capistrano is an open-source tool for running scripts on multiple servers; its main use is deploying web applications. It automates the process of making a new version of an application available on one or more web servers, including supporting tasks such as changing databases.

Contents

Capistrano is written in the Ruby language and is distributed using the RubyGems distribution channel. It is an outgrowth of the Ruby on Rails web application framework, but it is also used to deploy web applications written using other languages, for example, PHP.

Capistrano is implemented primarily for use on the UNIX shell command line. A user may choose from many Capistrano recipes, e.g. to deploy current changes to the web application or roll back to the previous deployment state.

Originally called SwitchTower, the name was changed to Capistrano in March 2006 due to a trademark conflict. [2] The original author, Jamis Buck, announced on February 24, 2009 that he is no longer the maintainer of the project. [3]

Internals

Capistrano is a utility and framework for executing commands in parallel on multiple remote machines, via SSH. It uses a simple domain-specific language borrowed in part from the tool Rake. It also supports tunnelling connections via some gateway machine to allow operations to be performed behind VPNs and firewalls.

Capistrano was originally designed to simplify and automate deployment of web applications to distributed environments, and originally came bundled with a set of tasks designed for deploying Ruby on Rails applications. The deployment tasks are now (as of Capistrano 2.0) opt-in and require clients to explicitly put "load 'deploy'" in their recipes. [4]

Example Capfile

task:xml_libs,:hosts=>"www.capify.org"dorun"ls -x1 /usr/lib | grep -i xml"end

This defines a single task, called "xml_libs", and says that it should be executed only on the "www.capify.org" host. When executed, it will display all files and subdirectories in /usr/lib that include the text "xml" in their name. Assuming the capfile is in the current directory, the user would execute that task like this:

cap xml_libs 

See also

Related Research Articles

Zope is a family of free and open-source web application servers written in Python, and their associated online community. Zope stands for "Z Object Publishing Environment", and was the first system using the now common object publishing methodology for the Web. Zope has been called a Python killer app, an application that helped put Python in the spotlight.

Ruby on Rails Server-side open source web application framework

Ruby on Rails, or Rails, is a server-side web application framework written in Ruby under the MIT License. Rails is a model–view–controller (MVC) framework, providing default structures for a database, a web service, and web pages. It encourages and facilitates the use of web standards such as JSON or XML for data transfer and HTML, CSS and JavaScript for user interfacing. In addition to MVC, Rails emphasizes the use of other well-known software engineering patterns and paradigms, including convention over configuration (CoC), don't repeat yourself (DRY), and the active record pattern.

CherryPy is an object-oriented web application framework using the Python programming language. It is designed for rapid development of web applications by wrapping the HTTP protocol but stays at a low level and does not offer much more than what is defined in RFC 7231.

Django (web framework) Python web framework

Django is a Python-based free and open-source web framework that follows the model–template–views (MTV) architectural pattern. It is maintained by the Django Software Foundation (DSF), an independent organization established in the US as a 501(c)(3) non-profit.

A web framework (WF) or web application framework (WAF) is a software framework that is designed to support the development of web applications including web services, web resources, and web APIs. Web frameworks provide a standard way to build and deploy web applications on the World Wide Web. Web frameworks aim to automate the overhead associated with common activities performed in web development. For example, many web frameworks provide libraries for database access, templating frameworks, and session management, and they often promote code reuse. Although they often target development of dynamic web sites, they are also applicable to static websites.

Grails is an open source web application framework that uses the Apache Groovy programming language. It is intended to be a high-productivity framework by following the "coding by convention" paradigm, providing a stand-alone development environment and hiding much of the configuration detail from the developer.

Aptana Text editor

Aptana, Inc. is a company that makes web application development tools for use with a variety of programming languages. Aptana's main products include Aptana Studio, Aptana Cloud and Aptana Jaxer.


This is a comparison of notable free and open-source configuration management software, suitable for tasks like server configuration, orchestration and infrastructure as code typically performed by a system administrator.

Lift (web framework)

Lift is a free and open-source web framework that is designed for the Scala programming language. It was originally created by David Pollak who was dissatisfied with certain aspects of the Ruby on Rails framework. Lift was launched as an open source project on 26 February 2007 under the Apache License 2.0. A commercially popular web platform often cited as being developed using Lift is Foursquare.

Web2py is an open-source web application framework written in the Python programming language. Web2py allows web developers to program dynamic web content using Python. Web2py is designed to help reduce tedious web development tasks, such as developing web forms from scratch, although a web developer may build a form from scratch if required.

Heroku is a cloud platform as a service (PaaS) supporting several programming languages. One of the first cloud platforms, Heroku has been in development since June 2007, when it supported only the Ruby programming language, but now supports Java, Node.js, Scala, Clojure, Python, PHP, and Go. For this reason, Heroku is said to be a polyglot platform as it has features for a developer to build, run and scale applications in a similar manner across most languages. Heroku was acquired by Salesforce in 2010 for $212 million.

Phusion Passenger is a free web server and application server with support for Ruby, Python and Node.js. It is designed to integrate into the Apache HTTP Server or the nginx web server, but also has a mode for running standalone without an external web server. Phusion Passenger supports Unix-like operating systems, and is available as a gem package, as a tarball, or as native Linux packages. As of Aug 2021 more than 130,000 web sites use Phusion Passenger.

Sinatra (software)

Sinatra is a free and open source software web application library and domain-specific language written in Ruby. It is an alternative to other Ruby web application frameworks such as Ruby on Rails, Merb, Nitro, and Camping. It is dependent on the Rack web server interface. It is named after musician Frank Sinatra.

Zed Shaw Software developer

Zed A. Shaw is a software developer best known for creating the Learn Code the Hard Way series of programming tutorials, as well as for creating the Mongrel web server for Ruby web applications,. He is also well known for his polemical views on programming languages and communities.

Ansible is an open-source software provisioning, configuration management, and application-deployment tool enabling infrastructure as code. It runs on many Unix-like systems, and can configure both Unix-like systems as well as Microsoft Windows. It includes its own declarative language to describe system configuration. Ansible was written by Michael DeHaan and acquired by Red Hat in 2015. Ansible is agentless, temporarily connecting remotely via SSH or Windows Remote Management to do its tasks.

Pylons Project is an open-source organization that develops a set of web application technologies written in Python. Initially the project was a single web framework called Pylons, but after the merger with the repoze.bfg framework under the new name Pyramid, the Pylons Project now consists of multiple related web application technologies.

References

  1. "Release 3.16.0". 28 February 2021. Retrieved 10 March 2021.
  2. "SwitchTower: Renamed". weblog.jamisbuck.org. 2006-03-05.
  3. "the { buckblogs :here }: Net::SSH, Capistrano, and Saying Goodbye". Weblog.jamisbuck.org. 2009-02-24. Retrieved 2014-03-21.
  4. "capistrano/README.md at master · capistrano/capistrano · GitHub". Github.com. 2013-06-13. Retrieved 2014-03-21.

Further reading