How do I deploy without using SVN. . .?

7 views
Skip to first unread message

gberz3

unread,
Feb 22, 2007, 2:28:32 PM2/22/07
to Capistrano
Hi All,

Is it possible to deploy without having a repository? I currently am
not concerned with source control for a quick-and-dirty setup I'm
working on and I just need Capistrano to work. Honestly, all I'm
looking for is a quick *installer* and setup. What am I missing. . .?


Thanks,
Michael

Phlip

unread,
Feb 22, 2007, 3:20:31 PM2/22/07
to capis...@googlegroups.com
gberz3 wrote:

scp -r my_site name@site:~/my_site

Then reconcile public/.htaccess and public_html/.htaccess, sym-link
public_html to my_site/public, and set the permissions on dispatch.*
to 755.

You are asking "how do I use a car to walk"; just walk!

--
Phlip
http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!!

gberz3

unread,
Feb 22, 2007, 3:46:24 PM2/22/07
to Capistrano
You may be correct, but I don't believe that's what I'm asking.
Capistrano does lots of things, including assisting in setting up a
mongrel "proxy-balancer". I simply don't want it to require an SVN
repository. In the spirit of your analogy, I've basically been given
a tow truck hitched to a trailer of tools. I simply want use of the
truck, not the extra tools.

Thanks,
Michael

> Phliphttp://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!!

Jamis Buck

unread,
Feb 22, 2007, 4:04:51 PM2/22/07
to capis...@googlegroups.com
Michael,

The answer is "yes, you can use Capistrano to deploy without an SCM".
However, you can't use any of the standard deployment tasks to do so;
you'll have to write your own tasks, which would wind up being pretty
much what Phlip suggested.

- Jamis

> --~--~---------~--~----~------------~-------~--~----~
> To unsubscribe from this group, send email to capistrano-
> unsub...@googlegroups.com
> For more options, visit this group at http://groups.google.com/
> group/capistrano
> -~----------~----~----~----~------~----~------~--~---
>

Message has been deleted
Message has been deleted

gberz3

unread,
Feb 22, 2007, 4:17:59 PM2/22/07
to Capistrano
Obviously you guys are much more in the know regarding Cap's ability.
I was simply looking for all the management "recipes" without having
SCM. I agree that it's good practice to have SCM, but I think it was
short sighted to actually *require* it for deployment. I simply need
to be able to point it a local directory and have it sync, etc. I
suppose my main concern is really the initial setup for each app.
Anywho, it appears that the main "manual" site is down. Can you
gents
point me in the right direction so as to get all knowed up on it?

Thanks in advance,
Michael

> smime.p7s
> 3KDownload

Phlip

unread,
Feb 22, 2007, 4:25:08 PM2/22/07
to capis...@googlegroups.com
gberz3 wrote:

> point me in the right direction so as to get all knowed up on it?

I want to know how to write

cap --tasks

and get a list of tasks. (I also then need to know which ones to
extend to add actions to each step in the process. Without reading the
documentation site, or Googling for [Capistrano Cheat Sheet].

But that don't work. I want to know which tasks to grep for, to read
their source and see what they do.

I'm no expert on Capistrano, but I can tell when code is coupled, and
Capistrano looks very tightly coupled to its SCM!

--
Phlip

Jamis Buck

unread,
Feb 22, 2007, 4:36:05 PM2/22/07
to capis...@googlegroups.com
"I think it was short sighted to actually *require* [SCM] for
deployment."

Nah, not at all. Capistrano's deployment functionality is very
explicit in that it requires SCM's for deployment. If your project is
trivial enough that it doesn't require an SCM, then it's trivial
enough that you don't need Capistrano to deploy it. Phlip had a very
good suggestion for you in that case: scp works fine. Or rsync. Or
any other similar tool.

Don't call a tool "short sighted" if it doesn't do what you want.
Instead, spend your energy positively by looking for the right tool
for the job. Obviously, capistrano isn't that tool for you, unless
you don't mind writing a few tasks to do what you want it to do.

- Jamis

On Feb 22, 2007, at 2:15 PM, gberz3 wrote:

>
> Obviously you guys are much more in the know regarding Cap's ability.
> I was simply looking for all the management "recipes" without having
> SCM. I agree that it's good practice to have SCM, but I think it was
> short sighted to actually *require* it for deployment. I simply need
> to be able to point it a local directory and have it sync, etc. I
> suppose my main concern is really the initial setup for each app.
>
> Anywho, it appears that the main "manual" site is down. Can you gents

> point me in the right directly so as to get all knowed up on it?
>
> Thanks in advance,
> Michael

>> smime.p7s
>> 3KDownload

wolfmanjm

unread,
Feb 22, 2007, 5:48:39 PM2/22/07
to Capistrano
Although I agree with Jamis (of course ;)

It turns out you could use my latest version of
local_subversion_rsync.rb to do what you want with some minor hacks...
just pointing you in the right direction here.

Follow the directions in my post, point the local rsync cache to your
folder with your source. Comment out the calls to subversion in my
code, and it should work.

http://blog.wolfman.com/articles/2007/02/18/updated-capistrano-local-subversion-and-perforce

Basically it will simply rsync your local copy with the server, so
long as you comment out all the svn accesses.

> smime.p7s
> 3KDownload

gberz3

unread,
Feb 22, 2007, 6:06:07 PM2/22/07
to Capistrano
Thanks Wolf! I'll take a deeper look at it later tonight. As for
Jamis, I certainly appreciate your input. I'm not calling it short-
sighted due to it's lack of ability. It does everything I want and
more. It just has excess baggage. It's like the free gift they won't
let you not take. I absolutely see it's usefulness, I just don't see
the need to force it. Gimme --options. ;)

