Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the landing practice of enterprise CI/CD tools deploying Serverless applications?

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

In this issue, the editor will bring you about the landing practice of enterprise-level CI/CD tools to deploy Serverless applications. The article is rich in content and analyzes and describes it from a professional point of view. I hope you can get something after reading this article.

Background knowledge

Through the study of the previous courses, I believe you have a certain understanding of the SAE platform. SAE frees customers from a lot of complex operation and maintenance work, out of the box and pay by usage; at the same time, SAE provides rich Open API, which can be easily integrated with other platforms; CI/CD tools like Cloud effect and Jenkins are an important part of agile software development practice, which can automatically compile, test, package and deploy customer code to various environments, thus improving the R & D efficiency of the team.

The article is divided into two parts, first introduces the use of cloud effect platform to achieve continuous integration from source code to SAE environment, and then introduces how to configure continuous integration using Jenkins.

Deploy to SAE using cloud effect

Rdc.console.aliyun.com is an enterprise-class one-stop Devops platform product launched by Aliyun, with features covering the whole process from [requirements-> Development-> Test-> release-> Operation and maintenance-> Operation]. Students who are interested in Cloud effect can go to [Aliyun's official website] to search for [Cloud effect]. This article only introduces some features related to CI/CD.

As shown in the figure above, the top half of the figure is our configuration process, and the flowchart in the lower half is an example of the continuous integration process we are going to perform. Cloud effect first pulls the corresponding code from the code repository, then performs code review and unit testing, and then compiles and builds the code, which produces the corresponding product: here we use a java application as an example. If the jar type is selected for the build product, then the pipeline runs the mvn package command at run time to produce the corresponding jar package. If the build product type is a Docker image, after the jar package is produced, continue to execute the docker build command to build the corresponding Docker image and upload it to the ACR image repository of your choice The last two steps of the pipeline are to call the Open API of SAE to distribute the build (jar package / Docker image) to the test environment. According to our pre-setting, after deploying the test environment, the pipeline will stop and wait for the next step to be triggered manually; after manually verifying that everything is normal for the test environment, the manual trigger pipeline will continue to run. This time, Open API will be called to deploy to the production environment.

Procedure:

First of all, make sure that the compilation and packaging configuration of the code is correct, and it can be compiled and packaged successfully locally. If it is deployed in a mirror mode, then the corresponding Dockerfile configuration under the root directory of the project will be required.

Create the corresponding application in the SAE console. Please note that if there are multi-environment deployment requirements, such as deployment to test (test) or product (production) environment, first create the corresponding test namespace and product namespace and create the application in the namespace.

Make the corresponding configuration in the cloud effect, including source code warehouse configuration and pipeline configuration. For specific configuration details, please refer to the corresponding product help documentation.

The last step is to click "run" to trigger the pipeline to perform compilation and deployment.

Deploy SAE using Jenkins

Jenkins is an open source CI/CD platform widely used in the industry. With Jenkins, the source code can be packaged and compiled and deployed to SAE. The final effect is similar to "deploying to SAE through cloud products". The application source code is compiled into a jar package through Jenkins, and then maven plugin is used to call SAE's Open API deployment interface to deploy the application to SAE.

Procedure:

There is a corresponding packaging configuration in the code base. When using Jenkins, the output build we packaged is the jar package, so here we are required to have the corresponding maven configuration file pom.xml in the root directory of the project.

Before deployment, you need to create the corresponding command space and applications in the SAE platform, and complete the application configuration by initializing the deployment.

Complete the configuration of the corresponding Docker plug-in in Jenkins, while creating and configuring the corresponding Project;Project in Jenkins can be configured to trigger compilation and deployment when the code is manually triggered or configured to submit code.

The above is what the enterprise CI/CD tool deployment Serverless application landing practice that Xiaobian shared for you is like. If you happen to have similar doubts, please refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report