<div dir="ltr">I believe we can add Glare driver to Zun [1] and allow it to pull container images from Glare directly. Then, as Kairat mentioned, we should prepare 'container-images' artifact type for Glare [2]. For sure, we can use 'images' (which are actually vm images) to store containers, but it's ugly, because virtual machine is not exactly the same as container. If it's required let me know, and I'll propose related patches to Zun and Glare.<div><br></div><div>Best,</div><div>Mike<br><div><br></div><div>[1] <a href="https://github.com/openstack/zun/tree/master/zun/image">https://github.com/openstack/zun/tree/master/zun/image</a><br></div><div>[2] <a href="https://github.com/openstack/glare/tree/master/glare/objects">https://github.com/openstack/glare/tree/master/glare/objects</a></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 16, 2016 at 3:36 PM, Kairat Kushaev <span dir="ltr"><<a href="mailto:kkushaev@mirantis.com" target="_blank">kkushaev@mirantis.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello Denis,<div>unfortunately, I don't have deep knowledge of Zun so i can speak from Glare side only.<br><div>So Glare can serve as some kind of artifact storage for container files but we need to define artifact structure first.</div><div>Please note that artifact is immutable after activation so once you need to change some files you need to create new artifact.</div><div>Also there is possibility to store container images in Glare also but this requires an integration from Zun to consume blobs from Glare.</div><div>So it requires some improvements outside Glare.</div></div></div><div class="gmail_extra"><br clear="all"><div><div class="m_6936203197040252043gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr">Best regards,<div>Kairat Kushaev</div></div></div></div></div></div>
<br><div class="gmail_quote"><div><div class="h5">On Tue, Dec 13, 2016 at 8:16 PM, Hongbin Lu <span dir="ltr"><<a href="mailto:hongbin.lu@huawei.com" target="_blank">hongbin.lu@huawei.com</a>></span> 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">





<div lang="EN-CA" link="blue" vlink="purple">
<div class="m_6936203197040252043m_1846641255330142608WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Denis,<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">Per my understanding, container image building is out of the scope of the Zun project. Zun assumes an image has been built and uploaded to a image repository
 (i.e. Glance, docker registry), then the image will be pulled down from the repo to host. However, feel free to let us know if anything else we can do.<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> December-12-16 4:51 PM<br>
<b>To:</b> OpenStack Development Mailing List (not for usage questions)<br>
<b>Subject:</b> [openstack-dev] [Zun][Glare][Glance] Building Docker images<u></u><u></u></span></p>
</div>
</div><div><div class="m_6936203197040252043h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p style="margin:0cm;margin-bottom:.0001pt;text-align:justify;text-justify:inter-ideograph">
<span style="font-size:11.0pt;font-family:"Arial","sans-serif";color:black">Hello to All.</span><u></u><u></u></p>
<p class="MsoNormal" style="text-align:justify;text-justify:inter-ideograph"><u></u> <u></u></p>
<p style="margin:0cm;margin-bottom:.0001pt;text-align:justify;text-justify:inter-ideograph;text-indent:36.0pt">
<span style="font-size:11.0pt;font-family:"Arial","sans-serif";color:black">I’d like to get initial feedback on the idea of building Docker images through Zun involving Glare as artifactory for all static components required for image.</span><u></u><u></u></p>
<p style="margin:0cm;margin-bottom:.0001pt;text-align:justify;text-justify:inter-ideograph">
<span class="m_6936203197040252043m_1846641255330142608gmail-apple-tab-span"><span style="font-size:11.0pt;font-family:"Arial","sans-serif";color:black">         
</span></span><span style="font-size:11.0pt;font-family:"Arial","sans-serif";color:black">So, the idea here is in being capable to build a Docker image through Zun API with storing all static data required for docker image building in Glare or Swift. In order
 to keep the same UX from using Docker it would be better to use Dockerfile as description format for image building.</span><u></u><u></u></p>
<p style="margin:0cm;margin-bottom:.0001pt;text-align:justify;text-justify:inter-ideograph">
<span class="m_6936203197040252043m_1846641255330142608gmail-apple-tab-span"><span style="font-size:11.0pt;font-family:"Arial","sans-serif";color:black">         
</span></span><span style="font-size:11.0pt;font-family:"Arial","sans-serif";color:black">In image creation process Glare could take role of artifactory, where users stores, let’s say source code of his applications that would run in containers, static data,
 etc. And those artifacts will be pulled during image creation and used to inject into image (similar process of context creation during Docker image building using native CLI). Please note that artifacts are completely optional for images, but would give a
 capability to keep artifacts in dedicated storage instead of transferring all data through Zun API (the opposite concept to Docker build context).</span><u></u><u></u></p>
<p class="MsoNormal" style="text-align:justify;text-justify:inter-ideograph"><u></u> <u></u></p>
<p style="margin:0cm;margin-bottom:.0001pt;text-align:justify;text-justify:inter-ideograph">
<span class="m_6936203197040252043m_1846641255330142608gmail-apple-tab-span"><span style="font-size:11.0pt;font-family:"Arial","sans-serif";color:black">         
</span></span><span style="font-size:11.0pt;font-family:"Arial","sans-serif";color:black">Once image is created, it can be stored in underlying Docker in Zun or can be published into Glance or Swift for further consumption (if user will need to save image,
 he’ll use Glance image download API). I’ve mentioned Swift VS Glance because Swift has concept of temp URLs that can be accessed without being authorized. Such feature allows to use Swift as storage from where possible to export image to Docker using Import
 API [1].</span><u></u><u></u></p>
<p class="MsoNormal" style="text-align:justify;text-justify:inter-ideograph"><u></u> <u></u></p>
<p class="MsoNormal" style="text-align:justify;text-justify:inter-ideograph"><u></u> <u></u></p>
<p style="margin:0cm;margin-bottom:.0001pt;text-align:justify;text-justify:inter-ideograph">
<span style="font-size:11.0pt;font-family:"Arial","sans-serif";color:black">Any feedback on the idea is appreciated.</span><u></u><u></u></p>
<p class="MsoNormal" style="text-align:justify;text-justify:inter-ideograph"><u></u> <u></u></p>
<p style="margin:0cm;margin-bottom:.0001pt;text-align:justify;text-justify:inter-ideograph">
<span style="font-size:11.0pt;font-family:"Arial","sans-serif";color:black">Kind regards,</span><u></u><u></u></p>
<p style="margin:0cm;margin-bottom:.0001pt;text-align:justify;text-justify:inter-ideograph">
<span style="font-size:11.0pt;font-family:"Arial","sans-serif";color:black">Denis Makogon</span><u></u><u></u></p>
<p class="MsoNormal" style="text-align:justify;text-justify:inter-ideograph"><u></u> <u></u></p>
<p style="margin:0cm;margin-bottom:.0001pt;text-align:justify;text-justify:inter-ideograph">
<span style="font-size:11.0pt;font-family:"Arial","sans-serif";color:black">[1] </span>
<a href="https://docs.docker.com/engine/reference/commandline/import/" target="_blank"><span style="font-size:11.0pt;font-family:"Arial","sans-serif";color:#1155cc">https://docs.docker.com/engine<wbr>/reference/commandline/import/</span></a><u></u><u></u></p>
</div>
</div></div></div>
</div>
</div>

<br></div></div>______________________________<wbr>______________________________<wbr>______________<span class=""><br>
OpenStack Development Mailing List (not for usage questions)<br></span>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.op<wbr>enstack.org?subject:unsubscrib<wbr>e</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi<wbr>-bin/mailman/listinfo/openstac<wbr>k-dev</a><br>
<br></blockquote></div><br></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>