[chef] LWRP prevents code-reuse...


Chronological Thread 
  • From: Ringo De Smet < >
  • To:
  • Subject: [chef] LWRP prevents code-reuse...
  • Date: Tue, 29 Jun 2010 14:23:21 +0200
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=GVFgxJqgKAOrYZou1SSpKgS7B067VCruk6STm8ranNAPClJujau+ryIQQRvDz4k9AB i+abadhA9fFuh5NINKJYbpfqE+xNTwHr4AfsEKPj8RcnnjhHQ7WPFSRyeBzQe8YQJiRa FGlftCshzshhN1HvqhC+lNqoxPRzqqn+RNRA4=

Hello,

Within our company, we use PyLabs (1). This environment has it's own
packaging system (qpackages) and it's own shell (qshell) based on
ipython. I started a cookbook to install the base environment, and
that was quickly done. However, I have more problems with the custom
resources and providers I am trying to implement:

1) a custom resource named "pylabs_qshell", based upon the "script"
resource, similar to "bash" and "python".
2) a custom resource named "pylabs_package", based on the standard
"Package" resource
3) a custom provider named "pylabs_package", extending the standard
"Package" provider

However, after several try-outs, I ended up looking in the core Chef
code to see how custom resources/providers worked. If someone packages
resources/providers in the cookbook, you seem to be obliged to use the
Light-Weight Resource Provider syntax. The generated classes in LWRP
are just Resources, not the Script or Package I want it to be. Similar
problem for the custom Provider.

Eventually, I replaced the LWRP syntax with full-fledged resource and
provider classes, but the build_from_file didn't seem to like it. What
is my best option to go forward?

Greetings,

Ringo

(1) http://www.pylabs.org



Archive powered by MHonArc 2.6.16.

§