<div dir="ltr"><div><div><div><div>This rises number of questions:<br></div><br>1. What about conditional dependencies? Like config3 depends on config1 AND config2 OR config3.<br></div><br>2. How do I pass values between configs? For example config1 requires value from user input and config2 needs an output value obtained from applying config1<br>
</div><br>3. How would you do error handling? For example config3 on server3 requires config1 to be applied on server1 and config2 on server2. Suppose that there was an error while applying config2 (and config1 succeeded). How do I specify reaction for that? Maybe I need then to try to apply config4 to server2 and continue or maybe just roll everything back<br>
</div><div><br>4. How these config dependencies play with nested stacks and resources like LoadBalancer that create such stacks? How do I specify that myConfig depends on HA proxy being configured if that config was declared in nested stack that is generated by resource's Python code and is not declared in my HOT template?<br>
</div><div><br>5. The solution is not generic. For example I want to write HOT template for my custom load-balancer and a scalable web-servers group. Load balancer config depends on all configs of web-servers. But web-servers are created dynamically (autoscaling). That means dependency graph needs to be also dynamically modified. But if you explicitly list config names instead of something like "depends on all configs of web-farm X" you have no way to describe such rule. In other words we need generic dependency, not just dependency on particular config<br>
</div><div><br></div><div>6. What would you do on STACK UPDATE that modifies the dependency graph?<br></div><div><br></div>The notation of configs and there <br></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Thu, Oct 10, 2013 at 4:25 AM, Angus Salkeld <span dir="ltr"><<a href="mailto:asalkeld@redhat.com" target="_blank">asalkeld@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="im">On 09/10/13 19:31 +0100, Steven Hardy wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Wed, Oct 09, 2013 at 06:59:22PM +0200, Alex Rudenko wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi everyone,<br>
<br>
I've read this thread and I'd like to share some thoughts. In my opinion,<br>
workflows (which run on VMs) can be integrated with heat templates as<br>
follows:<br>
<br>
1. workflow definitions should be defined separately and processed by<br>
stand-alone workflow engines (chef, puppet etc).<br>
</blockquote>
<br>
I agree, and I think this is the direction we're headed with the<br>
software-config blueprints - essentially we should end up with some new<br>
Heat *resources* which encapsulate software configuration.<br>
</blockquote>
<br></div>
Exactly.<br>
<br>
I think we need a software-configuration-aas sub-project that knows<br>
how to take puppet/chef/salt/... config and deploy it. Then Heat just<br>
has Resources for these (OS::SoftwareConfig::Puppet). <br>
We should even move our WaitConditions and Metadata over to that yet-to-be-made service so that Heat is totally clean of software config.<br>
<br>
How would this solve ordering issues:<br>
<br>
resources:<br>
config1:<br>
type: OS::SoftwareConfig::Puppet<br>
hosted_on: server1<br>
...<br>
config2:<br>
type: OS::SoftwareConfig::Puppet<br>
hosted_on: server1<br>
depends_on: config3<br>
...<br>
config3:<br>
type: OS::SoftwareConfig::Puppet<br>
hosted_on: server2<br>
depends_on: config1<br>
...<br>
server1:<br>
type: OS::Nova::Server<br>
...<br>
server2:<br>
type: OS::Nova::Server<br>
...<br>
<br>
<br>
Heat knows all about ordering:<br>
It starts the resources:<br>
server1, server2<br>
config1<br>
config3<br>
config2<br>
<br>
There is the normal contract in the client:<br>
we post the config to software-config-service<br>
and we wait for the state == ACTIVE (when the config is applied)<br>
before progressing to a resource that is dependant on it.<span class="HOEnZb"><font color="#888888"><br>
<br>
-Angus</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
IMO there is some confusion around the scope of HOT, we should not be<br>
adding functionality to it which already exists in established config<br>
management tools IMO, instead we should focus on better integration with<br>
exisitng tools at the resource level, and identifying template interfaces<br>
which require more flexibility (for example serialization primitives)<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
2. the HOT resources should reference workflows which they require,<br>
specifying a type of workflow and the way to access a workflow definition.<br>
The workflow definition might be provided along with HOT.<br>
</blockquote>
<br>
So again, I think this acatually has very little to do with HOT. The<br>
*Heat* resources may define software configuration, or possibly some sort<br>
of workflow, which is acted upon by $thing which is not Heat.<br>
<br>
So in the example provided by the OP, maybe you'd have a Murano resource,<br>
which knows how to define the input to the Murano API, which might trigger<br>
workflow type actions to happen in the Murano service.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
3. Heat should treat the orchestration templates as transactions (i.e.<br>
Heat should be able to rollback in two cases: 1) if something goes wrong<br>
during processing of an orchestration workflow 2) when a stand-alone<br>
workflow engine reports an error during processing of a workflow associated<br>
with a resource)<br>
</blockquote>
<br>
So we already have the capability for resources to recieve signals, which<br>
would allow (2) in the asynchronous case. But it seems to me that this is<br>
still a serialization problem, ie a synchronous case, therefore (2) is just<br>
part of (1).<br>
<br>
E.g<br>
<br>
- Heat stack create starts<br>
- Murano resource created (CREATE IN_PROGRESS state)<br>
- Murano workdlow stuff happens, signals Heat with success/failure<br>
- Murano resource transitions to either COMPLETE or FAILED state<br>
- If a FAILED state happened, e.g on update, we can roll back to the<br>
previous stack definition (this is already possible in Heat)<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
4. Heat should expose an API which enables basic communication between<br>
running workflows. Additionally, Heat should provide an API to workflows<br>
that allows workflows to specify whether they completed successfully or<br>
not. The reference to these APIs should be passed to the workflow engine<br>
that is responsible for executing workflows on VMs.<br>
</blockquote>
<br>
I personally don't think this is in scope for Heat. We already have an API<br>
which exposes the status of stacks and resources. Exposing some different<br>
API which describes a workflow implemented by a specific subset of resource<br>
types makes no sense to me.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Pros of each point:<br>
1 & 2 - keeps Heat simple and gives a possibility to choose the best<br>
workflows and engines among available ones.<br>
3 - adds some kind of all-or-nothing semantics improving the control and<br>
awareness of what's going on inside VMs.<br>
4 - allows workflow synchronization and communication through Heat API.<br>
Provides the error reporting mechanism for workflows. If a workflow does<br>
not need this functionality, it can ignore it.<br>
</blockquote>
<br>
IMHO (4) is very much a step too far, and is not well aligned with the<br>
current interfaces provided by Heat.<br>
<br>
I'm really keen to further discuss the use-cases here, but if possible, it<br>
would be helpful if folks can describe their requirements in less abstract<br>
terms, and with reference to our existing interfaces and template model.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
These thoughts might show some gaps in my understanding of how Heat works,<br>
but I would like to share them anyway.<br>
</blockquote>
<br>
You've raised some good points, thanks.<br>
<br>
I'm really keen to further discuss the use-cases here, but if possible, it<br>
would be helpful if folks can describe their requirements in less abstract<br>
terms, and with reference to our existing interfaces and template model.<br>
That way we can start defining what is actually missing to support specific<br>
use-cases.<br>
<br>
So far I see the following emerging as definite requirements:<br>
- Better/more flexible native serialization interfaces (possbly HOT<br>
additions)<br>
- Better/more flexible *resources* which encapsulate software configuration<br>
on instances, probably with the flexibility of applying more than one<br>
config to an instance (not necessarily related to any HOT changes at all)<br>
<br>
Thanks,<br>
<br>
Steve<br>
<br>
______________________________<u></u>_________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org" target="_blank">OpenStack-dev@lists.openstack.<u></u>org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/<u></u>cgi-bin/mailman/listinfo/<u></u>openstack-dev</a><br>
</blockquote>
<br>
______________________________<u></u>_________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org" target="_blank">OpenStack-dev@lists.openstack.<u></u>org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/<u></u>cgi-bin/mailman/listinfo/<u></u>openstack-dev</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr"><span style="border-collapse:separate;color:rgb(0,0,0);font-family:'Times New Roman';font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><span style="font-family:arial;font-size:small">Sincerely yours<br>
Stanislav (Stan) Lagun<br>Senior Developer<br>Mirantis</span></span><br><span style="border-collapse:separate;color:rgb(0,0,0);font-family:'Times New Roman';font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><span style="font-family:arial;font-size:small"><span style="font-size:10.0pt;font-family:"Arial","sans-serif"" lang="EN-US">35b/3, Vorontsovskaya
St.</span><br>Moscow, Russia<br>Skype: stanlagun<br><a href="http://www.mirantis.com/" target="_blank">www.mirantis.com</a><br><a href="mailto:slagun@mirantis.com" target="_blank">slagun@mirantis.com</a></span></span></div>
</div>