run custom chef cookbook #413
-
Sorry if this is obvious and I'm just being dumb. This project is extremely comprehensive and well written. There are, however, many layers of abstraction making it hard to wrap my mind about how it works. I'm trying to use this to build a custom vagrant box that uses chef (chef-solo/local mode is fine) to install a bunch of stuff (iis, coldfusion, etc) on win2019 using a custom cookbook. The cookbook itself works fine on its own (via kitchen, in production, etc), but I'm not sure how to insert/plug it into the process of building a box that I can hand to the application developers with all the stuff they need. I see the "workstation" examples in the other repo, but am having a hard time connecting the layers of abstraction there back to what needs to be done. In the README section "Chaining builds further" it talks about how you can add How does this chaining work in terms of what |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@rjhornsby thanks for reaching out and sorry if the layer of abstractions make it hard to extend the project. First of all, there are no dumb questions, so thanks for asking for clarification. Also, I did not document a lot of concepts, so it is perfectly valid not to grasp it as it is, I often get lost myself when extending this code when trying to understand what I've been thinking when writing it years ago :) As per you actual questions, configurations and chains are not discovered dynamicall,y but statically defined in code in the repo root's build.cake file. For example, here is the exact location where the IIS setup is configured for Windows Server 2022. All the other commands ( I indeed would suggest creating a wrapper cookbook that contains all the references to the other components you want to include. First, you could add to the root
After this, I hope this helps make this work, if not, feel free to invite me to your fork and I can help setting up a hello world example there. FYI, I am aware of all the complications above, so I am now trying to simplify things a lot in this PR. The main motivation for this setup years ago was that it was hard to prevent a lot of duplication with the Packer JSON templates, but with the HCL-based configuration system it is much more simpler. Also, the workstation repo was built before the policyfiles concept in Chef, so that's why it's also a lot more complicated than it should be now. I will try to rework that as well once this Packer update is done. |
Beta Was this translation helpful? Give feedback.
@rjhornsby thanks for reaching out and sorry if the layer of abstractions make it hard to extend the project. First of all, there are no dumb questions, so thanks for asking for clarification. Also, I did not document a lot of concepts, so it is perfectly valid not to grasp it as it is, I often get lost myself when extending this code when trying to understand what I've been thinking when writing it years ago :)
As per you actual questions, configurations and chains are not discovered dynamicall,y but statically defined in code in the repo root's build.cake file. For example, here is the exact location where the IIS setup is configured for Windows Server 2022. All the other commands (
info
,…