forked from docs/doc-exports
Reviewed-by: Eotvos, Oliver <oliver.eotvos@t-systems.com> Co-authored-by: Dong, Qiu Jian <qiujiandong1@huawei.com> Co-committed-by: Dong, Qiu Jian <qiujiandong1@huawei.com>
61 lines
7.0 KiB
HTML
61 lines
7.0 KiB
HTML
<a name="cce_bestpractice_0003"></a><a name="cce_bestpractice_0003"></a>
|
|
|
|
<h1 class="topictitle1">Containerizing an Entire Application</h1>
|
|
<div id="body1513917418808"><p id="cce_bestpractice_0003__p12700181618115">This tutorial describes how to containerize an ERP system by migrating it from a VM to CCE.</p>
|
|
<p id="cce_bestpractice_0003__p9741112611219">No recoding or re-architecting is required. You only need to pack the entire application into a container image and deploy the container image on CCE.</p>
|
|
<div class="section" id="cce_bestpractice_0003__section162176531261"><h4 class="sectiontitle">Introduction</h4><p id="cce_bestpractice_0003__p144592417364">In this example, the <span class="uicontrol" id="cce_bestpractice_0003__uicontrol114568127895852"><b>enterprise management application</b></span> is developed by enterprise A. This application is provided for third-party enterprises for use, and enterprise A is responsible for application maintenance.</p>
|
|
<p id="cce_bestpractice_0003__p154911228173318">When a third-party enterprise needs to use this application, a suit of <span class="uicontrol" id="cce_bestpractice_0003__uicontrol194621116394"><b>Tomcat application</b></span> and <span class="uicontrol" id="cce_bestpractice_0003__uicontrol1337122510911"><b>MongoDB database</b></span> must be deployed for the third-party enterprise. The MySQL database, used to store data of third-party enterprises, is provided by enterprise A.</p>
|
|
<div class="fignone" id="cce_bestpractice_0003__fig78809934014"><a name="cce_bestpractice_0003__fig78809934014"></a><a name="fig78809934014"></a><span class="figcap"><b>Figure 1 </b>Application architecture</span><br><span><img class="vsd" id="cce_bestpractice_0003__image087553211216" src="en-us_image_0000001851585812.png"></span></div>
|
|
<p id="cce_bestpractice_0003__p57605308298">As shown in <a href="#cce_bestpractice_0003__fig78809934014">Figure 1</a>, the application is a standard Tomcat application, and its backend interconnects with MongoDB and MySQL databases. For this type of applications, there is no need to split the architecture. The entire application is built as an image, and the MongoDB database is deployed in the same image as the Tomcat application. In this way, the application can be deployed or upgraded through the image.</p>
|
|
<ul id="cce_bestpractice_0003__ul99852318293"><li id="cce_bestpractice_0003__li20537103562913">Interconnecting with the MongoDB database for storing user files.</li><li id="cce_bestpractice_0003__li15091358153219">Interconnecting with the MySQL database for storing third-party enterprise data. The MySQL database is an external cloud database.</li></ul>
|
|
</div>
|
|
<div class="section" id="cce_bestpractice_0003__section15798151011249"><h4 class="sectiontitle">Benefits</h4><p id="cce_bestpractice_0003__p666041353118">In this example, the application was deployed on a VM. During application deployment and upgrade, a series of problems is encountered, but application containerization has solved these problems.</p>
|
|
<p id="cce_bestpractice_0003__p12574171343216">By using containers, you can easily pack application code, configurations, and dependencies and convert them into easy-to-use building blocks. This achieves the environmental consistency and version management, as well as improves the development and operation efficiency. Containers ensure quick, reliable, and consistent deployment of applications and prevent applications from being affected by deployment environment.</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="cce_bestpractice_0003__table349616204372" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Comparison between the two deployment modes</caption><thead align="left"><tr id="cce_bestpractice_0003__row18497202053716"><th align="left" class="cellrowborder" valign="top" width="18%" id="mcps1.3.4.4.2.4.1.1"><p id="cce_bestpractice_0003__p10896134318384">Category</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="36%" id="mcps1.3.4.4.2.4.1.2"><p id="cce_bestpractice_0003__p1749714207376">Before: Application Deployment on VM</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="46%" id="mcps1.3.4.4.2.4.1.3"><p id="cce_bestpractice_0003__p849772083717">After: Application Deployment Using Containers</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="cce_bestpractice_0003__row1249762010375"><td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.4.4.2.4.1.1 "><p id="cce_bestpractice_0003__p1789764318387">Deployment</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="36%" headers="mcps1.3.4.4.2.4.1.2 "><p id="cce_bestpractice_0003__p18586947142115">High deployment cost.</p>
|
|
<p id="cce_bestpractice_0003__p1851782102014">A VM is required for deploying a system for a customer.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="46%" headers="mcps1.3.4.4.2.4.1.3 "><p id="cce_bestpractice_0003__p18497122063720">More than 50% cost reduced.</p>
|
|
<p id="cce_bestpractice_0003__p3379185317201">Container services achieve multi-tenant isolation, which allows you to deploy systems for different enterprises on the same VM.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="cce_bestpractice_0003__row204971520193719"><td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.4.4.2.4.1.1 "><p id="cce_bestpractice_0003__p9897943133813">Upgrade</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="36%" headers="mcps1.3.4.4.2.4.1.2 "><p id="cce_bestpractice_0003__p61906812213">Low upgrade efficiency.</p>
|
|
<p id="cce_bestpractice_0003__p1649819207370">During version upgrades, log in to VMs one by one and manually configure the upgrades, which is inefficient and error-prone.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="46%" headers="mcps1.3.4.4.2.4.1.3 "><p id="cce_bestpractice_0003__p66881228172215">Per-second level upgrade.</p>
|
|
<p id="cce_bestpractice_0003__p156241728163913">Version upgrades can be completed within seconds by replacing the image tag. In addition, CCE provides rolling updates, ensuring zero service downtime during upgrades.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="cce_bestpractice_0003__row13162748112611"><td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.4.4.2.4.1.1 "><p id="cce_bestpractice_0003__p181621148122620">Operation and maintenance (O&M)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="36%" headers="mcps1.3.4.4.2.4.1.2 "><p id="cce_bestpractice_0003__p14156193914228">High O&M cost.</p>
|
|
<p id="cce_bestpractice_0003__p171631148102619">As the number of applications deployed for customer grows, the number of VMs that need to be maintained increases accordingly, which requires a large sum of maintenance cost.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="46%" headers="mcps1.3.4.4.2.4.1.3 "><p id="cce_bestpractice_0003__p20411442202215">Automatic O&M</p>
|
|
<p id="cce_bestpractice_0003__p10163104822611">Enterprises can focus on service development without paying attention to VM maintenance.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="cce_bestpractice_0340.html">Procedure</a></div>
|
|
</div>
|
|
</div>
|
|
|