Files
doc-exports/docs/cce/umn/cce_01_9997.html
Dong, Qiu Jian b05d81fd8b CCE UMN for 1.23 reuploaded -20221103
Reviewed-by: gtema <artem.goncharov@gmail.com>
Co-authored-by: Dong, Qiu Jian <qiujiandong1@huawei.com>
Co-committed-by: Dong, Qiu Jian <qiujiandong1@huawei.com>
2022-11-10 19:50:29 +00:00

24 lines
4.2 KiB
HTML

<a name="cce_01_9997"></a><a name="cce_01_9997"></a>
<h1 class="topictitle1">Migrating Images</h1>
<div id="body0000001151315264"><p id="cce_01_9997__p21226393161">Migrate the images stored in the image repository of CCE 1.0 to CCE 2.0.</p>
<div class="section" id="cce_01_9997__section84133634315"><h4 class="sectiontitle">Prerequisites</h4><ul id="cce_01_9997__ul0336713174317"><li id="cce_01_9997__li53361913104311">A VM is available. The VM is bound to a public IP address and can access the Internet. Docker (earlier than 1706) and jq have been installed on the VM.</li><li id="cce_01_9997__li633631324313">Configure an access whitelist for Docker, and add the access addresses of the image repositories of CCE 1.0 and CCE 2.0 to the <strong id="cce_01_9997__b19987142012504">--insecure-registry</strong> parameter of Docker.</li></ul>
</div>
<div class="section" id="cce_01_9997__section924789174410"><h4 class="sectiontitle">Procedure</h4><ol id="cce_01_9997__ol1275145448"><li id="cce_01_9997__li209273331444"><span>Obtain a docker login command from the image repository page of CCE 2.0.</span><p><ol type="a" id="cce_01_9997__ol119961642104414"><li id="cce_01_9997__li999674224411">Log in to the CCE 2.0 console. In the navigation pane, choose <strong id="cce_01_9997__b1047516526553">Image Repository</strong>.</li><li id="cce_01_9997__li3996204218442">In the image repository list, click the name of the target image repository. On the <strong id="cce_01_9997__b23071644145613">Pull/Push Guide</strong> tab page, click <strong id="cce_01_9997__b12836125075615">Generate the Docker login command</strong>.<div class="fignone" id="cce_01_9997__fig189316715118"><span class="figcap"><b>Figure 1 </b>Generate the Docker login command</span><br><span><img id="cce_01_9997__image108931871216" src="en-us_image_0000001178352594.png"></span></div>
</li></ol>
</p></li><li id="cce_01_9997__li131459664515"><span>Log in to the CCE 1.0 console, and obtain the docker login configuration file <strong id="cce_01_9997__b710485065716">dockercfg.json</strong>.</span><p><div class="fignone" id="cce_01_9997__fig613012571010"><span class="figcap"><b>Figure 2 </b>Obtain the docker login configuration file</span><br><span><img id="cce_01_9997__image16130185715111" src="en-us_image_0000001223473833.png"></span></div>
</p></li><li id="cce_01_9997__li1613482412453"><span>Log in to the Docker client as user <strong id="cce_01_9997__b81482717584">root</strong>, and copy the <strong id="cce_01_9997__b14681143819589">dockercfg.json</strong> file obtained in Step 2 and the image migration tool to the <strong id="cce_01_9997__b8856154845819">/root</strong> directory.</span></li><li id="cce_01_9997__li19134162418452"><span>In the <strong id="cce_01_9997__b1331714219391">/root</strong> directory, create a file named <strong id="cce_01_9997__b2730131553914">image_list</strong>. In the file, write the images to be migrated in the following format. Each image occupies a row.</span><p><p id="cce_01_9997__p613412420456">For example, write the BusyBox image into the <strong id="cce_01_9997__b128019716439">image_list</strong> file as follows:</p>
<pre class="screen" id="cce_01_9997__screen313502494519">10.44.200.121:443/otc0***507/busybox:latest</pre>
</p></li><li id="cce_01_9997__li513582410458"><span>Run the following command to automatically migrate the images to the image repository of CCE 2.0:</span><p><p id="cce_01_9997__p61358242451"><strong id="cce_01_9997__b5135132444511">bash migrate.sh</strong> "<em id="cce_01_9997__i1713517240456">{</em><em id="cce_01_9997__i213522484513">The login command obtained in </em><em id="cce_01_9997__i14135824124517">Step 1</em>"</p>
<p id="cce_01_9997__p713518247458">After the preceding command is executed, go to the image repository of CCE 2.0. You can find that images have been successfully pushed.</p>
<div class="fignone" id="cce_01_9997__fig24406151937"><span class="figcap"><b>Figure 3 </b>Migrate the image</span><br><span><img id="cce_01_9997__image344018150318" src="en-us_image_0000001223393885.png"></span></div>
</p></li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="cce_01_9999.html">Migrating Data from CCE 1.0 to CCE 2.0</a></div>
</div>
</div>