[chef] Re: Re: How to deploy using Git repo that has multiple projects inside folders in a single repo?


Chronological Thread 
  • From: Sachin Sagar Rai < >
  • To:
  • Subject: [chef] Re: Re: How to deploy using Git repo that has multiple projects inside folders in a single repo?
  • Date: Mon, 30 Jan 2012 21:54:09 +0545

I'll try this.

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

On Sunday, January 29, 2012 at 11:03 PM, Nathen Harvey wrote:

You may need to write some custom code to work around this but this might be a good time to revisit the decision to store two separate projects in the same github repo.

If you really need these in the same repo, using git submodules might make more sense.


On Sun, Jan 29, 2012 at 2:07 AM, Sachin Sagar Rai < "> > wrote:
Hi chef fellas!
I've a private repo at github and it has multiple projects in that single repo.
e.g

    /shared/microlabs (root of the git repo mirrored using git from github)
    
Following are the 2 projects inside the `microlabs1-subdir`

    /shared/microlabs/microlabs1-subdir/drupal
    /shared/microlabs/microlabs1-subdir/radiant

I got to install those 2 projects and I'm trying to follow the opscode's standard `application` and `database` recipes.

Following is the snippet default of the `php` application recipe.

    deploy_revision app['id'] do
      revision app['revision'][node.chef_environment]
      repository app['repository']
      user app['owner']
      group app['group']
      deploy_to app['deploy_to']
      action app['force'][node.chef_environment] ? :force_deploy : :deploy
      ssh_wrapper "#{app['deploy_to']}/deploy-ssh-wrapper" if app['deploy_key']
      shallow_clone true
      purge_before_symlink([])
      create_dirs_before_symlink([])
      symlinks({})
      symlink_before_migrate({
        local_settings_file_name => local_settings_full_path
      })
    end

By default, it will assume the checked-out repo dir as the source. And in my case, its below 2 dirs from the root of the git repo.

But I couldn't find any params that configures/tells to use the inner folder of the root repo?

How to deal with this?

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






Archive powered by MHonArc 2.6.16.

§