当前位置:网站首页>Coding CD of Devops
Coding CD of Devops
2022-06-24 03:13:00 【Baoyuanlin】
CI Article see :https://cloud.tencent.com/developer/article/1889086
Use Coding stay TKE Initial deployment of the application on , The following steps are required :
- Configure cloud account
- Configure the application
- Configure the deployment process
- Issuance of bill of lading
Configure cloud account
Only configuration TKE Authentication information of the cluster ,Coding You have the permission to deploy , Thus using Coding CD The first step is to configure the cloud account . As shown in the figure below , stay Coding Select... From the deployment console navigation bar menu 【 Cloud accounts 】, On the cloud account management page, select 【 Bind cloud accounts 】, Select Tencent cloud as the cloud account type TKE, Follow the instructions to complete the cluster binding under the cloud account name .
NOTE: The deployment console can be accessed through CODING The left navigation bar of the team home page quickly enters , For more help, see :https://help.coding.net/docs/cd/console.html
Configure the application
The application is CODING CD Basic deployment unit in ,Coding The recommended practice is that an application corresponds to a service in the microservice architecture . stay CODING Click... On the left navigation bar of the deployment console 【 application 】 Go to the application page ; Then click on 【 Create an 】 Button , Enter the application name in the pop-up create application dialog box , Deployment mode selection TKE, Then confirm to create an application
If you want to submit a release form in the project, execute the application release process , You also need to associate the application with a project . The following two figures show how to apply order-service And projects QCBM Association .
Configure the deployment process
be based on TCR Automatic triggering process of
After configuring the cloud account and Application , You can create the deployment process in the deployment console . Here's the picture , Click... On the application page order-service Enter the deployment process page , Select Create process . In the create deployment process dialog box , You can select the deployment template according to your needs . Example order-service The deployment process selects a blank process template .
Click OK in the above figure , Get into order-service Deployment process edit page . stay 【 Basic configuration 】 in , Add an automatic trigger to the process :TCR Personal warehouse triggers . say concretely , Click on “ Add trigger ” after , Select... In the trigger type “TCR Personal warehouse triggers ”, Then select a good area 、 Namespace 、 Warehouse and other information .
next , Click on 【 Basic configuration 】 Dexter 【 Add phase 】 Button , And select “ Deploy (Manifest)” .
In the deployment (Manifest) Select the cloud account configured above from the basic settings of .
Next, we will Manifest To configure ,Coding Two kinds of support manifest source : Use products and Input content .
- Use products
This method uses the pre written , And upload it to the deployment description file in the code warehouse . such as , The following figure shows the use of order-service Deployment of yaml, The yaml be located Coding Code warehouse qcbm-deployments in ( It's available through the link https://jishufanganzhongxin.coding.net/public/qcbm/qcbm-deployments/git/files/master/deployments/order-service.yaml see ).
- Input content
seeing the name of a thing one thinks of its function , Directly input the deployment of the application yaml, As shown in the figure below .
thus , be based on TCR The automatically triggered deployment process is configured , Save the configuration process as shown in the following figure .
Manually trigger the deployment process based on approval and confirmation
The last section talked about “ be based on TCR Automatic triggering process of ” For development / Test environment . For the deployment of production environment , Usually very careful , Manual approval is required 、 Post deployment validation 、 And rollback after deployment failure . This section is order-service Create a new deployment process , Realize manual confirmation 、 Rollback and other functions , See the new process shown in the figure below for details order-service-deployment-with-approve.
In the second step of process configuration , choice “ Generic type ” Under the “ Manual confirmation ”, Here's the picture :
Then add a manual confirmation message , Including confirmer and confirmation options , Here's the picture :
Fill in the confirmation information of the laborer , Add a follow-up “ Deploy Manifest” And named “ Deploy GZ-AZ3”, The configuration is described in the previous section , Skip here .
next , Steps in “ Deploy GZ-AZ3” Then add a manual confirmation step , Name it “GZ-AZ3 Deployment confirmation ”, It is used to confirm the deployment results of the three districts in Guangzhou . The following steps will be judged according to the confirmation results of this step , If the confirmation is passed , Continue to deploy the four districts of Guangzhou , Otherwise, roll back to the third district of Guangzhou .
Next , Add the steps to continue to deploy the Fourth District of Guangzhou , For the basic configuration of this step, see... In the previous section “ Deploy Manifest” Description of . The difference is this , This step needs to judge whether to continue according to the confirmation result of the previous step . here , You need to configure... For the step “ Execution Options ”, As shown in the figure below . Here you need to check “ Conditional expression ” And configure the following expression statement :
${#judgment("GZ-AZ3 Deployment confirmation ") == ' Deployment success , Continue deployment AZ4'} Current step “GZ-AZ3 Deployment confirmation ” in , The user selected the option “ Deployment success , Continue deployment AZ4”, Then the above expression is true , This step will continue , Otherwise skip this step .
Next, add a rollback step , stay “GZ-AZ3 Deployment confirmation ” Add a new step after , Type selection “ Roll back (Manifest)”, And named it “ Roll back GZ-AZ3” . Roll back Manifest Configure the cloud account selection AZ3 TKE The cloud account corresponding to the cluster ( See cloud account configuration in Section 2 ); The resource type is selected according to the actual situation , because AZ3 Use K8S Deployment Deployed , So here we choose deployment; Select... From the resource name order-service( If there is no such option , Enter a resource name manually according to the following figure ).
continue “ Roll back GZ-AZ3” Configuration of . The next step is to configure the number of fallback versions and conditional expressions . The number of fallback versions is 1 , Indicates rollback to the previous version docker Mirror image . The configuration of condition expression is as follows :
${#judgment("GZ-AZ3 Deployment confirmation ") == ' Deployment failed , Roll back AZ3'} thus , The deployment process with approval and manual confirmation has been configured .
Release sheet
The above describes how to configure the publishing process in the deployment console , When publishing coding A release sheet will be created to record the process and results of each release , Whether the deployment is triggered automatically or manually .
Here's how to Coding Manual deployment in . First , Get into qcbm project , Find... In the navigation bar on the left “ Continuous deployment ”, Re selection “Kubernetes”, The window on the right will all Kubernetes Application deployment process , As shown in the figure below .
In the diagram above , Click on order-service Under the “ Release sheet ” Button , Get into order-service Release list , Here's the picture :
In the diagram above , Click on “ New release ” Under the selection box “ Create a new release form ”, Select the deployment process in the pop-up dialog box :order-service-deployment-with-approve, Other configurations remain the default .
边栏推荐
- The cost of on-site development of software talent outsourcing is higher than that of software project outsourcing. Why
- Why does the fortress machine use an application publisher? What are the main functions of the fortress machine
- LeetCode 205. Isomorphic Strings
- 2022-2028 global cell-based seafood industry research and trend analysis report
- Highlights of future cloud native CIF Forum
- What is the role of the distributed configuration center? What are the advantages of a distributed configuration center?
- What protocol does FTP belong to in Fortress machine and how to use FTP in Fortress machine
- 2022-2028 global tungsten copper alloy industry research and trend analysis report
- Tencent Youtu won the champion of iccv2021 LVIs challenge workshop and the best innovation award of the project
- [Tencent cloud] how can the MySQL database on the cloud fully back up the data base script?
猜你喜欢
![[summary of interview questions] zj5](/img/d8/ece82f8b2479adb948ba706f6f5039.jpg)
[summary of interview questions] zj5

2022-2028 global portable two-way radio equipment industry research and trend analysis report

Sorting out of key vulnerabilities identified by CMS in the peripheral management of red team (I)

2022-2028 global indoor pressure monitor and environmental monitor industry research and trend analysis report

2022-2028 global cell-based seafood industry research and trend analysis report
![[51nod] 3216 Awards](/img/94/fdb32434d1343040d711c76568b281.jpg)
[51nod] 3216 Awards
![[51nod] 3395 n-bit gray code](/img/b5/2c072a11601de82cb92ade94672ecd.jpg)
[51nod] 3395 n-bit gray code

Permission maintenance topic: domain controller permission maintenance

2022-2028 global marine wet exhaust hose industry research and trend analysis report

2022-2028 global aircraft front wheel steering system industry research and trend analysis report
随机推荐
If the cloud knows that security is important
Shopee Clickhouse cold and hot data separation storage architecture and Practice
How to set up a cloud desktop server? Is there a charge for cloud desktop server setup?
[51nod] 3216 Awards
Grpc: based on cloud native environment, distinguish configuration files
The cost of on-site development of software talent outsourcing is higher than that of software project outsourcing. Why
2022-2028 global cancer biopsy instrument and kit industry research and trend analysis report
QT creator tips
Ligature in font design
Tencent cloud CVM starts IPv6
What is fortress resource authorization? What is barrier machine?
What if the computer audio and video engine is abnormal? What are the causes of abnormal computer audio and video engine?
2022-2028 global aircraft wireless intercom system industry research and trend analysis report
2022-2028 global medical modified polypropylene industry research and trend analysis report
Tencent cloud launched its new 100g+ cloud server product!! Expect more than 400g+ in the future!
2022-2028 global marine wet exhaust hose industry research and trend analysis report
What is the GPU usage for cloud desktops and servers? What can cloud desktop do?
Cloud desktop server resource planning, what are the advantages of cloud desktop
Cloud call: one line of code is directly connected to wechat open interface capability
[51nod] 2106 an odd number times