CSC/ECE 517 Fall 2013/ch1 1w09 hs: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
Line 131: Line 131:


http://www.urbancode.com/html/solutions/deployment-automation.html
http://www.urbancode.com/html/solutions/deployment-automation.html
https://devcenter.heroku.com/articles/how-heroku-works#deploying-applications


<references/>
<references/>


= See Also =
= See Also =

Revision as of 23:59, 16 September 2013

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. The different deployment activities include release, install and activate, deactivate, adapt, update, bulit-in, version tracking, uninstall and retire.

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

Various automated tools that are widely used for the process of deployment are

  • Capistrano
  • Heroku
  • Vlad

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

Heroku is a cloud platform as a service (PaaS) supporting several programming languages. Heroku was acquired by Salesforce.com in 2010. Heroku, one of the first cloud platforms, has been in development since June 2007, when it supported only the Ruby programming language, but has since added support for Java, Node.js, Scala, Clojure and Python and (undocumented) PHP and Perl. The base operating system is Debian or, in the newest stack, the Debian-based Ubuntu.

Heroku lets you manage environment-specific configurations (such as credentials for backing services) separately from your source code for greater safety and portability. In Heroku, this data can be managed with config vars, which are made available to your running application as simple environment variables.

The Heroku platform uses git as the primary means for deploying applications. When you create an application on Heroku, it associates a new git remote, typically named heroku, with the local git repository for your application. As a result, deploying code is just the familiar git push, but to the heroku remote instead: $ git push heroku master

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>

<p>"You mean you can't take <em>less</em>?" said the Hatter. "It's very easy to take <em>more</em> than nothing."</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

http://technet.microsoft.com

http://searchitchannel.techtarget.com/definition/release-management

http://www.capistranorb.com/documentation/getting-started/installation/

http://www.urbancode.com/html/solutions/deployment-automation.html

https://devcenter.heroku.com/articles/how-heroku-works#deploying-applications

<references/>

See Also