- From: Joseph Holsten <
>
- To: Noah Kantrowitz <
>
- Cc: Chef Dev <
>
- Subject: [chef-dev] Re: Dialect support and loading enhancements
- Date: Thu, 19 Sep 2013 20:57:31 +0000
On 2013-09-19, at 20:37, Noah Kantrowitz
<
>
wrote:
>
https://github.com/opscode/chef/pull/997
>
>
At long last I've pushed up a completed-enough-to-use version of my
>
[dialects
>
proposal](https://gist.github.com/coderanger/a6e0c627d349f0712dcc). I won't
>
repeat the whole document here, but some highlights:
>
>
1. Hooks to load Chef recipes and attribute files from formats other than
>
.rb
>
2. JSON and Yaml dialects for attribute files.
>
3. Root shortcuts for cookbook source files of which you commonly have only
>
one.
>
cookbooks/
>
apache2/
>
attributes.rb
>
recipe.rb
>
library.rb
>
4. Removal of the need for the default/ path segment under files/ and
>
templates/.
>
5. Ability to pass an array to #source on cookbook_file and template to
>
define your own lookup path similar to the current implicit one.
>
>
Personally I think all of these put together are an order of magnitude
>
improvement in ease of learning Chef and writing new cookbooks while not
>
losing any of the expressive power you want on the high end. This branch
>
should present no backwards incompatibilities, though I think it should
>
kick off a discussion separately about deprecating the implicit search path
>
on files/ and templates/ in favor of people using the new explicit search
>
path syntax for the rare occasions where such things are desired (and even
>
in those cases, it is generally just a few of the options in the current
>
search path). Any such deprecation would have to be over a very long time
>
though. I have opened https://tickets.opscode.com/browse/CHEF-4559 to track
>
this patch. If anyone has any feedback please don't hesitate to shoot me an
>
email or comment on the pull request/ticket.
So much <3.
For those interested in how alternate formats can work well, here's the doc
for saltstack's pydsl (closest to chef dsl today):
http://docs.saltstack.com/ref/renderers/all/salt.renderers.pydsl.html
compared to their jinja + yaml format (similar to mustache + yaml from the
proposal):
http://docs.saltstack.com/ref/renderers/all/salt.renderers.jinja.html
I'm not sure we could ever write libraries or lwrps in non-ruby, but I
definitely support it in recipes, attributes, metadata & templates.
--
~j
Attachment:
signature.asc
Description: Message signed with OpenPGP using GPGMail
Archive powered by MHonArc 2.6.16.