Comments (11)
This is correct, chef-zero does not merge cookbooks from different directories. It caused a bunch of confusion when it did. That's an interesting use case though. I wonder if there is a way to get the functionality without confusing people ...
from chef-zero.
So merging is the right thing to do from your point of view?
How hard would it be to bring it back as an optional option?
What confused people? I'd like to understand how this is different from the expected chef-server behavior?
Thank you
from chef-zero.
When using chef-server, you upload cookbooks via knife, which gives you a big warning that the feature is deprecated. It would've been removed in Chef 11.0 if we had enough time. I know some people really like the feature but I think it should be done explicitly via some extra tool that does the overlays and produces a cookbook with the overrides. Doing it implicitly leads to no end of grief.
from chef-zero.
Sounds like we should talk at ChefConf :-)
But today the merge is expected? It should be simple then for me to do the merge on the filesystem before starting chef-zero.
from chef-zero.
Expected is probably a strong word :) knife cookbook upload does it, knife upload /cookbooks does not; we are presently in an inconsistent state and we want to move to a world where the merge does not happen.
from chef-zero.
Curious to know why you want to abandon it. I always found it most useful when using other people's cookbooks. No easier way to do customisation.
Wrapper cookbooks are too heavyweight for my taste and using them to modify a template location doesn't feel right....at least it is not easy enough with today's solutions.
But I guess I'm just late to the party :-)
from chef-zero.
@jweiss we can chat at chefconf for sure. It just occurred to me that we could do something like have an explicit overlays directory that you configure, which might be okay. My problem with the feature is:
- Too easy to use it accidentally and upload something totally different than what you wanted to the server. IOW, newbie footgun.
- Very opaque. Only at cookbook upload time (or chef-solo runtime) is the combined cookbook actually synthesized, so even for experienced users you have to figure out what the synthesized cookbook will look like based on your mental model of how the feature works. I believe that more transparency is needed when the user is given opportunities to make mistakes.
from chef-zero.
@danielsdeleo @jweiss did you guys get to talk at ChefConf? What is your current thinking?
from chef-zero.
Nope, didn't get to chat. I'd still like to remove or rewrite the overlays feature. The two ways I could see it working are:
- Have a tool that builds the combined cookbook for you. Then you keep a pristine copy in one place, and your set of overlays in a different place and run something like
cookbook-combiner-tool COOKBOOK_NAME
to merge them. The good part of this approach is that chef/knife/etc. don't have to handle any of that complexity, it's explicit on the user's part, and it produces a final artifact that you can inspect and understand how it works. The downside is that you have to re-run the combiner command when iterating on a overlay file. - Support overlays, but require users to put the overlay files in some sort of overlay-specific location. For example, you might have a
cookbooks/
andcookbook-overlays
directory, and the second is not part of thecookbook_path
setting but is configured as acookbook_overlays_path
or something. The tradeoffs are basically the opposite of approach 1.
from chef-zero.
As a workaround we solved it by copying the files before the chef run. So we get back the chef-solo behaviour.
In general, I like suggestion 2).
From my experience overlays are a simple way to customise cookbooks you grabbed from somewhere. Many cookbook authors don't go as far as creating definitions, LWRPs etc.
from chef-zero.
Given that there's now a supported API to modify resources such that one can point to different template files and so on, and we still don't want to support merging, I'm going to close this issue.
Thanks,
-Thom
from chef-zero.
Related Issues (20)
- kitchen and chef-zero 404ing on data bag HOT 3
- check if a data_bag exists HOT 1
- chef-zero should make data available on save HOT 4
- Exception when file has #2 at the end of name HOT 1
- Chef zero outputs too much information for info log level HOT 3
- Chef encountered an error attempting to load the node data HOT 2
- Should do a release HOT 7
- Uploading cookbooks to chef-zero using berks often crashes when Request timeout is 300 HOT 3
- Improper require of Hashie causing error (NameError: uninitialized constant Hashie::Extensions::Array) HOT 5
- Unable to connect to chef-zero HOT 1
- Chef 13 vs Chef 12 ip address resolution HOT 1
- Completely arbitrary ruby version requirement HOT 2
- Need a mode of operation where chef-zero runs in-memory but populates from the disk cache
- Do not format the node definition JSON file after converging HOT 1
- Could chef-zero please support fetching inspec profiles?
- Re-raising exception: URI::InvalidURIError - bad URI(is not URI?)
- missing webrick makes chef-zero fail
- Add unique email contraint while creating user
- Configuring the chef-zero-automate reporter for the compliance phase 404s in TK against chef-zero
- Policy Groups in the policy file details (chef-zero) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chef-zero.