Implementation method, system and equipment of no-service computing platform and storage medium
By initializing various components in a serviceless computing platform and providing full-process management, the problems of configuration complexity and insufficient management in the existing technology are solved, and more efficient and flexible serviceless computing development and deployment are achieved, lowering the technical threshold for users.
Patent Information
- Application Number
- CN202411916159.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2044-12-24
AI Technical Summary
When integrating Kubernetes, the existing serviceless computing platform has problems such as complex YAML configuration, lack of unified monitoring tools, resource scheduling and management limitations, and insufficient management of the entire process, resulting in high difficulty and low efficiency of users.
It provides an implementation method of a serviceless computing platform. By initializing various components, providing online coding and container image deployment methods, implementing full-process management from code editing to function release, simplifying configuration solutions, and providing some monitoring functions to improve system availability and reliability.
By simplifying configuration and providing full-process management, the technical threshold for users to use serviceless computing is reduced, development efficiency and system availability are improved, and the combination of Kubernetes and serviceless computing platforms is enhanced.
Smart Images

Figure CN119829213A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Internet technology, and more specifically, to an implementation method, system, device and storage medium of a serverless computing platform. Background Art
[0002] With the rapid development of information technology, especially the widespread application of cloud computing and big data technologies, enterprises are facing new challenges and opportunities in software development and deployment. Traditional application development models often require developers to focus on the management and maintenance of the underlying infrastructure, which not only increases the complexity of development, but also limits the speed and flexibility of development. Therefore, more and more enterprises are beginning to explore serverless computing as an emerging computing model to achieve more efficient development and operation and maintenance.
[0003] Serverless computing is a cloud computing model that allows developers to focus on writing business logic without having to manage servers or infrastructure. Users only need to focus on writing code, and cloud service providers are responsible for automating resource allocation, load balancing, monitoring, and fault recovery. This model reduces operating costs by allocating resources on demand, while improving the scalability and flexibility of the system. The rise of serverless computing is due to the following factors:
[0004] Rapid development and deployment: Developers can quickly build and release applications to respond to changes in market demand.
[0005] Cost-effectiveness: Users pay based on actual usage, avoiding waste of resources.
[0006] Automatic expansion: The system can automatically adjust resources according to traffic fluctuations to ensure high availability of applications.
[0007] As an open source container orchestration platform, Kubernetes has become a core component of modern cloud computing architecture. It provides powerful container management, scheduling and automation capabilities, allowing developers to efficiently deploy and manage containerized applications. The main advantages of Kubernetes include: elasticity and scalability. Kubernetes can automatically expand and reduce application instances according to load to ensure efficient use of system resources; self-healing ability. When a failure occurs, Kubernetes can automatically restart or replace the failed instance to ensure the continuous availability of services; rich ecosystem. Kubernetes has a large number of open source tools and plug-ins, supports monitoring, log management, service mesh and other functions, greatly improving operation and maintenance efficiency.
[0008] The advantages of integrating Kubernetes with serverless computing are mainly reflected in the following aspects:
[0009] 1. Flexibility and scalability: Kubernetes' container orchestration capabilities combined with serverless computing's on-demand resource management can provide developers with greater flexibility. Through Kubernetes, developers can dynamically allocate and manage resources in a serverless architecture to ensure service stability and availability under high load conditions.
[0010] 2. Simplify development and operation and maintenance: Serverless computing allows developers to focus on business logic, while Kubernetes is responsible for the management of the underlying infrastructure. After integration, operation and maintenance work will be further simplified, reducing technical complexity and thus improving development efficiency.
[0011] 3. Event-driven architecture: Kubernetes can be seamlessly integrated with the serverless computing platform and supports event-driven application development. Developers can run serverless functions on Kubernetes and respond to various events (such as HTTP requests, message queues, etc.), thereby achieving efficient workflow and business logic processing.
[0012] 4. Cost-effectiveness: By integrating the on-demand billing model of serverless computing with the resource optimization capabilities of Kubernetes, enterprises can significantly reduce infrastructure costs while maintaining high availability. Kubernetes's automated resource management can reduce idle resources and improve return on investment.
[0013] 5. Unified management platform: After integration, enterprises can manage containerized applications and serverless functions on a unified platform, simplifying operations such as monitoring, logging, and security management. This unified management method helps improve overall operation and maintenance efficiency and reduce the complexity caused by managing multiple platforms.
[0014] 6. Improved developer experience: After integrating Kubernetes and serverless computing, developers can build, test, and deploy applications more conveniently. Whether it is a containerized application or a serverless function, developers can enjoy a consistent development environment and tool chain, thereby improving overall development efficiency.
[0015] By integrating Kubernetes and serverless computing, enterprises can give full play to the advantages of both, achieve more efficient and flexible application development and deployment, and meet the rapidly changing market needs. This integration not only improves the flexibility and scalability of the technical architecture, but also creates higher business value for enterprises and promotes the further development of cloud computing technology.
[0016] Although serverless computing and Kubernetes each have significant advantages, the combination of the two still faces challenges in practical applications. Currently, the implementation of many serverless computing platforms depends on specific cloud service providers, lacking flexibility and portability. At the same time, the configuration and management of Kubernetes often requires developers to have a certain technical background, which increases the difficulty of getting started.
[0017] Specifically, existing serverless computing solutions have problems in the following aspects:
[0018] 1. Complexity of YAML configuration: Kubernetes configuration files are usually in YAML format, which is complex and prone to human errors. This is particularly unfriendly to novice developers and increases the threshold for learning and use.
[0019] 2. Lack of unified monitoring tools: Although Kubernetes supports a variety of monitoring tools, users need to configure and integrate these tools additionally, resulting in fragmented monitoring information and difficulty in obtaining a comprehensive view of the system.
[0020] 3. Resource scheduling and management limitations: In serverless computing scenarios, how to efficiently automate resource scheduling and optimize configuration remains an unresolved problem, which may lead to resource waste or performance bottlenecks under high load conditions.
[0021] 4. Insufficient full-process management: The process from code editing to function release often lacks complete management tools, which causes inconvenience to users during development and deployment, affecting development efficiency. Summary of the invention
[0022] The technical problem to be solved by the present invention is aimed at the above-mentioned deficiencies in the prior art. The first purpose of the present invention is to provide an implementation method of a serverless computing platform, which can better combine Kubernetes with the serverless computing platform, make full use of the advantages of the Kubernetes cluster, provide full-process management from code editing to function publishing, simplify configuration solutions, and reduce the difficulty for users to use serverless computing. At the same time, it can also provide partial monitoring functions to help users understand the system's operating status in real time and improve the system's availability and reliability.
[0023] A second objective of the present invention is to provide an implementation system for a serverless computing platform.
[0024] A third object of the present invention is to provide a computer device.
[0025] A fourth objective of the present invention is to provide a computer storage medium.
[0026] In order to achieve the above objective 1, the present invention provides a method for implementing a serverless computing platform, comprising the following steps:
[0027] Step S1. Initialize various components of the serverless computing platform, including: front-end services, back-end services, online coding integrated development environment, build tools, container scheduling components, gateway services, and code repositories and container image repositories that need to be called;
[0028] Step S2. Create a new serverless computing function on the interface of the front-end service, and provide two construction methods for the user to choose, including: online coding deployment or container image deployment to meet different development needs;
[0029] Step S3. Obtaining the function code edited online by the user through the interface of the front-end service, where the function code is used to implement a simple serverless computing function;
[0030] Step S4. Obtain the service publishing request submitted by the user. In this step, the service publishing request initiated by the user through the interface of the front-end service is obtained so as to deploy the edited serverless computing function to the Kubernetes cluster and complete the official launch of the function;
[0031] Step S5. The backend service creates the Kubernetes YAML configuration required by the build tool and creates it in the cluster in the form of a custom resource object; and continuously monitors the change operation of the custom resource object to obtain the latest status of the custom resource object;
[0032] Step S6. The construction tool monitors the creation of the custom resource object, creates a corresponding pipeline task, and executes the image construction; after the image construction is completed, the result of the image construction is written back to the custom resource object;
[0033] Step S7. The backend service obtains the image building result; if the image building fails, the error information is recorded, the error log is displayed on the interface of the front-end service, and the result is returned; if the image building is successful, the subsequent operations are continued;
[0034] Step S8. The backend service uses the container image to create a custom resource object of the container scheduling component, thereby using the container scheduling component to implement the release of the serverless computing function;
[0035] Step S9. The container scheduling component creates a Kubernetes container group and a corresponding Kubernetes service according to the provided configuration information;
[0036] Step S10. The backend service generates a random domain name prefix and combines the domain name prefix with other domain name parts to generate a complete domain name; then creates a Kubernetes route and hands it over to the gateway service for processing;
[0037] Step S11. Through domain name wildcard domain name resolution, the generated domain name is pointed to the entrance of the gateway service; so that the user can access the serverless computing function through the domain name, thereby triggering the corresponding function.
[0038] As a further improvement, in step S2, when the user chooses to deploy the function in the online coding deployment mode, the specific steps performed by the backend service are as follows:
[0039] Step S21. The backend service automatically creates a new repository in the code repository;
[0040] Step S22. Execute the gitclone command to clone the new repository into the shared persistent storage mounted by the container group of the backend service;
[0041] Step S23: Copy the code template to the corresponding location of the mounted shared persistent storage, thereby completing the initialization of the code repository and the local working directory.
[0042] Furthermore, in step S2, when the user selects the container image deployment method to deploy the function, the user only needs to provide the image address and the exposed port number.
[0043] Furthermore, in step S3, the front-end service calls the online coding integrated development environment to provide online coding functions in the form of an embedded IDE, and the online coding function supports the features of code marking and error prompts; the online coding integrated development environment needs to mount the same shared persistent storage as the back-end service to ensure code file sharing.
[0044] Furthermore, in step S3, when the user saves the online coding, the backend service executes the gitcommit command to submit the code changes to the corresponding code repository, thereby ensuring the effectiveness of version management.
[0045] Further, in step S4, when the user chooses to deploy the function in the online coding deployment mode, the build process is started to generate a deployable container image;
[0046] When users choose to deploy a function using the container image deployment method, they do not need to go through the build process and can directly execute the release operation.
[0047] Furthermore, in step S9, when the Kubernetes container group and the corresponding Kubernetes service are created, the container scheduling component uses the internal activator component to monitor and analyze the calling of the Kubernetes service; at the same time, the container scheduling component uses the autoscaler component to dynamically control the scale of the Kubernetes container group; if the Kubernetes service is not called for a long time, the scale of the Kubernetes container group will be reduced to 0; once a request is triggered, the scale of the Kubernetes container group will be automatically adjusted to 1.
[0048] In order to achieve the above-mentioned second objective, the present invention provides a system for implementing a serverless computing platform, comprising:
[0049] The initialization module is used to initialize the various components of the serverless computing platform, including front-end services, back-end services, online coding integrated development environment, build tools, container scheduling components, gateway services, and code repositories and container image repositories that need to be called;
[0050] Create a new serverless computing function module, which is used to create a new serverless computing function on the interface of the front-end service, and provide two construction methods for users to choose from: online coding deployment or container image deployment to meet different development needs;
[0051] A function code acquisition module is used to acquire the function code edited online by the user through the interface of the front-end service, where the function code is used to implement a simple serverless computing function;
[0052] A service publishing request acquisition module is used to acquire a service publishing request submitted by a user. In this step, a service publishing request initiated by a user through the interface of the front-end service is acquired so as to deploy the edited serverless computing function to the Kubernetes cluster and complete the official launch of the function.
[0053] The monitoring module is used for the backend service to create the Kubernetes YAML configuration required by the build tool and create it into the cluster in the form of a custom resource object; and continuously monitor the change operation of the custom resource object to obtain the latest status of the custom resource object;
[0054] The image building module is used for the building tool to monitor the creation of custom resource objects, create corresponding pipeline tasks, and execute image building; after the image building is completed, the image building result is written back to the custom resource object; the back-end service obtains the image building result; if the image building fails, the error information is recorded, the error log is displayed on the interface of the front-end service, and the result is returned; if the image building is successful, the subsequent operations are continued;
[0055] A publishing module, used for the backend service to create a custom resource object of the container scheduling component using the container image, so as to realize the publishing of the serverless computing function using the container scheduling component;
[0056] A service module is created, which is used by the container scheduling component to create a Kubernetes container group and a corresponding Kubernetes service according to the provided configuration information; the backend service generates a random domain name prefix and combines the domain name prefix with other domain name parts to generate a complete domain name; then a Kubernetes route is created and handed over to the gateway service for processing; through the domain name wildcard domain name resolution, the generated domain name is pointed to the entrance of the gateway service; so that users can access the serverless computing function through the domain name, thereby triggering the corresponding function.
[0057] In order to achieve the third objective above, the present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the above-mentioned method for implementing a serverless computing platform when executing the computer program.
[0058] In order to achieve the fourth objective above, the present invention provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for implementing the above-mentioned serverless computing platform is implemented.
[0059] Beneficial Effects
[0060] Compared with the prior art, the present invention has the following advantages:
[0061] 1. This invention better combines Kubernetes with the serverless computing platform to give full play to the advantages of both. Through this innovation, users can enjoy the full process management from code editing to function publishing, which greatly simplifies the configuration scheme and lowers the technical threshold for users when using serverless computing.
[0062] 2. The present invention provides an intuitive user interface and automated tools, allowing users to easily create and manage serverless computing functions without deep Kubernetes knowledge. Through solutions and automated deployment processes that do not require writing YAML configurations, novice users can quickly get started, reducing learning costs and thus accelerating the development cycle. This user-friendly experience will attract more developers to participate in the application of serverless computing and promote its popularization in various industries. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Figure 1 It is a flow chart of the present invention. DETAILED DESCRIPTION
[0064] The present invention will be further described below with reference to the specific embodiments in the accompanying drawings.
[0065] See also Figure 1 , a method for implementing a serverless computing platform, aims to build a one-stop serverless computing platform; the serverless computing platform built with Kubernetes cluster can significantly improve resource utilization, optimize the scheduling and resource allocation of serverless computing functions, and conveniently apply the perfect monitoring function of the Kubernetes platform. In addition, when starting a serverless computing function, users do not need to write Kubernetes YAML, which reduces the learning cost and difficulty of getting started.
[0066] The method specifically includes the following steps S1 to S11:
[0067] Step S1. Initialize the various components of the serverless computing platform, including: front-end service serverless-ui, back-end service serverless, online coding integrated development environment web-ide, build tool build-controller, container scheduling component knative, gateway service istio, and code repository and container image repository that need to be called.
[0068] Front-end service serverless-ui: provides a user-friendly interface that allows users to create, manage, and monitor serverless computing functions. It supports online editing, function publishing requests, and other operations, simplifying the interaction between users and the system.
[0069] Backend service serverless: responsible for processing backend logic, including receiving user requests, managing the life cycle of functions, coordinating the work of various components, and interacting with the Kubernetes cluster.
[0070] Online coding integrated development environment web-ide: provides an embedded online development environment that allows users to write, edit and debug function codes in the browser. It has functions such as code marking and error prompts, supports real-time code saving and version control, and improves user development efficiency.
[0071] Build-controller: responsible for managing the function build process, including creating pipeline tasks, executing image builds, etc. It monitors changes in custom resource objects and writes the build results back to the corresponding resource objects to ensure the automation and transparency of the build process.
[0072] Container scheduling component knative: provides the core scheduling and management functions of serverless computing. Knative is responsible for automatically creating Kubernetes container groups and services based on user configurations, and monitors service calls through internal activator and autoscaler components, dynamically adjusting the size of container groups to optimize resource utilization.
[0073] Gateway service istio: As the traffic management layer in the microservice architecture, Istio is responsible for processing requests entering the Kubernetes cluster. It provides load balancing, traffic control, monitoring, and security functions to ensure the stability and availability of serverless computing functions.
[0074] Step S2. Create a new serverless computing function on the front-end service serverless-ui interface, and provide two construction methods for users to choose from: online coding deployment or container image deployment to meet different development needs.
[0075] In step S2, when the user chooses the online coding deployment method to deploy the function, the specific steps performed by the backend service serverless are as follows:
[0076] Step S21. The backend service serverless automatically creates a new repository in the code repository;
[0077] Step S22: Execute the gitclone command to clone the new repository into the shared persistent storage mounted by the container group of the backend service serverless.
[0078] Step S23: Copy the code template to the corresponding location of the mounted shared persistent storage, thereby completing the initialization of the code repository and the local working directory.
[0079] In addition, in step S2, when the user chooses the container image deployment method to deploy the function, the user only needs to provide the image address and the exposed port number, without having to perform the related steps of online coding and building the container image.
[0080] Step S3: Obtain the function code edited online by the user through the front-end service serverless-ui interface. The function code is used to implement a simple serverless computing function.
[0081] In step S3, the front-end service serverless-ui calls the online coding integrated development environment web-ide to provide the online coding function in the form of an embedded IDE. The online coding function supports the features of code marking and error prompts. The online coding integrated development environment web-ide needs to mount the same shared persistent storage as the back-end service serverless to ensure code file sharing.
[0082] In step S3, when the user saves the online coding, the backend service serverless executes the gitcommit command to submit the code changes to the corresponding code repository, thereby ensuring the effectiveness of version management.
[0083] Step S4. Obtain the service publishing request submitted by the user. In this step, obtain the service publishing request initiated by the user through the interface of the front-end service serverless-ui, so as to deploy the edited serverless computing function to the Kubernetes cluster and complete the official launch of the function.
[0084] In step S4, when the user chooses to deploy the function in the online coding deployment mode, the build process is started to generate a deployable container image.
[0085] When users choose to deploy a function using the container image deployment method, they do not need to go through the build process and can directly execute the release operation.
[0086] Step S5. The backend service serverless creates the Kubernetes YAML configuration required by the build tool build-controller and creates it into the cluster in the form of a custom resource object; and continuously monitors the change operations of the custom resource object to obtain the latest status of the custom resource object.
[0087] Step S6. The build-controller tool monitors the creation of the custom resource object, creates a corresponding pipeline task, and executes the image building; after the image building is completed, the result of the image building is written back to the custom resource object.
[0088] Step S7. The backend service serverless obtains the image building result; if the image building fails, the error information is recorded, the error log is displayed on the interface of the front-end service serverless-ui, and the result is returned; if the image building is successful, the subsequent operations are continued.
[0089] Step S8. The backend service serverless uses the container image to create a custom resource object of the container scheduling component knative, thereby using the container scheduling component knative to implement the release of the serverless computing function.
[0090] Step S9. The container scheduling component knative creates a Kubernetes container group and a corresponding Kubernetes service according to the provided configuration information.
[0091] In step S9, after the Kubernetes container group and the corresponding Kubernetes service are created, the container scheduling component knative uses the internal activator component to monitor and analyze the call status of the Kubernetes service. At the same time, the container scheduling component knative uses the autoscaler component to dynamically control the scale of the Kubernetes container group. If the Kubernetes service is not called for a long time, the scale of the Kubernetes container group will be reduced to 0. Once a request is triggered, the scale of the Kubernetes container group will be automatically adjusted to 1. The process of pulling up the container group can be completed within seconds, ensuring the high efficiency of the service and the optimal use of resources.
[0092] Step S10. The backend service serverless generates a random domain name prefix and combines the domain name prefix with other domain name parts to generate a complete domain name. Then it creates a Kubernetes routing ingress and hands it over to the gateway service istio for processing.
[0093] Step S11. Through the wildcard domain name resolution, the generated domain name is pointed to the entrance of the gateway service istio, so that users can access the serverless computing function through the domain name, thereby triggering the corresponding function.
[0094] A system for implementing a serverless computing platform, comprising:
[0095] The initialization module is used to initialize the various components of the serverless computing platform, including the front-end service serverless-ui, the back-end service serverless, the online coding integrated development environment web-ide, the build tool build-controller, the container scheduling component knative, the gateway service istio, and the code repository and container image repository that need to be called;
[0096] Create a new serverless computing function module, which is used to create a new serverless computing function on the front-end service serverless-ui interface. Two construction methods are provided for users to choose: online coding deployment or container image deployment to meet different development needs;
[0097] Get function code module, which is used to get the function code that users edit online through the front-end service serverless-ui interface. The function code is used to implement simple serverless computing function functions.
[0098] The service publishing request acquisition module is used to obtain the service publishing request submitted by the user. In this step, the service publishing request initiated by the user through the front-end service serverless-ui interface is obtained to deploy the edited serverless computing function to the Kubernetes cluster and complete the official launch of the function.
[0099] The monitoring module is used by the backend serverless service to create the Kubernetes YAML configuration required by the build tool build-controller and create it in the cluster in the form of a custom resource object; and continuously monitor the change operations of the custom resource object to obtain the latest status of the custom resource object;
[0100] The image building module is used by the build-controller to monitor the creation of custom resource objects, create corresponding pipeline tasks, and execute image building. After the image building is completed, the image building result is written back to the custom resource object. The backend service serverless obtains the image building result. If the image building fails, the error information is recorded, the error log is displayed on the interface of the frontend service serverless-ui, and the result is returned. If the image building is successful, the subsequent operations are continued.
[0101] The publishing module is used by the backend service serverless to create a custom resource object of the container scheduling component knative using the container image, so as to use the container scheduling component knative to implement the publishing of serverless computing functions;
[0102] Create a service module for the container scheduling component knative to create a Kubernetes container group and the corresponding Kubernetes service according to the provided configuration information; the backend service serverless generates a random domain name prefix and combines the domain name prefix with other domain name parts to generate a complete domain name; then create a Kubernetes routing ingress and hand it over to the gateway service istio for processing; through the domain name wildcard domain name resolution, point the generated domain name to the entrance of the gateway service istio; so that users can access the serverless computing function through the domain name, thereby triggering the corresponding function.
[0103] A computer device includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the above-mentioned method for implementing a serverless computing platform when executing the computer program.
[0104] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the above-mentioned method for implementing a serverless computing platform.
[0105] The above are only preferred embodiments of the present invention. It should be pointed out that for those skilled in the art, several modifications and improvements can be made without departing from the structure of the present invention, which will not affect the effect of the implementation of the present invention and the practicality of the patent.
Claims
1. A method for implementing a serverless computing platform, characterized in that: The following steps are involved: Step S1. Initialize the various components of the serverless computing platform, including: front-end service (serverless-ui), back-end service (serverless), online coding integrated development environment (web-ide), build tool (build-controller), container scheduling component (knative), gateway service (istio), and code repository and container image repository that need to be called; Step S2. Create a new serverless computing function on the interface of the front-end service (serverless-ui), and provide two construction methods for users to choose from: online coding deployment or container image deployment to meet different development needs; Step S3. Obtain the function code edited online by the user through the interface of the front-end service (serverless-ui), where the function code is used to implement a simple serverless computing function; Step S4. Obtain the service publishing request submitted by the user. In this step, obtain the service publishing request initiated by the user through the interface of the front-end service (serverless-ui) so as to deploy the edited serverless computing function to the Kubernetes cluster and complete the official launch of the function; Step S5. The backend service (serverless) creates the Kubernetes YAML configuration required by the build tool (build-controller) and creates it into the cluster in the form of a custom resource object; and continuously monitors the change operation of the custom resource object to obtain the latest status of the custom resource object; Step S6. The build-controller monitors the creation of the custom resource object, creates a corresponding pipeline task, and executes the image building; after the image building is completed, the result of the image building is written back to the custom resource object; Step S7. The backend service (serverless) obtains the image building result; if the image building fails, the error information is recorded, the error log is displayed on the interface of the front-end service (serverless-ui), and the result is returned; if the image building is successful, the subsequent operations are continued; Step S8. The backend service (serverless) uses the container image to create a custom resource object of the container scheduling component (knative), thereby using the container scheduling component (knative) to implement the release of the serverless computing function; Step S9. The container scheduling component (knative) creates a Kubernetes container group and a corresponding Kubernetes service according to the provided configuration information; Step S10: The backend service (serverless) generates a random domain name prefix and combines the domain name prefix with other domain name parts to generate a complete domain name; then creates a Kubernetes route (ingress) and hands it over to the gateway service (istio) for processing; Step S11. Through the domain name wildcard domain name resolution, the generated domain name is pointed to the entrance of the gateway service (istio); so that users can access the serverless computing function through the domain name, thereby triggering the corresponding function.
2. The method for implementing a serverless computing platform according to claim 1, characterized in that: In step S2, when the user chooses to deploy the function in the online coding deployment mode, the specific steps performed by the backend service (serverless) are as follows: Step S21. The backend service (serverless) automatically creates a new repository in the code repository; Step S22. Execute the gitclone command to clone the new repository into the shared persistent storage mounted by the container group of the backend service (serverless); Step S23: Copy the code template to the corresponding location of the mounted shared persistent storage, thereby completing the initialization of the code repository and the local working directory.
3. The method for implementing a serverless computing platform according to claim 1, characterized in that: In step S2, when the user chooses the container image deployment method to deploy the function, the user only needs to provide the image address and the exposed port number.
4. The method for implementing a serverless computing platform according to claim 1, characterized in that: In step S3, the front-end service (serverless-ui) calls the online coding integrated development environment (web-ide) to provide online coding function in the form of embedded IDE, and the online coding function supports the features of code marking and error prompts; the online coding integrated development environment (web-ide) needs to mount the same shared persistent storage as the back-end service (serverless) to ensure code file sharing.
5. The method for implementing a serverless computing platform according to claim 1, characterized in that: In step S3, when the user saves the online coding, the backend service (serverless) executes the gitcommit command to submit the code changes to the corresponding code repository, thereby ensuring the effectiveness of version management.
6. The method for implementing a serverless computing platform according to claim 1, characterized in that: In step S4, when the user chooses to deploy the function in the online coding deployment mode, the build process is started to generate a deployable container image; When users choose to deploy a function using the container image deployment method, they do not need to go through the build process and can directly execute the release operation.
7. The method for implementing a serverless computing platform according to claim 1, characterized in that: In step S9, after the Kubernetes container group and the corresponding Kubernetes service are created, the container scheduling component (knative) uses the internal activator component to monitor and analyze the call status of the Kubernetes service; at the same time, the container scheduling component (knative) uses the autoscaler component to dynamically control the scale of the Kubernetes container group; if the Kubernetes service is not called for a long time, the scale of the Kubernetes container group will be reduced to 0; once a request is triggered, the scale of the Kubernetes container group will be automatically adjusted to 1.
8. A system for implementing a serverless computing platform, characterized in that: include: The initialization module is used to initialize the various components of the serverless computing platform, including the front-end service (serverless-ui), back-end service (serverless), online coding integrated development environment (web-ide), build tool (build-controller), container scheduling component (knative), gateway service (istio), and code repository and container image repository that need to be called; Create a new serverless computing function module, which is used to create a new serverless computing function on the interface of the front-end service (serverless-ui), and provide two construction methods for users to choose from: online coding deployment or container image deployment to meet different development needs; A function code acquisition module is used to acquire the function code edited online by the user through the interface of the front-end service (serverless-ui), where the function code is used to implement a simple serverless computing function. The service publishing request acquisition module is used to acquire the service publishing request submitted by the user. In this step, the service publishing request initiated by the user through the interface of the front-end service (serverless-ui) is acquired so as to deploy the edited serverless computing function to the Kubernetes cluster and complete the official launch of the function. A monitoring module is used for the backend service (serverless) to create the Kubernetes YAML configuration required by the build tool (build-controller) and create it into the cluster in the form of a custom resource object; and continuously monitor the change operation of the custom resource object to obtain the latest status of the custom resource object; The image building module is used for the build tool (build-controller) to monitor the creation of custom resource objects, create corresponding pipeline tasks, and execute image building; after the image building is completed, the image building result is written back to the custom resource object; the backend service (serverless) obtains the image building result; if the image building fails, the error information is recorded, the error log is displayed on the interface of the front-end service (serverless-ui), and the result is returned; if the image building is successful, the subsequent operations are continued; A publishing module, used for the backend service (serverless) to create a custom resource object of the container scheduling component (knative) using the container image, so as to realize the publishing of the serverless computing function using the container scheduling component (knative); A service module is created, which is used by the container scheduling component (knative) to create a Kubernetes container group and a corresponding Kubernetes service according to the provided configuration information; the backend service (serverless) generates a random domain name prefix and combines the domain name prefix with other domain name parts to generate a complete domain name; then a Kubernetes route (ingress) is created and handed over to the gateway service (istio) for processing; through the domain name wildcard domain name resolution, the generated domain name is pointed to the entrance of the gateway service (istio); so that users can access the serverless computing function through the domain name, thereby triggering the corresponding function.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the method for implementing a serverless computing platform as described in any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for implementing a serverless computing platform as described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Method and a system for automatically deploying services in a Kubernetes cluster
CN109491674A
Deployment method and device of network controller without service architecture, equipment and medium
CN116095150A
Service route updating method and device, storage medium and electronic equipment
CN117873535A
Method for constructing Serverless Kubernetes based on public cloud Iaas resources
CN118860568A
Tractor-attached waste plastic collection device
KR102537187B1