Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Deploying to self-same server
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  8 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
jdgriffith  
View profile  
 More options Jun 6 2012, 10:48 am
From: jdgriffith <justin.dean.griff...@gmail.com>
Date: Wed, 6 Jun 2012 07:48:05 -0700 (PDT)
Local: Wed, Jun 6 2012 10:48 am
Subject: Deploying to self-same server

I am curious about using capistrano to deploy to the selfsame server on
which the recipe lives on without doing an ssh connection since it is not
needed. Is this something capistrano can do easily or is it mostly used for
remote deployments?

Regards,
Jdgriffith


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lee Hambley  
View profile  
 More options Jun 6 2012, 10:51 am
From: Lee Hambley <lee.hamb...@gmail.com>
Date: Wed, 6 Jun 2012 16:51:25 +0200
Local: Wed, Jun 6 2012 10:51 am
Subject: Re: [capistrano] Deploying to self-same server

Hi JD,

From the docs:

> Capistrano is a developer tool for deploying web applications. It is typically installed on a workstation, and used to deploy code from your source code management (SCM) to one, or more servers.

It can be used with some horrible hacks to do loopback ssh on locally bound IP/ports, but frankly you should take a look at rake or make for that kind of thing.

- Lee Hambley, Maintainer,


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Donovan Bray  
View profile  
 More options Jun 6 2012, 11:38 am
From: Donovan Bray <donno...@gmail.com>
Date: Wed, 6 Jun 2012 08:38:34 -0700
Local: Wed, Jun 6 2012 11:38 am
Subject: Re: [capistrano] Deploying to self-same server

Possibly if you override the sudo, run, and make them call run_locally

That being said I've deployed to localhost by setting up a specific key for the deploy user, and it worked fine and preserved the ability to deploy to stages that weren't localhost.

What's so bad about ssh'ing to itself?

Other ideas can be found here

http://stackoverflow.com/questions/8692664/how-do-i-execute-a-capistr...

On Jun 6, 2012, at 7:48 AM, jdgriffith <justin.dean.griff...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lee Hambley  
View profile  
 More options Jun 6 2012, 11:40 am
From: Lee Hambley <lee.hamb...@gmail.com>
Date: Wed, 6 Jun 2012 17:40:27 +0200
Local: Wed, Jun 6 2012 11:40 am
Subject: Re: [capistrano] Deploying to self-same server

Donovan,

Kudos for giving a longer answer, but when you are "deploying" to a local server, what you are really doing is building the app, deploying, sort of by definition is getting something from somewhere, and putting it somewhere else…

I'd argue rake is the correct tool for a *lot* of what people misuse capistrano for; and particularly in this case, Rake fits the bill perfectly for building/releasing when everything is in one place.

- Lee  


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Donovan Bray  
View profile  
 More options Jun 6 2012, 9:34 pm
From: Donovan Bray <donno...@gmail.com>
Date: Wed, 6 Jun 2012 18:34:06 -0700
Local: Wed, Jun 6 2012 9:34 pm
Subject: Re: [capistrano] Deploying to self-same server

I have a much more liberal view I guess of what capistrano can be leveraged for. If you know you have to build a deployment tool to reach remote servers; and deploying to localhost allows you to test that pattern before you pay for that server then by all means do it with cap.

However I agree many maintenance tasks are written directly in cap when they should be written in rake. I create a rake cmd wrapper that I use in those situations so I can easily call the rake task from cap just as easily as I could run rake directly on the server via the console.  If you ONLY have those tasks in cap then that is a deployment smell.

Always leave yourself options.

On Jun 6, 2012, at 8:40 AM, Lee Hambley <lee.hamb...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lee Hambley  
View profile  
 More options Jun 7 2012, 3:48 am
From: Lee Hambley <lee.hamb...@gmail.com>
Date: Thu, 7 Jun 2012 09:48:23 +0200
Local: Thurs, Jun 7 2012 3:48 am
Subject: Re: [capistrano] Deploying to self-same server

> I have a much more liberal view I guess of what capistrano can be

leveraged for. If you know you have to build a deployment tool to reach
remote servers; and deploying to localhost allows you to test that pattern
before you pay for that server then by all means do it with cap.

I'd say misused, additional use cases outside of the intended make it
increasingly difficult for me to change anything, because I am then
breaking mis-features, and mis-uses of the library; but in open source
that's not something one can ever prevent.

> However I agree many maintenance tasks are written directly in cap when

they should be written in rake.

I'm seriously considering adding a `rake()` command, that's effectively
`run("#{rake} #{task}")` - to encourage this technique, and make it seem
more like someone actually thought about it.

- Lee

On 7 June 2012 03:34, Donovan Bray <donno...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Richardson  
View profile  
 More options Jun 7 2012, 9:31 am
From: Michael Richardson <m...@sandelman.ca>
Date: Thu, 07 Jun 2012 09:31:03 -0400
Local: Thurs, Jun 7 2012 9:31 am
Subject: Re: [capistrano] Deploying to self-same server

>>>>> "Donovan" == Donovan Bray <donno...@gmail.com> writes:

    Donovan> That being said I've deployed to localhost by setting up a
    Donovan> specific key for the deploy user, and it worked fine and
    Donovan> preserved the ability to deploy to stages that weren't
    Donovan> localhost.  

    Donovan> What's so bad about ssh'ing to itself?

Yeah, this just seems like the best way.

I've wanted to hack the git recipes to add a --reference argument so
that git clones go super-fast, and this would also rock for ::1.

--
]       He who is tired of Weird Al is tired of life!           |  firewalls  [
]   Michael Richardson, Sandelman Software Works, Ottawa, ON    |net architect[
] m...@sandelman.ottawa.on.ca http://www.sandelman.ottawa.on.ca/ |device driver[
   Kyoto Plus: watch the video <http://www.youtube.com/watch?v=kzx1ycLXQSE>
                       then sign the petition.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Donovan Bray  
View profile  
 More options Jun 7 2012, 11:22 am
From: Donovan Bray <donno...@gmail.com>
Date: Thu, 7 Jun 2012 08:22:41 -0700
Local: Thurs, Jun 7 2012 11:22 am
Subject: Re: [capistrano] Deploying to self-same server

I don't see how it's misused; ssh is ssh whether your doing it to localhost or otherwise it requires no particular support from capistrano.  In both cases you only need to ensure that your ssh client and server are properly configured.

That's the beauty of capistrano being built in ruby; you are free to make the necessary changes to support your core concept. If that isn't what I want out of capistrano I'm free to monkey patch it.  

As much as I'm a proponent for bending cap where it makes sense; I'm also your biggest supporter of making capistrano narrowly focused on delivering a reliable deployment system. The inspired architecture and openness to be extended will continue to allow me to use it for provisioning. You shouldn't be shackled by anything outside your core concept, I say change what you must and be brutal about adhering to your core concept.

On Jun 7, 2012, at 12:48 AM, Lee Hambley <lee.hamb...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »