Connecting deploy and remote file providers


#1

I’m going to rewrite my hack that allows the use of a local file as input
for the deploy resource, cleaner than last time, and hopefully to get it
added to chef core, since both of those are core resources. Or at least
make it independent of application.

To see the way it was done last time, check in the application_java
cookbook, under libraries are the resource and provider files for
file_deploy.

I need two things from all of you experts out there:

  1. How can I make this less of a hack? It currently is just a mapping
    between the attributes and methods that are required for a deploy resource
    and the attributes and methods provided by file/remote_file.

  2. Anyone have suggestions on whether it should live under
    provider/deploy/file.rb, provider/file/deploy.rb,
    provider/remote_file/deploy.rb, or… elsewhere? my gut says
    provider/deploy/file.rb or provider/deploy/remote_file.rb

Thank you!


#2

Interesting. I found examples that were helpful in catching up here:

I wonder what the diff would look like to look at this as adding
support for using Chef::Provider::File and Chef::Provider::RemoteFile
as arguments to scm_provider. How much more is this than making
action_sync and alias to action_create?

Bryan


#3

Without digging in too far, would this still make use of the deploy
resource?
I don’t want to lose the functionality I get from using deploy, where it
takes care of tracking versioning, triggering restarts, etc etc.

That might have been my original approach back in the chef 10 days, I
could look in the history of application_java to see if my old libraries
were in there, i think they were…

On Tue, Sep 24, 2013 at 1:09 PM, Bryan McLellan btm@opscode.com wrote:

Interesting. I found examples that were helpful in catching up here:
https://github.com/opscode-cookbooks/application_java/blob/master/README.md

I wonder what the diff would look like to look at this as adding
support for using Chef::Provider::File and Chef::Provider::RemoteFile
as arguments to scm_provider. How much more is this than making
action_sync and alias to action_create?

Bryan


#4

Taking a different look… that is exactly how I did it the last time for
application_java.
The hack I was talking about is essentially building the various
requirements for scm_provider either as aliases or extra little bits of
functionality.

On Thu, Sep 26, 2013 at 8:48 PM, Jesse Campbell hikeit@gmail.com wrote:

Without digging in too far, would this still make use of the deploy
resource?
I don’t want to lose the functionality I get from using deploy, where it
takes care of tracking versioning, triggering restarts, etc etc.

That might have been my original approach back in the chef 10 days, I
could look in the history of application_java to see if my old libraries
were in there, i think they were…

On Tue, Sep 24, 2013 at 1:09 PM, Bryan McLellan btm@opscode.com wrote:

Interesting. I found examples that were helpful in catching up here:

https://github.com/opscode-cookbooks/application_java/blob/master/README.md

I wonder what the diff would look like to look at this as adding
support for using Chef::Provider::File and Chef::Provider::RemoteFile
as arguments to scm_provider. How much more is this than making
action_sync and alias to action_create?

Bryan