<div dir="ltr">Also doing this partial externalization also creates a rats nest of security concerns (almost all stuff that can be handled within Java has to run as root)..  we are truly on the fence right now on which way to go<br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Feb 15, 2014 at 6:55 PM, Michael Thoreson <span dir="ltr"><<a href="mailto:m.thoreson@c4labs.ca" target="_blank">m.thoreson@c4labs.ca</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Get the source for pfSense. They have been doing what I think you want to do for a long time now. It is a routing project but it is solely based on FreeBSD and they are making the move to FBSD v10 with their 2.2 version. They have tons of scripts for building a very minimal BSD installation and you can take a look at their "single config file" method. pfSense as a whole is just a fancy web ui that calls php\perl and i think some bash scripts to configure the host's applications that do the hard work. Also they have a great package framework you may be able to use as an example.<div>
<div class="h5"><br>
<br>
<br>
On 15/02/2014 5:41 PM, Aryeh Friedman wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
One way to think of petitecloud is nothing more then a brillian script generator.  Namely it does all the precondtion checks on it's own and then generates a serialized script (no loops or conditionals) to the task it needs to do this.<br>

<br>
Currently some of this done by doing one shot commands straight from the business logic (and the underlying drivers).   This makes stuff fast and easy for typical cases but some of the flexibility that we are talking about it breaks it very fast.<br>

<br>
An example of such a design dilemma is hyperv support spread across muiltiple host OS's.   Namely the actual syntax (and sometimes the semantics) for how a given hyperv is called on one OS is different then on a different host OS.  Also sometimes the semantics even differ between the same hyperv on the same OS.  For example the only difference between "bhyve-freebsd" and "bhyve-linux" is the name of the bhyveload and how it is called (namely you need to also make/populate the device map dir).<br>

<br>
We realized a few weeks ago that this created a "N time M" problem in how many classes we have (i.e. we would need to subclass each hyperv for each supported OS).   This gets really hard to manage very quickly and is due to it's complexity likely to be the source of many bugs (i.e. bugs not in the scripts generated but the wrong script be generated [and within the context it was generated it is correct]).<br>

<br>
An other solution is we just do a partial externalization of the scripts themselves.   This way we just do the mixing and matching at runtime and not compile time and the lack of a script template indicates lack of support (one major issue we had under the above design was how to handle unsupported operations).<br>

<br>
In order to do this right we would need to do the following:<br>
<br>
1. Come up with a universal script templating system (i.e. tell PC where the blanks to be filled in are)<br>
<br>
2. Refactor PC so all calls to OSCommand (except trivial ones that are only generation prep calls) they all go through some form of script<br>
<br>
3. Redesign most of the sub-business logic architecture to be nothing but smart script callers (they internalize far too much right now)<br>
<br>
-- <br>
Aryeh M. Friedman, Lead Developer, <a href="http://www.PetiteCloud.org" target="_blank">http://www.PetiteCloud.org</a><br>
<br>
<br></div></div>
______________________________<u></u>_________________<br>
petitecloud-general mailing list<br>
<a href="mailto:petitecloud-general@lists.petitecloud.nyclocal.net" target="_blank">petitecloud-general@lists.<u></u>petitecloud.nyclocal.net</a><br>
<a href="http://lists.petitecloud.nyclocal.net/listinfo.cgi/petitecloud-general-petitecloud.nyclocal.net" target="_blank">http://lists.petitecloud.<u></u>nyclocal.net/listinfo.cgi/<u></u>petitecloud-general-<u></u>petitecloud.nyclocal.net</a><br>

</blockquote>
<br>
______________________________<u></u>_________________<br>
petitecloud-general mailing list<br>
<a href="mailto:petitecloud-general@lists.petitecloud.nyclocal.net" target="_blank">petitecloud-general@lists.<u></u>petitecloud.nyclocal.net</a><br>
<a href="http://lists.petitecloud.nyclocal.net/listinfo.cgi/petitecloud-general-petitecloud.nyclocal.net" target="_blank">http://lists.petitecloud.<u></u>nyclocal.net/listinfo.cgi/<u></u>petitecloud-general-<u></u>petitecloud.nyclocal.net</a><br>

</blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr">Aryeh M. Friedman, Lead Developer, <a href="http://www.PetiteCloud.org" target="_blank">http://www.PetiteCloud.org</a><br></div>
</div>