CSC/ECE 517 Fall 2013/ch1 1w09 hs
Code Deployment and Release Management with Rails
Code Deployment or Software Deployment and Release management with Ruby on Rails uses various tools such as Capistrano, Heroku, Mina, Vlad, Inploy etc. These automated tools are frameworks used to write and execute commands in parallel remote machines and thus ease the process of deployment and management of various applications.
Introduction
Deployment is a process of transferring your application onto a production server to make it available for other users. This process involves various activities and transitions between them. Though the general guidelines remain the same, the specific requirements vary with each software system.
Release management is a software engineering process intended to oversee the development, testing, deployment and support of software releases. Release management usually begins in the development cycle with requests for changes or new features. If the request is approved, the new release is planned and designed. The new design enters the testing or quality assurance phase, in which the release is built, reviewed, tested and tweaked until it is ultimately accepted as a release candidate. The release then enters the deployment phase, where it is implemented and made available. Once deployed, the release enters a support phase, where bug reports and other issues are collected; this leads to new requests for changes, and the cycle starts all over again.
Why Automation?
Manual deployments are slow and error prone Deployment of a real world application is a complex and all-too-often manual process. IT deployment instructions are typically found in multiple documents, spread across several groups and may be incomplete, requiring tribal knowledge in order to be executed successfully. Components of the application may need to be deployed in some specific order to any number of environments, from early testing, user acceptance, and staging, to production, performance, and disaster recovery. The manual deployment process must be repeated for each environment. Manually-introduced errors are common and costly.
Deployment Automation Deliver your applications faster and with fewer errors using UrbanCode's software deployment automation tool: UrbanCode Deploy. Define your software deployment process and apply it across all of your environments consistently every time. With UrbanCode Deploy's automated application deployment platform, manual deployments become a thing of the past.
Deployment Automation tools
Capistrano
Capistrano is a Ruby program that gives you a set of advanced tools to deploy web applications to your servers. With Capistrano it’s also possible to deploy to many machines at once. Capistrano offers many advanced options and can be used to deploy many kinds of applications.
It supports the scripting and execution of arbitrary tasks, and includes a set of sane-default deployment workdflows.
Capistrano can be used to:
Reliably deploy web application to any number of machines simultaneously, in sequence or as a rolling set
- To automate audits of any number of machines (checking login logs, enumerating uptimes, and/or applying security patches)
- To script arbitrary workflows over SSH
- To automate common tasks in software teams.
- To drive infrastructure provisioning tools such as chef-solo, Ansible or similar.
Capistrano is also very scriptable, and can be integrated with any other Ruby software to form part of a larger too.
Installing Capistrano
General Usage
The following commands will clone Capistrano at the latest v3 revision, and will build the gem and install it locally.
$ gem install capistrano --pre --trust-policy HighSecurity
Or grab the bleeding edge head from:
$ git clone -b v3 https://github.com/capistrano/capistrano.git $ cd capistrano $ gem build *.gemspec $ gem install *.gem
Signed Rubygems
As Capistrano is a signed gem, you should always be careful to use the --trust-policy flag when installing Gems, or since Bundler 1.3 you should use the same flag:
$ gem install capistrano --pre --trust-policy HighSecurity $ bundle install --trust-policy HighSecurity
If you get a message that looks like:
ERROR: While executing gem ... (Gem::Security::Exception) unsigned gems are not allowed by the High Security policy
Then please complain to your Gem author, and have them start signing their Gems.
Usage in a Rails project
Add the following lines to the Gemfile to the :development group ideally.
group :development do gem 'capistrano-rails', '~> 0.0.7' end
Heroku
Vlad
refer below site http://docs.seattlerb.org/vlad/index.html
Comparison between Capistrano/Heroku/Vlad
Criteria | Capistrano | Heroku | Vlad |
---|---|---|---|
"Take some more [[tea]]," the March Hare said to Alice, very earnestly. "I've had '''nothing''' yet," Alice replied in an offended tone, "so I can't take more." "You mean you can't take ''less''?" said the Hatter. "It's very easy to take ''more'' than nothing." |
<p>"Take some more <a title="Tea" href="/wiki/Tea">tea</a>," the March Hare said to Alice, very earnestly.</p> <p>"I've had <strong>nothing</strong> yet," Alice replied in an offended tone, "so I can't take more."</p> |
"Take some more tea," the March Hare said to Alice, very earnestly.
"I've had nothing yet," Alice replied in an offended tone, "so I can't take more." "You mean you can't take less?" said the Hatter. "It's very easy to take more than nothing." |
Conclusion
References
technet.microsoft.com
<references/>