[chef] Re: Re: Re: Re: Introducing the httpd cookbook


Chronological Thread 
  • From: Lamont Granquist < >
  • To: Bráulio Bhavamitra < >
  • Cc: , chef < >
  • Subject: [chef] Re: Re: Re: Re: Introducing the httpd cookbook
  • Date: Mon, 25 Aug 2014 08:44:46 -0700


Well the idea is that should be up to you.  So you can write a cookbook that wraps that and exposes the node data that your organization needs and then you can wrap that with application cookbooks that load up the node data if that makes sense to you.  Or else you can feed it from databags if you like (and using databags to drive node data to drive LWRPs is a layer of indirection that the databag-driven user does not need).  Or else you can just hard code it directly in the recipe because you decide you don't need to search on that information.  There's no one best way to do that.  But if node data makes sense to you, then you've basically just written your wrapper cookbook there.

On 8/25/14, 8:22 AM, Bráulio Bhavamitra wrote:
" type="cite">
But why left node values forgotten? LWRP can be used with node values, for example:

node[:httpd][:services].each do |service|
  httpd_service do
    service.each{ |key, value| send key, value }
  end
end

Also, the provider could have a way to specify how node attributes should fill LWRP

cheers,
bráulio


On Sat, Aug 23, 2014 at 1:04 AM, Lamont Granquist < " target="_blank"> > wrote:

Yep, agreed with all of that.  There's the detail of why shareable recipes
have failed, though, and have been replaced by LWRPs.  The more involved
members of the community have all come to that realization, but its come at the
cost of years of fighting with it.  I don't think the failures have been enumerated
clearly so that others understand it.


On Fri Aug 22 18:54:45 2014, Adam Jacob wrote:
I look at a little differently. I think, for most people, the promise
of shareable recipes that encode policy has failed. If you make them
flexible enough to matter (apaxhe2, say) you have a very complicated
beast, when you probably only needed 20 lines of it.

I think it may well be that the having resources be the prime unit of
re-use, rather than recipes, may well be the right abstraction in the end.

Adam

On Aug 22, 2014 6:31 PM, "Lamont Granquist" < " target="_blank">
<mailto: " target="_blank"> >> wrote:

    On Fri Aug 22 18:12:27 2014, Bráulio Bhavamitra wrote:

        I still cannot get this model of "all done by a wrapper
        cookbook using
        LWRP". It is just simpler to read node values...


    When you go down that road you eventually wind up needing two of a
    thing on a server and not just one instance.   Then you start
    putting arrays of hashes in your attributes.  Since you're now
    looping over an array and firing off a lot of resources you'll
    want to internally implement that problem as LWRPs anyway.  Then
    eventually you'll wind up wanting to merge arrays in your
    attributes and you'll wind up on this page eventually:
    https://coderanger.net/arrays-__and-chef/

    <https://coderanger.net/arrays-and-chef/>

    Its much easier to just expose the LWRPs.  Then the user can use
    node attributes, drive them with databags, or just statically code
    them in the LWRP.






--
"Lute pela sua ideologia. Seja um com sua ideologia. Viva pela sua ideologia. Morra por sua ideologia" P.R. Sarkar

EITA - Educação, Informação e Tecnologias para Autogestão
http://cirandas.net/brauliobo
http://eita.org.br

"Paramapurusha é meu pai e Parama Prakriti é minha mãe. O universo é meu lar e todos nós somos cidadãos deste cosmo. Este universo é a imaginação da Mente Macrocósmica, e todas as entidades estão sendo criadas, preservadas e destruídas nas fases de extroversão e introversão do fluxo imaginativo cósmico. No âmbito pessoal, quando uma pessoa imagina algo em sua mente, naquele momento, essa pessoa é a única proprietária daquilo que ela imagina, e ninguém mais. Quando um ser humano criado mentalmente caminha por um milharal também imaginado, a pessoa imaginada não é a propriedade desse milharal, pois ele pertence ao indivíduo que o está imaginando. Este universo foi criado na imaginação de Brahma, a Entidade Suprema, por isso a propriedade deste universo é de Brahma, e não dos microcosmos que também foram criados pela imaginação de Brahma. Nenhuma propriedade deste mundo, mutável ou imutável, pertence a um indivíduo em particular; tudo é o patrimônio comum de todos."
Restante do texto em http://cirandas.net/brauliobo/blog/a-problematica-de-hoje-em-dia




Archive powered by MHonArc 2.6.16.

§