<div dir="ltr">Hello Hongbin.<div><br></div><div>See inline comments.</div><div><br></div><div>Kind regards,</div><div>Denis Makogon<br><div class="gmail_extra"><br><div class="gmail_quote">2016-12-07 2:56 GMT+02: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 class="m_3864345211904358859WordSection1">
<p class="MsoNormal"><span style="color:#1f497d">Hi all,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">This is a continued discussion of the k8s integration blueprint [1]. Currently, Zun exposes a container-oriented APIs that provides service for end-users to operate on containers (i.e. CRUD). At the last team
meeting, we discussed how to introduce k8s to Zun as an alternative to the Docker driver. There are two approaches that has been discussed:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">1. Introduce the concept of Pod. If we go with this approach, an API endpoint (i.e. /pods) will be added to the Zun APIs. Both Docker driver and k8s driver need to implement this endpoint. In addition, all the
future drivers need to implement this endpoint as well (or throw a NotImplemented exception). Some of our team members raised concerns about this approach. The main concern is that this approach will hide a lot of k8s-specific features (i.e. replication controller)
or there will be a lot of work to bring all those features to Zun.</span></p></div></div></blockquote><div><br></div><div>Exactly, i think Pods concept shouldn't appear in Zun (it's all about Magnum, isn't it?). So, the problem is that K8t Pod is too different from Docker Swarm node and different from Rkt. Since Zun is aimed to be an abstraction on-top for different container technologies. So every infra management should be leveraged to Magnum.</div><div><br></div><div>I think it would make more sense to introduce an abstraction, let's say "Datastore", behind this abstraction we can hide different types of technologies (required connection attributes, etc.). If i would need to create container in Swarm i'll use "--datastore <a href="http://swarm.production.com">swarm.production.com</a>", if i would need to attach value, i'll ask magnum to do that and whatever i would need in order to deploy required Zun container.</div><div> </div><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 class="m_3864345211904358859WordSection1"><p class="MsoNormal"><span style="color:#1f497d"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d"> $ zun pod-create … # this create a k8s pod (if k8s driver is used), or create a sandbox with a set of containers (if docker driver is used)<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d"> $ zun create … # this create a k8s pod with one container, or create a sandbox with one container<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">2. Introduce a dedicated k8s endpoint that acts as a proxy to k8s APIs. This will expose all the k8s features but users won’t have a unified APIs across drivers.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d"><u></u> </span> </p></div></div></blockquote><div><br></div><div>This is exactly intersection with Magnum. Zun is meant to be Containers-as-a-Service, but not Containers-infra-management-as-a-Service. So, if i would need to deploy container on specific Pod i would like to have capability to deploy it on that pod (no matter if it was deployed by Magnum or by 3rd-party tools outside of OpenStack), of course there would be problems with Cinder volumes.</div><div><br></div><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 class="m_3864345211904358859WordSection1"><p class="MsoNormal"><span style="color:#1f497d"><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d"> $ zun k8s pod create … # this create a k8s pod<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d"> $ zun docker container create … # this create a docker container<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d"> $ zun create … # the behavior of this command is unclear<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">So far, we haven’t decided which approach to use (or use a third approach), but we wanted to collect more feedback before making a decision. Thoughts?<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d"><u></u> </span></p></div></div></blockquote><div><br></div><div>So, overall, Zun should remain to be agnostic to any container technologies like Docker, K8t, Rkt, CEO. So every infra management should be leveraged to Magnum, and Zun should consume container technology CRUD API and use Magnum in order to modify underlying Nova/Cinder resources.</div><div><br></div><div>Another question, why do Zun needs K8t pods CRUD API? Can't Zun talk to Magnum to work with Magnum?</div><div> </div><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 class="m_3864345211904358859WordSection1"><p class="MsoNormal"><span style="color:#1f497d"><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">[1] <a href="https://blueprints.launchpad.net/zun/+spec/k8s-integration" target="_blank">
https://blueprints.launchpad.<wbr>net/zun/+spec/k8s-integration</a><u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">Best regards,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">Hongbin<u></u><u></u></span></p>
</div>
</div>
<br>______________________________<wbr>______________________________<wbr>______________<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.<wbr>openstack.org?subject:<wbr>unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/<wbr>cgi-bin/mailman/listinfo/<wbr>openstack-dev</a><br>
<br></blockquote></div><br></div></div></div>