Step 6: Deploying an Application (CCE)
CodeArts Deploy provides visualized and automated deployment. Various deployment actions are provided to help you formulate a standard deployment process, reduce deployment costs, and improve release efficiency.
To deliver software more quickly and stably, the development team needs some self-service deployment service capabilities to reduce some subsequent maintenance work.
This section describes how Chris deploys a release package on CCE. For details about ECS-based deployment, see Step 6: Deploying an Application (ECS).
Preset Applications
There are three deployment applications preset in the sample project.
Presetting Applications |
Application Description |
---|---|
phoenix-cd-cce |
Application deployed on CCE |
phoenix-sample-standalone |
Application deployed on ECS |
phoenix-sample-predeploy |
Application for which you install dependency tools on ECS |
This section uses the phoenix-cd-cce application as an example.
Buying and Configuring CCE
In this document, Cloud Container Engine (CCE) is used.
Buy a CCE cluster on the console.
Category |
Configuration Item |
Suggestion |
---|---|---|
Basic Settings |
Billing Mode |
Select Pay-per-use. |
Cluster Version |
Select a version as required. You are advised to select the latest version. |
|
Network Settings |
Network Model |
Select Tunnel network. |
VPC |
Select an existing VPC. If no proper VPC is available in the list, click Create VPC. |
|
Master Node Subnet |
Select an existing subnet. If no proper subnet is available in the list, click Create Subnet. |
|
Container CIDR Block |
Click Auto select. |
Category |
Configuration Item |
Suggestion |
---|---|---|
Compute Settings |
Billing Mode |
Select Pay-per-use. |
Node Type |
Select Elastic Cloud Server (VM). |
|
Specifications |
Select General-purpose with 2 vCPUs and 8 GiB memory or higher. |
|
Container Engine |
Select Docker. |
|
OS |
Click Public image and select an Euler image. |
|
Node Name |
Enter a custom name. |
|
Login Mode |
Select Password. |
|
Password |
Enter a password. |
|
Network Settings |
Node IP |
Select Random. |
EIP |
Select Auto create. |
Configuring and Executing an Application
Deploy the .yaml files generated in Step 5: Building an Application in the CCE cluster one by one.
- Configure the application.
- Go to the Phoenix Mall project and choose . The built-in deployment applications of the sample project are displayed on the page.
- Find application phoenix-cd-cce. Click and choose Edit from the drop-down list.
- On the Deployment Actions tab page, complete the following configurations in each action.
Table 4 Configuring deployment actions Configuration Item
Suggestion
Cluster Name
Use the cluster name set when buying a CCE cluster.
Namespace
In this document, select default.
- Click the Parameters tab and set parameters.
Table 5 Parameters Parameter
Example Value
ci_task_name
Enter phoenix-sample-ci.
version
Use the value of version of the phoenix-sample-ci task.
- Click Save.
- Go to the CCE console. Locate the target cluster, click , click the Deployments tab, and verify that no record exists in the list.
If there are records in the list, select all records, click Delete, select all resource release options, and click Yes to clear the records in the list.
- Return to the application list page, click in the row of the phoenix-cd-cce application, and click OK in the dialog box that is displayed to start deployment.
If is displayed on the page, the deployment is successful. If the deployment fails, rectify the fault based on the failed action information and error information in logs.
- Verify the deployment result.
- Go to the CCE console.
- Locate the target cluster, click , and click the Deployments tab.
Five records are displayed on the page. All the records are in the Running state.
- Click vote to go to the details page. On the Access Mode tab page, choose .
Set the parameters by referring to Table 6, and click OK.
- Return to the list. Record the port number with a dotted line below the text in the Port/Protocol column.
Figure 1 Workload access mode
- Open a new browser page and enter http://ip: port number in the address box. The page is displayed successfully.
If ip is set to the elastic IP address bound to the node in Buying and Configuring CCE. The port number is the port number recorded in 4.d.
- Return to the Deployments page and update result (the service port is 5001) by referring to 4.c.
After the creation is successful, enter the node IP address and service port number in the address box of a new browser. The page shows a success message.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.