当前位置:网站首页>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 .
边栏推荐
- Grpc: implement service end flow restriction
- Why should I change my PC to a cloud desktop server? What are the characteristics of this server?
- What is the principle of intelligent image recognition? What are the applications of intelligent image recognition?
- Simple and beautiful weather code
- Grand summary of boutique idea plug-ins! Worth collecting
- Sorting out of key vulnerabilities identified by CMS in the peripheral management of red team (I)
- Industry experts talk about "extortion virus": how does e-government build a moat?
- [51nod] 3216 Awards
- How does the fortress machine connect to the server? Which is easy to use, fortress machine or firewall?
- LeetCode 599. Minimum index sum of two lists
猜你喜欢
![[51nod] 3047 displacement operation](/img/cb/9380337adbc09c54a5b984cab7d3b8.jpg)
[51nod] 3047 displacement operation

QT creator tips

2022-2028 global aircraft wireless intercom system industry research and trend analysis report

2022-2028 global aircraft audio control panel system industry research and trend analysis report

2022-2028 global medical coating materials industry research and trend analysis report

2022-2028 global high tibial osteotomy plate industry research and trend analysis report
![[51nod] 2653 section XOR](/img/2d/cb4bf4e14939ce432cac6d35b6a41b.jpg)
[51nod] 2653 section XOR

2022-2028 global aircraft front wheel steering system industry research and trend analysis report

What is etcd and its application scenarios
![[summary of interview questions] zj6 redis](/img/4b/eadf66ca8d834f049f3546d348fa32.jpg)
[summary of interview questions] zj6 redis
随机推荐
[summary of interview questions] zj6 redis
MySQL case deep excavation information_ Root causes of slow schema view query (Part 2)
What does the cloud desktop server do? What are the cloud desktop functions
Double 11 will arrive soon. Is your website ready?
How to design a hybrid system
Heavy release! Tencent security hosting service TA is here!
The server size of the cloud desktop. The cloud desktop faces the server configuration requirements
How to access the cloud game management server? Which cloud game management server can I choose?
Micro build low code enterprise exchange day · Shenzhen station opens registration
2022-2028 global marine wet exhaust hose industry research and trend analysis report
How does the fortress machine connect to the server? Which is easy to use, fortress machine or firewall?
2022-2028 global aircraft audio control panel system industry research and trend analysis report
How to set up a cloud desktop server? Is there a charge for cloud desktop server setup?
What are the security guarantees for cloud desktop servers? What are the cloud desktop server platforms?
Why can't cloud games connect to the server? What if the cloud game fails to connect to the server?
Why do cloud desktops use rack servers? Why choose cloud desktop?
LeetCode 205. Isomorphic Strings
Actual combat | how to use micro build low code to realize tolerance application
2022-2028 global high tibial osteotomy plate industry research and trend analysis report
An example of SPM manual binding execution plan