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:
- a custom resource named “pylabs_qshell”, based upon the "script"
resource, similar to “bash” and “python”.
- a custom resource named “pylabs_package”, based on the standard
- a custom provider named “pylabs_package”, extending the standard
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?