On Feb 22, 5:48 pm, "wolfmanjm" <wolfma...@gmail.com> wrote:
> Although I agree with Jamis (of course ;)
>
> It turns out you could use my latest version of
> local_subversion_rsync.rb to do what you want with some minor hacks...
> just pointing you in the right direction here.
>
> Follow the directions in my post, point the local rsync cache to your
> folder with your source. Comment out the calls to subversion in my
> code, and it should work.
>

> http://blog.wolfman.com/articles/2007/02/18/updated-capistrano-local-...

alexey.v...@gmail.com

unread,
Feb 24, 2007, 3:34:19 PM2/24/07
to Capistrano
Lately, I've talked to some people who deploy Rails apps in more
formal IT environments. There is some demand to deploy from a zipped
release package, instead of a Subversion trunk (or even a tag). It
comes from the notion that development and deployment should be
separated activities, for a bunch of security-related reasons.
Particularly that deployers should have no write access to source
code, while developers should have no write access to production
environment.

As misguided as it may be in case of Ruby (that has no separation of
source and executable form), IT of some public corporations in USA and
Canada sees it as a legal requirement (usually referring to Sarbannes-
Oxley Act).

I do appreciate the fact that Capistrano devs don't care about formal
IT environments and public corporations. But if someone on this list
does, a Capistrano recipe that does this in a nice way is worth
publishing. Myself, or somebody else in ThoughtWorks, may even have to
do it soon - by the nature of our work we do care about formal IT
environments more than we may want to admit. :)

Thoughts?

Alex Verkhovsky

wolfmanjm

unread,
Feb 24, 2007, 3:56:34 PM2/24/07
to Capistrano
i have contracted at a company that had the same policies, its not too
unusual.

I think the code in my local subversion scm module may be a good place
to start.

Basically I tar (you could easily zip instead) up a release directory,
send it to the servers and de-tar there.

I think you could easily add an option to skip the tar-ing of the
releases directory, and just point to a pre-tar'd (or zipped)
package instead, as you suggest.


On Feb 24, 12:34 pm, "alexey.verkhov...@gmail.com"

Faisal N Jawdat

unread,
Feb 25, 2007, 2:08:25 AM2/25/07
to capis...@googlegroups.com
On Feb 24, 2007, at 3:34 PM, alexey.v...@gmail.com wrote:
> Lately, I've talked to some people who deploy Rails apps in more
> formal IT environments. There is some demand to deploy from a
> zipped release package, instead of a Subversion trunk (or even a
> tag). It comes from the notion that development and deployment
> should be separated activities, for a bunch of security-related
> reasons. Particularly that deployers should have no write access to
> source code, while developers should have no write access to
> production environment.

Would it be insufficient to only give deployment read-only access to
the repository, and not give development access to the deployment
servers?

-faisal

Alexey Verkhovsky

unread,
Feb 25, 2007, 8:14:22 AM2/25/07
to capis...@googlegroups.com
On 2/25/07, Faisal N Jawdat <fai...@faisal.com> wrote:
Would it be insufficient to only give deployment read-only access to
the repository, and not give development access to the deployment
servers?

It would be insufficient, because you are talking about accessing SVN repository from production boxes.
In places we are talking about, there is often a big, paranoid firewall (or two, or three) between them.

Alex


Faisal N Jawdat

unread,
Feb 25, 2007, 11:35:17 AM2/25/07
to capis...@googlegroups.com
On Feb 25, 2007, at 8:14 AM, Alexey Verkhovsky wrote:
> It would be insufficient, because you are talking about accessing
> SVN repository from production boxes. In places we are talking
> about, there is often a big, paranoid firewall (or two, or three)
> between them.

I can't entirely disagree with that sentiment.

At a former employer the makefile spit out tarballs of the final
product, and marked those tarballs (and their contents) with the
date, building user, and CVS tags related to that source. A subset
of users had write access to the (semi-publicly readable) directory
these tarballs were distributed from, and end-users could type a
specific command to figure out what release they were running. This
let support figure out exactly what they were debugging with. The
company was doing software distribution rather than web services, but
there might be some lessons there.

Capistrano's current model for deploying new code is:
local machine talks to app server, server pulls from svn repo

I could see use for
local machine exports from svn repo, scp's to app server

All the other moving parts (disable_web, restart, symlink,
enable_web, etc.) would be more or less the same. I'd be more
comfortable with this approach, but don't need it right now. Which
is to say: if someone builds it I'll want to play with it. Failing
that, I may try to whip something up before the heat death of the
universe.

-faisal

wolfmanjm

unread,
Feb 25, 2007, 4:52:39 PM2/25/07
to Capistrano
That is exactly what the local_subversion scm module does, with the
option of using rsync or scp to transfer the code to the server.

it is documented here... http://blog.wolfman.com/articles/2007/02/18/updated-capistrano-local-subversion-and-perforce


as well as various posts to this group, which makes me think is google
groups losing posts???

Alexey Verkhovsky

unread,
Feb 25, 2007, 11:23:13 PM2/25/07
to capis...@googlegroups.com
On 2/25/07, wolfmanjm <wolf...@gmail.com> wrote:

That is exactly what the local_subversion scm module does, with the
option of using rsync or scp to transfer the code to the server.

 
Thanks for the pointer.

Alex
Reply all
Reply to author
Forward
0 new messages