[chef] Re: Re: Re: Re: Don't require to upload cookbooks not actually being used


Chronological Thread 
  • From: Eric Helgeson < >
  • To: " " < >
  • Subject: [chef] Re: Re: Re: Re: Don't require to upload cookbooks not actually being used
  • Date: Tue, 9 Sep 2014 11:14:33 -0500

Brian, you're correct, Berks will resolve them all, so if you're doing berks upload you'll get suggested and recommends. See this for more details on rational: https://github.com/berkshelf/berkshelf/issues/895

-Eric Helgeson

On Tue, Sep 9, 2014 at 10:08 AM, Brian Pitts < " target="_blank"> > wrote:
If you're using berkshelf to manage dependencies, does the use of
'recommends' and 'suggests' help? I thought it treated them as
equivalent to 'depends'.

On Tue, Sep 9, 2014 at 7:47 AM, Eric Helgeson < "> > wrote:
> I believe this is what 'recommends' or 'suggests' is for in metadata.rb
>
> https://docs.getchef.com/essentials_cookbook_metadata.html
>
> "Adds a dependency on another cookbook that is recommended, but not
> required. A cookbook will still work even if recommended dependencies are
> not available."
>
> As for specifying a git version, the cookbook is just saying what it needs,
> not where to get it. Thats what berks/librarian are for.
>
> -Eric Helgeson
> @nulleric
> http://usingchef.com
>
>
> 2014-09-09 7:28 GMT-05:00 Bráulio Bhavamitra < "> >:
>>
>> +1 to a solution. Also, depends should be able to specify a git version,
>> as in Berksfile
>>
>> On Tue, Sep 9, 2014 at 7:28 AM, Anton Koldaev < "> > wrote:
>>>
>>> Let's look at lita cookbook:
>>> https://github.com/litaio/chef-lita
>>>
>>> `grep depends metadata.rb`:
>>> depends 'apt'
>>> depends 'build-essential'
>>> depends 'ruby-ng', '~> 0.1.1'
>>> depends 'redis2', '~> 0.5.0'
>>>
>>> However there is an option not to use ruby-ng and redis2 cookbooks, which
>>> is really useful since there are plenty of different 'ruby' and 'redis'
>>> cookbooks and cookbook developer should always let user use another cookbook
>>> to install dependencies.
>>> # dependency install type:
>>> #
>>> # - auto: let the cookbook try to figure it out
>>> # - none: will be installed by other means and available in system path
>>> #
>>> default["lita"]["ruby_install_type"]  = "auto"
>>> default["lita"]["redis_install_type"] = "auto"
>>>
>>> It doesn't make any sense to require those cookbooks to be uploaded to
>>> chef-server if I'm not going to use them:
>>> % knife cookbook upload lita
>>> Uploading lita           [0.0.3]
>>> ERROR: Cookbook lita depends on cookbooks which are not currently
>>> ERROR: being uploaded and cannot be found on the server.
>>> ERROR: The missing cookbook(s) are: 'ruby-ng' version '~> 0.1.1',
>>> 'redis2' version '~> 0.5.0'
>>>
>>> It's a common problem for most cookbooks. Is there a good way to work it
>>> around?
>>>
>>>
>>> --
>>> Best regards,
>>> Koldaev Anton
>>
>>
>>
>>
>> --
>> "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
>
>



--
Brian Pitts
Web Operations Engineer




Archive powered by MHonArc 2.6.16.

§