CFEngine build system #4881
Replies: 4 comments 11 replies
-
Bas van der Vlies ***@***.***> writes:
I am just playing with cfbs and it is a nice system for
generating your masterfiles setup.
Glad you are liking it.
What I see is that masterfiles meaning has been shifted the
`modules` are now included in the masterfiles and then
copied to `/var/cfengine/modules`. Templates are included
and to force copy package modules get the extension mustache
to force the copy.
Oh fun, terminology disambiguation ...
<https://docs.cfengine.com/docs/3.18/reference-language-concepts-modules.html>
CFEngine has had a thing called "modules" for ever. These modules are
programs that emit output that conforms with the module protocol
typically found in `/var/cfengine/modules' and used with `usemodule()',
or commands type promises where [module => "true"].
The vendoring of those type of modules from Masterfiles is unrelated to
`cfbs'. Previously package modules and variables and classes modules
were vendored as part of our packages and clients would populate their
own `/var/cfengine/modules' by copying them from the hub. But we thought
it made more sense to render those from the MPF so that we could account
for any differences we might need to based on the binary version present
instead of relying on the modules present on the hub to work with all
client versions that copy them down.
For me this feels a bit awkward with the `cfbs` system you
could for every standard shortcut a directory:
* masterfiles
* modules
* templates
* data
Then when a policy is added that as a mustache, json or data
file iit can be placed in one of the above directories. It
is just suggestion
For know `cfbs` has complete control over the generated
directories so local additions to `data` and `templates` are
not possible
I am unsure of a good way of supporting vendoring assets in a module
that are not part of the policy set and not delivered to all agents. At
least not without making some tweaks to the MPF and embedded bootstrap
policy. We could have some directories inside masterfiles that are
excluded from copy to clients by default perhaps.
If you have content that is separate, like for example templates, you
could have a module that ensures the templates are installed on your
hub, that policy file could be run on the hub only, and it could take
care of keeping the templates dir up to date with some other source.
Similarly, we will soon want to vendor things like compliance reports in
cfbs modules and probably we will want to avoid shipping those report
specifications to all agents, mostly because it is wasteful and the
bandwidth conservation society would not approve.
[module => "true"]
<https://docs.cfengine.com/docs/3.18/reference-promise-types-commands.html#module>
…--
Nick Anderson | Doer of Things | (+1) 785-550-1767 | https://northern.tech
|
Beta Was this translation helpful? Give feedback.
-
@nickanderson I just realizes that the |
Beta Was this translation helpful? Give feedback.
-
Good to hear why not put it outside the masterfiles directory? The
the you do not have to update |
Beta Was this translation helpful? Give feedback.
-
@olehermanse thanks for the feedback. I can imagine that everything in masterfiles is easy. Masterfiles used to be easy only used for policy files. Now it feels awkward to put dir/files in this directory that are not needed on the client at all. The only way to prevent it from copying (bootstrap/update) is to put in a In the CFEngine masterfiles framework there are shortcuts defined for Maybe this scenario works to put everything under
It is a fact of life that policy files need data/script/json files/dirs . These items do not belong in masterfiles and my personal view is that it makes the masterfiles complex for update/bootstrap process with all the "special" exclude/include rules. Just my 2cents its now cumbersome to distribute these kind of files. |
Beta Was this translation helpful? Give feedback.
-
I am just playing with cfbs and it is a nice system for generating your masterfiles setup. What I see is that masterfiles meaning has been shifted the
modules
are now included in the masterfiles and then copied to/var/cfengine/modules
. Templates are included and to force copy package modules get the extension mustache to force the copy.For me this feels a bit awkward with the
cfbs
system you could for every standard shortcut a directory:Then when a policy is added that as a mustache, json or data file iit can be placed in one of the above directories. It is just suggestion
For know
cfbs
has complete control over the generated directories so local additions todata
andtemplates
are not possibleBeta Was this translation helpful? Give feedback.
All reactions