|
Chef::CookbookLoader must understand different languages file typesCurrently, the cookbook loader looks for '*.rb' files. It will need to load all the files in the tree that we understand how to parse. Chef::Cookbook needs to run files for each languageNow that the cookbooks can contain files of different languages, we need to be able to execute them. This process is as follows: For attributesWe should shell out to the proper interpreter, passing the node object as JSON. We should read the node object back out, replacing the original with the new version. For librariesWe should include the libraries for the given language as included on the command line (when supported). For definitionsIn order for definitions to work, we need to have a mechanism for re-constituting a Chef::ResourceDefinition object in ruby for each. That will allow us to take the resources generated in any language and utilize the definition for each properly. For recipesThe languages should send out an interim-format as JSON for the resources to add to the collection. We should then take this format and build resource objects as normal, doing validation. (This differs from the perl-based prototype I have currently, which spits out raw Chef::Resource objects.) This will allow us to keep all the same validation, etc. that exists in the ruby libs. Perl PrototypeA working Perl prototype exists, that works for just recipes. You can find it on CPAN and the source on GitHub. To give it a shot:
|
Labels:
None