Re: Newbie questions
"'Nick Anderson' via help-cfengine" <[email protected]> Wed, 13 Aug 2025 19:24:21 -0500
| Newsgroups | gmane.comp.sysutils.cfengine.general |
|---|---|
| Message-ID | <[email protected]> |
--=-=-= Content-Type: multipart/alternative; boundary="==-=-=" --==-=-= Content-Type: text/plain; charset="UTF-8" IN_PROGRESS Respond to Jakub Wardyn <[email protected]>: Re: [help-cfengine] Newbie questions :email:CFEngine:support: ============================================================================================ Thank you for the clarifications, I think I also understand CFEngine a bit better. Great. > Installing and bootstrapping to a hub and then figuring > things out is totally possible. That's I think what most > people do. By default the MPF doesn't really do much of > anything. Yeah well, I find it quite puzzling that > CFEngine doesn't have this kind of behavior out of the > box, I feel like everything rests on this brittle > assumption that CFEngine is installed in /var/cfengine . CFEngine being installed in `/var/cfengine' has been the standard for CFEngine since it's inception (way back in 1993) as far as I know, it's that way in the oldest docs at least (<https://docs.cfengine.com/docs/archive/manuals/cf2-Reference.html#Work-directory>). Interestingly enough, the beginnings of developing the file system hierarchy standard (FHS) was around the same time (<https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch07s02.html>) So from what I understand - I will have to modify the default MPF update scripts, so that, on the agent, it somehow "calculates" the paths? It's still not clear to me what paths exactly you are talking about. There are paths that are involved in building CFEngine, for example between packages built by the maintainers of CFEngine (where everything is installed in `/var/cfengine'). Distributions will often build with FHS enabled. It's generally a-typical to run environments with a mix of FHS and non-FHS options. the MPF generally uses variables when referring to CFEngine's paths. A more concrete example of what you mean might help me. > I am not sure what you mean by "is the file structure > just coupled together everywhere". What I mean is that, > with MPF by default, the installation path of CFEngine > needs to be the same in every agent. It should not have to need to be. We recommend keeping things the same for simplicity. Since that is not a configuration we test, you might indeed run into some issues. What are the specific errors? > I meant to ask but apparently forgot, when you say: > >I've seen that bundles can modify variables and define >class in > the parent scope, but that seems quite >horrible. Can you point me to where you see this? I think >this is it: ><https://docs.cfengine.com/docs/3.26/reference-promise-types-methods.html#usebundle> I've said it's "quite horrible" - that might be an exaggeration, it's just weird coming from a programming background. OK, yeah. CFEngine is certainly different, there is no doubt about that. I remember being annoyed because when I started with CFEngine I really /wanted/ the promiser to store the returned data something like: "DEFINE_THIS_VAR" usebundle => child; Anyway, I got over it I guess. I don't want that anymore, but I still see how it would be a desire. -- You received this message because you are subscribed to the Google Groups "help-cfengine" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/help-cfengine/87jz36kawv.fsf%40northern.tech. --==-=-= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <blockquote style=3D"border-left: 2px solid gray; padding-left: 4px;"> <p> Thank you for the clarifications, I think I also understand CFEngine a bit better. </p> </blockquote> <p> Great. </p> <blockquote style=3D"border-left: 2px solid gray; padding-left: 4px;"> <p> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex"> <div>Installing and bootstrapping to a hub and then figuring things out is totally possible. That's I think what most people do. By default the MPF doesn't really do much of anything. </div></blockquote> Yeah well, I find it quite puzzling that CFEngine doesn't have this kind of behavior out of the box, I feel like everything rests on this brittle assumption that CFEngine is installed in /var/cfengine . </p> </blockquote> <p> CFEngine being installed in <code>/var/cfengine</code> has been the standar= d for CFEngine since it's inception (way back in 1993) as far as I know, it= 's that way in the oldest docs at least (<a href=3D"https://docs.cfengine.c= om/docs/archive/manuals/cf2-Reference.html#Work-directory">https://docs.cfe= ngine.com/docs/archive/manuals/cf2-Reference.html#Work-directory</a>). Inte= restingly enough, the beginnings of developing the file system hierarchy st= andard (FHS) was around the same time (<a href=3D"https://refspecs.linuxfou= ndation.org/FHS_3.0/fhs/ch07s02.html">https://refspecs.linuxfoundation.org/= FHS_3.0/fhs/ch07s02.html</a>) </p> <blockquote style=3D"border-left: 2px solid gray; padding-left: 4px;"> <p> So from what I understand - I will have to modify the default MPF update scripts, so that, on the agent, it somehow "calculates" the paths? </p> </blockquote> <p> It's still not clear to me what paths exactly you are talking about. </p> <p> There are paths that are involved in building CFEngine, for example between= packages built by the maintainers of CFEngine (where everything is install= ed in <code>/var/cfengine</code>). Distributions will often build with FHS = enabled. It's generally a-typical to run environments with a mix of FHS and= non-FHS options. the MPF generally uses variables when referring to CFEngi= ne's paths. </p> <p> A more concrete example of what you mean might help me. </p> <blockquote style=3D"border-left: 2px solid gray; padding-left: 4px;"> <p> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex"> <div>I am not sure what you mean by "is the file structure just coupled together everywhere". </div></blockquote> What I mean is that, with MPF by default, the installation path of CFEngine needs to be the same in every agent. </p> </blockquote> <p> It should not have to need to be. We recommend keeping things the same for = simplicity. </p> <p> Since that is not a configuration we test, you might indeed run into some i= ssues. What are the specific errors? </p> <blockquote style=3D"border-left: 2px solid gray; padding-left: 4px;"> <p> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex"> <div>I meant to ask but apparently forgot, when you say: <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex"> <div>I've seen that bundles can modify variables and define class in the parent scope, but that seems quite horrible. </div></blockquote> Can you point me to where you see this? </div></blockquote> I think this is it: <a href=3D"https://docs.cfengine.com/docs/3.26/reference-promise-types-meth= ods.html#usebundle">https://docs.cfengine.com/docs/3.26/reference-promise-t= ypes-methods.html#usebundle</a> </p> <p> I've said it's "quite horrible" - that might be an exaggeration, it's just weird coming from a programming background. </p> </blockquote> <p> OK, yeah. CFEngine is certainly different, there is no doubt about that. </p> <p> I remember being annoyed because when I started with CFEngine I really <i>w= anted</i> the promiser to store the returned data something like: </p> <p> "DEFINE_THIS_VAR" usebundle =3D> child; </p> <p> Anyway, I got over it I guess. I don't want that anymore, but I still see h= ow it would be a desire. </p> <p></p> -- <br /> You received this message because you are subscribed to the Google Groups &= quot;help-cfengine" group.<br /> To unsubscribe from this group and stop receiving emails from it, send an e= mail to <a href=3D"mailto:[email protected]">help-= [email protected]</a>.<br /> To view this discussion visit <a href=3D"https://groups.google.com/d/msgid/= help-cfengine/87jz36kawv.fsf%40northern.tech?utm_medium=3Demail&utm_source= =3Dfooter">https://groups.google.com/d/msgid/help-cfengine/87jz36kawv.fsf%4= 0northern.tech</a>.<br /> --==-=-=-- --=-=-= Content-Type: text/plain; charset="UTF-8" -- Nick Anderson | Doer of Things | (+1) 785-550-1767 | https://northern.tech -- You received this message because you are subscribed to the Google Groups "help-cfengine" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/help-cfengine/87jz36kawv.fsf%40northern.tech. --=-=-=--