Git Product home page Git Product logo

Comments (7)

karnauskas avatar karnauskas commented on August 26, 2024

Why do you need it on Supermarket? Berkshelf can fetch it from Github without any problems.

from chef-pulp.

damacus avatar damacus commented on August 26, 2024

Whilst is it possible to use berkshelf in that way, it isn't ideal as github isn't an versioned artefact repository in the same way supermarket is.

from chef-pulp.

karnauskas avatar karnauskas commented on August 26, 2024

I'm not familiar with Supermarket internals, but from my experience git has better versioning then Chef cookbooks.

from chef-pulp.

hansnqyr avatar hansnqyr commented on August 26, 2024

@nkts Berkshelf can only fetch it from Github when it's a direct dependent - any further down the tree and it disappears. This is by design as the Github support is there for development only, not distribution.

For Example:
Cookbook B > Cookbook A (github) hosted - This works ok, because in B's Berksfile, you specify the Github location.
However if Cookbook C, wants to consume B (and A), it now has to specify A's location in it's own Berksfile.

Your comment about git versioning is spot on with regards to source control versioning, however the important issue here is release versioning, which is done at a cookbook level, not at a git level.

Hope this helps!

from chef-pulp.

karnauskas avatar karnauskas commented on August 26, 2024

@hanskreuger If Cookbook C requires Cookbook B (and Cookbook A) it will be looking for those cookbooks in Chef's server. Berksfile just provides way to specify cookbook source and put them into Chef server.
Is this Chef client's default behaviour try to resolve cookbook dependencies looking into Supermarket at first place?

from chef-pulp.

hansnqyr avatar hansnqyr commented on August 26, 2024

@nkts I was giving an example of Berkshelf dependencies - i'm not talking about the chef server/client here.

The situation we're trying to avoid is one where a consumer cookbook (ie a wrapper that include_recipes pulp in this case) has to specify dependent cookbooks in the Berksfile.

For example, my_nice_library cookbook might consume pulp by setting the following:
recipes/default.rb:

include_recipe 'pulp'

metadata.rb:

depends 'pulp', '~> 1.0.0'

Berksfile:

source 'https://supermarket.chef.io'
metadata

This lets Berkshelf find dependencies from metadata and source them from the supermarket.
The alternative you suggest would be something like:

Berksfile:

source 'https://supermarket.chef.io'
metadata
cookbook 'pulp', github: 'nkts/chef-pulp', branch: '1.0.0'

my_nice_library cookbook now has explicit knowledge about pulp. The biggest problem with this is that cookbook statements aren't propagated, so a consumer of my_nice_library has to put the same cookbook statement in that Berksfile. This rather dilutes the point of using Berkshelf in the first place 😢

from chef-pulp.

karnauskas avatar karnauskas commented on August 26, 2024

I have pushed v0.1.1 to Supermarket. tho I don't recommend to use it. I'm working on new and updated version. New releases will be tagged and pushed to Supermarket as well.

from chef-pulp.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.