<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body dir="auto">
<div>Hongbin,</div>
<div id="AppleMailSignature"><br>
</div>
<div id="AppleMailSignature">Both of approaches you suggested may only work for one binary format. If you try to use docker on a different system architecture, the pre-cache of images makes it even more difficult to get the correct images built and loaded. </div>
<div id="AppleMailSignature"><br>
</div>
<div id="AppleMailSignature">I suggest we take an approach that allows the Baymodel creator to specify a docker registry and/or prefix that will determine where docker images are pulled from if they are not found in the local cache. That would give cloud operators
 the option to set up such a registry locally and populate it with the right images. This approach would also make it easier to customize the Magnum setup by tweaking the container images prior to use.<br>
<br>
Thanks,</div>
<div id="AppleMailSignature"><br>
<div>Adrian</div>
</div>
<div><br>
On Apr 19, 2016, at 11:58 AM, Hongbin Lu <<a href="mailto:hongbin.lu@huawei.com">hongbin.lu@huawei.com</a>> wrote:<br>
<br>
</div>
<blockquote type="cite">
<div>
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"\@SimSun";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Eli,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">The approach of pre-pulling docker images has a problem. It only works for specific docker storage driver. In comparison, the tar file approach is portable
 across different storage drivers.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Best regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hongbin<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></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";color:windowtext">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext"> taget [<a href="mailto:qiaoliyong@gmail.com">mailto:qiaoliyong@gmail.com</a>]
<br>
<b>Sent:</b> April-19-16 4:26 AM<br>
<b>To:</b> <a href="mailto:openstack-dev@lists.openstack.org">openstack-dev@lists.openstack.org</a><br>
<b>Subject:</b> Re: [openstack-dev] [Magnum]Cache docker images<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">hi hello again<br>
<br>
I believe you are talking about this bp <a href="https://blueprints.launchpad.net/magnum/+spec/cache-docker-images">
https://blueprints.launchpad.net/magnum/+spec/cache-docker-images</a><br>
then ignore my previous reply, that may another topic to solve network limited problem.<br>
<br>
I think you are on the right way to build docker images but this image could only bootstrap by cloud-init, without cloud-init<br>
the container image tar file are not loaded at all, but seems this may not be the best way.<br>
<br>
I'v suggest that may be the best way is we pull docker images while building atomic-image. Per my understanding, the<br>
image build process is we mount the image to read/write mode to some tmp directory and chroot to to that dircetory,<br>
we can do some custome operation there.<br>
<br>
I can do a try on the build progress(guess rpm-ostree should support some hook scripts)<br>
<br>
<o:p></o:p></p>
<div>
<p class="MsoNormal">On 2016<span lang="ZH-CN" style="font-family:SimSun">年</span>04<span lang="ZH-CN" style="font-family:SimSun">月</span>19<span lang="ZH-CN" style="font-family:SimSun">日</span> 11:41, Eli Qiao wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal" style="margin-bottom:12.0pt">@wanghua<br>
<br>
I think there were some discussion already , check <a href="https://blueprints.launchpad.net/magnum/+spec/support-private-registry">
https://blueprints.launchpad.net/magnum/+spec/support-private-registry</a><br>
and <a href="https://blueprints.launchpad.net/magnum/+spec/allow-user-softwareconfig">
<span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#0033AA;text-decoration:none">https://blueprints.launchpad.net/magnum/+spec/allow-user-softwareconfig</span></a><o:p></o:p></p>
<div>
<p class="MsoNormal">On 2016<span lang="ZH-CN" style="font-family:SimSun">年</span>04<span lang="ZH-CN" style="font-family:SimSun">月</span>19<span lang="ZH-CN" style="font-family:SimSun">日</span> 10:57,
<span lang="ZH-CN" style="font-family:SimSun">王华</span> wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal">Hi all, <o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<p class="MsoNormal">We want to eliminate pulling docker images over the Internet on bay provisioning. There are two problems of this approach:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">1. Pulling docker images over the Internet is slow and fragile.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">2. Some clouds don't have external Internet access.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">It is suggested to build all the required images into the cloud images to resolved the issue.<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Here is a solution:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">We export the docker images as tar files, and put the tar files into a dir in the image when we build the image. And we add scripts to load the tar files in cloud-init, so that we don't need to download the docker images.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Any advice for this solution or any better solution?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Regards,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Wanghua<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><br>
<br>
<br>
<o:p></o:p></p>
<pre>__________________________________________________________________________<o:p></o:p></pre>
<pre>OpenStack Development Mailing List (not for usage questions)<o:p></o:p></pre>
<pre>Unsubscribe: <a href="mailto:OpenStack-dev-request@lists.openstack.org?subject:unsubscribe">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><o:p></o:p></pre>
<pre><a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><o:p></o:p></pre>
</blockquote>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<pre>-- <o:p></o:p></pre>
<pre>Best Regards, Eli Qiao (<span lang="ZH-CN" style="font-family:SimSun">乔立勇</span>)<o:p></o:p></pre>
<pre>Intel OTC China<o:p></o:p></pre>
<p class="MsoNormal"><br>
<br>
<br>
<o:p></o:p></p>
<pre>__________________________________________________________________________<o:p></o:p></pre>
<pre>OpenStack Development Mailing List (not for usage questions)<o:p></o:p></pre>
<pre>Unsubscribe: <a href="mailto:OpenStack-dev-request@lists.openstack.org?subject:unsubscribe">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><o:p></o:p></pre>
<pre><a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><o:p></o:p></pre>
</blockquote>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<pre>-- <o:p></o:p></pre>
<pre>Best Regards, Eli Qiao (<span lang="ZH-CN" style="font-family:SimSun">乔立勇</span>)<o:p></o:p></pre>
</div>
</div>
</div>
</blockquote>
<blockquote type="cite">
<div><span>__________________________________________________________________________</span><br>
<span>OpenStack Development Mailing List (not for usage questions)</span><br>
<span>Unsubscribe: <a href="mailto:OpenStack-dev-request@lists.openstack.org">OpenStack-dev-request@lists.openstack.org</a>?subject:unsubscribe</span><br>
<span><a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a></span><br>
</div>
</blockquote>
</body>
</html>