[chef] Re: Re: What are the available methods does deploy_revision have to check the source repo versions?


Chronological Thread 
  • From: millisami r < >
  • To:
  • Subject: [chef] Re: Re: What are the available methods does deploy_revision have to check the source repo versions?
  • Date: Thu, 31 May 2012 17:47:25 +0545

Thaks, very well said.


@millisami
~Sachin Sagar Rai
Ruby on Rails Developer
http://tfm.com.np
http://nepalonrails.tumblr.com



On Thu, May 31, 2012 at 12:39 PM, Andrea Campi < " target="_blank"> > wrote:
On Tue, May 29, 2012 at 8:15 PM, Sachin Sagar Rai < "> > wrote:
> Hi Chefellas!
>
>
> I've deployed a rails 3 app using `deploy_revision` resource with asset
> compilation is done inside the `before_restart` block and it works fine.
>
> Since it takes too long and though any assets is not changed, it will still
> do the precompilation.
>
>   before_restart do
>     bash "asset_precompile" do
>       cwd current_release
>       user app[:owner]
>       group app[:group]
>       code %{
>         export RAILS_ENV=#{rails_env}
>         bundle exec rake assets:precompile --trace
>       }
>       action :run
>     end
>   end

No reason to look for a workaround, this should work. I.e. the
before_restart will only be invoked if the revision changed.

If you're seeing a different behavior, you should try to figure out
what's going wrong instead of looking for complicated workarounds.
Not to pick on you, but the number one rule when seeking help on a ml
for an open source project is, provide enough information that people
can help you.
Please send the relevant parts of a chef-client -l debug.
You are looking for a line similar to: is the latest version

Andrea




Archive powered by MHonArc 2.6.16.

§