Attempt to deploy Ruby on Rails application with Capistrano

Source: Internet
Author: User
Tags connect ssh ruby on rails

Deploying Network application Services is a hassle, installing programs, upgrading database schemas, switching versions, and restarting services. The more steps, the more human involvement, the more prone to problems.

Capistrano is Ruby on Rails to provide the deployment solution, the original name Switchtower, a lot of names, the results and people heavy, replaced now this, it is estimated to be in order to become angry, anyway, I can no longer spell the right. It integrates many of the steps required by the deployment program, with SSH, version management systems (which support SVN, CVS, and so on) and rails migration, to a large extent automate deployment as long as the configuration is done.

Capistrano's documentation can be seen here. The easiest way to use this is:

Installation

Gem Install Capistrano

Join Capistrano Support

Cap--apply-to/path/to/my/app Myapplicationname

Modify configuration file

Modify the Config/deploy.rb file.

Initializing the running environment on the server

Rake Remote:exec Action=setup

This step will connect you to the server and create some catalogs.

Deployment

Rake Deploy

Connect to the server and complete the deployment.

It's kind of easy to say. The main problem is to modify the CONFIG/DEPLOY.RB configuration file. Generally, the main configuration parameters include:

Application: Application name.

Repository: The link URL for the version management system.

Web:web List of server names.

App: List of application servers.

DB: List of database servers.

USER:SSH user name.

DEPLOY_TO: Apply deployment path.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.