Forum: Ruby on Rails Version control for deployment?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
9305282d6cc66f05c5dc3d8485f708af?d=identicon&s=25 DJ Tequila (Guest)
on 2006-05-12 10:47
(Received via mailing list)
If I can get root access, I'll use version control for deployment as
well... It beats ftp and scp hands down for speed. Setting up a
repository on a remote server means I get automatic off-site backup as
part of the development cycle, and deployment/site update is as simple
as a three word command line entry. Small changes on remote test sites
can be made with Vim (or your *nix editor of choice), and checked back
in to the project. If there is a problem caused by the difference
between the development and test environments, it can be quite a little
time-saver.

I am curious though... Does anyone else do this? I haven't come across
any (I only started doing it recently), but can you think of any
potential disadvantages? Do you have any better or alternative
deployment techniques for Rails projects?

Ben
0b1b1c3a746a2e346d8cae668b109b6e?d=identicon&s=25 Chris McGrath (Guest)
on 2006-05-12 11:45
(Received via mailing list)
On 12 May 2006, at 10:45, DJ Tequila wrote:

> I am curious though... Does anyone else do this? I haven't come
> across any (I only started doing it recently), but can you think of
> any potential disadvantages? Do you have any better or alternative
> deployment techniques for Rails projects?

If you don't use capistrano yet, start using it now! :)

http://manuals.rubyonrails.com/read/chapter/97

Cheers,

Chris
Ad7805c9fcc1f13efc6ed11251a6c4d2?d=identicon&s=25 Alex Young (Guest)
on 2006-05-12 11:45
(Received via mailing list)
DJ Tequila wrote:
> I am curious though... Does anyone else do this? I haven't come across
> any (I only started doing it recently), but can you think of any
> potential disadvantages? Do you have any better or alternative
> deployment techniques for Rails projects?

That's pretty much how Capistrano works :-)
Cfda8d3a956b6bf4b73f8fc2132da051?d=identicon&s=25 Kenneth Liu (Guest)
on 2006-05-12 15:45
(Received via mailing list)
I have to chime in and agree.  Capistrano (the software formerly known
as SwitchTower) is brilliant.  It only took me about an hour to learn
how it works, but the actual setup process only takes minutes.  It
basically makes deploying a new release as simple as "rake deploy".
Broken release?  "rake rollback".

Ken
0900e6a4828bd989f96427082c6c74ca?d=identicon&s=25 Mike Garey (random52k)
on 2006-05-12 16:26
(Received via mailing list)
so do most of you guys use Capistrano in addition to your version
control system, such as svn?  I use svn for all my development, and
when it comes to deployment time, I had planned on using svn on the
server and just doing an svn co/update to bring the server sources in
line with the development sources..  I thought Capistrano was for
people who didn't use some type of version control management
software..

Mike
Ad7805c9fcc1f13efc6ed11251a6c4d2?d=identicon&s=25 Alex Young (Guest)
on 2006-05-12 16:45
(Received via mailing list)
Mike Garey wrote:
> so do most of you guys use Capistrano in addition to your version
> control system, such as svn?  I use svn for all my development, and
> when it comes to deployment time, I had planned on using svn on the
> server and just doing an svn co/update to bring the server sources in
> line with the development sources..  I thought Capistrano was for
> people who didn't use some type of version control management
> software..
Capistrano does a checkout from version control to the deployment
directory on command, then HUPs the server...  It essentially does
precisely what you're looking for :-)
Cfda8d3a956b6bf4b73f8fc2132da051?d=identicon&s=25 Kenneth Liu (Guest)
on 2006-05-13 16:55
(Received via mailing list)
AFAIK, Capistrano requires some kind of version control to work at all,
at least to do anything useful.

(what kind of developers don't use version control anyways?)
B780ee0ee1480454a85df58536702f63?d=identicon&s=25 Alder Green (Guest)
on 2006-05-13 17:16
(Received via mailing list)
On 5/12/06, DJ Tequila <mail@djtequila.com> wrote:
> I am curious though... Does anyone else do this? I haven't come across
> any (I only started doing it recently), but can you think of any
> potential disadvantages? Do you have any better or alternative
> deployment techniques for Rails projects?
>
> Ben
>

I'm doing that with Darcs. Very simple: a one-line "darcs push"
command that I've set as a script. So my deployment is basically:

deploy_script

and enter. But, reading this thread, I guess I should indeed check
Capistrano (which was recommended to me several times).
Cfda8d3a956b6bf4b73f8fc2132da051?d=identicon&s=25 Kenneth Liu (Guest)
on 2006-05-13 17:35
(Received via mailing list)
If all Capistrano did was simply update source code on your server, then
it wouldn't be that useful compared to the approach you describe.
However, it does a whole lot more.  It can deploy code simultaneously
across many servers in a farm.  It's also super easy to define
additional actions to take as part of your deployment process (e.g. do a
database dump, migrate your database, bounce your servers, copy files,
rename directories, etc.)  You can even define a sequence of tasks in a
"transaction", so if one task fails, Capistrano will automatically
execute the "rollback" task.  Lots more good stuff too.

Mike Clark has blogged a nice summary of it here:
http://clarkware.com/cgi/blosxom/2005/12/17

Ken
This topic is locked and can not be replied to.