<div dir="ltr">Hello Hongbin.<div><br></div><div>I would disagree on what you are saying, because having Higgins doing too basic stuff is not very valuable. As for those of us who works with development and continuous delivery how can Higgins address, for example, micro-service chaining?</div><div><br></div><div>In any case Higgins eventually will end up having its own DSL (or TOSCA, or compose DSL) because there are not so much benefits from having API that only spin-up containers separately. Developers will, again, have to build solution over Higgins to support more advanced things like service chaining and that would mean that Higgins doesn't meet their requirements for further service consumption.</div><div><br></div><div><br></div><div>Kind regards,</div><div>Denys Makogon</div><div> </div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-05-31 23:15 GMT+03:00 Hongbin Lu <span dir="ltr"><<a href="mailto:hongbin.lu@huawei.com" target="_blank">hongbin.lu@huawei.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-CA" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I don’t think it is a good to re-invent docker-compose in Higgins. Instead, we should leverage existing libraries/tools if we can.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Frankly, I don’t think Higgins should interpret any docker-compose like DSL in server, but maybe it is a good idea to have a CLI extension to interpret specific
 DSL and translate it to a set of REST API calls to Higgins server. The solution should be generic enough so that we can re-use it to interpret another DSL (e.g. pod, TOSCA, etc.) in the future.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Best regards,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Hongbin<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Denis Makogon [mailto:<a href="mailto:lildee1991@gmail.com" target="_blank">lildee1991@gmail.com</a>]
<br>
<b>Sent:</b> May-31-16 3:25 PM<br>
<b>To:</b> OpenStack Development Mailing List (not for usage questions)<br>
<b>Subject:</b> Re: [openstack-dev] [higgins] Docker-compose support<u></u><u></u></span></p>
</div>
</div><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Hello.<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">It is hard to tell if given API will be final version, but i tried to make it similar to CLI and its capabilities. So, why not?<u></u><u></u></p>
</div>
<div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">2016-05-31 22:02 GMT+03:00 Joshua Harlow <<a href="mailto:harlowja@fastmail.com" target="_blank">harlowja@fastmail.com</a>>:<u></u><u></u></p>
<p class="MsoNormal">Cool good to know,<br>
<br>
I see <a href="https://github.com/docker/compose/pull/3535/files#diff-1d1516ea1e61cd8b44d000c578bbd0beR66" target="_blank">
https://github.com/docker/compose/pull/3535/files#diff-1d1516ea1e61cd8b44d000c578bbd0beR66</a><br>
<br>
Would that be the primary API? Hard to tell what is the API there actually, haha. Is it the run() method?<br>
<br>
I was thinking more along the line that higgins could be a 'interpreter' of the same docker-compose format (or similar format); if the library that is being created takes a docker-compose file and turns it into a 'intermediate' version/format that'd be cool.
 The compiled version would then be 'executable' (and introspectable to) by say higgins (which could say traverse over that intermediate version and activate its own code to turn the intermediate versions primitives into reality), or a docker-compose service
 could or ...<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">What abou TOSCA? From my own perspective compose format is too limited, so it is really necessary to consider regarding use of TOSCA in Higgins workflows.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
Libcompose also seems to be targeted at a higher level library, from at least reading the summary, neither seem to be taking a compose yaml file, turning it into a intermediate format, exposing that intermediate format to others for introspection/execution
 (and also likely providing a default execution engine that understands that format) but instead both just provide an equivalent of:<u></u><u></u></p>
</blockquote>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">That's why i've started this thread, as community we have use cases for Higgins itself and for compose but most of them are not formalized or even written. Isn't this a good time to define them?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal">  project = make_project(yaml_file)<br>
  project.run/up()<br>
<br>
Which probably isn't the best API for something like a web-service that uses that same library to have. IMHO having a long running run() method
<u></u><u></u></p>
</blockquote>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Well, compose allows to run detached executions for most of its API calls. By use of events, we can track service/containers statuses (but it is not really trivial).<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal" style="margin-bottom:12.0pt">exposed, without the necessary state tracking, ability to interrupt/pause/resume that run() method and such is not going to end well for users of that lib (especially a web-service that needs to periodically
 be `service webservice stop` or restart, or ...).<u></u><u></u></p>
</blockquote>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Yes, agreed. But docker or swarm by itself doesn't provide such API (can't tell the same for K8t). <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal">Denis Makogon wrote:<u></u><u></u></p>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Hello Stackers.<br>
<br>
<br>
As part of discussions around what Higgins is and what its mission there<br>
are were couple of you who mentioned docker-compose [1] and necessity of<br>
doing the same thing for Higgins but from scratch.<br>
<br>
I don't think that going that direction is the best way to spend<br>
development cycles. So, that's why i ask you to take a look at recent<br>
patchset submitted to docker-compose upstream [2] that makes this tool<br>
(initially designed as CLI) to become a library with Python API.  The<br>
whole idea is to make docker-compose look similar to libcompose [3]<br>
(written on Go).<br>
<br>
If we need to utilize docker-compose features in Higgins i'd recommend<br>
to work on this with Docker community and convince them to land that<br>
patch to upstream.<br>
<br>
If you have any questions, please let me know.<br>
<br>
[1] <a href="https://docs.docker.com/compose/" target="_blank">https://docs.docker.com/compose/</a><br>
[2] <a href="https://github.com/docker/compose/pull/3535" target="_blank">https://github.com/docker/compose/pull/3535</a><br>
[3] <a href="https://github.com/docker/libcompose" target="_blank">https://github.com/docker/libcompose</a><br>
<br>
<br>
Kind regards,<br>
Denys Makogon<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal">__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" target="_blank">
OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><u></u><u></u></p>
<p class="MsoNormal"><br>
__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" target="_blank">
OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><u></u><u></u></p>
</blockquote>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</div>
</div></div></div>
</div>
</div>

<br>__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><br></div>