<div dir="ltr">I'd have to vouch for building on Foreman models too. It seems like there are already many responsibilities that Foreman models cover already and are easily mapped. Moreover, the work of finding the equivalences with the Openstack models has already more or less been done from what I read above too. I think we're basically going to rewrite a large portion of what Foreman already provides if we start using many new models.<div>
Also we get proven integration with Dynflow for free, if it gets hairy we can use composition as stated on the first post.</div><div><br></div><div>Another important reason is I think development pace should significantly increase since a portion of the team already knows and has worked with these models, and we can explain to newcomers how to use them to build Staypuft.</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Mar 7, 2014 at 9:55 AM, Ivan Necas <span dir="ltr"><<a href="mailto:inecas@redhat.com" target="_blank">inecas@redhat.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><br>
<br>
----- Original Message -----<br>
> On Thu, Mar 06, 2014 at 05:54:08PM +0100, Petr Chalupa wrote:<br>
> > Hi guys,<br>
> ><br>
> > After yesterdays IRC talk we (Marek and Petr) started to look at OFI<br>
> > models design. Unfortunately I haven't received any email with link<br>
> > to that so we jumped in quite late. Anyway we've tried to decode as<br>
> > much information as possible about staypuft model from etherpad [1].<br>
> > Here's ER diagram we were able to construct from those information.<br>
><br>
> Hey Petr and Marek. First of all I really appreciate the effort you have<br>
> put into understanding the problem we're trying to solve and trying to<br>
> work out the best way to solve it with existing Foreman data<br>
> structures.<br>
><br>
> Unfortunately there are a couple of important bits of the model that you<br>
> missed that will make it considerably more difficult to implement using<br>
> stock Foreman data structures. (I think Scott has already outlined some<br>
> of these bits.) In particular, an OpenStackLayout is actually an entire<br>
> reference architecture (think HA vs. non-HA vs -- later --<br>
> HA-with-separate-neutron-networker vs. HA-with-one-node-per-service)<br>
> that will map to a set of roles, which in turn contain 1..n<br>
> services. (This is a change we made from the original model he put<br>
> together). In this sense an OpenStackLayout is a kind of template that<br>
> we will, on deployment, *realize* by the creation and provisioning of<br>
> hostgroups. For this reason, I think there is quite substantial value in<br>
> modeling the layout as an entirely separate data structure from the<br>
> hostgroups that we will generate in the deploy stage.<br>
><br>
> For these reasons, I would like to press forward with Scott's original<br>
> approach for now. If we arrive post-April and we decide we want to<br>
> refactor to use more Foreman-centric data structures, let's revisit it<br>
> at that time.<br>
<br>
</div></div>I'm supporting the approach of reusing the Foreman modeles where it makes<br>
sense (and a lot of things in the original model can be IMO modeled quite<br>
easily with what's already done in Foreman) because, even if it might not<br>
look like that, it should be less work since all of it is already being<br>
used in production environment.<br>
<br>
I understand the need for the setup and realization phase being separated,<br>
but introducing new models is just one way of solving that. I have no big<br>
issues with Openstack Roles and Services for the purposes of the wizard and they<br>
could really speed up its creation.<br>
<br>
However, having the Deployment Roles and Deployment Services and Deployment Service<br>
Params seems quite odd to me, as I don't see added value in those models<br>
as opposed to hostgroups, global and smart parameters. But it might be just<br>
lack my understanding and I will be happy for somebody bringing more<br>
more lights on the benefits of those.<br>
<br>
On the other hand, using the things we already have in Foreman<br>
for the deployment phase allows working on the orchestration without having<br>
the wizard ready to be used (if we agree what the artifacts of the wizard will be).<br>
<br>
Anyway, I would encourage looking into the Foreman advances features around<br>
smart parameters, organizations etc. before modeling those things from scratch.<br>
<br>
Just my $0.02<br>
<br>
-- Ivan<br>
<div><div class="h5"><br>
><br>
> Take care,<br>
> --Hugh<br>
><br>
> ><br>
> > <see model A><br>
> ><br>
> > Our main concern is that we are recreating models that are already<br>
> > present in Foreman. We understand Astapor issue that it was very<br>
> > hard for user understand all Foreman specifics so now we try to do<br>
> > it Openstack way and use Foreman as provisioning and configuration<br>
> > backend. However we still think that we should built on top of<br>
> > existing and tested models and just create a new easy to use and<br>
> > intuitive UI.<br>
> ><br>
> > inecas: +1 on reusing the Foreman model: the foreman model seems to<br>
> > have most of the things to support what is required, building<br>
> > something custom means:<br>
> > * duplication of what is already there<br>
> > * writing throw-away code, that nobody except the OFI itself will<br>
> > use: the power of Foreman is in the community: building it on the<br>
> > Foreman model (and enhancing it when needed) means the same work<br>
> > will be used outside of OFI with all the benefits that come with it<br>
> > I would like to avoid doing that, especially when it doesn't seem<br>
> > that much work to use the existing model<br>
> ><br>
> > So what we propose is following DB schema:<br>
> ><br>
> > <see model B><br>
> ><br>
> > Each deployment is contained under an Organization for separation.<br>
> > Which also means that same Foreman instance could be normally used<br>
> > when user leaves the wizard.<br>
> ><br>
> > Left side is ER model right side is representing relationships<br>
> > between Hostgroups instances. The one called 'Deploy' is lets say an<br>
> > common parent Hostgroup for all other hostgroups in the deployment.<br>
> > 'Deploy' allows sharing of configuration to the other hostgroups.<br>
> > Other hostgroups are representing Roles (like controller, compute,<br>
> > etc.)<br>
> ><br>
> > Basically we'd map:<br>
> > OpenStackDeployment -> Organization<br>
> > OpenStackLayout -> organization's parameter<br>
> > OpenStackRole -> Hostgroup (*)<br>
> > OpenStackService -> N/A (at least for April)<br>
> > OpenStackSeviceParam -> LookupKey (aka Smart Variable)<br>
> > OpenStackDeployService -> N/A<br>
> > OpenStackDeployServiceParam -> LookupKey (aka Smart Variable Value)<br>
> > OpenStackDeployRole -> assignment of Host to Hostgroup (*)<br>
> ><br>
> > At the moment, the only thing that's missing is that Foreman 1.4.1<br>
> > does not allow us to set one hostgroup to be used in two parent<br>
> > hostgroups (one service in two roles). This is going to change in<br>
> > 1.5 when ConfigRoles will be merged. We suppose to use quickstack<br>
> > modules for April version so we still have just puppet classes on<br>
> > role level (not on service level) and therefore we won't allow user<br>
> > to customize services in roles. Since we need this post April we can<br>
> > stick with current Foreman model. Later we could either back-port<br>
> > ConfigRoles or base on newer Foreman.<br>
> ><br>
> > Benefits we see by reusing foreman models<br>
> > + we save work on need to model everything again<br>
> > + we save work on writing logic that will copy all<br>
> > (Deploy)Service/Role (Deploy)ServiceParameters values to<br>
> > Hostgroup/LookupKey/LookupValue<br>
> > + ability to turn off the wizard plugin (something like removing the<br>
> > training wheels) and keeping the Foreman instance still usable<br>
> ><br>
> > Cons<br>
> > - people may spend some time to better understand existing Foreman code<br>
> > inecas: that should be under Pros, and by people I don't mean the<br>
> > actual users of OFI, but its developers<br>
> ><br>
> > Potential concerns we understood from yesterday<br>
> > 1. too foreman specific<br>
> > 2. need of doing some business logic before Deploy is triggered<br>
> > 3. writing some easy UI around existing models is bigger pain that<br>
> > creating new objects from scratch<br>
> > 4. to able to delay host provisioning until whole deployment is configured<br>
> ><br>
> > Our answers to those<br>
> > 1. this is just about building new UI that we'll need anyway and<br>
> > re-labeling (we already have Smart Variable which in fact is<br>
> > LookupKey model), we could use STI or composition to modify Foreman<br>
> > objects behavior if they are too restricting<br>
> > 2. It's easy to extend Dynflow process with a plugin injecting any<br>
> > additional steps into the deployment process.<br>
> > 3. if this really becomes a problem we could always wrap existing<br>
> > models by some other classes<br>
> > 4. If the hosts are kept in unmanaged state nothing gets applied to<br>
> > them. Until orchestration takes over and switches them to managed<br>
> > state.<br>
> ><br>
> > Are we sure that we need to allow user to prepare changes to an<br>
> > existing-deployment-configuration and then apply them all at the<br>
> > same time in April? I think we can postpone this for later and keep<br>
> > Foreman's behavior for now that changes made to a hostgroup are<br>
> > immediately applied.<br>
> ><br>
> > [1]: <a href="http://etherpad.corp.redhat.com/staypuft-model-design-notes" target="_blank">http://etherpad.corp.redhat.com/staypuft-model-design-notes</a><br>
> ><br>
> > Looking forward to your feedback Petr and Marek.<br>
> ><br>
><br>
><br>
><br>
> > _______________________________________________<br>
> > Rdo-list mailing list<br>
> > <a href="mailto:Rdo-list@redhat.com">Rdo-list@redhat.com</a><br>
> > <a href="https://www.redhat.com/mailman/listinfo/rdo-list" target="_blank">https://www.redhat.com/mailman/listinfo/rdo-list</a><br>
><br>
><br>
> --<br>
> == Hugh Brock, <a href="mailto:hbrock@redhat.com">hbrock@redhat.com</a> ==<br>
> == Senior Engineering Manager, Cloud Engineering ==<br>
> == Tuskar: Elastic Scaling for OpenStack ==<br>
> == <a href="http://github.com/tuskar" target="_blank">http://github.com/tuskar</a> ==<br>
><br>
> "I know that you believe you understand what you think I said, but I’m<br>
> not sure you realize that what you heard is not what I meant."<br>
> --Robert McCloskey<br>
><br>
> --<br>
> You received this message because you are subscribed to the Google Groups<br>
> "foreman-dev" group.<br>
> To unsubscribe from this group and stop receiving emails from it, send an<br>
> email to <a href="mailto:foreman-dev%2Bunsubscribe@googlegroups.com">foreman-dev+unsubscribe@googlegroups.com</a>.<br>
> For more options, visit <a href="https://groups.google.com/groups/opt_out" target="_blank">https://groups.google.com/groups/opt_out</a>.<br>
><br>
<br>
--<br>
You received this message because you are subscribed to the Google Groups "foreman-dev" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:foreman-dev%2Bunsubscribe@googlegroups.com">foreman-dev+unsubscribe@googlegroups.com</a>.<br>
</div></div>For more options, visit <a href="https://groups.google.com/d/optout" target="_blank">https://groups.google.com/d/optout</a>.<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Daniel Lobato<br><br>@elobatoss<br><a href="http://blog.daniellobato.me" target="_blank">blog.daniellobato.me</a><div><a href="http://daniellobato.me/" target="_blank">daniellobato.me</a></div>
<div><br></div><div>GPG: <a href="http://keys.gnupg.net/pks/lookup?op=get&search=0x7A92D6DD38D6DE30" target="_blank">http://keys.gnupg.net/pks/lookup?op=get&search=0x7A92D6DD38D6DE30</a></div></div>
</div>