Google Groups Home
Help | Sign in
Deploy on specific 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
  7 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
 
Bolo  
View profile  
(1 user)  More options Mar 23 2007, 3:46 pm
From: "Bolo" <mala...@gmail.com>
Date: Fri, 23 Mar 2007 19:46:52 -0000
Local: Fri, Mar 23 2007 3:46 pm
Subject: Deploy on specific server
Hello

i have 3 servers

role :web, "lamp1, lamp2" #Cluster Production
role :web,  "lamp3", #Server Dev

Its possible to deploy my application on lamp3 only or lamp1 and lamp2
only ?

Thanks


    Reply to author    Forward  
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.
dubek  
View profile  
 More options Mar 28 2007, 4:02 am
From: "dubek" <dov.mu...@gmail.com>
Date: Wed, 28 Mar 2007 08:02:01 -0000
Local: Wed, Mar 28 2007 4:02 am
Subject: Re: Deploy on specific server

> role :web, "lamp1, lamp2" #Cluster Production
> role :web,  "lamp3", #Server Dev

> Its possible to deploy my application on lamp3 only or lamp1 and lamp2
> only ?

You might try this in your recipe file:

case ENV["TARGET"]
when "prod"
  role :web, "lamp1, lamp2" #Cluster Production
when "dev"
  role :web,  "lamp3", #Server Dev
end

Then run:

  TARGET=prod cap deploy

in order to deploy to the production machines, or:

  TARGET=dev cap deploy

in order to deploy to the dev machine.

Many people have this kind of situation (usually with 3 environments:
dev, staging and production). Just search the capistrano and rails
groups for "staging" and you'll find all the talks about it... I have
a feeling the Jamis is planning some solution for it in the next big
release. ;-)

Best,
dubek.


    Reply to author    Forward  
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.
Jamis Buck  
View profile  
 More options Mar 29 2007, 10:49 am
From: Jamis Buck <jamis.b...@gmail.com>
Date: Thu, 29 Mar 2007 08:49:36 -0600
Local: Thurs, Mar 29 2007 10:49 am
Subject: Re: [Capistrano] Re: Deploy on specific server
On Mar 28, 2007, at 2:02 AM, dubek wrote:

> Many people have this kind of situation (usually with 3 environments:
> dev, staging and production). Just search the capistrano and rails
> groups for "staging" and you'll find all the talks about it... I have
> a feeling the Jamis is planning some solution for it in the next big
> release. ;-)

I'm curious why you have that feeling. :) Even more, though, I'm  
curious what you think Capistrano ought to do about this. Personally,  
I think the case statement is a great solution. Totally fine. What  
could Capistrano do that would be cleaner and easier to read than:

   case ENV['STAGE']
   when "production"
     role ....
     set ...
     ...
   when "development"
     ....
   ...
   end

If it is the environment variable that looks klunky you, you can use  
capistrano variables instead:

   case stage
   ...
   end

And then invoke it like this

   cap -S stage=production deploy

- Jamis


    Reply to author    Forward  
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.
Ezra Zygmuntowicz  
View profile  
(2 users)  More options Mar 29 2007, 1:54 pm
From: Ezra Zygmuntowicz <ezmob...@gmail.com>
Date: Thu, 29 Mar 2007 10:54:44 -0700
Local: Thurs, Mar 29 2007 1:54 pm
Subject: Re: [Capistrano] Re: Deploy on specific server

        I have found that the cleanest way to do staging and production  
tasks like this is this way:

task :production do
   role :web, '65.74.169.199:8192'
   role :app, '65.74.169.199:8192'
   role :db, '65.74.169.199:8192', :primary => true
end

task :staging do
   role :web, '65.74.169.199:8194'
   role :app, '65.74.169.199:8194'
   role :db, '65.74.169.199:8194', :primary => true
end

Then you can do:

$ cap staging deploy
$ cap production deploy

Cheers-
-Ezra

On Mar 29, 2007, at 7:49 AM, Jamis Buck wrote:

-- Ezra Zygmuntowicz
-- Lead Rails Evangelist
-- e...@engineyard.com
-- Engine Yard, Serious Rails Hosting
-- (866) 518-YARD (9273)

    Reply to author    Forward  
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.
Jamis Buck  
View profile  
 More options Mar 29 2007, 3:10 pm
From: Jamis Buck <jamis.b...@gmail.com>
Date: Thu, 29 Mar 2007 13:10:31 -0600
Local: Thurs, Mar 29 2007 3:10 pm
Subject: Re: [Capistrano] Re: Deploy on specific server
I'd forgotten about that one, Ezra. I really, really like that.

- Jamis

On Mar 29, 2007, at 11:54 AM, Ezra Zygmuntowicz wrote:


    Reply to author    Forward  
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.
J.F. Groff  
View profile  
(1 user)  More options Mar 29 2007, 10:11 pm
From: "J.F. Groff" <jfgr...@gmail.com>
Date: Thu, 29 Mar 2007 19:11:04 -0700
Local: Thurs, Mar 29 2007 10:11 pm
Subject: Re: Deploy on specific server
Yes, a staging config should be standard in Rails and Capistrano imho.
For safety and laziness, I usually set the defaults to staging at the
top of deploy.rb:

set :rails_env, :staging
set :deploy_to, "/my/app/path/staging"

desc "Production setup"
task :production do
  set :rails_env, :production  # override :staging default
  set :deploy_to, "/my/app/path/production"
end

Then I play with staging via "cap deploy", "cap migrate" and friends.
When all is fine on the staging host, it's time to

cap production deploy_with_migrations

and pray that no migration breaks the precious production db ;-)

Tip of the day: use a dump of your production db as a sample to test
your software and migration procedures on the staging host.

Just my 2 cents,

  JFG

On 29 Mar, 19:54, Ezra Zygmuntowicz <ezmob...@gmail.com> wrote:


    Reply to author    Forward  
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.
Bolo  
View profile  
 More options Apr 4 2007, 9:43 am
From: "Bolo" <mala...@gmail.com>
Date: Wed, 04 Apr 2007 13:43:38 -0000
Local: Wed, Apr 4 2007 9:43 am
Subject: Re: Deploy on specific server
Thanks you all for your help

On 29 mar, 22:11, "J.F.  Groff" <jfgr...@gmail.com> wrote:


    Reply to author    Forward  
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 »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google