WO2022037612A1 - Method for providing application construction service, and application construction platform, application deployment method and system - Google Patents

Method for providing application construction service, and application construction platform, application deployment method and system Download PDF

Info

Publication number
WO2022037612A1
WO2022037612A1 PCT/CN2021/113249 CN2021113249W WO2022037612A1 WO 2022037612 A1 WO2022037612 A1 WO 2022037612A1 CN 2021113249 W CN2021113249 W CN 2021113249W WO 2022037612 A1 WO2022037612 A1 WO 2022037612A1
Authority
WO
WIPO (PCT)
Prior art keywords
workload
service
maintenance
maintenance capability
resources
Prior art date
Application number
PCT/CN2021/113249
Other languages
French (fr)
Chinese (zh)
Inventor
马浩
杨守仁
郑曌
丁禹博
李文军
罗伟锋
王昱森
Original Assignee
第四范式(北京)技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from CN202010845842.2A external-priority patent/CN111984270A/en
Priority claimed from CN202010845106.7A external-priority patent/CN111984269B/en
Application filed by 第四范式(北京)技术有限公司 filed Critical 第四范式(北京)技术有限公司
Publication of WO2022037612A1 publication Critical patent/WO2022037612A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Definitions

  • the present disclosure relates to the field of cloud platform application development, and more particularly, to a method for providing application construction services, an application construction platform, and an application deployment method and system.
  • PaaS Platinum as a Service
  • Kubernetes provides various native resource models, such as deployment, statefulset, configmap, service, etc.
  • PaaS maintainers can combine one or more A resource model is used to form a service, and each platform can have its own composition.
  • FIG. 1 is a schematic diagram showing the architecture of an existing PaaS platform.
  • the PaaS platform is divided into two parts: built-in services and online services.
  • built-in service part services such as monitoring indicator data (Promethus), authentication (Authorization), monitoring (Monitor), and log (Log) are rendered into kubernetes yaml files through the devops tool, and then the built-in applications are deployed to the kubernetes cluster through kubectl .
  • Tensorflow-Serving For the online service part, Tensorflow-Serving, GDBT, Flink Task, H2O, Customize Real-Time Estimates, PMML and other services are deployed to the kubernetes cluster through PAS, and the templates of kubernetes native resources are maintained inside PAS. (For example, Deployment Template, Service Template, Configmap Template, etc.), and then combine each template to complete the resource deployment.
  • the existing PaaS platform has the following problems: (1) devops and pas are two independent technology stacks. Although they are essentially the same, they are both deploying services to the kubernetes cluster, but the technologies accumulated with each other cannot be shared. Two sets of technical solutions are deployed, managed and maintained in different ways. Good solution ideas cannot be reused. (2) Devops maintains a large number of yaml templates, the mode is fixed, the expansion ability is poor, and the service access cost is high when encountering complex requirements. (3) PAS completes service deployment by maintaining resource templates, which are also fixed json templates of kubernetes native resources, which have poor scalability and low reusability. (4) It is difficult to form the standard of precipitation technology and abstract business model in the existing template method.
  • Exemplary embodiments of the present disclosure may or may not address at least the above-mentioned problems.
  • a system comprising at least one computing device and at least one storage device storing instructions, wherein the instructions, when executed by the at least one computing device, cause the at least one computing device to execute
  • the following steps of the method for providing application building services providing at least one workload and at least one operation and maintenance capability, wherein each workload encapsulates multiple resource-related services in the infrastructure cluster for executing corresponding services, and each operation
  • the maintenance capability encapsulates a variety of operation and maintenance-related resources in the infrastructure cluster for performing corresponding operation and maintenance; provides a respective controller for each workload and each operation and maintenance capability, wherein each controller is used to manage Corresponding workloads or resources related to operation and maintenance capabilities; provide an API module, wherein the API module is used to enable users to configure workloads and operation and maintenance capabilities through the API module to execute application construction.
  • a method for providing an application building service includes: providing at least one workload and at least one operation and maintenance capability, wherein each workload encapsulates a variety of service-related resources in an infrastructure cluster to Used to execute the corresponding service, each operation and maintenance capability encapsulates a variety of operation and maintenance-related resources in the infrastructure cluster for performing the corresponding operation and maintenance; provides the respective control of each workload and each operation and maintenance capability controller, wherein each controller is used to manage the corresponding workload or resources related to operation and maintenance capabilities; provides an API module, wherein the API module is used to enable users to configure workloads and operation and maintenance capabilities through the API module to execute the application's Construct.
  • an application building platform comprising: a workload library, including at least one workload, wherein each workload encapsulates a plurality of kinds of infrastructure clusters on which the application building platform relies Service-related resources for executing corresponding services; an operation and maintenance capability library, including at least one operation and maintenance capability, wherein each operation and maintenance capability encapsulates a variety of operation and maintenance-related resources in the infrastructure cluster for executing corresponding services operation and maintenance; controller library, including respective controllers for each workload and each operation and maintenance capability, wherein each controller is used to manage the resources related to the corresponding workload or operation and maintenance capability; API module, used to make The user configures the workload and operation and maintenance capabilities through the API module to execute the construction of the application.
  • a workload library including at least one workload, wherein each workload encapsulates a plurality of kinds of infrastructure clusters on which the application building platform relies Service-related resources for executing corresponding services
  • an operation and maintenance capability library including at least one operation and maintenance capability, wherein each operation and maintenance capability encapsulates a variety of
  • a system comprising at least one computing device and at least one storage device storing instructions, wherein the instructions, when executed by the at least one computing device, cause the at least one computing device to Performing the following steps of providing an application deployment method: receiving first information for registering a component through an API module, wherein the first information includes information for declaring at least one workload used by the component and a set of business-related parameters, each Each workload encapsulates a variety of service-related resources in the infrastructure cluster for executing corresponding services; the component is created according to the first information by the registration component module to register the component to the infrastructure cluster;
  • the API module receives the second information for deploying the application, wherein the second information includes the information for declaring used components, at least one operation and maintenance capability used and its parameters, and the set of business-related parameters, wherein each Each operation and maintenance capability encapsulates a variety of operation and maintenance related resources in the infrastructure cluster for performing corresponding operation and maintenance; the application deployment configuration file is created by the deployment application module according
  • an application deployment method comprising: receiving, through an API module, first information for registering a component, wherein the first information includes at least one workload used for declaring the component and a Information about group business-related parameters, each workload encapsulates a variety of service-related resources in the infrastructure cluster for executing corresponding services; the component is created according to the first information by the registration component module to register the component to the infrastructure cluster; receiving second information for deploying an application through the API module, where the second information includes a component used for declaring use, at least one operation and maintenance capability used and its parameters, and the set of services information about relevant parameters, wherein each operation and maintenance capability encapsulates a variety of operation and maintenance-related resources in the infrastructure cluster for performing corresponding operation and maintenance; the deployment application module creates an application deployment configuration file according to the second information to creating the application deployment configuration file to the infrastructure cluster; after the at least one workload and the at least one operation and maintenance capability are instantiated, use the at least one workload and the at least one operation
  • an application deployment system comprising: a business layer module configured to: receive first information for registering a component through an API module, wherein the first information includes a method for declaring the component Information about at least one workload and a set of business-related parameters used, wherein each workload encapsulates a variety of service-related resources in the infrastructure cluster for executing corresponding services, and is created by the registration component module according to the first information
  • the component is used to register the component to the infrastructure cluster
  • the second information for deploying the application is received through the API module, wherein the second information includes the component used for declaring the use, the at least one operation and maintenance used capability and its parameters and information about the set of business-related parameters, wherein each operation and maintenance capability encapsulates a variety of operation and maintenance-related resources in the infrastructure cluster for performing corresponding operation and maintenance; by deploying an application module Create an application deployment configuration file according to the second information to create the application deployment configuration file to the infrastructure cluster; the underlying module is configured to: be instantiated
  • a computer-readable storage medium storing instructions, wherein, when the instructions are executed by at least one computing device, the at least one computing device is caused to perform the application building service of the present disclosure. method or application deployment method.
  • an electronic device comprising: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the present disclosure
  • a method for providing application building services or an application deployment method comprising: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the present disclosure
  • various service resources of the infrastructure cluster supported by the platform are organized, packaged and managed through workloads, and the operation and maintenance capabilities are used to Organize, encapsulate and manage the various operation and maintenance resources of the infrastructure cluster on which the platform relies, so as to provide all the product functions required by the upper-layer development application, which can not only provide richer business requirements, but also control all behaviors.
  • it satisfies community standards and ecology, which facilitates the subsequent integration with the community, and enables application developers to focus only on business-related development work without having to pay attention to or develop the underlying architecture and operation and maintenance details.
  • the management of applications all revolves around the management of workload and operation and maintenance capabilities.
  • iterative upgrade and exploration of the product it can continuously strengthen and stabilize the workload and operation and maintenance capabilities, and upper-layer application developers only need to declare and use it.
  • the component information may include the component name and the component version number
  • a new version number may be added, which will not Affecting existing services, you only need to declare a new version number in the application configuration file.
  • application delivery is delivered in the form of components, so that it can be delivered as a single application or a specified application. Due to the transfer from a large number of yaml files to the combined declaration of workload and operation and maintenance capabilities, the template template needs to be fully rendered, and now only the corresponding components or application configuration files need to be upgraded, and the workload and operation and maintenance capabilities are kubernetes. Operation and maintenance can make full use of the extension mechanism provided by kubernetes and the stability of its own mechanism. Currently, the image of the specified upgraded application can be delivered, and the image used by the workload in the component can be upgraded without the heavy delivery of offline packages. With the standard set of workload and operation and maintenance capabilities, development, operation and maintenance, and delivery are coordinated in the standard, which greatly reduces the communication cost.
  • FIG. 1 is a schematic diagram showing the architecture of a conventional PaaS platform.
  • FIG. 2 is a schematic diagram illustrating application deployment performed by a user according to an exemplary embodiment of the present disclosure.
  • FIG. 3 is a block diagram illustrating an application building platform according to an exemplary embodiment of the present disclosure.
  • FIG. 4 is a flowchart illustrating a method of providing an application building service according to an exemplary embodiment of the present disclosure.
  • FIG. 5 is a block diagram illustrating an application deployment system according to an exemplary embodiment of the present disclosure.
  • FIG. 6 is a flowchart illustrating an application deployment method according to an exemplary embodiment of the present disclosure.
  • the PaaS platform According to the existing management mode and operation and maintenance method of the PaaS platform, it is difficult to provide the abstraction of the APP concept.
  • the services of the PaaS platform are presented in the form of APP, and users will not perceive how the underlying services are maintained.
  • the PaaS platform provides users with an APP. Therefore, in order to solve the existing problems, the present disclosure proposes an APP-centric upgrade method, focusing on APP-based application management. Specifically, all built-in services and online services can be abstracted into workloads and operational capabilities (trait).
  • the CRD+controller custom resource definition + controller
  • the various resources of the kubernetes cluster are abstracted and encapsulated as CRDs of workloads and operation and maintenance capabilities, and their corresponding controllers are started to realize the management of the entire life cycle of the application through the combination of workloads and operation and maintenance capabilities.
  • All applications running on infrastructure clusters can include kubernetes clusters, Hadoop clusters, storage clusters, etc.
  • an APP is composed of one or more components, and then through the various components provided by the trait This kind of operation and maintenance capability completes the provision of complete functions of an APP.
  • components can register components by embedding workloads, and support Expanding workloads (for example, CRDs of kubernetes clusters), that is, supporting custom workloads (workload CRDs), that is, unified components facilitate unified management of the platform, and components can embed different workloads to meet the platform itself business characteristics.
  • Expanding workloads for example, CRDs of kubernetes clusters
  • workload CRDs workload CRDs
  • unified components facilitate unified management of the platform
  • components can embed different workloads to meet the platform itself business characteristics.
  • the deployment of APP can be realized by declaring the application configuration file (Application Configuration), that is, the components and operation and maintenance capabilities are organized through an application configuration file. Based on this application configuration file, all the meta information of the APP can be satisfied.
  • the workload controller corresponding to the workload and the trait controller corresponding to the operation and maintenance capability included in the component can create various kinds of functions on the infrastructure cluster (for example, the kubernetes cluster) according to the corresponding meta information and expected logic. Corresponding resources to complete the complete deployment of an APP.
  • the abstracted workload and operation and maintenance capabilities can be continuously precipitated, polished, expanded and improved with the iteration of requirements, and become the platform service APP standard, with a community and ecology.
  • the above method of deploying APP can not only be used to deploy APP on the kubernetes cluster that the platform relies on as the infrastructure, but also can be used to deploy APP on any infrastructure cluster that can use the above method of deploying APP, for example, but not limited to , ECS, FaaS, Mesos, etc.
  • Workload One or more resources corresponding to the provided services are encapsulated by the developers of the application building platform by abstracting the resources provided by the infrastructure cluster (for example, the kubernetes cluster) on which the application building platform relies.
  • the infrastructure cluster for example, the kubernetes cluster
  • the workload may include at least one of a first workload (ServerWorkload) corresponding to an online service application and a second workload (TaskWorkload) corresponding to an offline service application.
  • the native resources in the Kubernetes cluster that can be packaged by the first workload may include, but are not limited to, deployment, statefulset, daemonset, pods, services, and configmaps to meet long-running business characteristics and expectations.
  • deployment is a native resource of kubernetes, which mainly satisfies stateless services of multiple copies;
  • statefulset is a native resource of kubernetes, which satisfies stateful services, and can provide stable persistent storage, stable network identification, orderly Deployment, orderly shrinking, etc.;
  • daemonset is a native resource of kubernetes, which ensures that a pod runs a pod on all or some nodes; pod is the smallest scheduling unit of kubernetes, and a pod consists of one or several containers and has an independent network IP; service is a native resource of kubernetes.
  • the first workload can create a service service by default for subsequent internal load balancing and other capabilities; configmap is a native resource of kubernetes , used to store key-value pair configuration data that can be used in pods, or used to store configuration data for system components like controllers, which can be understood as a Linux system In the /etc directory, a directory dedicated to storing configuration files.
  • the first workload may also encapsulate non-kubernetes native resources, for example, self-developed non-kubernetes native resources, some of the kubernetes community Mature available resources (such as OpenKruise's CloneSet, etc.).
  • non-kubernetes native resources can be self-developed or introduced to encapsulate them in the first workload according to business requirements or AI application characteristics. For example, in some scenarios, rescheduling will bring unnecessary scheduling overhead.
  • upgrading the sidecar container will cause the main container to restart, which is usually unacceptable.
  • an Advanced StatefulSet that supports in-place upgrades can be introduced.
  • Non-kubernetes native resources for example, self-developed non-kubernetes native resources, some of the kubernetes community Mature available resources (such as OpenKruise's CloneSet, etc.).
  • non-kubernetes native resources can be self-developed or introduced to encapsulate them in the first workload according to business requirements or AI application
  • the native resources in the kubernetes cluster that the second workload can encapsulate may include, but are not limited to, job, cronjob, and configmap, etc. native resources.
  • job is a native resource of kubernetes, which is responsible for batch tasks, that is, tasks that are executed only once, to ensure that one or more Pods of the batch tasks end successfully.
  • Cronjob is a native resource of kubernetes, which is responsible for scheduled tasks and can regularly pull up jobs.
  • the second workload may also encapsulate non-kubernetes native resources, for example, self-developed non-kubernetes native resources, some of the kubernetes community Mature available resources.
  • non-kubernetes native resources can be self-developed or introduced to encapsulate them in the second workload according to business requirements or AI application characteristics. For example, a Broadcast Job that is similar to the native resource DaemonSet, a non-kubernetes native resource, can run on all nodes like a daemonset, but this provides the ability of a job.
  • Service-related parameters The parameters of the workload open to the outside world, which can provide the ability to modify the metadata of the workload.
  • the business-related parameters may include an image identification for obtaining the address of the image to be used, an environment variable for specifying the address of the model to be used, and a parameter for specifying a configuration file to be used , at least one of the image startup command and parameters, the name and version number of the component, the service health check probe, and the environment variable that the service opens to the outside world.
  • These business-related parameters are some basic parameters for running containers in the infrastructure cluster. The specific business-related parameters are also different according to different workloads.
  • the service-related parameters may include a first parameter (workloadsubtype field) used to indicate whether the online service application is a stateful service or a stateless service, and this parameter determines the subsequent first workload controller pulls It enables the native service capabilities of the infrastructure cluster.
  • the business-related parameters can be used to indicate whether the offline service application is a one-time service or a second parameter (schedule field) of a scheduled service. This parameter indicates the timing rule for starting offline tasks, similar to the operating system. crontab.
  • the Workload Controller is responsible for managing the corresponding workload-related resources. Specifically, the workload controller may select to create resources in the corresponding infrastructure cluster according to the meta-information corresponding to the parameters in the workload instance. For example, in the case of a kubernetes cluster, the workload controller can create one or a group of resources such as deployment, stateful, service, configmap, etc. to make the app service converge to the desired state. In addition, the workload controller can monitor the changes of the corresponding resources, so that the state of the resources converges to the desired state. In addition, when the corresponding APP is deleted, the workload controller automatically completes the recycling of related resources.
  • the controller of the first workload when the user declares to use the first workload corresponding to the online service application and declares the first parameter, the controller of the first workload creates a deployment, One or more resources in statefulset, daemonset, pod, service, and configmap.
  • the controller of the first workload when the first parameter indicates that the online service application is a stateful service, the controller of the first workload creates resources such as statefulset, service, and configmap according to the meta-information of the declared first parameter, and when the first parameter indicates that the online service application is In the stateless service, the controller of the first workload creates deployment or daemonset resources according to the meta-information of the declared first parameter.
  • the control of the second workload when the user declares to use the second workload corresponding to the offline service application and declares the second parameter, and the second parameter indicates that the offline service application is a one-time service, the control of the second workload
  • the compiler creates the job resource based on the meta information of the declared second parameter.
  • the controller of the second workload according to the meta-information of the declared second parameter Create a cronjob or job resource.
  • Operation and maintenance capabilities (trait): The developers of the application building platform abstract the resources provided by the infrastructure cluster (for example, the kubernetes cluster) on which the application building platform is based, and encapsulate one or more operation and maintenance capabilities corresponding to the provided operation and maintenance capabilities. a resource. For example, in order to complete some specific operation and maintenance capabilities, each operation and maintenance capability needs to provide corresponding information (for example, parameters), and the definition of the information can be transmitted through CRD meta information.
  • the infrastructure cluster for example, the kubernetes cluster
  • information for example, parameters
  • operation and maintenance capabilities may include, but are not limited to, automatic elastic scaling operation and maintenance capabilities (AutoScalerTrait), load balancing operation and maintenance capabilities (IngressTrait), and custom service replica number operation and maintenance capabilities (ManualscalerTrait) ), at least one of persistence management operation and maintenance capability (VolumeMounterTrait) and release strategy operation and maintenance capability (FlaaggerTrait).
  • AutoScalerTrait automatic elastic scaling operation and maintenance capabilities
  • IngressTrait load balancing operation and maintenance capabilities
  • ManualscalerTrait custom service replica number operation and maintenance capabilities
  • VolumeMounterTrait persistence management operation and maintenance capability
  • FrelaaggerTrait release strategy operation and maintenance capability
  • the automatic elastic scaling operation and maintenance capability can be used to provide the capability of horizontal scaling of the Pod, and the number of service Pod replicas can be dynamically adjusted according to the CPU load and memory usage of the Pod.
  • the resources encapsulated by the automatic elastic expansion and contraction operation and maintenance capabilities can include, but are not limited to, the Horizontal Pod Autoscaler and Promethus native resources in the kubernetes cluster.
  • the parameters of the automatic elastic scaling operation and maintenance capability open to the outside world may include, but are not limited to, the CPU size (CPU), the memory size (memory), the minimum number of replicas (minReplica), and the maximum number of replicas (maxReplica).
  • the load balancing operation and maintenance capability can utilize the existing load balancing capability of kubernetes Ingress to provide a load balancing capability for a service created by a workload configured by a user.
  • the resources encapsulated by the load balancing operation and maintenance capability can include, but are not limited to, the native resources of Service and Ingress in the kubernetes cluster.
  • the parameters of the load balancing operation and maintenance capability open to the outside world may include, but are not limited to, the requested path (Path), the requested domain name (Host), and the requested service port (ServicePort).
  • the operation and maintenance capability (ManualscalerTrait) for customizing the number of service replicas can provide the ability to customize the number of replicas of a service. After specifying, the number of replicas will converge to the expected value, and the corresponding workload (for example, The size of the replica resource for user-selected and/or configured workloads).
  • the operation and maintenance capability of customizing the number of service copies can update the number of service copies to the expected value according to the corresponding resources (for example, statefulset, deployment, etc.) pulled by the corresponding workload.
  • the operation and maintenance capability of the number of custom service copies can update (patch) the resources pulled up by the corresponding workload, and the operation and maintenance capability of the number of custom service copies can know which workload it is applied to, so as to know which workload to use. Which specific resources (for example, which statefulset or which deployment, etc.) should be updated (patch).
  • the parameters of the operation and maintenance capability of the custom service replica number open to the outside world may include, but are not limited to, the number of replicas (Replica) and the resources of the replicas that can be set (Resource).
  • the resources of the replica that can be set may include CPU size, memory size, GPU size, and the like.
  • the persistence management operation and maintenance capability can provide business persistence requirements.
  • the resources encapsulated by the load balancing operation and maintenance capabilities may include, but are not limited to, Persistent Volumes, Persistent Volume Claims, StorageClass native resources, and various open source provider resources (for example, OpenEBS, etc.) in the kubernetes cluster.
  • the parameters of the persistent management operation and maintenance capability open to the outside world may include, but are not limited to, a storage volume resource (VolumeResource) and a storage type (StorageType).
  • the storage volume resource may include the size of the used disk (that is, the storage size) and the mounting path
  • the storage type may include various cloud-native storages of the kubernetes cluster.
  • the release strategy operation and maintenance capability can be combined with the operation and maintenance capability mode by utilizing the release strategies (eg, canary, blue-green, A/B Testing, etc.) already supported by the open source deployment plug-in Flagger , the user can use multiple publishing strategies simply by declaring the necessary policy information.
  • the release strategy operation and maintenance capability encapsulates the open source release strategy Flagger resource, controls the behavior of the Flagger, and enables the Flagger to control the resources pulled by the workload, which is used to support the user to configure the release strategy.
  • the parameters of the release policy operation and maintenance capability open to the outside world may include, but are not limited to, release policy parameters (Analysis) and release policies (Policy).
  • operation and maintenance capabilities of the present disclosure are not limited to the above-mentioned operation and maintenance capabilities, and may also include other possible operation and maintenance capabilities, such as log operation and maintenance capabilities, monitoring operation and maintenance capabilities, and the like.
  • Operation and maintenance capability controller responsible for managing the resources related to the corresponding operation and maintenance capability. Specifically, the operation and maintenance capability controller may select to create resources in the corresponding infrastructure cluster according to the meta-information corresponding to the parameters in the operation and maintenance capability instance.
  • the controller of the automatic elastic expansion and contraction operation and maintenance capability can control the HPA of kubernetes through the automatic elastic expansion and contraction operation and maintenance capability, so that the HPA can monitor the corresponding workload and pull up resources in real time according to the set parameters (for example, the status information of CPU, memory), according to the expected load and the expected number of replicas defined by the automatic elastic scaling operation and maintenance capability, perform elastic scaling on the number of Pod instances corresponding to the workload.
  • the set parameters For example, the status information of CPU, memory
  • the controller of the load balancing operation and maintenance capability may create corresponding load balancing rules according to the meta information corresponding to the requested path, the requested domain name, and the requested service port.
  • the controller that customizes the operation and maintenance capability of the number of service copies can control the corresponding workload (eg, the first workload corresponding to the online service application) to pull up the number of copies of resources, so that the The number of copies is within the set value.
  • the corresponding workload eg, the first workload corresponding to the online service application
  • the controller of the persistent management operation and maintenance capability may create a corresponding persistent storage volume declaration (PVC) and storage type ( StorageClass) and mount the storage volume to the path specified inside the pod.
  • PVC persistent storage volume declaration
  • StorageClass storage type
  • the controller of the release policy operation and maintenance capability may create a corresponding release policy according to the set release policy parameters and the meta information corresponding to the set release policy.
  • a component is an integral part of an application, and can include services that the application depends on, such as a MySQL database, the application service itself (eg, a PHP server with multiple copies).
  • the application service eg, a PHP server with multiple copies.
  • all pods running on a kubernetes cluster can be declared as components, including some basic information, including images, startup parameters, health detection probes, resources, etc. That is to say, an application can be composed of one or more components.
  • the architect of the application building platform can decompose the application into modules that can be reused.
  • the idea of modular encapsulation of application components Represents a best practice for building secure and highly scalable applications: it realizes the decoupling of application component description and implementation through a fully distributed architecture model.
  • components can be registered by means of embedded workloads. Unified components are convenient for unified management, and different embedded workloads can be opened to platform maintainers, which can be based on platform business characteristics. to develop different workloads.
  • platform maintainers which can be based on platform business characteristics. to develop different workloads.
  • application developers "package" the code they wrote into a component through the platform, and then write a configuration file to describe the relationship between the component and the service and the requirements for operation and maintenance capabilities, so that application developers can focus more on business-related development work without having to focus or develop the underlying architectural and operational details.
  • Application Configuration In order to organize the declared components and operation and maintenance capabilities into a real running application, the application to be run can be instantiated by writing an application configuration file.
  • Application developers can use the API modules provided by the platform to write application configuration files, so that the platform can instantiate the corresponding, really running applications according to the application configuration files submitted by the application developers, and cluster them on the infrastructure that the platform relies on. Create the corresponding resources on the above to complete the complete deployment of an application.
  • FIG. 2 is a schematic diagram illustrating application deployment performed by a user according to an exemplary embodiment of the present disclosure.
  • a user performing application deployment may include two steps, ie, registering a component and deploying an application.
  • the workload according to an exemplary embodiment of the present disclosure may include a first workload (ServerWorkload) corresponding to an online service application and a second workload (TaskWorkload) corresponding to an offline service application.
  • the user needs to declare the use of the first workload or the second workload or both the first workload and the second workload, and also needs to declare business-related parameters corresponding to the declared workload.
  • the workload according to the exemplary embodiment of the present disclosure may include any other possible workloads besides the first workload and the second workload.
  • the operation and maintenance capabilities may include automatic elastic scaling operation and maintenance capabilities (AutoScalerTrait), load balancing operation and maintenance capabilities (IngressTrait), custom service replica number operation and maintenance capabilities (ManualscalerTrait), persistent Management operation and maintenance capabilities (VolumeMounterTrait) and release strategy operation and maintenance capabilities (FlaaggerTrait).
  • AutoScalerTrait automatic elastic scaling operation and maintenance capabilities
  • IngressTrait load balancing operation and maintenance capabilities
  • ManualscalerTrait custom service replica number operation and maintenance capabilities
  • VolumeMounterTrait persistent Management operation and maintenance capabilities
  • DelaaggerTrait release strategy operation and maintenance capabilities
  • the operation and maintenance capabilities according to the exemplary embodiments of the present disclosure may include any other possible operation and maintenance capabilities in addition to the above-mentioned operation and maintenance capabilities.
  • FIG. 3 is a block diagram illustrating an application building platform according to an exemplary embodiment of the present disclosure.
  • an application building platform 300 (hereinafter, may be referred to as platform 300 for short) according to an exemplary embodiment of the present disclosure may include a workload library 310 , an operation and maintenance capability library 320 , a controller library 330 , and an API module 340 .
  • the workload library 310 may include at least one workload, wherein each workload encapsulates a variety of service-related resources in the infrastructure cluster on which the platform 300 rests for executing the corresponding service.
  • the workload library 310 may include at least one of a first workload corresponding to an online service application and a second workload corresponding to an offline service application.
  • the workload library 310 is not limited to this, and may also include other possible workloads, for example, workloads corresponding to online and offline mixed service applications, and the like.
  • the first workload may encapsulate native resources such as deployment, statefulset, daemonset, pod, service, and configmap in the kubernetes cluster.
  • the first workload can also encapsulate non-kubernetes native resources.
  • the second workload can encapsulate native resources such as jobs, cronjobs, and configmaps in the kubernetes cluster.
  • the second workload can also encapsulate non-kubernetes native resources.
  • the operation and maintenance capability library 320 may include at least one operation and maintenance capability, wherein each operation and maintenance capability encapsulates a variety of operation and maintenance-related resources in the infrastructure cluster on which the platform 300 relies to perform corresponding operation and maintenance.
  • the operation and maintenance capability library 320 may include automatic elastic expansion and contraction operation and maintenance capabilities, load balancing operation and maintenance capabilities, custom service copy number operation and maintenance capabilities, persistence management operation and maintenance capabilities, and release policy operation and maintenance capabilities at least one of the dimensional capabilities.
  • the operation and maintenance capability library 310 is not limited to this, and may also include other possible operation and maintenance capabilities, such as log operation and maintenance capabilities, monitoring operation and maintenance capabilities, and the like.
  • the automatic elastic expansion and contraction operation and maintenance capability can encapsulate the Horizontal Pod Autoscaler and Promethus resources in the kubernetes cluster, which are used to dynamically adjust the number of service pod replicas .
  • the load balancing operation and maintenance capability can encapsulate the Service and Ingress resources in the kubernetes cluster, and use the existing load balancing capabilities of the Ingress in the kubernetes cluster to provide load balancing capabilities for services created by user-configured workloads.
  • the operation and maintenance capability of customizing the number of service copies can update the number of service copies to the expected value according to the corresponding resources pulled by the workload configured by the user, so as to converge and/or modify the number of service copies within the value of the customized number of service copies Replica resource size for user-configured workloads.
  • Persistent management operation and maintenance capabilities can encapsulate Persistent Volumes, Persistent Volume Claims, StorageClass resources and various open source provider resources in the kubernetes cluster to provide service data persistence requirements.
  • the release strategy operation and maintenance capability can encapsulate the open source release strategy Flagger resources, control the behavior of the Flagger, and enable the Flagger to control the resources pulled by the workload, which is used to support the user to configure the release strategy.
  • the controller library 330 may include a respective controller for each workload and each operational capability, wherein each controller is used to manage resources related to the corresponding workload or operational capability.
  • the workload controller can choose to create the corresponding kubernetes resources (for example, native resources or non-native resources) according to the parameters in the corresponding workload, so that the APP service can converge to the desired state, and can also monitor the changes of the corresponding resources , so that the state of the resource converges in the desired state.
  • the workload controller can automatically complete the recycling of related resources.
  • the operation and maintenance capability controller can choose to create the corresponding kubernetes resources or update (patch) the resources pulled by the corresponding workload according to the parameters in the corresponding operation and maintenance capabilities to meet the operation and maintenance requirements of the corresponding APP.
  • the API module 340 may be used for a user (eg, an application developer) to configure workloads and operational capabilities (eg, including declaring which workloads and operational capabilities to use and parameters associated with them) to perform construction of the application.
  • a user eg, an application developer
  • workloads and operational capabilities eg, including declaring which workloads and operational capabilities to use and parameters associated with them
  • FIG. 4 is a flowchart illustrating a method of providing an application building service according to an exemplary embodiment of the present disclosure.
  • each workload encapsulates a variety of service-related resources in the infrastructure cluster on which the platform 300 relies to execute corresponding services
  • each operation and maintenance capability encapsulates a variety of services in the infrastructure cluster on which the platform 300 relies.
  • Operation and maintenance related resources are used to perform corresponding operation and maintenance.
  • the at least one workload may include at least one of a first workload corresponding to an online service application and a second workload corresponding to an offline service application.
  • the workload is not limited to this, and may also include other possible workloads, for example, workloads corresponding to online and offline mixed service applications, and the like.
  • the first workload may encapsulate native resources such as deployment, statefulset, daemonset, pod, service, and configmap in the kubernetes cluster.
  • the first workload can also encapsulate non-kubernetes native resources.
  • the second workload can encapsulate native resources such as jobs, cronjobs, and configmaps in the kubernetes cluster.
  • the second workload can also encapsulate non-kubernetes native resources.
  • the at least one operation and maintenance capability may include an automatic elastic expansion and shrinkage operation and maintenance capability, a load balancing operation and maintenance capability, a custom service copy number operation and maintenance capability, a persistence management operation and maintenance capability, and a publishing capability.
  • At least one of the policy operation and maintenance capabilities are not limited to this, and may also include other possible operation and maintenance capabilities, such as log operation and maintenance capabilities, monitoring operation and maintenance capabilities, and the like.
  • the automatic elastic expansion and contraction operation and maintenance capability can encapsulate the Horizontal Pod Autoscaler and Promethus resources in the kubernetes cluster, which are used to dynamically adjust the number of service pod replicas .
  • the load balancing operation and maintenance capability can encapsulate the Service and Ingress resources in the kubernetes cluster, and use the existing load balancing capabilities of the Ingress in the kubernetes cluster to provide load balancing capabilities for services created by user-configured workloads.
  • the operation and maintenance capability of customizing the number of service copies can update the number of service copies to the expected value according to the corresponding resources pulled by the workload configured by the user, so as to converge and/or modify the number of service copies within the value of the customized number of service copies Replica resource size for user-configured workloads.
  • Persistent management operation and maintenance capabilities can encapsulate Persistent Volumes, Persistent Volume Claims, StorageClass resources and various open source provider resources in the kubernetes cluster to provide service data persistence requirements.
  • the release strategy operation and maintenance capability can encapsulate the open source release strategy Flagger resources, control the behavior of the Flagger, and enable the Flagger to control the resources pulled by the workload, which is used to support the user to configure the release strategy.
  • a respective controller for each workload and each operation and maintenance capability is provided, wherein each controller is used to manage resources related to the corresponding workload or operation and maintenance capability.
  • the workload controller can choose to create the corresponding kubernetes resources (for example, native resources or non-native resources) according to the parameters in the corresponding workload, so that the APP service can converge to the desired state, and can also monitor the changes of the corresponding resources , so that the state of the resource converges in the desired state.
  • the workload controller can automatically complete the recycling of related resources.
  • the operation and maintenance capability controller can choose to create the corresponding kubernetes resources or update (patch) the resources pulled by the corresponding workload according to the parameters in the corresponding operation and maintenance capabilities to meet the operation and maintenance requirements of the corresponding APP.
  • an API module is provided for a user (eg, an application developer) to configure workloads and operational capabilities (eg, including declaring which workloads and operational capabilities to use and parameters associated with them) to perform application building .
  • FIG. 5 is a block diagram illustrating an application deployment system according to an exemplary embodiment of the present disclosure.
  • the application deployment system 500 may include two parts: a business layer module 510 and a bottom layer module 520 .
  • the business layer module 510 may include an API module 511 , a registration component module 512 and a deployment application module 513 .
  • the bottom layer module 520 may include a controller library module for managing workloads and operation and maintenance capabilities, including at least one workload controller 521 and at least one operation and maintenance capability controller 522 .
  • the API module 511 can provide restfulapi services to the outside world
  • the registration component module 512 can define the protocol standard of the component and execute the component registration
  • the deployment application module 513 can define the protocol standard of the application deployment and execute the application deployment.
  • the service layer module 510 may further include an adaptation module (not shown) for performing a layer of adaptation between the operating system and the controller library module.
  • an adaptation module (not shown) for performing a layer of adaptation between the operating system and the controller library module.
  • the service may not be aware of the controller library The existence of the module, the controller library module is not coupled to the business, and only focuses on the maintenance of the workload and operation and maintenance capabilities.
  • the API module 511 may receive first information for a user (eg, an application developer) to register the component.
  • the first information may include information for declaring at least one workload used by the component and a set of service-related parameters (ie, parameters open to the outside world corresponding to the workload).
  • the user may declare the first information according to a standard protocol (standard configuration file) provided by the platform 300 .
  • the at least one workload may include at least one of a first workload corresponding to an online service application and a second workload corresponding to an offline service application.
  • the at least one workload is not limited to this, and may also include other possible workloads, for example, workloads corresponding to online and offline mixed service applications, and the like.
  • the infrastructure cluster of the platform 300 is a kubernetes cluster
  • the first workload can encapsulate native resources such as deployment, statefulset, daemonset, pod, service, and configmap in the kubernetes cluster.
  • the first workload can also encapsulate non-kubernetes native resources.
  • the second workload can encapsulate native resources such as jobs, cronjobs, and configmaps in the kubernetes cluster.
  • the second workload can also encapsulate non-kubernetes native resources.
  • the set of business-related parameters may include: an image identification for obtaining the address of the image to be used, an environment variable for specifying the address of the model to be used, an environment variable for specifying the address of the model to be used At least one of the parameters of the configuration file, the image startup command and parameters, the name and version number of the component, the service health check probe, and the environment variables that the service opens to the outside world.
  • the register component module 512 may create the component according to the first information to register the component with the infrastructure cluster on which the platform 300 rests.
  • the component embeds at least one workload and a set of business-related parameters declared by the user.
  • the API module 511 may receive second information used by a user (eg, an application developer) to deploy the application.
  • the second information may include a set of services for declaring the component and its related information (for example, the name of the component, version number, etc.), at least one operation and maintenance capability used and its parameters, and a set of services declared when registering the component Information about relevant parameters.
  • the user may declare the second information according to a standard protocol (standard configuration file) provided by the platform 300 .
  • the at least one operation and maintenance capability may include an automatic elastic expansion and shrinkage operation and maintenance capability, a load balancing operation and maintenance capability, a custom service copy number operation and maintenance capability, a persistence management operation and maintenance capability, and a publishing capability.
  • At least one of the policy operation and maintenance capabilities is not limited to this, and may also include other possible operation and maintenance capabilities, for example, a log operation and maintenance capability, a monitoring operation and maintenance capability, and the like.
  • the automatic elastic expansion and contraction capacity operation and maintenance capability can encapsulate resources such as Horizontal Pod Autoscaler and Promethus in the kubernetes cluster for dynamically adjusting service pod replicas number.
  • the load balancing operation and maintenance capability can encapsulate resources such as Service and Ingress in the kubernetes cluster, and use the existing load balancing capabilities of the Ingress in the kubernetes cluster to provide load balancing capabilities for the services created by the workload configured by the user.
  • the operation and maintenance capability of customizing the number of service copies can update the number of service copies to the expected value according to the corresponding resources pulled by the workload configured by the user, so as to converge and/or modify the number of service copies within the value of the customized number of service copies Replica resource size for user-configured workloads.
  • Persistent management operation and maintenance capabilities can encapsulate Persistent Volumes, Persistent Volume Claims, StorageClass and other resources in the kubernetes cluster, as well as a variety of open source provider resources to provide service data persistence requirements.
  • the release strategy operation and maintenance capability can encapsulate the open source release strategy Flagger resources, control the behavior of the Flagger, and enable the Flagger to control the resources pulled by the workload, which is used to support the user to configure the release strategy.
  • the parameters of the automatic elastic scaling capacity operation and maintenance capability may include, but are not limited to, CPU size, memory size, minimum number of copies, and maximum number of copies.
  • the parameters of the load balancing operation and maintenance capability may include, but are not limited to, the requested path, the requested domain name, and the requested service port.
  • the parameters for customizing the operation and maintenance capabilities of the number of replicas of a service may include, but are not limited to, the number of replicas and the CPU size, memory size, and GPU size of the replicas.
  • Parameters of persistent management operation and maintenance capabilities may include, but are not limited to, storage type, storage size, and mounting path.
  • the parameters of the release policy operation and maintenance capability may include, but are not limited to, release policy parameters and release policies.
  • the deployment application module 513 may create an application deployment configuration file according to the second information to create the application deployment configuration file to the infrastructure cluster on which 300 is based.
  • the application deployment configuration file includes the declared component and its related information, at least one used operation and maintenance capability and its parameters, and the information of a set of business-related parameters declared when the component is registered.
  • the at least one workload and the at least one operational capability can be instantiated.
  • the at least one instance of the workload and the at least one instance of the operation and maintenance capability may be rendered through an interpreter installed on the platform 300 .
  • the respective controllers 521 and 522 of each of the at least one workload and the at least one operation and maintenance capability monitor that the corresponding workload or operation and maintenance capability is instantiated. , and create corresponding resources according to the corresponding meta information to complete the deployment of the application.
  • the meta information may be generated by the adaptation module based on workload, operation and maintenance capability, business-related parameters, and operation and maintenance capability parameters when performing adaptation.
  • the set of business-related parameters may include indicating whether the online service application is a stateful service or a stateless service
  • the first parameter of the first workload the controller of the first workload can create one or more resources in deployment, statefulset, daemonset, pod, service and configmap according to the meta-information of the declared first parameter.
  • the controller of the first workload when the first parameter indicates that the online service application is a stateful service, the controller of the first workload creates resources such as statefulset, service, and configmap according to the meta-information of the declared first parameter, and when the first parameter indicates that the online service application is In the stateless service, the controller of the first workload creates deployment or daemonset resources according to the meta-information of the declared first parameter.
  • the set of service-related parameters may include an indicator indicating whether the offline service application is a one-time service or a scheduled service
  • the controller of the second workload may create one or more resources in the job, cronjob and configmap according to the declared meta-information of the second parameter.
  • the controller of the second workload may create a job resource according to the declared meta information of the second parameter.
  • the controller of the second workload may create a cronjob or a job resource according to the declared meta-information of the second parameter.
  • the controller of the automatic elastic expansion and contraction operation and maintenance capability may control the automatic elastic expansion and contraction operation and maintenance capability through the automatic elastic expansion and contraction operation and maintenance capability.
  • the HPA of kubernetes enables HPA to monitor the status information of the resources pulled up by the at least one workload in real time according to the set parameters, and can adjust the at least one workload according to the expected load and the expected number of copies defined by the automatic elastic expansion and contraction operation and maintenance capabilities.
  • the number of Pod instances under load performs elastic scaling.
  • the controller of the load balancing operation and maintenance capability may create a corresponding load balancing rule according to the meta information corresponding to the requested path, the requested domain name and the requested service port .
  • the controller of the operation and maintenance capability of customizing the number of service copies may control the number of copies of the resource pulled by the at least one workload, so that the copies of the service instance The number is within the set value.
  • the controller of the persistent management and operation and maintenance capability may create a corresponding persistent storage volume according to the meta information corresponding to the storage type, storage size and mounting path Declare and storage type and mount the storage volume to the specified path inside the pod.
  • the controller of the release policy operation and maintenance capability may create a corresponding release policy according to the set release policy parameters and meta information corresponding to the set release policy.
  • FIG. 6 is a flowchart illustrating an application deployment method according to an exemplary embodiment of the present disclosure.
  • first information for registering a component by a user may be received through the API module 511 .
  • the first information may include information for declaring at least one workload used by the component and a set of service-related parameters (ie, parameters open to the outside world corresponding to the workload).
  • the user may declare the first information according to a standard protocol (standard configuration file) provided by the platform 300 .
  • the at least one workload may include at least one of a first workload corresponding to an online service application and a second workload corresponding to an offline service application.
  • the at least one workload is not limited to this, and may also include other possible workloads, for example, workloads corresponding to online and offline mixed service applications, and the like.
  • the infrastructure cluster of the platform 300 is a kubernetes cluster
  • the first workload can encapsulate native resources such as deployment, statefulset, daemonset, pod, service, and configmap in the kubernetes cluster.
  • the first workload can also encapsulate non-kubernetes native resources.
  • the second workload can encapsulate native resources such as jobs, cronjobs, and configmaps in the kubernetes cluster.
  • the second workload can also encapsulate non-kubernetes native resources.
  • the set of business-related parameters may include: an image identification for obtaining the address of the image to be used, an environment variable for specifying the address of the model to be used, an environment variable for specifying the address of the model to be used At least one of the parameters of the configuration file, the image startup command and parameters, the name and version number of the component, the service health check probe, and the environment variables that the service opens to the outside world.
  • the component may be created according to the first information by the registering component module 512 to register the component with the infrastructure cluster on which the platform 300 is based.
  • the component embeds at least one workload and a set of business-related parameters declared by the user.
  • second information for deploying the application by a user may be received through the API module 511 .
  • the second information may include a set of services for declaring the component and its related information (for example, the name of the component, version number, etc.), at least one operation and maintenance capability used and its parameters, and a set of services declared when registering the component Information about relevant parameters.
  • the user may declare the second information according to a standard protocol (standard configuration file) provided by the platform 300 .
  • the at least one operation and maintenance capability may include an automatic elastic expansion and shrinkage operation and maintenance capability, a load balancing operation and maintenance capability, a custom service copy number operation and maintenance capability, a persistence management operation and maintenance capability, and a publishing capability.
  • At least one of the policy operation and maintenance capabilities is not limited to this, and may also include other possible operation and maintenance capabilities, for example, a log operation and maintenance capability, a monitoring operation and maintenance capability, and the like.
  • the automatic elastic expansion and contraction capacity operation and maintenance capability can encapsulate resources such as Horizontal Pod Autoscaler and Promethus in the kubernetes cluster for dynamically adjusting service pod replicas number.
  • the load balancing operation and maintenance capability can encapsulate resources such as Service and Ingress in the kubernetes cluster, and use the existing load balancing capabilities of the Ingress in the kubernetes cluster to provide load balancing capabilities for the services created by the workload configured by the user.
  • the operation and maintenance capability of customizing the number of service copies can update the number of service copies to the expected value according to the corresponding resources pulled by the workload configured by the user, so as to converge and/or modify the number of service copies within the value of the customized number of service copies Replica resource size for user-configured workloads.
  • Persistent management operation and maintenance capabilities can encapsulate Persistent Volumes, Persistent Volume Claims, StorageClass and other resources in the kubernetes cluster, as well as a variety of open source provider resources to provide service data persistence requirements.
  • the release strategy operation and maintenance capability can encapsulate the open source release strategy Flagger resources, control the behavior of the Flagger, and enable the Flagger to control the resources pulled by the workload, which is used to support the user to configure the release strategy.
  • the parameters of the automatic elastic scaling capacity operation and maintenance capability may include, but are not limited to, CPU size, memory size, minimum number of copies, and maximum number of copies.
  • the parameters of the load balancing operation and maintenance capability may include, but are not limited to, the requested path, the requested domain name, and the requested service port.
  • the parameters for customizing the operation and maintenance capabilities of the number of replicas of a service may include, but are not limited to, the number of replicas and the CPU size, memory size, and GPU size of the replicas.
  • Parameters of persistent management operation and maintenance capabilities may include, but are not limited to, storage type, storage size, and mounting path.
  • the parameters of the release policy operation and maintenance capability may include, but are not limited to, release policy parameters and release policies.
  • an application deployment configuration file may be created according to the second information by the deployment application module 513 to create the application deployment configuration file to the infrastructure cluster on which the platform 300 relies.
  • the application deployment configuration file includes the declared component and its related information, at least one used operation and maintenance capability and its parameters, and the information of a set of business-related parameters declared when the component is registered.
  • the at least one workload and the at least one operational capability may be instantiated.
  • the at least one instance of the workload and the at least one instance of the operation and maintenance capability may be rendered through an interpreter installed on the platform 300 .
  • the respective controllers 521 and 522 of each of the at least one workload and each of the at least one operation and maintenance capability can monitor the corresponding workload or operation and maintenance capability.
  • corresponding resources are created according to the corresponding meta information to complete the deployment of the application.
  • the meta information may be generated by the adaptation module based on workload, operation and maintenance capability, business-related parameters, and operation and maintenance capability parameters when performing adaptation.
  • the set of business-related parameters may include indicating whether the online service application is a stateful service or a stateless service
  • the first parameter of the first workload the controller of the first workload can create one or more resources in deployment, statefulset, daemonset, pod, service and configmap according to the meta-information of the declared first parameter.
  • the controller of the first workload when the first parameter indicates that the online service application is a stateful service, the controller of the first workload creates a statefulset resource according to the meta-information of the declared first parameter, and when the first parameter indicates that the online service application is a stateless service, The controller of the first workload creates a deployment resource according to the declared meta-information of the first parameter.
  • the set of service-related parameters may include an indicator indicating whether the offline service application is a one-time service or a scheduled service
  • the controller of the second workload may create one or more resources in the job, cronjob and configmap according to the declared meta-information of the second parameter.
  • the controller of the second workload may create a job resource according to the declared meta information of the second parameter.
  • the controller of the second workload may create a cronjob resource according to the declared meta information of the second parameter.
  • the controller of the automatic elastic expansion and contraction operation and maintenance capability may control the automatic elastic expansion and contraction operation and maintenance capability through the automatic elastic expansion and contraction operation and maintenance capability.
  • the HPA of kubernetes enables HPA to monitor the status information of the resources pulled up by the at least one workload in real time according to the set parameters, and can adjust the at least one workload according to the expected load and the expected number of copies defined by the automatic elastic expansion and contraction operation and maintenance capabilities.
  • the number of Pod instances under load performs elastic scaling.
  • the controller of the load balancing operation and maintenance capability may create a corresponding load balancing rule according to the meta information corresponding to the requested path, the requested domain name and the requested service port .
  • the controller of the operation and maintenance capability of customizing the number of service copies may control the number of copies of the resource pulled by the at least one workload, so that the copies of the service instance The number is within the set value.
  • the controller of the persistent management and operation and maintenance capability may create a corresponding persistent storage volume according to the meta information corresponding to the storage type, storage size and mounting path Declare and storage type and mount the storage volume to the specified path inside the pod.
  • the controller of the release policy operation and maintenance capability may create a corresponding release policy according to the set release policy parameters and meta information corresponding to the set release policy.
  • the input of the recommendation service application is the user identification information, the materials accessed by the user, and the list of materials to be recommended.
  • the output of the recommendation service application is the ranking of the recommended material list, and the top-ranked materials are recommended to the user.
  • the recommendation service application provides external access capabilities, receives user requests, and provides A/B Testing capabilities to determine the impact of different models on user click-through rate (CTR).
  • CTR click-through rate
  • Declare the component (if the component has been declared, skip this step). Declaring components can be done by writing standard protocols.
  • the information to be declared by the declaration component and the parameters open to the outside world may include: specifying the recommended service as an online service and a stateless service through the first parameter (workloadsubtype field); the image identifier of the recommended service, according to which the image address can be pulled; recommended The model address used by the service, which can be specified by environment variables; the configuration file used by the recommended service, which can be specified by the config field; the default resources (for example, CPU and memory), the name and version of the component (for example, sage-rec-svc) to start the service , 1.0.0); service health check probes (for example, liveness and readiness); specify the environment variables that the service opens to the outside world, which can be passed in when deploying the service.
  • Deploy the application Deploying applications can be accomplished by writing standard protocols. When deploying an application, you need to specify the following information: specify the component that uses the recommended service (which can be specified by the component name) and its version number; the application name used when deploying the application; the operation and maintenance capabilities used by the declaration; open parameters.
  • three operation and maintenance capabilities need to be declared, namely, load balancing operation and maintenance capabilities, custom service replica number operation and maintenance capabilities (providing the ability to manually change replica resources), release policy operation and maintenance capabilities (providing A/ B Testing ability).
  • the interpreter installed on the platform will render the first workload instance corresponding to the online service application and the above three operation and maintenance capability instances.
  • the load balancing operation and maintenance capability creates Ingress rules based on the created Service, and provides estimated services to the outside world.
  • the component sage-rec-svc:1.0.0 can be upgraded to sage-rec-svc:1.0.1, mainly to update the image in the first workload.
  • various service resources of the infrastructure cluster supported by the platform are organized, packaged and managed through workloads, and the operation and maintenance capabilities are used to Organize, encapsulate and manage the various operation and maintenance resources of the infrastructure cluster on which the platform relies, so as to provide all the product functions required by the upper-layer development application, which can not only provide richer business requirements, but also control all behaviors.
  • it satisfies community standards and ecology, which facilitates the subsequent integration with the community, and enables application developers to focus only on business-related development work without having to pay attention to or develop the underlying architecture and operation and maintenance details.
  • the management of the application all revolves around the management of workload and operation and maintenance capabilities.
  • iterative upgrade and exploration of the product it can continuously strengthen and stabilize the workload and operation and maintenance capabilities, and upper-layer application developers only need to declare and use it.
  • the component information may include the component name and the component version number
  • a new version number may be added, which will not Affecting existing services, you only need to declare a new version number in the application configuration file.
  • application delivery is delivered in the form of components, so that it can be delivered as a single application or a specified application. Due to the transfer from a large number of yaml files to the combined declaration of workload and operation and maintenance capabilities, the template template needs to be fully rendered, and now only the corresponding components or application configuration files need to be upgraded, and the workload and operation and maintenance capabilities are kubernetes. Operation and maintenance can make full use of the extension mechanism provided by kubernetes and the stability of its own mechanism. Currently, the image of the specified upgraded application can be delivered, and the image used by the workload in the component can be upgraded without the heavy delivery of offline packages. With the standard set of workload and operation and maintenance capabilities, development, operation and maintenance, and delivery are coordinated in the standard, which greatly reduces the communication cost.
  • each module in the application building platform shown in FIG. 3 and the application deployment system through the application building platform shown in FIG. 5 may be configured as software, hardware, firmware or any combination of the above to perform specific functions.
  • each module may correspond to a dedicated integrated circuit, may also correspond to pure software code, or may correspond to a module combining software and hardware.
  • one or more functions implemented by each module can also be uniformly performed by components in a physical entity device (eg, a processor, a client or a server, etc.).
  • the method for providing an application construction service described with reference to FIG. 4 and the application deployment method described in FIG. 6 may be implemented by programs (or instructions) recorded on a computer-readable storage medium.
  • a computer-readable storage medium may be provided storing instructions that, when executed by at least one computing device, cause the at least one computing device to execute a provisioning application according to the present disclosure A method for building a service and/or an application deployment method.
  • the computer program in the above-mentioned computer-readable storage medium can run in an environment deployed in computer equipment such as a client, a host, an agent device, a server, etc. It should be noted that the computer program can also be used to perform additional steps in addition to the above-mentioned steps or More specific processing is performed when the above steps are performed, and the contents of these additional steps and further processing have been mentioned in the description of the related method with reference to FIG. 4 and FIG.
  • each module in the application construction platform and the application deployment system can completely rely on the running of the computer program to achieve corresponding functions, that is, each module corresponds to each step in the functional architecture of the computer program , so that the whole system is called through special software packages (for example, lib library) to realize the corresponding functions.
  • special software packages for example, lib library
  • each module shown in FIG. 3 and FIG. 5 can also be implemented by hardware, software, firmware, middleware, microcode or any combination thereof.
  • program codes or code segments for performing corresponding operations may be stored in a computer-readable medium such as a storage medium, so that a processor can read and execute the corresponding program by reading code or code segment to perform the corresponding action.
  • exemplary embodiments of the present disclosure may also be implemented as a computing device including a storage component and a processor, the storage component stores a computer-executable instruction set, and when the computer-executable instruction set is executed by the processor, executes the A method of providing an application construction service and/or a method of application deployment according to an exemplary embodiment of the present disclosure.
  • the computing device may be deployed in a server or a client, or may be deployed on a node device in a distributed network environment.
  • the computing device may be a PC computer, a tablet device, a personal digital assistant, a smartphone, a web application, or other device capable of executing the set of instructions described above.
  • the computing device does not have to be a single computing device, but can also be any set of devices or circuits capable of individually or jointly executing the above-mentioned instructions (or instruction sets).
  • the computing device may also be part of an integrated control system or system manager, or may be configured as a portable electronic device that interfaces locally or remotely (eg, via wireless transmission).
  • a processor may include a central processing unit (CPU), a graphics processing unit (GPU), a programmable logic device, a special purpose processor system, a microcontroller, or a microprocessor.
  • processors may also include analog processors, digital processors, microprocessors, multi-core processors, processor arrays, network processors, and the like.
  • Some operations described in the method for providing an application construction service and/or the application deployment method according to the exemplary embodiments of the present disclosure may be implemented by software, some operations may be implemented by hardware, and in addition, some operations may be implemented by software These operations are implemented by means of a combination of hardware.
  • the processor may execute instructions or code stored in one of the storage components, which may also store data. Instructions and data may also be sent and received over a network via a network interface device, which may employ any known transport protocol.
  • the memory component may be integrated with the processor, eg, RAM or flash memory arranged within an integrated circuit microprocessor or the like. Additionally, the storage components may include separate devices, such as external disk drives, storage arrays, or any other storage device that may be used by a database system. The storage component and the processor may be operatively coupled, or may communicate with each other, eg, through I/O ports, network connections, etc., to enable the processor to read files stored in the storage component.
  • the computing device may also include a video display (such as a liquid crystal display) and a user interaction interface (such as a keyboard, mouse, touch input device, etc.). All components of the computing device may be connected to each other via a bus and/or network.
  • a video display such as a liquid crystal display
  • a user interaction interface such as a keyboard, mouse, touch input device, etc.
  • the method of providing an application building service and/or the application deployment method according to the exemplary embodiments of the present disclosure may be described as various interconnected or coupled functional blocks or functional diagrams. However, these functional blocks or functional diagrams may be equally integrated into a single logical device or operate along non-precise boundaries.
  • the method for providing an application building service described with reference to FIG. 4 and the application deployment method described with reference to FIG. 6 may be implemented by a system including at least one computing device and at least one storage device storing instructions.
  • At least one computing device is a computing device for providing a method for an application building service and/or a general application deployment method according to an exemplary embodiment of the present disclosure
  • the storage device stores computer-executable instructions
  • the set when the set of computer-executable instructions is executed by at least one computing device, performs the method for providing an application building service described with reference to FIG. 4 and/or the application deployment method described with reference to FIG. 6 .
  • an electronic device comprising: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement a reference The method for providing an application construction service described in FIG. 4 and/or the application deployment method described with reference to FIG. 6 .
  • various service resources of the infrastructure cluster supported by the platform are organized, packaged and managed through workloads, and the operation and maintenance capabilities are used to Organize, encapsulate and manage the various operation and maintenance resources of the infrastructure cluster on which the platform relies, so as to provide all the product functions required by the upper-layer development application, which can not only provide richer business requirements, but also control all behaviors.
  • it satisfies community standards and ecology, which facilitates the subsequent integration with the community, and enables application developers to focus only on business-related development work without having to pay attention to or develop the underlying architecture and operation and maintenance details.

Abstract

Provided are a method for providing an application construction service, and an application construction platform, an application deployment method and a system. The method for providing an application construction service comprises: providing at least one working load and at least one operation and maintenance capability, wherein various types of service-related resources in an infrastructure cluster are encapsulated in each working load, so as to execute corresponding services, and various types of resources related to operation and maintenance in the infrastructure cluster are encapsulated in each operation and maintenance capability, so as to execute corresponding operation and maintenance; providing respective controllers for each working load and each operation and maintenance capability, wherein each controller is used for managing a resource related to a corresponding working load or a resource related to a corresponding operation and maintenance capability; and providing an API module, wherein the API module is used for making a user configure a working load and an operation and maintenance capability by means of the API module, so as to execute application construction.

Description

提供应用构建服务的方法及应用构建平台、应用部署方法和系统Method for providing application construction service, application construction platform, application deployment method and system
本申请要求申请号为202010845106.7,申请日为2020年8月20日,名称为“提供应用构建服务的方法及应用构建平台”的中国专利申请的优先权要求以及申请号为202010845842.2,申请日为2020年8月20日,名称为“应用部署方法和系统”的中国专利申请的优先权,其中,上述申请公开的内容通过引用结合在本申请中。This application requires the application number of 202010845106.7, the application date is August 20, 2020, the priority claim of the Chinese patent application entitled "Method for providing application construction services and application construction platform" and the application number of 202010845842.2, the application date is 2020 On August 20, 2008, the priority of the Chinese patent application entitled "Application Deployment Method and System", wherein the content disclosed in the above application is incorporated herein by reference.
技术领域technical field
本公开涉及云平台应用开发领域,更具体地说,涉及一种提供应用构建服务的方法及应用构建平台、应用部署方法和系统。The present disclosure relates to the field of cloud platform application development, and more particularly, to a method for providing application construction services, an application construction platform, and an application deployment method and system.
背景技术Background technique
云原生时代,以kubernetes为底座的PaaS(平台即服务)平台逐步成为共识,Kubernetes提供了各种原生的资源模型,比如deployment、statefulset、configmap、service等等,PaaS维护人员通过组合一种或多种资源模型,来构成一个服务,每个平台都可以拥有一个自己的组合方式。In the cloud native era, the PaaS (Platform as a Service) platform based on kubernetes has gradually become a consensus. Kubernetes provides various native resource models, such as deployment, statefulset, configmap, service, etc. PaaS maintainers can combine one or more A resource model is used to form a service, and each platform can have its own composition.
例如,图1是示出现有的PaaS平台的架构示意图。如图1所示,PaaS平台分为内置服务和在线服务两个部分。对于内置服务部分,通过devops工具将例如监控指标数据(Promethus)、鉴权(Authorization)、监控(Monitor)、日志(Log)等服务渲染为kubernetes yaml文件,然后通过kubectl把内置应用部署到kubernetes集群。对于在线服务部分,通过PAS来将Tensorflow-Serving、GDBT、Flink Task、H2O、定制化实时预估(Customize Real-Time Estimates)、PMML等服务部署到kubernetes集群,PAS内部维护了kubernetes原生资源的模板(例如,Deployment Template、Service Template、Configmap Template等),然后组合各个模板来完成资源部署。For example, FIG. 1 is a schematic diagram showing the architecture of an existing PaaS platform. As shown in Figure 1, the PaaS platform is divided into two parts: built-in services and online services. For the built-in service part, services such as monitoring indicator data (Promethus), authentication (Authorization), monitoring (Monitor), and log (Log) are rendered into kubernetes yaml files through the devops tool, and then the built-in applications are deployed to the kubernetes cluster through kubectl . For the online service part, Tensorflow-Serving, GDBT, Flink Task, H2O, Customize Real-Time Estimates, PMML and other services are deployed to the kubernetes cluster through PAS, and the templates of kubernetes native resources are maintained inside PAS. (For example, Deployment Template, Service Template, Configmap Template, etc.), and then combine each template to complete the resource deployment.
现有的PaaS平台存在以下问题:(1)devops和pas是两套独立的技术栈,虽然本质上是相同的,都在将服务部署到kubernetes集群,但彼此沉淀的技术不能共享,通过两种不同的方式来部署和管理,维护两套技术方案,好的方案思路彼此不能复用。(2)devops维护大量的yaml模板,模式固定,扩展能力较差,遇到复杂需求业务接入成本高昂。(3)PAS通过维护资源模板的方式来完成服务部署,模板也是固定的kubernetes原生资源的json模板,扩展性较差,复用性不高。(4)现有模板方式难于形成沉淀技术和抽象业务模型的标准。The existing PaaS platform has the following problems: (1) devops and pas are two independent technology stacks. Although they are essentially the same, they are both deploying services to the kubernetes cluster, but the technologies accumulated with each other cannot be shared. Two sets of technical solutions are deployed, managed and maintained in different ways. Good solution ideas cannot be reused. (2) Devops maintains a large number of yaml templates, the mode is fixed, the expansion ability is poor, and the service access cost is high when encountering complex requirements. (3) PAS completes service deployment by maintaining resource templates, which are also fixed json templates of kubernetes native resources, which have poor scalability and low reusability. (4) It is difficult to form the standard of precipitation technology and abstract business model in the existing template method.
发明内容SUMMARY OF THE INVENTION
本公开的示例性实施例可至少解决上述问题,也可不解决上述问题。Exemplary embodiments of the present disclosure may or may not address at least the above-mentioned problems.
根据本公开的第一方面,一种包括至少一个计算装置和至少一个存储指令的存储装置的系统,其中,所述指令在被所述至少一个计算装置运行时,促使所述至少一个计算装置执行提供应用构建服务的方法的以下步骤:提供至少一个工作负载和至少一个运维能力,其中,每个工作负载封装了基础设施集群中的多种资源相关服务用于执行对应的服务,每个运维能力封装了所述基础设施集群中的多种运维相关资源以用于执行对应的运维;提供每个工作负载和每个运维能力各自的控制器,其中,每个控制器用于管理对应的工作负载或运维能力相关的资源;提供API模块,其中,所述API模块用于使用户通过API模块配置工作负载和运维能力以执行应用的构建。According to a first aspect of the present disclosure, a system comprising at least one computing device and at least one storage device storing instructions, wherein the instructions, when executed by the at least one computing device, cause the at least one computing device to execute The following steps of the method for providing application building services: providing at least one workload and at least one operation and maintenance capability, wherein each workload encapsulates multiple resource-related services in the infrastructure cluster for executing corresponding services, and each operation The maintenance capability encapsulates a variety of operation and maintenance-related resources in the infrastructure cluster for performing corresponding operation and maintenance; provides a respective controller for each workload and each operation and maintenance capability, wherein each controller is used to manage Corresponding workloads or resources related to operation and maintenance capabilities; provide an API module, wherein the API module is used to enable users to configure workloads and operation and maintenance capabilities through the API module to execute application construction.
根据本公开的第二方面,一种提供应用构建服务的方法,包括:提供至少一个工作负 载和至少一个运维能力,其中,每个工作负载封装了基础设施集群中的多种服务相关资源以用于执行对应的服务,每个运维能力封装了所述基础设施集群中的多种运维相关资源以用于执行对应的运维;提供每个工作负载和每个运维能力各自的控制器,其中,每个控制器用于管理对应的工作负载或运维能力相关的资源;提供API模块,其中,所述API模块用于使用户通过API模块配置工作负载和运维能力以执行应用的构建。According to a second aspect of the present disclosure, a method for providing an application building service includes: providing at least one workload and at least one operation and maintenance capability, wherein each workload encapsulates a variety of service-related resources in an infrastructure cluster to Used to execute the corresponding service, each operation and maintenance capability encapsulates a variety of operation and maintenance-related resources in the infrastructure cluster for performing the corresponding operation and maintenance; provides the respective control of each workload and each operation and maintenance capability controller, wherein each controller is used to manage the corresponding workload or resources related to operation and maintenance capabilities; provides an API module, wherein the API module is used to enable users to configure workloads and operation and maintenance capabilities through the API module to execute the application's Construct.
根据本公开的第三方面,提供一种应用构建平台,包括:工作负载库,包括至少一个工作负载,其中,每个工作负载封装了所述应用构建平台所依托的基础设施集群中的多种服务相关资源以用于执行对应的服务;运维能力库,包括至少一个运维能力,其中,每个运维能力封装了所述基础设施集群中的多种运维相关资源以用于执行对应的运维;控制器库,包括每个工作负载和每个运维能力各自的控制器,其中,每个控制器用于管理对应的工作负载或运维能力相关的资源;API模块,用于使用户通过API模块配置工作负载和运维能力以执行应用的构建。According to a third aspect of the present disclosure, there is provided an application building platform, comprising: a workload library, including at least one workload, wherein each workload encapsulates a plurality of kinds of infrastructure clusters on which the application building platform relies Service-related resources for executing corresponding services; an operation and maintenance capability library, including at least one operation and maintenance capability, wherein each operation and maintenance capability encapsulates a variety of operation and maintenance-related resources in the infrastructure cluster for executing corresponding services operation and maintenance; controller library, including respective controllers for each workload and each operation and maintenance capability, wherein each controller is used to manage the resources related to the corresponding workload or operation and maintenance capability; API module, used to make The user configures the workload and operation and maintenance capabilities through the API module to execute the construction of the application.
根据本公开的第四方面,提供一种包括至少一个计算装置和至少一个存储指令的存储装置的系统,其中,所述指令在被所述至少一个计算装置运行时,促使所述至少一个计算装置执行提供应用部署方法的以下步骤:通过API模块接收用于注册组件的第一信息,其中,第一信息包括用于声明所述组件使用的至少一个工作负载和一组业务相关参数的信息,每个工作负载封装了基础设施集群中的多种服务相关资源以用于执行对应的服务;通过注册组件模块根据第一信息创建所述组件以将所述组件注册到所述基础设施集群;通过所述API模块接收用于部署应用的第二信息,其中,第二信息包括用于声明使用的组件、使用的至少一个运维能力及其参数和所述一组业务相关参数的信息,其中,每个运维能力封装了所述基础设施集群中的多种运维相关资源以用于执行对应的运维;通过部署应用模块根据第二信息创建应用部署配置文件以将所述应用部署配置文件创建到所述基础设施集群;在所述至少一个工作负载和所述至少一个运维能力被实例化后,通过所述至少一个工作负载和所述至少一个运维能力中的每个工作负载和每个运维能力各自的控制器分别根据对应业务相关参数对应的元信息和对应运维能力的参数对应的元信息创建对应的资源以完成应用的部署,其中,每个控制器用于管理对应的实例化后的工作负载或运维能力相关的资源。According to a fourth aspect of the present disclosure, there is provided a system comprising at least one computing device and at least one storage device storing instructions, wherein the instructions, when executed by the at least one computing device, cause the at least one computing device to Performing the following steps of providing an application deployment method: receiving first information for registering a component through an API module, wherein the first information includes information for declaring at least one workload used by the component and a set of business-related parameters, each Each workload encapsulates a variety of service-related resources in the infrastructure cluster for executing corresponding services; the component is created according to the first information by the registration component module to register the component to the infrastructure cluster; The API module receives the second information for deploying the application, wherein the second information includes the information for declaring used components, at least one operation and maintenance capability used and its parameters, and the set of business-related parameters, wherein each Each operation and maintenance capability encapsulates a variety of operation and maintenance related resources in the infrastructure cluster for performing corresponding operation and maintenance; the application deployment configuration file is created by the deployment application module according to the second information to create the application deployment configuration file to the infrastructure cluster; after the at least one workload and the at least one operational capability are instantiated, pass each workload and each of the at least one workload and the at least one operational capability The controllers of each operation and maintenance capability respectively create corresponding resources according to the meta-information corresponding to the corresponding service-related parameters and the meta-information corresponding to the parameters of the corresponding operation and maintenance capability to complete the deployment of the application, wherein each controller is used to manage the corresponding instance resources related to the transformed workload or operational capabilities.
根据本公开的第五方面,提供一种应用部署方法,包括:通过API模块接收用于注册组件的第一信息,其中,第一信息包括用于声明所述组件使用的至少一个工作负载和一组业务相关参数的信息,每个工作负载封装了基础设施集群中的多种服务相关资源以用于执行对应的服务;通过注册组件模块根据第一信息创建所述组件以将所述组件注册到所述基础设施集群;通过所述API模块接收用于部署应用的第二信息,其中,第二信息包括用于声明使用的组件、使用的至少一个运维能力及其参数和所述一组业务相关参数的信息,其中,每个运维能力封装了所述基础设施集群中的多种运维相关资源以用于执行对应的运维;通过部署应用模块根据第二信息创建应用部署配置文件以将所述应用部署配置文件创建到所述基础设施集群;在所述至少一个工作负载和所述至少一个运维能力被实例化后,通过所述至少一个工作负载和所述至少一个运维能力中的每个工作负载和每个运维能力各自的控制器分别根据对应业务相关参数对应的元信息和对应运维能力的参数对应的元信息创建对应的资源以完成应用的部署,其中,每个控制器用于管理对应的实例化后的工作负载或运维能力相关的资源。According to a fifth aspect of the present disclosure, there is provided an application deployment method, comprising: receiving, through an API module, first information for registering a component, wherein the first information includes at least one workload used for declaring the component and a Information about group business-related parameters, each workload encapsulates a variety of service-related resources in the infrastructure cluster for executing corresponding services; the component is created according to the first information by the registration component module to register the component to the infrastructure cluster; receiving second information for deploying an application through the API module, where the second information includes a component used for declaring use, at least one operation and maintenance capability used and its parameters, and the set of services information about relevant parameters, wherein each operation and maintenance capability encapsulates a variety of operation and maintenance-related resources in the infrastructure cluster for performing corresponding operation and maintenance; the deployment application module creates an application deployment configuration file according to the second information to creating the application deployment configuration file to the infrastructure cluster; after the at least one workload and the at least one operation and maintenance capability are instantiated, use the at least one workload and the at least one operation and maintenance capability The respective controllers of each workload and each operation and maintenance capability in the above create corresponding resources according to the meta-information corresponding to the corresponding business-related parameters and the meta-information corresponding to the parameters of the corresponding operation and maintenance capability to complete the deployment of the application, wherein each A controller is used to manage the resources related to the corresponding instantiated workload or operation and maintenance capabilities.
根据本公开的第六方面,提供一种应用部署系统,包括:业务层模块,被配置为:通过API模块接收用于注册组件的第一信息,其中,第一信息包括用于声明所述组件使用的至少一个工作负载和一组业务相关参数的信息,其中,每个工作负载封装了基础设施集群中的多种服务相关资源以用于执行对应的服务,通过注册组件模块根据第一信息创建所述组件以将所述组件注册到所述基础设施集群;通过所述API模块接收用于部署应用的第二信息,其中,第二信息包括用于声明使用的组件、使用的至少一个运维能力及其参数和 所述一组业务相关参数的信息,其中,每个运维能力封装了所述基础设施集群中的多种运维相关资源以用于执行对应的运维;通过部署应用模块根据第二信息创建应用部署配置文件以将所述应用部署配置文件创建到所述基础设施集群;底层模块,被配置为:在所述至少一个工作负载和所述至少一个运维能力被实例化后,通过所述至少一个工作负载和所述至少一个运维能力中的每个工作负载和每个运维能力各自的控制器分别根据对应业务相关参数对应的元信息和对应运维能力的参数对应的元信息创建对应的资源以完成应用的部署,其中,每个控制器用于管理对应的实例化后的工作负载或运维能力相关的资源。According to a sixth aspect of the present disclosure, there is provided an application deployment system, comprising: a business layer module configured to: receive first information for registering a component through an API module, wherein the first information includes a method for declaring the component Information about at least one workload and a set of business-related parameters used, wherein each workload encapsulates a variety of service-related resources in the infrastructure cluster for executing corresponding services, and is created by the registration component module according to the first information The component is used to register the component to the infrastructure cluster; the second information for deploying the application is received through the API module, wherein the second information includes the component used for declaring the use, the at least one operation and maintenance used capability and its parameters and information about the set of business-related parameters, wherein each operation and maintenance capability encapsulates a variety of operation and maintenance-related resources in the infrastructure cluster for performing corresponding operation and maintenance; by deploying an application module Create an application deployment configuration file according to the second information to create the application deployment configuration file to the infrastructure cluster; the underlying module is configured to: be instantiated in the at least one workload and the at least one operation and maintenance capability Then, through the respective controllers of the at least one workload and each of the at least one operation and maintenance capability and each of the operation and maintenance capabilities, according to the meta-information corresponding to the corresponding business-related parameters and the parameters of the corresponding operation and maintenance capability The corresponding meta-information creates corresponding resources to complete application deployment, wherein each controller is used to manage the corresponding instantiated workload or resources related to operation and maintenance capabilities.
根据本公开的第七方面,提供一种存储指令的计算机可读存储介质,其中,当所述指令被至少一个计算装置运行时,促使所述至少一个计算装置执行本公开的提供应用构建服务的方法或应用部署方法。According to a seventh aspect of the present disclosure, there is provided a computer-readable storage medium storing instructions, wherein, when the instructions are executed by at least one computing device, the at least one computing device is caused to perform the application building service of the present disclosure. method or application deployment method.
根据本公开的第八方面,提供一种电子设备,包括:处理器;用于存储所述处理器可执行指令的存储器;其中,所述处理器被配置为执行所述指令,以实现本公开的提供应用构建服务的方法或应用部署方法。According to an eighth aspect of the present disclosure, there is provided an electronic device, comprising: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the present disclosure A method for providing application building services or an application deployment method.
根据本公开的提供应用构建服务的方法和应用构建平台、应用部署方法和系统,通过工作负载来对平台所依托的基础设施集群的多种服务资源进行组织、封装和管理,通过运维能力来对平台所依托的基础设施集群的多种运维资源进行组织、封装和管理,从而可提供上层开发应用所需要的全部产品功能,这不仅能够提供更丰富的业务需求,且所有行为可控,同时满足社区标准和生态,便于后续和社区的融合,还能够使应用开发者仅需专注于与业务相关的开发工作,而不必关注或开发底层架构和运维细节。According to the method for providing application construction service, the application construction platform, the application deployment method and the system of the present disclosure, various service resources of the infrastructure cluster supported by the platform are organized, packaged and managed through workloads, and the operation and maintenance capabilities are used to Organize, encapsulate and manage the various operation and maintenance resources of the infrastructure cluster on which the platform relies, so as to provide all the product functions required by the upper-layer development application, which can not only provide richer business requirements, but also control all behaviors. At the same time, it satisfies community standards and ecology, which facilitates the subsequent integration with the community, and enables application developers to focus only on business-related development work without having to pay attention to or develop the underlying architecture and operation and maintenance details.
此外,根据本公开的提供应用构建服务的方法和应用构建平台、应用部署方法和系统,应用的管理全部围绕对工作负载和运维能力的管理。随着产品的迭代升级及探索,能够不断强化和稳定工作负载和运维能力,上层应用开发者只需通过声明使用即可。In addition, according to the method for providing application construction service, the application construction platform, the application deployment method and the system of the present disclosure, the management of applications all revolves around the management of workload and operation and maintenance capabilities. With the iterative upgrade and exploration of the product, it can continuously strengthen and stabilize the workload and operation and maintenance capabilities, and upper-layer application developers only need to declare and use it.
此外,根据本公开的提供应用构建服务的方法和应用构建平台、应用部署方法和系统,由于组件信息可包括组件名称和组件版本号,因此,应用升级时,可新增版本号,这不会影响已有服务,只需要在应用配置文件中声明新的版本号即可。In addition, according to the method and application construction platform, application deployment method and system for providing application construction services of the present disclosure, since the component information may include the component name and the component version number, when the application is upgraded, a new version number may be added, which will not Affecting existing services, you only need to declare a new version number in the application configuration file.
此外,根据本公开的提供应用构建服务的方法和应用构建平台、应用部署方法和系统,应用的交付围绕着组件的形式交付,这样可以按单个应用或者指定应用交付即可。由于从大量的yaml文件转移到工作负载和运维能力的组合声明上,原来需要全量渲染template模板,现在只需要升级对应的组件或者应用配置文件即可,而工作负载和运维能力是kubernetes的运维,可充分利用kubernetes提供的扩展机制及其自身机制的稳定性,现在的交付指定升级的应用的镜像,对组件中工作负载使用的镜像进行升级即可,不用通过离线包这种繁重交付方式,并且有了工作负载和运维能力这套标准,开发、运维、交付在标准中进行协作,大大减少了沟通成本。In addition, according to the method, application construction platform, application deployment method and system for providing application construction services of the present disclosure, application delivery is delivered in the form of components, so that it can be delivered as a single application or a specified application. Due to the transfer from a large number of yaml files to the combined declaration of workload and operation and maintenance capabilities, the template template needs to be fully rendered, and now only the corresponding components or application configuration files need to be upgraded, and the workload and operation and maintenance capabilities are kubernetes. Operation and maintenance can make full use of the extension mechanism provided by kubernetes and the stability of its own mechanism. Currently, the image of the specified upgraded application can be delivered, and the image used by the workload in the component can be upgraded without the heavy delivery of offline packages. With the standard set of workload and operation and maintenance capabilities, development, operation and maintenance, and delivery are coordinated in the standard, which greatly reduces the communication cost.
附图说明Description of drawings
通过结合附图,从实施例的下面描述中,本公开这些和/或其它方面及优点将会变得清楚,并且更易于理解,其中:These and/or other aspects and advantages of the present disclosure will become apparent, and be more readily understood, from the following description of embodiments, taken in conjunction with the accompanying drawings, wherein:
图1是示出现有的PaaS平台的架构示意图。FIG. 1 is a schematic diagram showing the architecture of a conventional PaaS platform.
图2是示出根据本公开的示例性实施例的用户执行应用部署的示意图。FIG. 2 is a schematic diagram illustrating application deployment performed by a user according to an exemplary embodiment of the present disclosure.
图3是示出根据本公开的示例性实施例的应用构建平台的框图。3 is a block diagram illustrating an application building platform according to an exemplary embodiment of the present disclosure.
图4是示出根据本公开的示例性实施例的提供应用构建服务的方法的流程图。FIG. 4 is a flowchart illustrating a method of providing an application building service according to an exemplary embodiment of the present disclosure.
图5是示出根据本公开的示例性实施例的应用部署系统的框图。FIG. 5 is a block diagram illustrating an application deployment system according to an exemplary embodiment of the present disclosure.
图6是示出根据本公开的示例性实施例的应用部署方法的流程图。FIG. 6 is a flowchart illustrating an application deployment method according to an exemplary embodiment of the present disclosure.
具体实施方式detailed description
提供参照附图的以下描述以帮助对由权利要求及其等同物限定的本公开的实施例的 全面理解。包括各种特定细节以帮助理解,但这些细节仅被视为是示例性的。因此,本领域的普通技术人员将认识到在不脱离本公开的范围和精神的情况下,可对描述于此的实施例进行各种改变和修改。此外,为了清楚和简洁,省略对公知的功能和结构的描述。The following description with reference to the accompanying drawings is provided to assist in a comprehensive understanding of the embodiments of the present disclosure as defined by the claims and their equivalents. Various specific details are included to aid in that understanding, but are to be regarded as exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted for clarity and conciseness.
在此需要说明的是,在本公开中出现的“若干项之中的至少一项”均表示包含“该若干项中的任意一项”、“该若干项中的任意多项的组合”、“该若干项的全体”这三类并列的情况。在本公开中出现的“和/或”均表示被其连接的前后两项或多项中的至少一项。例如,“包括A和B之中的至少一个”、“包括A和/或B”即包括如下三种并列的情况:(1)包括A;(2)包括B;(3)包括A和B。又例如,“执行步骤一和步骤二之中的至少一个”、“执行步骤一和/或步骤二”即表示如下三种并列的情况:(1)执行步骤一;(2)执行步骤二;(3)执行步骤一和步骤二。也就是说,“A和/或B”也可被表示为“A和B之中的至少一个”,“执行步骤一和/或步骤二”也可被表示为“执行步骤一和步骤二之中的至少一个”。It should be noted here that "at least one of several items" in the present disclosure all means including "any one of the several items", "a combination of any of the several items", The three categories of "the whole of the several items" are juxtaposed. In the present disclosure, "and/or" all means at least one of the preceding two or more items joined by it. For example, "including at least one of A and B" and "including A and/or B" include the following three parallel situations: (1) including A; (2) including B; (3) including A and B . For another example, "execute at least one of step 1 and step 2", "execute step 1 and/or step 2" means the following three parallel situations: (1) execute step 1; (2) execute step 2; (3) Execute step one and step two. That is to say, "A and/or B" can also be expressed as "at least one of A and B", and "execute step 1 and/or step 2" can also be expressed as "execute step 1 and step 2" at least one of".
根据现有的PaaS平台的管理模式和运维方式,难于提供APP概念的抽象,然而,PaaS平台的服务通过APP的形式呈现,用户不会感知底层服务如何维护的,像OS呈现给用户的就是一个一个进程,PaaS平台提供给用户的就是一个一个APP。因此,为了解决现有的问题,本公开提出一种以APP为中心的升级方式,聚焦于基于APP的应用管理。具体地说,可将内置服务和在线服务全部抽象为工作负载(workload)和运维能力(trait),例如,充分利用kubernetes平台提供的CRD+controller(自定义资源定义+控制器)机制,将kubernetes集群的各种资源抽象并封装为工作负载和运维能力的CRD,并开始各自对应的控制器,通过工作负载和运维能力的组合来实现应用的整个生命周期的管理。所有跑在基础设施集群(例如,基础设施集群可包括kubernetes集群、Hadoop集群、存储集群等)上的应用可以注册为组件(component),APP就是一个或多个组件构成,然后通过trait提供的各种运维能力,完成一个APP完整功能的提供。为了提高适应不同场景(例如,在线、离线、PaaS Service、PaaS Build-in Service、有状态、无状态等多种业务场景)的能力,组件可通过内嵌工作负载的方式来注册组件,并支持扩展工作负载(例如,kubernetes集群的CRD),即,支持自定义的工作负载(workload CRDs),也就是说,统一的组件方便平台统一管理,组件可通过内嵌不同的工作负载以满足平台自身业务特点。此外,APP的部署可通过声明应用配置文件(Application Configuration)的方式来实现,即,通过一个应用配置文件将组件和运维能力组织起来,基于这个应用配置文件,可满足APP所有的元信息,组件中包括的工作负载对应的控制器(workload controller)和运维能力对应的控制器(trait controller)可根据对应的元信息及预期的逻辑在基础设施集群(例如,kubernetes集群)上创建各种对应的资源以完成一个APP的完整部署。此外,对于抽象出的工作负载和运维能力,可随着需求的迭代,不断沉淀和打磨,不断扩展和完善,成为平台服务APP标准,且有社区、有生态。此外,上述部署APP的方式不仅可用于在平台所依托的作为基础架构的kubernetes集群上部署APP,还可用于在任何可使用上述部署APP的方式的基础设施集群上部署APP,例如,但不限于,ECS、FaaS、Mesos等。According to the existing management mode and operation and maintenance method of the PaaS platform, it is difficult to provide the abstraction of the APP concept. However, the services of the PaaS platform are presented in the form of APP, and users will not perceive how the underlying services are maintained. One process at a time, the PaaS platform provides users with an APP. Therefore, in order to solve the existing problems, the present disclosure proposes an APP-centric upgrade method, focusing on APP-based application management. Specifically, all built-in services and online services can be abstracted into workloads and operational capabilities (trait). For example, by making full use of the CRD+controller (custom resource definition + controller) mechanism provided by the kubernetes platform, the The various resources of the kubernetes cluster are abstracted and encapsulated as CRDs of workloads and operation and maintenance capabilities, and their corresponding controllers are started to realize the management of the entire life cycle of the application through the combination of workloads and operation and maintenance capabilities. All applications running on infrastructure clusters (for example, infrastructure clusters can include kubernetes clusters, Hadoop clusters, storage clusters, etc.) can be registered as components, and an APP is composed of one or more components, and then through the various components provided by the trait This kind of operation and maintenance capability completes the provision of complete functions of an APP. In order to improve the ability to adapt to different scenarios (for example, online, offline, PaaS Service, PaaS Build-in Service, stateful, stateless and other business scenarios), components can register components by embedding workloads, and support Expanding workloads (for example, CRDs of kubernetes clusters), that is, supporting custom workloads (workload CRDs), that is, unified components facilitate unified management of the platform, and components can embed different workloads to meet the platform itself business characteristics. In addition, the deployment of APP can be realized by declaring the application configuration file (Application Configuration), that is, the components and operation and maintenance capabilities are organized through an application configuration file. Based on this application configuration file, all the meta information of the APP can be satisfied. The workload controller corresponding to the workload and the trait controller corresponding to the operation and maintenance capability included in the component can create various kinds of functions on the infrastructure cluster (for example, the kubernetes cluster) according to the corresponding meta information and expected logic. Corresponding resources to complete the complete deployment of an APP. In addition, the abstracted workload and operation and maintenance capabilities can be continuously precipitated, polished, expanded and improved with the iteration of requirements, and become the platform service APP standard, with a community and ecology. In addition, the above method of deploying APP can not only be used to deploy APP on the kubernetes cluster that the platform relies on as the infrastructure, but also can be used to deploy APP on any infrastructure cluster that can use the above method of deploying APP, for example, but not limited to , ECS, FaaS, Mesos, etc.
下面,对应用构建平台涉及的相关词汇进行解释。Below, the relevant vocabulary involved in the application building platform is explained.
工作负载(workload):通过应用构建平台的研发人员对应用构建平台所依托的基础设施集群(例如,kubernetes集群)提供的资源进行抽象而封装了与提供的服务相应的一种或多种资源。Workload: One or more resources corresponding to the provided services are encapsulated by the developers of the application building platform by abstracting the resources provided by the infrastructure cluster (for example, the kubernetes cluster) on which the application building platform relies.
根据本公开的示例性实施例,工作负载可包括与在线服务应用对应的第一工作负载(ServerWorkload)和与离线服务应用对应的第二工作负载(TaskWorkload)中的至少一个。According to an exemplary embodiment of the present disclosure, the workload may include at least one of a first workload (ServerWorkload) corresponding to an online service application and a second workload (TaskWorkload) corresponding to an offline service application.
根据本公开的示例性实施例,当应用构建平台所依托的基础设施集群为kubernetes集群时,第一工作负载可封装的kubernetes集群中的原生资源可包括,但不限于, deployment、statefulset、daemonset、pod、service和configmap等,以满足长期运行(long running)业务特点及期望。这里,deployment是kubernetes的一种原生资源,主要满足多个副本的无状态服务;statefulset是kubernetes的一种原生资源,满足有状态服务,可以提供稳定的持久化存储,稳定的网络标识,有序部署,有序收缩等;daemonset是kubernetes的一种原生资源,确保一个Pod在全部节点或部分节点运行一个Pod;Pod是kubernetes最小的调度单位,Pod由一个或几个容器组成,有独立的网络IP;service是kubernetes的一种原生资源,由于第一工作负载对应在线服务应用,因此,第一工作负载可默认创建service服务,供后续内部负载均衡等能力使用;configmap是kubernetes的一种原生资源,用来保存键值对(key-value pair)配置数据,这个数据可以在pods里使用,或者被用来为像控制器(controller)一样的系统组件存储配置数据,可以把它理解为Linux系统中的/etc目录,专门用来存储配置文件的目录。According to an exemplary embodiment of the present disclosure, when the infrastructure cluster on which the application building platform relies is a Kubernetes cluster, the native resources in the Kubernetes cluster that can be packaged by the first workload may include, but are not limited to, deployment, statefulset, daemonset, pods, services, and configmaps to meet long-running business characteristics and expectations. Here, deployment is a native resource of kubernetes, which mainly satisfies stateless services of multiple copies; statefulset is a native resource of kubernetes, which satisfies stateful services, and can provide stable persistent storage, stable network identification, orderly Deployment, orderly shrinking, etc.; daemonset is a native resource of kubernetes, which ensures that a pod runs a pod on all or some nodes; pod is the smallest scheduling unit of kubernetes, and a pod consists of one or several containers and has an independent network IP; service is a native resource of kubernetes. Since the first workload corresponds to an online service application, the first workload can create a service service by default for subsequent internal load balancing and other capabilities; configmap is a native resource of kubernetes , used to store key-value pair configuration data that can be used in pods, or used to store configuration data for system components like controllers, which can be understood as a Linux system In the /etc directory, a directory dedicated to storing configuration files.
根据本公开的示例性实施例,当应用构建平台所依托的基础设施集群为kubernetes集群时,第一工作负载还可封装非kubernetes原生资源,例如,自研的非kubernetes原生资源、kubernetes社区的一些成熟的可用资源(诸如,OpenKruise的CloneSet等)。具体地说,可根据业务需求或者AI应用特点自研或引入非kubernetes原生资源以封装在第一工作负载中。例如,在某些场景如果重新调度会来带不必要的调度开销,同时多容器的Pod,升级sidecar容器导致主容器重启,通常是不可接受的,此时,可引入支持原地升级的Advanced StatefulSet非kubernetes原生资源。According to an exemplary embodiment of the present disclosure, when the infrastructure cluster on which the application building platform relies is a kubernetes cluster, the first workload may also encapsulate non-kubernetes native resources, for example, self-developed non-kubernetes native resources, some of the kubernetes community Mature available resources (such as OpenKruise's CloneSet, etc.). Specifically, non-kubernetes native resources can be self-developed or introduced to encapsulate them in the first workload according to business requirements or AI application characteristics. For example, in some scenarios, rescheduling will bring unnecessary scheduling overhead. At the same time, for Pods with multiple containers, upgrading the sidecar container will cause the main container to restart, which is usually unacceptable. In this case, an Advanced StatefulSet that supports in-place upgrades can be introduced. Non-kubernetes native resources.
根据本公开的示例性实施例,当应用构建平台所依托的基础设施集群为kubernetes集群时,第二工作负载可封装的kubernetes集群中的原生资源可包括,但不限于,job、cronjob和configmap等原生资源。这里,job是kubernetes的一种原生资源,负责批处理任务,即仅执行一次的任务,保证批处理任务的一个或多个Pod成功结束。cronjob是kubernetes的一种原生资源,负责定时任务,可定时拉起job。According to an exemplary embodiment of the present disclosure, when the infrastructure cluster on which the application building platform relies is a kubernetes cluster, the native resources in the kubernetes cluster that the second workload can encapsulate may include, but are not limited to, job, cronjob, and configmap, etc. native resources. Here, job is a native resource of kubernetes, which is responsible for batch tasks, that is, tasks that are executed only once, to ensure that one or more Pods of the batch tasks end successfully. Cronjob is a native resource of kubernetes, which is responsible for scheduled tasks and can regularly pull up jobs.
根据本公开的示例性实施例,当应用构建平台所依托的基础设施集群为kubernetes集群时,第二工作负载还可封装非kubernetes原生资源,例如,自研的非kubernetes原生资源、kubernetes社区的一些成熟的可用资源。具体地说,可根据业务需求或者AI应用特点自研或引入非kubernetes原生资源以封装在第二工作负载中。例如,与原生资源DaemonSet类似的Broadcast Job非kubernetes原生资源,可以像daemonset一样在所有节点运行,但是这提供了一个job的能力。According to an exemplary embodiment of the present disclosure, when the infrastructure cluster on which the application building platform relies is a kubernetes cluster, the second workload may also encapsulate non-kubernetes native resources, for example, self-developed non-kubernetes native resources, some of the kubernetes community Mature available resources. Specifically, non-kubernetes native resources can be self-developed or introduced to encapsulate them in the second workload according to business requirements or AI application characteristics. For example, a Broadcast Job that is similar to the native resource DaemonSet, a non-kubernetes native resource, can run on all nodes like a daemonset, but this provides the ability of a job.
业务相关参数(parameters):工作负载对外开放的参数,可提供修改工作负载元信息的能力。在部署APP时,可指定与业务相关的各种参数,并将参数传入到工作负载实例中,从而提供给对应的工作负载控制器根据这些元信息产生不同的行为。Service-related parameters (parameters): The parameters of the workload open to the outside world, which can provide the ability to modify the metadata of the workload. When deploying the APP, you can specify various parameters related to the business, and pass the parameters into the workload instance, so as to provide the corresponding workload controller to generate different behaviors according to these meta-information.
根据本公开的示例性实施例,业务相关参数可包括用于获取将使用的镜像的地址的镜像标识、用于指定将使用的模型的地址的环境变量、用于指定将使用的配置文件的参数、镜像启动命令及参数、组件的名称及版本号、服务健康检查探针、服务对外开放的环境变量中的至少一个。这些业务相关参数都是在基础设施集群运行容器的一些基本参数,根据工作负载的不同,具体的业务相关参数也不同。例如,对于第一工作负载来说,业务相关参数可包括用于指示在线服务应用是有状态服务还是无状态服务的第一参数(workloadsubtype字段),该参数决定后续第一工作负载的控制器拉起基础设施集群原生的服务能力。再例如,对于第二工作负载来说,业务相关参数可用于指示离线服务应用是一次性服务还是定时服务的第二参数(schedule字段),该参数表示启动离线任务的定时规则,类似操作系统的crontab。According to an exemplary embodiment of the present disclosure, the business-related parameters may include an image identification for obtaining the address of the image to be used, an environment variable for specifying the address of the model to be used, and a parameter for specifying a configuration file to be used , at least one of the image startup command and parameters, the name and version number of the component, the service health check probe, and the environment variable that the service opens to the outside world. These business-related parameters are some basic parameters for running containers in the infrastructure cluster. The specific business-related parameters are also different according to different workloads. For example, for the first workload, the service-related parameters may include a first parameter (workloadsubtype field) used to indicate whether the online service application is a stateful service or a stateless service, and this parameter determines the subsequent first workload controller pulls It enables the native service capabilities of the infrastructure cluster. For another example, for the second workload, the business-related parameters can be used to indicate whether the offline service application is a one-time service or a second parameter (schedule field) of a scheduled service. This parameter indicates the timing rule for starting offline tasks, similar to the operating system. crontab.
工作负载控制器(Workload Controller),负责管理对应的工作负载相关的资源。具体地说,工作负载控制器可根据与工作负载实例中的参数对应的元信息,选择创建应对的基础设施集群中的资源。例如,在kubernetes集群的情况下,工作负载控制器可创建一个或者一组deployment、stateful、service、configmap等资源来让APP服务收敛在期望的状 态。此外,工作负载控制器可监控对应的资源的变化,让资源的状态收敛在期望的状态里面。此外,当对应的APP被删除时,工作负载控制器自动完成相关资源的回收。The Workload Controller is responsible for managing the corresponding workload-related resources. Specifically, the workload controller may select to create resources in the corresponding infrastructure cluster according to the meta-information corresponding to the parameters in the workload instance. For example, in the case of a kubernetes cluster, the workload controller can create one or a group of resources such as deployment, stateful, service, configmap, etc. to make the app service converge to the desired state. In addition, the workload controller can monitor the changes of the corresponding resources, so that the state of the resources converges to the desired state. In addition, when the corresponding APP is deleted, the workload controller automatically completes the recycling of related resources.
根据本公开的示例性实施例,当用户声明使用与在线服务应用对应的第一工作负载并声明了第一参数时,第一工作负载的控制器根据声明的第一参数的元信息创建deployment、statefulset、daemonset、pod、service和configmap中的一个或多个资源。例如,当第一参数指示在线服务应用为有状态服务时,第一工作负载的控制器根据声明的第一参数的元信息创建statefulset、service、configmap等资源,当第一参数指示在线服务应用为无状态服务时,第一工作负载的控制器根据声明的第一参数的元信息创建deployment或daemonset资源。According to an exemplary embodiment of the present disclosure, when the user declares to use the first workload corresponding to the online service application and declares the first parameter, the controller of the first workload creates a deployment, One or more resources in statefulset, daemonset, pod, service, and configmap. For example, when the first parameter indicates that the online service application is a stateful service, the controller of the first workload creates resources such as statefulset, service, and configmap according to the meta-information of the declared first parameter, and when the first parameter indicates that the online service application is In the stateless service, the controller of the first workload creates deployment or daemonset resources according to the meta-information of the declared first parameter.
根据本公开的示例性实施例,当用户声明使用与离线服务应用对应的第二工作负载并声明了第二参数,且第二参数指示离线服务应用是一次性服务时,第二工作负载的控制器根据声明的第二参数的元信息创建job资源。当用户声明使用与离线服务应用对应的第二工作负载并声明了第二参数,且第二参数指示离线服务应用是定时服务时,第二工作负载的控制器根据声明的第二参数的元信息创建cronjob或job资源。According to an exemplary embodiment of the present disclosure, when the user declares to use the second workload corresponding to the offline service application and declares the second parameter, and the second parameter indicates that the offline service application is a one-time service, the control of the second workload The compiler creates the job resource based on the meta information of the declared second parameter. When the user declares to use the second workload corresponding to the offline service application and declares the second parameter, and the second parameter indicates that the offline service application is a timed service, the controller of the second workload according to the meta-information of the declared second parameter Create a cronjob or job resource.
运维能力(trait):通过应用构建平台的研发人员对应用构建平台所依托的基础设施集群(例如,kubernetes集群)提供的资源进行抽象而封装了与提供的运维能力相应的一种或多种资源。例如,每种运维能力为了完成某些特定的运维能力,需要提供对应的信息(例如,参数),信息的定义可通过CRD元信息来传递。Operation and maintenance capabilities (trait): The developers of the application building platform abstract the resources provided by the infrastructure cluster (for example, the kubernetes cluster) on which the application building platform is based, and encapsulate one or more operation and maintenance capabilities corresponding to the provided operation and maintenance capabilities. a resource. For example, in order to complete some specific operation and maintenance capabilities, each operation and maintenance capability needs to provide corresponding information (for example, parameters), and the definition of the information can be transmitted through CRD meta information.
根据本公开的示例性实施例,运维能力可包括,但不限于,自动弹性扩缩容运维能力(AutoScalerTrait)、负载均衡运维能力(IngressTrait)、自定义服务副本数运维能力(ManualscalerTrait)、持久化管理运维能力(VolumeMounterTrait)和发布策略运维能力(FlaggerTrait)中的至少一个。According to an exemplary embodiment of the present disclosure, operation and maintenance capabilities may include, but are not limited to, automatic elastic scaling operation and maintenance capabilities (AutoScalerTrait), load balancing operation and maintenance capabilities (IngressTrait), and custom service replica number operation and maintenance capabilities (ManualscalerTrait) ), at least one of persistence management operation and maintenance capability (VolumeMounterTrait) and release strategy operation and maintenance capability (FlaaggerTrait).
下面,以应用构建平台所依托的基础设施集群为kubernetes集群为例,分别具体介绍上述运维能力的特点。In the following, the characteristics of the above operation and maintenance capabilities are introduced in detail by taking the kubernetes cluster as an example of the infrastructure cluster on which the application construction platform relies.
根据本公开的示例性实施例,自动弹性扩缩容运维能力(AutoScalerTrait)可用于提供Pod水平扩缩容的能力,可根据Pod的CPU负载情况和内存使用情况等动态调整服务Pod副本数。自动弹性扩缩容运维能力封装的资源可包括,但不限于,kubernetes集群中的Horizontal Pod Autoscaler、Promethus原生资源。自动弹性扩缩容运维能力对外开放的参数可包括,但不限于,CPU大小(CPU)、存储器大小(memory)、最小副本数(minReplica)和最大副本数(maxReplica)。According to an exemplary embodiment of the present disclosure, the automatic elastic scaling operation and maintenance capability (AutoScalerTrait) can be used to provide the capability of horizontal scaling of the Pod, and the number of service Pod replicas can be dynamically adjusted according to the CPU load and memory usage of the Pod. The resources encapsulated by the automatic elastic expansion and contraction operation and maintenance capabilities can include, but are not limited to, the Horizontal Pod Autoscaler and Promethus native resources in the kubernetes cluster. The parameters of the automatic elastic scaling operation and maintenance capability open to the outside world may include, but are not limited to, the CPU size (CPU), the memory size (memory), the minimum number of replicas (minReplica), and the maximum number of replicas (maxReplica).
根据本公开的示例性实施例,负载均衡运维能力(IngressTrait)可利用kubernetes Ingress已有的负载均衡能力结合用户配置的工作负载所创建的服务提供负载均衡的能力。负载均衡运维能力封装的资源可包括,但不限于,kubernetes集群中的Service、Ingress原生资源。负载均衡运维能力对外开放的参数可包括,但不限于,请求的路径(Path)、请求的域名(Host)和请求的服务端口(ServicePort)。According to an exemplary embodiment of the present disclosure, the load balancing operation and maintenance capability (IngressTrait) can utilize the existing load balancing capability of kubernetes Ingress to provide a load balancing capability for a service created by a workload configured by a user. The resources encapsulated by the load balancing operation and maintenance capability can include, but are not limited to, the native resources of Service and Ingress in the kubernetes cluster. The parameters of the load balancing operation and maintenance capability open to the outside world may include, but are not limited to, the requested path (Path), the requested domain name (Host), and the requested service port (ServicePort).
根据本公开的示例性实施例,自定义服务副本数运维能力(ManualscalerTrait)可提供自定义服务副本数的能力,指定后副本数将收敛在该期望数值,同时可修改对应工作负载(例如,用户选择和/或配置的工作负载)的副本资源的大小。自定义服务副本数运维能力可根据对应工作负载拉起的对应资源(例如,statefulset、deployment等),将服务副本数更新到期望值。也就是说,自定义服务副本数运维能力可将对应工作负载拉起的资源进行更新(patch),自定义服务副本数运维能力能够知道自己被应用于哪个工作负载上,从而能够知道对具体哪些资源(例如,哪个statefulset或哪个deployment等)进行更新(patch)。自定义服务副本数运维能力对外开放的参数可包括,但不限于,副本数(Replica)、可设置的副本的资源(Resource)。例如,可设置的副本的资源可包括CPU大小、存储器大小和GPU大小等。According to an exemplary embodiment of the present disclosure, the operation and maintenance capability (ManualscalerTrait) for customizing the number of service replicas can provide the ability to customize the number of replicas of a service. After specifying, the number of replicas will converge to the expected value, and the corresponding workload (for example, The size of the replica resource for user-selected and/or configured workloads). The operation and maintenance capability of customizing the number of service copies can update the number of service copies to the expected value according to the corresponding resources (for example, statefulset, deployment, etc.) pulled by the corresponding workload. That is to say, the operation and maintenance capability of the number of custom service copies can update (patch) the resources pulled up by the corresponding workload, and the operation and maintenance capability of the number of custom service copies can know which workload it is applied to, so as to know which workload to use. Which specific resources (for example, which statefulset or which deployment, etc.) should be updated (patch). The parameters of the operation and maintenance capability of the custom service replica number open to the outside world may include, but are not limited to, the number of replicas (Replica) and the resources of the replicas that can be set (Resource). For example, the resources of the replica that can be set may include CPU size, memory size, GPU size, and the like.
根据本公开的示例性实施例,持久化管理运维能力(VolumeMounterTrait)可提供业 务持久化需求,在部署服务时,声明已经支持的存储类型及挂载路径等信息即可实现服务数据持久化的需求。负载均衡运维能力封装的资源可包括,但不限于,kubernetes集群中的Persistent Volumes、Persistent Volume Claim、StorageClass原生资源以及各种开源的provider资源(例如,OpenEBS等)。持久化管理运维能力对外开放的参数可包括,但不限于,存储卷资源(VolumeResource)、存储类型(StorageType)。其中,存储卷资源可包括使用磁盘的大小(即,存储大小)和挂载路径,存储类型可包括kubernetes集群的多种云原生存储。According to an exemplary embodiment of the present disclosure, the persistence management operation and maintenance capability (VolumeMounterTrait) can provide business persistence requirements. When deploying a service, declaring the supported storage type and mounting path and other information can realize the persistence of service data. need. The resources encapsulated by the load balancing operation and maintenance capabilities may include, but are not limited to, Persistent Volumes, Persistent Volume Claims, StorageClass native resources, and various open source provider resources (for example, OpenEBS, etc.) in the kubernetes cluster. The parameters of the persistent management operation and maintenance capability open to the outside world may include, but are not limited to, a storage volume resource (VolumeResource) and a storage type (StorageType). Among them, the storage volume resource may include the size of the used disk (that is, the storage size) and the mounting path, and the storage type may include various cloud-native storages of the kubernetes cluster.
根据本公开的示例性实施例,发布策略运维能力(FlaggerTrait)可通过利用开源部署插件Flagger已经支持的发布策略(例如,金丝雀、蓝绿及A/B Testing等)结合运维能力模式,用户简单声明必要策略信息即可使用多种发布策略。发布策略运维能力封装了开源的发布策略Flagger资源,控制Flagger的行为以使Flagger来控制工作负载拉起的资源,用于支持用户配置发布策略。发布策略运维能力对外开放的参数可包括,但不限于,发布策略参数(Analysis)、发布策略(Policy)。According to an exemplary embodiment of the present disclosure, the release strategy operation and maintenance capability (FlaggerTrait) can be combined with the operation and maintenance capability mode by utilizing the release strategies (eg, canary, blue-green, A/B Testing, etc.) already supported by the open source deployment plug-in Flagger , the user can use multiple publishing strategies simply by declaring the necessary policy information. The release strategy operation and maintenance capability encapsulates the open source release strategy Flagger resource, controls the behavior of the Flagger, and enables the Flagger to control the resources pulled by the workload, which is used to support the user to configure the release strategy. The parameters of the release policy operation and maintenance capability open to the outside world may include, but are not limited to, release policy parameters (Analysis) and release policies (Policy).
当然,本公开的运维能力不限于上述提及的运维能力,还可包括其它可能的运维能力,例如,日志运维能力、监控运维能力等。Of course, the operation and maintenance capabilities of the present disclosure are not limited to the above-mentioned operation and maintenance capabilities, and may also include other possible operation and maintenance capabilities, such as log operation and maintenance capabilities, monitoring operation and maintenance capabilities, and the like.
运维能力控制器(trait controller):负责管理对应的运维能力相关的资源。具体地说,运维能力控制器可根据与运维能力实例中的参数对应的元信息,选择创建应对的基础设施集群中的资源。Operation and maintenance capability controller (trait controller): responsible for managing the resources related to the corresponding operation and maintenance capability. Specifically, the operation and maintenance capability controller may select to create resources in the corresponding infrastructure cluster according to the meta-information corresponding to the parameters in the operation and maintenance capability instance.
根据本公开的示例性实施例,自动弹性扩缩容运维能力的控制器可通过自动弹性扩缩容运维能力控制kubernetes的HPA,使得HPA根据设置的参数实时监控对应工作负载拉起资源(例如,CPU、memory)的状态信息,根据自动弹性扩缩容运维能力定义的期望负载及期望副本数对对应工作负载的Pod实例数量执行弹性扩缩。According to an exemplary embodiment of the present disclosure, the controller of the automatic elastic expansion and contraction operation and maintenance capability can control the HPA of kubernetes through the automatic elastic expansion and contraction operation and maintenance capability, so that the HPA can monitor the corresponding workload and pull up resources in real time according to the set parameters ( For example, the status information of CPU, memory), according to the expected load and the expected number of replicas defined by the automatic elastic scaling operation and maintenance capability, perform elastic scaling on the number of Pod instances corresponding to the workload.
根据本公开的示例性实施例,负载均衡运维能力的控制器可根据与请求的路径、请求的域名和请求的服务端口对应的元信息,创建对应的负载均衡规则。According to an exemplary embodiment of the present disclosure, the controller of the load balancing operation and maintenance capability may create corresponding load balancing rules according to the meta information corresponding to the requested path, the requested domain name, and the requested service port.
根据本公开的示例性实施例,自定义服务副本数运维能力的控制器可控制对应工作负载(例如,与在线服务应用对应的第一工作负载)拉起资源的副本数,使得服务实例的副本数在设置的数值内。According to an exemplary embodiment of the present disclosure, the controller that customizes the operation and maintenance capability of the number of service copies can control the corresponding workload (eg, the first workload corresponding to the online service application) to pull up the number of copies of resources, so that the The number of copies is within the set value.
根据本公开的示例性实施例,持久化管理运维能力的控制器可根据与存储类型、存储大小和挂载路径对应的元信息,创建对应的持久化存储卷声明(PVC)以及存储类型(StorageClass)并将存储卷挂载到pod内部指定的路径。According to an exemplary embodiment of the present disclosure, the controller of the persistent management operation and maintenance capability may create a corresponding persistent storage volume declaration (PVC) and storage type ( StorageClass) and mount the storage volume to the path specified inside the pod.
根据本公开的示例性实施例,发布策略运维能力的控制器可根据与设置的发布策略参数和设置的发布策略对应的元信息,创建对应的发布策略。According to an exemplary embodiment of the present disclosure, the controller of the release policy operation and maintenance capability may create a corresponding release policy according to the set release policy parameters and the meta information corresponding to the set release policy.
组件(component):组件是组成一个应用的组成部分,可包括应用所依赖的服务,例如,MySQL数据库、应用服务本身(例如,拥有多个副本的PHP服务器)。例如,所有跑在kubernetes集群上的pod都可声明为组件,包括一些基础的信息,包括镜像、启动参数、健康检测探针、资源等。也就是说,一个应用可由一个或多个组件,有了组件的概念,应用构建平台的架构师可将应用分解成一个个可被复用的模块,这种模块化封装应用组成部分的思想,代表了一种构建安全、高可扩展性应用的最佳实践:它通过一个完全分布式的架构模型,实现了应用组件描述和实现的解耦。考虑到应用构建平台的业务复杂程度,可通过内嵌工作负载的方式来注册组件,统一的组件方便统一管理,而内嵌不同的工作负载可开放给平台的维护者,这样可基于平台业务特点来开发不同的工作负载。当应用开发者通过平台将他们写的代码“打包”成一个组件,然后通过编写配置文件来描述该组件与服务之间的关系以及运维能力需求,使得应用开发者能够更专注于与业务相关的开发工作,而不必关注或开发底层架构和运维细节。Component: A component is an integral part of an application, and can include services that the application depends on, such as a MySQL database, the application service itself (eg, a PHP server with multiple copies). For example, all pods running on a kubernetes cluster can be declared as components, including some basic information, including images, startup parameters, health detection probes, resources, etc. That is to say, an application can be composed of one or more components. With the concept of components, the architect of the application building platform can decompose the application into modules that can be reused. The idea of modular encapsulation of application components, Represents a best practice for building secure and highly scalable applications: it realizes the decoupling of application component description and implementation through a fully distributed architecture model. Considering the business complexity of the application building platform, components can be registered by means of embedded workloads. Unified components are convenient for unified management, and different embedded workloads can be opened to platform maintainers, which can be based on platform business characteristics. to develop different workloads. When application developers "package" the code they wrote into a component through the platform, and then write a configuration file to describe the relationship between the component and the service and the requirements for operation and maintenance capabilities, so that application developers can focus more on business-related development work without having to focus or develop the underlying architectural and operational details.
应用配置文件(Application Configuration):为了将声明的组件以及运维能力组织起来,变成一个真正运行起来的应用,可通过编写应用配置文件来实例化这个待运行的应用。 应用开发者可利用平台提供的API模块来编写应用配置文件,使得平台能够根据应用开发者提交的应用配置文件,实例化出对应的、真正运行起来的应用,并在平台所依托的基础设施集群上创建对应的资源以完成一个应用的完整部署。Application configuration file (Application Configuration): In order to organize the declared components and operation and maintenance capabilities into a real running application, the application to be run can be instantiated by writing an application configuration file. Application developers can use the API modules provided by the platform to write application configuration files, so that the platform can instantiate the corresponding, really running applications according to the application configuration files submitted by the application developers, and cluster them on the infrastructure that the platform relies on. Create the corresponding resources on the above to complete the complete deployment of an application.
下面将参照图2至图6具体描述根据本公开的示例性实施例的提供应用构建服务的方法和应用构建平台以及应用部署方法和系统。The method for providing an application construction service, an application construction platform, and an application deployment method and system according to exemplary embodiments of the present disclosure will be described in detail below with reference to FIGS. 2 to 6 .
图2是示出根据本公开的示例性实施例的用户执行应用部署的示意图。FIG. 2 is a schematic diagram illustrating application deployment performed by a user according to an exemplary embodiment of the present disclosure.
参照图2,用户执行应用部署可包括两个步骤,即,注册组件和部署应用。Referring to FIG. 2, a user performing application deployment may include two steps, ie, registering a component and deploying an application.
注册组件需要声明组件所使用的工作负载及其对外开放的业务相关参数。例如,根据本公开的示例性实施例的工作负载可包括与在线服务应用对应的第一工作负载(ServerWorkload)和与离线服务应用对应的第二工作负载(TaskWorkload)。用户在注册组件时需要声明使用第一工作负载或者第二工作负载或者第一工作负载和第二工作负载两者,此外,还需要声明与声明使用的工作负载对应的业务相关参数(parameters)。当然,根据本公开的示例性实施例的工作负载除了可包括第一工作负载和第二工作负载之外,还可包括其他任何可能的工作负载。Registering a component requires declaring the workload used by the component and its business-related parameters that are open to the outside world. For example, the workload according to an exemplary embodiment of the present disclosure may include a first workload (ServerWorkload) corresponding to an online service application and a second workload (TaskWorkload) corresponding to an offline service application. When registering the component, the user needs to declare the use of the first workload or the second workload or both the first workload and the second workload, and also needs to declare business-related parameters corresponding to the declared workload. Of course, the workload according to the exemplary embodiment of the present disclosure may include any other possible workloads besides the first workload and the second workload.
部署应用需要声明使用哪个或哪些组件及其相关信息(例如,名称、版本号等)、使用哪个或哪些运维能力及其参数以及注册组件时所声明的工作负载对外开放的业务相关参数。例如,根据本公开的示例性实施例的运维能力可包括自动弹性扩缩容运维能力(AutoScalerTrait)、负载均衡运维能力(IngressTrait)、自定义服务副本数运维能力(ManualscalerTrait)、持久化管理运维能力(VolumeMounterTrait)和发布策略运维能力(FlaggerTrait)。用户在部署应用时需要声明使用上述运维能力中的哪个或哪些运维能力及其对外开放的参数。当然,根据本公开的示例性实施例的运维能力除了可包括上述运维能力之外,还可包括其他任何可能的运维能力。When deploying an application, you need to declare which component or components to use and related information (for example, name, version number, etc.), which operation and maintenance capabilities or parameters to use, and the business-related parameters of the workload declared when the component is registered. For example, the operation and maintenance capabilities according to the exemplary embodiments of the present disclosure may include automatic elastic scaling operation and maintenance capabilities (AutoScalerTrait), load balancing operation and maintenance capabilities (IngressTrait), custom service replica number operation and maintenance capabilities (ManualscalerTrait), persistent Management operation and maintenance capabilities (VolumeMounterTrait) and release strategy operation and maintenance capabilities (FlaaggerTrait). When deploying an application, the user needs to declare which one or which of the above operation and maintenance capabilities to use and its open parameters. Of course, the operation and maintenance capabilities according to the exemplary embodiments of the present disclosure may include any other possible operation and maintenance capabilities in addition to the above-mentioned operation and maintenance capabilities.
图3是示出根据本公开的示例性实施例的应用构建平台的框图。3 is a block diagram illustrating an application building platform according to an exemplary embodiment of the present disclosure.
参照图3,根据本公开的示例性实施例的应用构建平台300(下面,可简称为平台300)可包括工作负载库310、运维能力库320、控制器库330、API模块340。3 , an application building platform 300 (hereinafter, may be referred to as platform 300 for short) according to an exemplary embodiment of the present disclosure may include a workload library 310 , an operation and maintenance capability library 320 , a controller library 330 , and an API module 340 .
工作负载库310可包括至少一个工作负载,其中,每个工作负载封装了平台300所依托的基础设施集群中的多种服务相关资源以用于执行对应的服务。The workload library 310 may include at least one workload, wherein each workload encapsulates a variety of service-related resources in the infrastructure cluster on which the platform 300 rests for executing the corresponding service.
根据本公开的示例性实施例,工作负载库310可包括与在线服务应用对应的第一工作负载和与离线服务应用对应的第二工作负载中的至少一个。当然,工作负载库310不限于此,还可包括其它可能的工作负载,例如,与在线离线混合业务应用对应的工作负载等。According to an exemplary embodiment of the present disclosure, the workload library 310 may include at least one of a first workload corresponding to an online service application and a second workload corresponding to an offline service application. Of course, the workload library 310 is not limited to this, and may also include other possible workloads, for example, workloads corresponding to online and offline mixed service applications, and the like.
根据本公开的示例性实施例,当平台300所基础设施集群为kubernetes集群时,第一工作负载可封装kubernetes集群中的deployment、statefulset、daemonset、pod、service和configmap等原生资源。此外,第一工作负载还可封装非kubernetes原生资源。第二工作负载可封装了kubernetes集群中的job、cronjob和configmap等原生资源。此外,第二工作负载还可封装非kubernetes原生资源。According to an exemplary embodiment of the present disclosure, when the infrastructure cluster of the platform 300 is a kubernetes cluster, the first workload may encapsulate native resources such as deployment, statefulset, daemonset, pod, service, and configmap in the kubernetes cluster. In addition, the first workload can also encapsulate non-kubernetes native resources. The second workload can encapsulate native resources such as jobs, cronjobs, and configmaps in the kubernetes cluster. In addition, the second workload can also encapsulate non-kubernetes native resources.
运维能力库320可包括至少一个运维能力,其中,每个运维能力封装了平台300所依托的基础设施集群中的多种运维相关资源以用于执行对应的运维。The operation and maintenance capability library 320 may include at least one operation and maintenance capability, wherein each operation and maintenance capability encapsulates a variety of operation and maintenance-related resources in the infrastructure cluster on which the platform 300 relies to perform corresponding operation and maintenance.
根据本公开的示例性实施例,运维能力库320可包括自动弹性扩缩容运维能力、负载均衡运维能力、自定义服务副本数运维能力、持久化管理运维能力和发布策略运维能力中的至少一个。当然,运维能力库310不限于此,还可包括其它可能的运维能力,例如,日志运维能力、监控运维能力等。According to an exemplary embodiment of the present disclosure, the operation and maintenance capability library 320 may include automatic elastic expansion and contraction operation and maintenance capabilities, load balancing operation and maintenance capabilities, custom service copy number operation and maintenance capabilities, persistence management operation and maintenance capabilities, and release policy operation and maintenance capabilities at least one of the dimensional capabilities. Of course, the operation and maintenance capability library 310 is not limited to this, and may also include other possible operation and maintenance capabilities, such as log operation and maintenance capabilities, monitoring operation and maintenance capabilities, and the like.
根据本公开的示例性实施例,当平台300所基础设施集群为kubernetes集群时,自动弹性扩缩容运维能力可封装kubernetes集群中的Horizontal Pod Autoscaler、Promethus资源,用于动态调整服务pod副本数。负载均衡运维能力可封装kubernetes集群中的Service、Ingress资源,用于利用kubernetes集群中的Ingress已有的负载均衡能力结合用户配置的工作负载所创建的服务提供负载均衡能力。自定义服务副本数运维能力可根据用户配置的 工作负载拉起的对应资源,将服务副本数更新到期望值,用于将服务副本数收敛在自定义的服务副本数的数值内和/或修改用户配置的工作负载的副本资源大小。持久化管理运维能力可封装kubernetes集群中的Persistent Volumes、Persistent Volume Claim、StorageClass资源以及多种开源的provider资源,用于提供服务数据持久化需求。发布策略运维能力可封装开源的发布策略Flagger资源,控制Flagger的行为以使Flagger来控制工作负载拉起的资源,用于支持用户配置发布策略。According to an exemplary embodiment of the present disclosure, when the infrastructure cluster of the platform 300 is a kubernetes cluster, the automatic elastic expansion and contraction operation and maintenance capability can encapsulate the Horizontal Pod Autoscaler and Promethus resources in the kubernetes cluster, which are used to dynamically adjust the number of service pod replicas . The load balancing operation and maintenance capability can encapsulate the Service and Ingress resources in the kubernetes cluster, and use the existing load balancing capabilities of the Ingress in the kubernetes cluster to provide load balancing capabilities for services created by user-configured workloads. The operation and maintenance capability of customizing the number of service copies can update the number of service copies to the expected value according to the corresponding resources pulled by the workload configured by the user, so as to converge and/or modify the number of service copies within the value of the customized number of service copies Replica resource size for user-configured workloads. Persistent management operation and maintenance capabilities can encapsulate Persistent Volumes, Persistent Volume Claims, StorageClass resources and various open source provider resources in the kubernetes cluster to provide service data persistence requirements. The release strategy operation and maintenance capability can encapsulate the open source release strategy Flagger resources, control the behavior of the Flagger, and enable the Flagger to control the resources pulled by the workload, which is used to support the user to configure the release strategy.
控制器库330可包括每个工作负载和每个运维能力各自的控制器,其中,每个控制器用于管理对应的工作负载或运维能力相关的资源。例如,工作负载控制器可根据对应工作负载中的参数来选择创建对应的kubernetes的资源(例如,原生资源或非原生资源),让APP服务收敛在期望的状态,还可监控对应的资源的变化,让资源的状态收敛在期望的状态里面,此外,当对应的APP被删除时,工作负载控制器可自动完成相关资源的回收。再例如,运维能力控制器可根据对应运维能力中的参数来选择创建对应的kubernetes的资源或者对对应工作负载拉起的资源进行更新(patch),以满足对应APP的运维需求。The controller library 330 may include a respective controller for each workload and each operational capability, wherein each controller is used to manage resources related to the corresponding workload or operational capability. For example, the workload controller can choose to create the corresponding kubernetes resources (for example, native resources or non-native resources) according to the parameters in the corresponding workload, so that the APP service can converge to the desired state, and can also monitor the changes of the corresponding resources , so that the state of the resource converges in the desired state. In addition, when the corresponding APP is deleted, the workload controller can automatically complete the recycling of related resources. For another example, the operation and maintenance capability controller can choose to create the corresponding kubernetes resources or update (patch) the resources pulled by the corresponding workload according to the parameters in the corresponding operation and maintenance capabilities to meet the operation and maintenance requirements of the corresponding APP.
API模块340可用于供用户(例如,应用开发者)配置工作负载和运维能力(例如,包括声明使用哪些工作负载和运维能力及与它们相关的参数)来执行应用的构建。The API module 340 may be used for a user (eg, an application developer) to configure workloads and operational capabilities (eg, including declaring which workloads and operational capabilities to use and parameters associated with them) to perform construction of the application.
图4是示出根据本公开的示例性实施例的提供应用构建服务的方法的流程图。FIG. 4 is a flowchart illustrating a method of providing an application building service according to an exemplary embodiment of the present disclosure.
参照图4,在步骤401,可提供至少一个工作负载和至少一个运维能力。其中,每个工作负载封装了平台300所依托的基础设施集群中的多种服务相关资源以用于执行对应的服务,每个运维能力封装了平台300所依托的基础设施集群中的多种运维相关资源以用于执行对应的运维。4, in step 401, at least one workload and at least one operation and maintenance capability may be provided. Among them, each workload encapsulates a variety of service-related resources in the infrastructure cluster on which the platform 300 relies to execute corresponding services, and each operation and maintenance capability encapsulates a variety of services in the infrastructure cluster on which the platform 300 relies. Operation and maintenance related resources are used to perform corresponding operation and maintenance.
根据本公开的示例性实施例,所述至少一个工作负载可包括与在线服务应用对应的第一工作负载和与离线服务应用对应的第二工作负载中的至少一个。当然,工作负载不限于此,还可包括其它可能的工作负载,例如,与在线离线混合业务应用对应的工作负载等。According to an exemplary embodiment of the present disclosure, the at least one workload may include at least one of a first workload corresponding to an online service application and a second workload corresponding to an offline service application. Of course, the workload is not limited to this, and may also include other possible workloads, for example, workloads corresponding to online and offline mixed service applications, and the like.
根据本公开的示例性实施例,当平台300所基础设施集群为kubernetes集群时,第一工作负载可封装kubernetes集群中的deployment、statefulset、daemonset、pod、service和configmap等原生资源。此外,第一工作负载还可封装非kubernetes原生资源。第二工作负载可封装了kubernetes集群中的job、cronjob和configmap等原生资源。此外,第二工作负载还可封装非kubernetes原生资源。According to an exemplary embodiment of the present disclosure, when the infrastructure cluster of the platform 300 is a kubernetes cluster, the first workload may encapsulate native resources such as deployment, statefulset, daemonset, pod, service, and configmap in the kubernetes cluster. In addition, the first workload can also encapsulate non-kubernetes native resources. The second workload can encapsulate native resources such as jobs, cronjobs, and configmaps in the kubernetes cluster. In addition, the second workload can also encapsulate non-kubernetes native resources.
根据本公开的示例性实施例,所述至少一个运维能力可包括自动弹性扩缩容运维能力、负载均衡运维能力、自定义服务副本数运维能力、持久化管理运维能力和发布策略运维能力中的至少一个。当然,运维能力不限于此,还可包括其它可能的运维能力,例如,日志运维能力、监控运维能力等。According to an exemplary embodiment of the present disclosure, the at least one operation and maintenance capability may include an automatic elastic expansion and shrinkage operation and maintenance capability, a load balancing operation and maintenance capability, a custom service copy number operation and maintenance capability, a persistence management operation and maintenance capability, and a publishing capability. At least one of the policy operation and maintenance capabilities. Of course, the operation and maintenance capabilities are not limited to this, and may also include other possible operation and maintenance capabilities, such as log operation and maintenance capabilities, monitoring operation and maintenance capabilities, and the like.
根据本公开的示例性实施例,当平台300所基础设施集群为kubernetes集群时,自动弹性扩缩容运维能力可封装kubernetes集群中的Horizontal Pod Autoscaler、Promethus资源,用于动态调整服务pod副本数。负载均衡运维能力可封装kubernetes集群中的Service、Ingress资源,用于利用kubernetes集群中的Ingress已有的负载均衡能力结合用户配置的工作负载所创建的服务提供负载均衡能力。自定义服务副本数运维能力可根据用户配置的工作负载拉起的对应资源,将服务副本数更新到期望值,用于将服务副本数收敛在自定义的服务副本数的数值内和/或修改用户配置的工作负载的副本资源大小。持久化管理运维能力可封装kubernetes集群中的Persistent Volumes、Persistent Volume Claim、StorageClass资源以及多种开源的provider资源,用于提供服务数据持久化需求。发布策略运维能力可封装开源的发布策略Flagger资源,控制Flagger的行为以使Flagger来控制工作负载拉起的资源,用于支持用户配置发布策略。According to an exemplary embodiment of the present disclosure, when the infrastructure cluster of the platform 300 is a kubernetes cluster, the automatic elastic expansion and contraction operation and maintenance capability can encapsulate the Horizontal Pod Autoscaler and Promethus resources in the kubernetes cluster, which are used to dynamically adjust the number of service pod replicas . The load balancing operation and maintenance capability can encapsulate the Service and Ingress resources in the kubernetes cluster, and use the existing load balancing capabilities of the Ingress in the kubernetes cluster to provide load balancing capabilities for services created by user-configured workloads. The operation and maintenance capability of customizing the number of service copies can update the number of service copies to the expected value according to the corresponding resources pulled by the workload configured by the user, so as to converge and/or modify the number of service copies within the value of the customized number of service copies Replica resource size for user-configured workloads. Persistent management operation and maintenance capabilities can encapsulate Persistent Volumes, Persistent Volume Claims, StorageClass resources and various open source provider resources in the kubernetes cluster to provide service data persistence requirements. The release strategy operation and maintenance capability can encapsulate the open source release strategy Flagger resources, control the behavior of the Flagger, and enable the Flagger to control the resources pulled by the workload, which is used to support the user to configure the release strategy.
在步骤402,提供每个工作负载和每个运维能力各自的控制器,其中,每个控制器用于管理对应的工作负载或运维能力相关的资源。例如,工作负载控制器可根据对应工作负载中的参数来选择创建对应的kubernetes的资源(例如,原生资源或非原生资源),让 APP服务收敛在期望的状态,还可监控对应的资源的变化,让资源的状态收敛在期望的状态里面,此外,当对应的APP被删除时,工作负载控制器可自动完成相关资源的回收。再例如,运维能力控制器可根据对应运维能力中的参数来选择创建对应的kubernetes的资源或者对对应工作负载拉起的资源进行更新(patch),以满足对应APP的运维需求。In step 402, a respective controller for each workload and each operation and maintenance capability is provided, wherein each controller is used to manage resources related to the corresponding workload or operation and maintenance capability. For example, the workload controller can choose to create the corresponding kubernetes resources (for example, native resources or non-native resources) according to the parameters in the corresponding workload, so that the APP service can converge to the desired state, and can also monitor the changes of the corresponding resources , so that the state of the resource converges in the desired state. In addition, when the corresponding APP is deleted, the workload controller can automatically complete the recycling of related resources. For another example, the operation and maintenance capability controller can choose to create the corresponding kubernetes resources or update (patch) the resources pulled by the corresponding workload according to the parameters in the corresponding operation and maintenance capabilities to meet the operation and maintenance requirements of the corresponding APP.
在步骤403,提供API模块,以供用户(例如,应用开发者)配置工作负载和运维能力(例如,包括声明使用哪些工作负载和运维能力及与它们相关的参数)来执行应用的构建。At step 403, an API module is provided for a user (eg, an application developer) to configure workloads and operational capabilities (eg, including declaring which workloads and operational capabilities to use and parameters associated with them) to perform application building .
当然,本公开对上述步骤401-403的顺序不作限作,上述步骤401-403可按任意顺序或同时执行。Of course, the present disclosure does not limit the order of the above steps 401-403, and the above steps 401-403 may be performed in any order or simultaneously.
图5是示出根据本公开的示例性实施例的应用部署系统的框图。FIG. 5 is a block diagram illustrating an application deployment system according to an exemplary embodiment of the present disclosure.
参照图5,应用部署系统500可包括业务层模块510和底层模块520两个部分。业务层模块510可包括API模块511、注册组件模块512和部署应用模块513。底层模块520可包括用于管理工作负载和运维能力的控制器库模块,包括至少一个工作负载控制器521和至少一个运维能力控制器522。API模块511可对外提供restfulapi服务,注册组件模块512可定义组件的协议标准并执行组件注册,部署应用模块513可定义应用部署的协议标准并执行应用部署。此外,业务层模块510还可包括适配模块(未示出),用于在操作系统和控制器库模块之间做一层适配,有了这层适配,业务可以不感知控制器库模块的存在,控制器库模块不耦合业务,仅专注于工作负载和运维能力的维护。Referring to FIG. 5 , the application deployment system 500 may include two parts: a business layer module 510 and a bottom layer module 520 . The business layer module 510 may include an API module 511 , a registration component module 512 and a deployment application module 513 . The bottom layer module 520 may include a controller library module for managing workloads and operation and maintenance capabilities, including at least one workload controller 521 and at least one operation and maintenance capability controller 522 . The API module 511 can provide restfulapi services to the outside world, the registration component module 512 can define the protocol standard of the component and execute the component registration, and the deployment application module 513 can define the protocol standard of the application deployment and execute the application deployment. In addition, the service layer module 510 may further include an adaptation module (not shown) for performing a layer of adaptation between the operating system and the controller library module. With this layer of adaptation, the service may not be aware of the controller library The existence of the module, the controller library module is not coupled to the business, and only focuses on the maintenance of the workload and operation and maintenance capabilities.
具体地说,API模块511可接收用户(例如,应用开发者)用于注册组件的第一信息。这里,第一信息可包括用于声明所述组件使用的至少一个工作负载和一组业务相关参数(即,对应工作负载对外开放的参数)的信息。这里,用户可按照平台300提供的标准协议(标准配置文件)来声明第一信息。Specifically, the API module 511 may receive first information for a user (eg, an application developer) to register the component. Here, the first information may include information for declaring at least one workload used by the component and a set of service-related parameters (ie, parameters open to the outside world corresponding to the workload). Here, the user may declare the first information according to a standard protocol (standard configuration file) provided by the platform 300 .
根据本公开的示例性实施例,所述至少一个工作负载可包括与在线服务应用对应的第一工作负载和与离线服务应用对应的第二工作负载中的至少一个。当然,所述至少一个工作负载不限于此,还可包括其它可能的工作负载,例如,与在线离线混合业务应用对应的工作负载等。例如,当平台300所基础设施集群为kubernetes集群时,第一工作负载可封装kubernetes集群中的deployment、statefulset、daemonset、pod、service和configmap等原生资源。此外,第一工作负载还可封装非kubernetes原生资源。第二工作负载可封装了kubernetes集群中的job、cronjob和configmap等原生资源。此外,第二工作负载还可封装非kubernetes原生资源。According to an exemplary embodiment of the present disclosure, the at least one workload may include at least one of a first workload corresponding to an online service application and a second workload corresponding to an offline service application. Of course, the at least one workload is not limited to this, and may also include other possible workloads, for example, workloads corresponding to online and offline mixed service applications, and the like. For example, when the infrastructure cluster of the platform 300 is a kubernetes cluster, the first workload can encapsulate native resources such as deployment, statefulset, daemonset, pod, service, and configmap in the kubernetes cluster. In addition, the first workload can also encapsulate non-kubernetes native resources. The second workload can encapsulate native resources such as jobs, cronjobs, and configmaps in the kubernetes cluster. In addition, the second workload can also encapsulate non-kubernetes native resources.
根据本公开的示例性实施例,所述一组业务相关参数可包括:用于获取将使用的镜像的地址的镜像标识、用于指定将使用的模型的地址的环境变量、用于指定将使用的配置文件的参数、镜像启动命令及参数、所述组件的名称及版本号、服务健康检查探针、服务对外开放的环境变量中的至少一个。According to an exemplary embodiment of the present disclosure, the set of business-related parameters may include: an image identification for obtaining the address of the image to be used, an environment variable for specifying the address of the model to be used, an environment variable for specifying the address of the model to be used At least one of the parameters of the configuration file, the image startup command and parameters, the name and version number of the component, the service health check probe, and the environment variables that the service opens to the outside world.
随后,注册组件模块512可根据第一信息创建所述组件以将所述组件注册到平台300所依托的基础设施集群。所述组件内嵌用户声明使用的至少一个工作负载和一组业务相关参数。Subsequently, the register component module 512 may create the component according to the first information to register the component with the infrastructure cluster on which the platform 300 rests. The component embeds at least one workload and a set of business-related parameters declared by the user.
随后,API模块511可接收用户(例如,应用开发者)用于部署应用的第二信息。这里,第二信息可包括用于声明所述组件及其相关信息(例如,所述组件的名称、版本号等)、使用的至少一个运维能力及其参数和注册组件时声明的一组业务相关参数的信息。这里,用户可按照平台300提供的标准协议(标准配置文件)来声明第二信息。Subsequently, the API module 511 may receive second information used by a user (eg, an application developer) to deploy the application. Here, the second information may include a set of services for declaring the component and its related information (for example, the name of the component, version number, etc.), at least one operation and maintenance capability used and its parameters, and a set of services declared when registering the component Information about relevant parameters. Here, the user may declare the second information according to a standard protocol (standard configuration file) provided by the platform 300 .
根据本公开的示例性实施例,所述至少一个运维能力可包括自动弹性扩缩容运维能力、负载均衡运维能力、自定义服务副本数运维能力、持久化管理运维能力和发布策略运维能力中的至少一个。当然,所述至少一个运维能力不限于此,还可包括其它可能的运维能力,例如,日志运维能力、监控运维能力等。According to an exemplary embodiment of the present disclosure, the at least one operation and maintenance capability may include an automatic elastic expansion and shrinkage operation and maintenance capability, a load balancing operation and maintenance capability, a custom service copy number operation and maintenance capability, a persistence management operation and maintenance capability, and a publishing capability. At least one of the policy operation and maintenance capabilities. Of course, the at least one operation and maintenance capability is not limited to this, and may also include other possible operation and maintenance capabilities, for example, a log operation and maintenance capability, a monitoring operation and maintenance capability, and the like.
根据本公开的示例性实施例,当平台300所基础设施集群为kubernetes集群时,自 动弹性扩缩容运维能力可封装kubernetes集群中的Horizontal Pod Autoscaler、Promethus等资源,用于动态调整服务pod副本数。负载均衡运维能力可封装kubernetes集群中的Service、Ingress等资源,用于利用kubernetes集群中的Ingress已有的负载均衡能力结合用户配置的工作负载所创建的服务提供负载均衡能力。自定义服务副本数运维能力可根据用户配置的工作负载拉起的对应资源,将服务副本数更新到期望值,用于将服务副本数收敛在自定义的服务副本数的数值内和/或修改用户配置的工作负载的副本资源大小。持久化管理运维能力可封装kubernetes集群中的Persistent Volumes、Persistent Volume Claim、StorageClass等资源以及多种开源的provider资源,用于提供服务数据持久化需求。发布策略运维能力可封装开源的发布策略Flagger资源,控制Flagger的行为以使Flagger来控制工作负载拉起的资源,用于支持用户配置发布策略。According to an exemplary embodiment of the present disclosure, when the infrastructure cluster of the platform 300 is a kubernetes cluster, the automatic elastic expansion and contraction capacity operation and maintenance capability can encapsulate resources such as Horizontal Pod Autoscaler and Promethus in the kubernetes cluster for dynamically adjusting service pod replicas number. The load balancing operation and maintenance capability can encapsulate resources such as Service and Ingress in the kubernetes cluster, and use the existing load balancing capabilities of the Ingress in the kubernetes cluster to provide load balancing capabilities for the services created by the workload configured by the user. The operation and maintenance capability of customizing the number of service copies can update the number of service copies to the expected value according to the corresponding resources pulled by the workload configured by the user, so as to converge and/or modify the number of service copies within the value of the customized number of service copies Replica resource size for user-configured workloads. Persistent management operation and maintenance capabilities can encapsulate Persistent Volumes, Persistent Volume Claims, StorageClass and other resources in the kubernetes cluster, as well as a variety of open source provider resources to provide service data persistence requirements. The release strategy operation and maintenance capability can encapsulate the open source release strategy Flagger resources, control the behavior of the Flagger, and enable the Flagger to control the resources pulled by the workload, which is used to support the user to configure the release strategy.
根据本公开的示例性实施例,自动弹性扩缩容运维能力的参数可包括,但不限于,CPU大小、存储器大小、最小副本数和最大副本数。负载均衡运维能力的参数可包括,但不限于,请求的路径、请求的域名和请求的服务端口。自定义服务副本数运维能力的参数可包括,但不限于,副本数以及副本的CPU大小、存储器大小和GPU大小。持久化管理运维能力的参数可包括,但不限于,存储类型、存储大小和挂载路径。发布策略运维能力的参数可包括,但不限于,发布策略参数和发布策略。According to an exemplary embodiment of the present disclosure, the parameters of the automatic elastic scaling capacity operation and maintenance capability may include, but are not limited to, CPU size, memory size, minimum number of copies, and maximum number of copies. The parameters of the load balancing operation and maintenance capability may include, but are not limited to, the requested path, the requested domain name, and the requested service port. The parameters for customizing the operation and maintenance capabilities of the number of replicas of a service may include, but are not limited to, the number of replicas and the CPU size, memory size, and GPU size of the replicas. Parameters of persistent management operation and maintenance capabilities may include, but are not limited to, storage type, storage size, and mounting path. The parameters of the release policy operation and maintenance capability may include, but are not limited to, release policy parameters and release policies.
随后,部署应用模块513可根据第二信息创建应用部署配置文件以将所述应用部署配置文件创建到300所依托的基础设施集群。所述应用部署配置文件包括声明的组件及其相关信息、使用的至少一个运维能力及其参数和注册组件时声明的一组业务相关参数的信息。Subsequently, the deployment application module 513 may create an application deployment configuration file according to the second information to create the application deployment configuration file to the infrastructure cluster on which 300 is based. The application deployment configuration file includes the declared component and its related information, at least one used operation and maintenance capability and its parameters, and the information of a set of business-related parameters declared when the component is registered.
随后,所述至少一个工作负载和所述至少一个运维能力可被实例化。例如,可通过平台300所安装的解释器渲染出所述至少一个工作负载的实例,和所述至少一个运维能力的实例。Subsequently, the at least one workload and the at least one operational capability can be instantiated. For example, the at least one instance of the workload and the at least one instance of the operation and maintenance capability may be rendered through an interpreter installed on the platform 300 .
随后,所述至少一个工作负载和所述至少一个运维能力中的每个工作负载和每个运维能力各自的控制器521、522在监控到对应的工作负载或运维能力被实例化后,根据对应的元信息以创建对应的资源以完成应用的部署。例如,元信息可通过适配模块在执行适配时基于工作负载、运维能力、业务相关参数和运维能力参数而产生的。Subsequently, the respective controllers 521 and 522 of each of the at least one workload and the at least one operation and maintenance capability monitor that the corresponding workload or operation and maintenance capability is instantiated. , and create corresponding resources according to the corresponding meta information to complete the deployment of the application. For example, the meta information may be generated by the adaptation module based on workload, operation and maintenance capability, business-related parameters, and operation and maintenance capability parameters when performing adaptation.
根据本公开的示例性实施例,当所述至少一个工作负载包括与在线服务应用对应的第一工作负载时,所述一组业务相关参数可包括指示在线服务应用是有状态服务还是无状态服务的第一参数,第一工作负载的控制器可根据声明的第一参数的元信息创建deployment、statefulset、daemonset、pod、service和configmap中的一个或多个资源。例如,当第一参数指示在线服务应用为有状态服务时,第一工作负载的控制器根据声明的第一参数的元信息创建statefulset、service、configmap等资源,当第一参数指示在线服务应用为无状态服务时,第一工作负载的控制器根据声明的第一参数的元信息创建deployment或daemonset资源。According to an exemplary embodiment of the present disclosure, when the at least one workload includes a first workload corresponding to an online service application, the set of business-related parameters may include indicating whether the online service application is a stateful service or a stateless service The first parameter of the first workload, the controller of the first workload can create one or more resources in deployment, statefulset, daemonset, pod, service and configmap according to the meta-information of the declared first parameter. For example, when the first parameter indicates that the online service application is a stateful service, the controller of the first workload creates resources such as statefulset, service, and configmap according to the meta-information of the declared first parameter, and when the first parameter indicates that the online service application is In the stateless service, the controller of the first workload creates deployment or daemonset resources according to the meta-information of the declared first parameter.
根据本公开的示例性实施例,当所述至少一个工作负载包括与离线服务应用对应的第二工作负载时,所述一组业务相关参数可包括指示离线服务应用是一次性服务还是定时服务的第二参数,第二工作负载的控制器可根据声明的第二参数的元信息创建job、cronjob和configmap中的一个或多个资源。例如,当第二参数指示离线服务应用是一次性服务时,第二工作负载的控制器可根据声明的第二参数的元信息创建job资源。当第二参数指示离线服务应用是定时服务时,第二工作负载的控制器可根据声明的第二参数的元信息创建cronjob或job资源。According to an exemplary embodiment of the present disclosure, when the at least one workload includes a second workload corresponding to an offline service application, the set of service-related parameters may include an indicator indicating whether the offline service application is a one-time service or a scheduled service For the second parameter, the controller of the second workload may create one or more resources in the job, cronjob and configmap according to the declared meta-information of the second parameter. For example, when the second parameter indicates that the offline service application is a one-time service, the controller of the second workload may create a job resource according to the declared meta information of the second parameter. When the second parameter indicates that the offline service application is a scheduled service, the controller of the second workload may create a cronjob or a job resource according to the declared meta-information of the second parameter.
根据本公开的示例性实施例,当所述至少一个运维能力包括自动弹性扩缩容运维能力时,自动弹性扩缩容运维能力的控制器可通过自动弹性扩缩容运维能力控制kubernetes的HPA,使得HPA根据设置的参数实时监控所述至少一个工作负载拉起资源的状态信息,并可根据自动弹性扩缩容运维能力定义的期望负载及期望副本数对所述至少一个工作负 载的Pod实例数量执行弹性扩缩。According to an exemplary embodiment of the present disclosure, when the at least one operation and maintenance capability includes the automatic elastic expansion and contraction operation and maintenance capability, the controller of the automatic elastic expansion and contraction operation and maintenance capability may control the automatic elastic expansion and contraction operation and maintenance capability through the automatic elastic expansion and contraction operation and maintenance capability. The HPA of kubernetes enables HPA to monitor the status information of the resources pulled up by the at least one workload in real time according to the set parameters, and can adjust the at least one workload according to the expected load and the expected number of copies defined by the automatic elastic expansion and contraction operation and maintenance capabilities. The number of Pod instances under load performs elastic scaling.
当所述至少一个运维能力包括负载均衡运维能力时,负载均衡运维能力的控制器可根据与请求的路径、请求的域名和请求的服务端口对应的元信息,创建对应的负载均衡规则。When the at least one operation and maintenance capability includes a load balancing operation and maintenance capability, the controller of the load balancing operation and maintenance capability may create a corresponding load balancing rule according to the meta information corresponding to the requested path, the requested domain name and the requested service port .
当所述至少一个运维能力包括自定义服务副本数运维能力时,自定义服务副本数运维能力的控制器可控制所述至少一个工作负载拉起资源的副本数,使得服务实例的副本数在设置的数值内。When the at least one operation and maintenance capability includes the operation and maintenance capability of customizing the number of service copies, the controller of the operation and maintenance capability of customizing the number of service copies may control the number of copies of the resource pulled by the at least one workload, so that the copies of the service instance The number is within the set value.
当所述至少一个运维能力包括持久化管理运维能力时,持久化管理运维能力的控制器可根据与存储类型、存储大小和挂载路径对应的元信息,创建对应的持久化存储卷声明以及存储类型并将存储卷挂载到pod内部指定的路径。When the at least one operation and maintenance capability includes a persistent management and operation and maintenance capability, the controller of the persistent management and operation and maintenance capability may create a corresponding persistent storage volume according to the meta information corresponding to the storage type, storage size and mounting path Declare and storage type and mount the storage volume to the specified path inside the pod.
当所述至少一个运维能力包括发布策略运维能力时,发布策略运维能力的控制器可根据与设置的发布策略参数和设置的发布策略对应的元信息,创建对应的发布策略。When the at least one operation and maintenance capability includes a release policy operation and maintenance capability, the controller of the release policy operation and maintenance capability may create a corresponding release policy according to the set release policy parameters and meta information corresponding to the set release policy.
图6是示出根据本公开的示例性实施例的应用部署方法的流程图。FIG. 6 is a flowchart illustrating an application deployment method according to an exemplary embodiment of the present disclosure.
参照图6,在步骤601,可通过API模块511接收用户(例如,应用开发者)用于注册组件的第一信息。这里,第一信息可包括用于声明所述组件使用的至少一个工作负载和一组业务相关参数(即,对应工作负载对外开放的参数)的信息。这里,用户可按照平台300提供的标准协议(标准配置文件)来声明第一信息。Referring to FIG. 6 , in step 601 , first information for registering a component by a user (eg, an application developer) may be received through the API module 511 . Here, the first information may include information for declaring at least one workload used by the component and a set of service-related parameters (ie, parameters open to the outside world corresponding to the workload). Here, the user may declare the first information according to a standard protocol (standard configuration file) provided by the platform 300 .
根据本公开的示例性实施例,所述至少一个工作负载可包括与在线服务应用对应的第一工作负载和与离线服务应用对应的第二工作负载中的至少一个。当然,所述至少一个工作负载不限于此,还可包括其它可能的工作负载,例如,与在线离线混合业务应用对应的工作负载等。例如,当平台300所基础设施集群为kubernetes集群时,第一工作负载可封装kubernetes集群中的deployment、statefulset、daemonset、pod、service和configmap等原生资源。此外,第一工作负载还可封装非kubernetes原生资源。第二工作负载可封装了kubernetes集群中的job、cronjob和configmap等原生资源。此外,第二工作负载还可封装非kubernetes原生资源。According to an exemplary embodiment of the present disclosure, the at least one workload may include at least one of a first workload corresponding to an online service application and a second workload corresponding to an offline service application. Of course, the at least one workload is not limited to this, and may also include other possible workloads, for example, workloads corresponding to online and offline mixed service applications, and the like. For example, when the infrastructure cluster of the platform 300 is a kubernetes cluster, the first workload can encapsulate native resources such as deployment, statefulset, daemonset, pod, service, and configmap in the kubernetes cluster. In addition, the first workload can also encapsulate non-kubernetes native resources. The second workload can encapsulate native resources such as jobs, cronjobs, and configmaps in the kubernetes cluster. In addition, the second workload can also encapsulate non-kubernetes native resources.
根据本公开的示例性实施例,所述一组业务相关参数可包括:用于获取将使用的镜像的地址的镜像标识、用于指定将使用的模型的地址的环境变量、用于指定将使用的配置文件的参数、镜像启动命令及参数、所述组件的名称及版本号、服务健康检查探针、服务对外开放的环境变量中的至少一个。According to an exemplary embodiment of the present disclosure, the set of business-related parameters may include: an image identification for obtaining the address of the image to be used, an environment variable for specifying the address of the model to be used, an environment variable for specifying the address of the model to be used At least one of the parameters of the configuration file, the image startup command and parameters, the name and version number of the component, the service health check probe, and the environment variables that the service opens to the outside world.
在步骤602,可通过注册组件模块512根据第一信息创建所述组件以将所述组件注册到平台300所依托的基础设施集群。所述组件内嵌用户声明使用的至少一个工作负载和一组业务相关参数。In step 602, the component may be created according to the first information by the registering component module 512 to register the component with the infrastructure cluster on which the platform 300 is based. The component embeds at least one workload and a set of business-related parameters declared by the user.
在步骤603,可通过API模块511接收用户(例如,应用开发者)用于部署应用的第二信息。这里,第二信息可包括用于声明所述组件及其相关信息(例如,所述组件的名称、版本号等)、使用的至少一个运维能力及其参数和注册组件时声明的一组业务相关参数的信息。这里,用户可按照平台300提供的标准协议(标准配置文件)来声明第二信息。In step 603 , second information for deploying the application by a user (eg, an application developer) may be received through the API module 511 . Here, the second information may include a set of services for declaring the component and its related information (for example, the name of the component, version number, etc.), at least one operation and maintenance capability used and its parameters, and a set of services declared when registering the component Information about relevant parameters. Here, the user may declare the second information according to a standard protocol (standard configuration file) provided by the platform 300 .
根据本公开的示例性实施例,所述至少一个运维能力可包括自动弹性扩缩容运维能力、负载均衡运维能力、自定义服务副本数运维能力、持久化管理运维能力和发布策略运维能力中的至少一个。当然,所述至少一个运维能力不限于此,还可包括其它可能的运维能力,例如,日志运维能力、监控运维能力等。According to an exemplary embodiment of the present disclosure, the at least one operation and maintenance capability may include an automatic elastic expansion and shrinkage operation and maintenance capability, a load balancing operation and maintenance capability, a custom service copy number operation and maintenance capability, a persistence management operation and maintenance capability, and a publishing capability. At least one of the policy operation and maintenance capabilities. Of course, the at least one operation and maintenance capability is not limited to this, and may also include other possible operation and maintenance capabilities, for example, a log operation and maintenance capability, a monitoring operation and maintenance capability, and the like.
根据本公开的示例性实施例,当平台300所基础设施集群为kubernetes集群时,自动弹性扩缩容运维能力可封装kubernetes集群中的Horizontal Pod Autoscaler、Promethus等资源,用于动态调整服务pod副本数。负载均衡运维能力可封装kubernetes集群中的Service、Ingress等资源,用于利用kubernetes集群中的Ingress已有的负载均衡能力结合用户配置的工作负载所创建的服务提供负载均衡能力。自定义服务副本数运维能力可根据用户配置的工作负载拉起的对应资源,将服务副本数更新到期望值,用于将服务副本数收 敛在自定义的服务副本数的数值内和/或修改用户配置的工作负载的副本资源大小。持久化管理运维能力可封装kubernetes集群中的Persistent Volumes、Persistent Volume Claim、StorageClass等资源以及多种开源的provider资源,用于提供服务数据持久化需求。发布策略运维能力可封装开源的发布策略Flagger资源,控制Flagger的行为以使Flagger来控制工作负载拉起的资源,用于支持用户配置发布策略。According to an exemplary embodiment of the present disclosure, when the infrastructure cluster of the platform 300 is a kubernetes cluster, the automatic elastic expansion and contraction capacity operation and maintenance capability can encapsulate resources such as Horizontal Pod Autoscaler and Promethus in the kubernetes cluster for dynamically adjusting service pod replicas number. The load balancing operation and maintenance capability can encapsulate resources such as Service and Ingress in the kubernetes cluster, and use the existing load balancing capabilities of the Ingress in the kubernetes cluster to provide load balancing capabilities for the services created by the workload configured by the user. The operation and maintenance capability of customizing the number of service copies can update the number of service copies to the expected value according to the corresponding resources pulled by the workload configured by the user, so as to converge and/or modify the number of service copies within the value of the customized number of service copies Replica resource size for user-configured workloads. Persistent management operation and maintenance capabilities can encapsulate Persistent Volumes, Persistent Volume Claims, StorageClass and other resources in the kubernetes cluster, as well as a variety of open source provider resources to provide service data persistence requirements. The release strategy operation and maintenance capability can encapsulate the open source release strategy Flagger resources, control the behavior of the Flagger, and enable the Flagger to control the resources pulled by the workload, which is used to support the user to configure the release strategy.
根据本公开的示例性实施例,自动弹性扩缩容运维能力的参数可包括,但不限于,CPU大小、存储器大小、最小副本数和最大副本数。负载均衡运维能力的参数可包括,但不限于,请求的路径、请求的域名和请求的服务端口。自定义服务副本数运维能力的参数可包括,但不限于,副本数以及副本的CPU大小、存储器大小和GPU大小。持久化管理运维能力的参数可包括,但不限于,存储类型、存储大小和挂载路径。发布策略运维能力的参数可包括,但不限于,发布策略参数和发布策略。According to an exemplary embodiment of the present disclosure, the parameters of the automatic elastic scaling capacity operation and maintenance capability may include, but are not limited to, CPU size, memory size, minimum number of copies, and maximum number of copies. The parameters of the load balancing operation and maintenance capability may include, but are not limited to, the requested path, the requested domain name, and the requested service port. The parameters for customizing the operation and maintenance capabilities of the number of replicas of a service may include, but are not limited to, the number of replicas and the CPU size, memory size, and GPU size of the replicas. Parameters of persistent management operation and maintenance capabilities may include, but are not limited to, storage type, storage size, and mounting path. The parameters of the release policy operation and maintenance capability may include, but are not limited to, release policy parameters and release policies.
在步骤604,可通过部署应用模块513根据第二信息创建应用部署配置文件以将所述应用部署配置文件创建到平台300所依托的基础设施集群。所述应用部署配置文件包括声明的组件及其相关信息、使用的至少一个运维能力及其参数和注册组件时声明的一组业务相关参数的信息。In step 604, an application deployment configuration file may be created according to the second information by the deployment application module 513 to create the application deployment configuration file to the infrastructure cluster on which the platform 300 relies. The application deployment configuration file includes the declared component and its related information, at least one used operation and maintenance capability and its parameters, and the information of a set of business-related parameters declared when the component is registered.
在步骤605,所述至少一个工作负载和所述至少一个运维能力可被实例化。例如,可通过平台300所安装的解释器渲染出所述至少一个工作负载的实例,和所述至少一个运维能力的实例。At step 605, the at least one workload and the at least one operational capability may be instantiated. For example, the at least one instance of the workload and the at least one instance of the operation and maintenance capability may be rendered through an interpreter installed on the platform 300 .
在步骤606,可通过所述至少一个工作负载和所述至少一个运维能力中的每个工作负载和每个运维能力各自的控制器521、522在监控到对应的工作负载或运维能力被实例化后,根据对应的元信息以创建对应的资源以完成应用的部署。例如,元信息可通过适配模块在执行适配时基于工作负载、运维能力、业务相关参数和运维能力参数而产生的。In step 606, the respective controllers 521 and 522 of each of the at least one workload and each of the at least one operation and maintenance capability can monitor the corresponding workload or operation and maintenance capability. After being instantiated, corresponding resources are created according to the corresponding meta information to complete the deployment of the application. For example, the meta information may be generated by the adaptation module based on workload, operation and maintenance capability, business-related parameters, and operation and maintenance capability parameters when performing adaptation.
根据本公开的示例性实施例,当所述至少一个工作负载包括与在线服务应用对应的第一工作负载时,所述一组业务相关参数可包括指示在线服务应用是有状态服务还是无状态服务的第一参数,第一工作负载的控制器可根据声明的第一参数的元信息创建deployment、statefulset、daemonset、pod、service和configmap中的一个或多个资源。例如,当第一参数指示在线服务应用为有状态服务时,第一工作负载的控制器根据声明的第一参数的元信息创建statefulset资源,当第一参数指示在线服务应用为无状态服务时,第一工作负载的控制器根据声明的第一参数的元信息创建deployment资源。According to an exemplary embodiment of the present disclosure, when the at least one workload includes a first workload corresponding to an online service application, the set of business-related parameters may include indicating whether the online service application is a stateful service or a stateless service The first parameter of the first workload, the controller of the first workload can create one or more resources in deployment, statefulset, daemonset, pod, service and configmap according to the meta-information of the declared first parameter. For example, when the first parameter indicates that the online service application is a stateful service, the controller of the first workload creates a statefulset resource according to the meta-information of the declared first parameter, and when the first parameter indicates that the online service application is a stateless service, The controller of the first workload creates a deployment resource according to the declared meta-information of the first parameter.
根据本公开的示例性实施例,当所述至少一个工作负载包括与离线服务应用对应的第二工作负载时,所述一组业务相关参数可包括指示离线服务应用是一次性服务还是定时服务的第二参数,第二工作负载的控制器可根据声明的第二参数的元信息创建job、cronjob和configmap中的一个或多个资源。例如,当第二参数指示离线服务应用是一次性服务时,第二工作负载的控制器可根据声明的第二参数的元信息创建job资源。当第二参数指示离线服务应用是定时服务时,第二工作负载的控制器可根据声明的第二参数的元信息创建cronjob资源。According to an exemplary embodiment of the present disclosure, when the at least one workload includes a second workload corresponding to an offline service application, the set of service-related parameters may include an indicator indicating whether the offline service application is a one-time service or a scheduled service For the second parameter, the controller of the second workload may create one or more resources in the job, cronjob and configmap according to the declared meta-information of the second parameter. For example, when the second parameter indicates that the offline service application is a one-time service, the controller of the second workload may create a job resource according to the declared meta information of the second parameter. When the second parameter indicates that the offline service application is a scheduled service, the controller of the second workload may create a cronjob resource according to the declared meta information of the second parameter.
根据本公开的示例性实施例,当所述至少一个运维能力包括自动弹性扩缩容运维能力时,自动弹性扩缩容运维能力的控制器可通过自动弹性扩缩容运维能力控制kubernetes的HPA,使得HPA根据设置的参数实时监控所述至少一个工作负载拉起资源的状态信息,并可根据自动弹性扩缩容运维能力定义的期望负载及期望副本数对所述至少一个工作负载的Pod实例数量执行弹性扩缩。According to an exemplary embodiment of the present disclosure, when the at least one operation and maintenance capability includes the automatic elastic expansion and contraction operation and maintenance capability, the controller of the automatic elastic expansion and contraction operation and maintenance capability may control the automatic elastic expansion and contraction operation and maintenance capability through the automatic elastic expansion and contraction operation and maintenance capability. The HPA of kubernetes enables HPA to monitor the status information of the resources pulled up by the at least one workload in real time according to the set parameters, and can adjust the at least one workload according to the expected load and the expected number of copies defined by the automatic elastic expansion and contraction operation and maintenance capabilities. The number of Pod instances under load performs elastic scaling.
当所述至少一个运维能力包括负载均衡运维能力时,负载均衡运维能力的控制器可根据与请求的路径、请求的域名和请求的服务端口对应的元信息,创建对应的负载均衡规则。When the at least one operation and maintenance capability includes a load balancing operation and maintenance capability, the controller of the load balancing operation and maintenance capability may create a corresponding load balancing rule according to the meta information corresponding to the requested path, the requested domain name and the requested service port .
当所述至少一个运维能力包括自定义服务副本数运维能力时,自定义服务副本数运维能力的控制器可控制所述至少一个工作负载拉起资源的副本数,使得服务实例的副本数 在设置的数值内。When the at least one operation and maintenance capability includes the operation and maintenance capability of customizing the number of service copies, the controller of the operation and maintenance capability of customizing the number of service copies may control the number of copies of the resource pulled by the at least one workload, so that the copies of the service instance The number is within the set value.
当所述至少一个运维能力包括持久化管理运维能力时,持久化管理运维能力的控制器可根据与存储类型、存储大小和挂载路径对应的元信息,创建对应的持久化存储卷声明以及存储类型并将存储卷挂载到pod内部指定的路径。When the at least one operation and maintenance capability includes a persistent management and operation and maintenance capability, the controller of the persistent management and operation and maintenance capability may create a corresponding persistent storage volume according to the meta information corresponding to the storage type, storage size and mounting path Declare and storage type and mount the storage volume to the specified path inside the pod.
当所述至少一个运维能力包括发布策略运维能力时,发布策略运维能力的控制器可根据与设置的发布策略参数和设置的发布策略对应的元信息,创建对应的发布策略。When the at least one operation and maintenance capability includes a release policy operation and maintenance capability, the controller of the release policy operation and maintenance capability may create a corresponding release policy according to the set release policy parameters and meta information corresponding to the set release policy.
下面,将详细介绍将根据本公开的示例性实施例的通过应用构建平台部署应用的方法应用于一个推荐服务应用的场景。In the following, a scenario in which the method for deploying an application through an application building platform according to an exemplary embodiment of the present disclosure is applied to a recommendation service application will be described in detail.
场景描述:推荐服务应用输入为用户标识信息、用户访问的物料及待推荐的物料列表,推荐服务应用输出为推荐物料列表的排名,并将排名靠前的物料推荐给用户。Scenario description: The input of the recommendation service application is the user identification information, the materials accessed by the user, and the list of materials to be recommended. The output of the recommendation service application is the ranking of the recommended material list, and the top-ranked materials are recommended to the user.
服务要求:推荐服务应用提供对外访问的能力,接收用户请求,并提供A/B Testing的能力以判断不同模型对用户点击率(CTR)的影响。Service requirements: The recommendation service application provides external access capabilities, receives user requests, and provides A/B Testing capabilities to determine the impact of different models on user click-through rate (CTR).
部署步骤:Deployment steps:
1、声明组件(如已声明组件,则跳过此步骤)。声明组件可通过编写标准协议来完成。声明组件需要声明的信息及对外开放的参数可包括:通过第一参数(workloadsubtype字段)指定推荐服务为在线服务且无状态服务;推荐服务的镜像标识,根据该标识可以拉取到镜像地址;推荐服务使用的模型地址,可通过环境变量指定;推荐服务使用的配置文件,可通过config字段指定;启动服务默认资源(例如,CPU和memory)、组件的名字和版本(例如,sage-rec-svc,1.0.0);服务健康检查探针(例如,liveness和readiness);指定服务对外开放的环境变量,部署服务时可传入。1. Declare the component (if the component has been declared, skip this step). Declaring components can be done by writing standard protocols. The information to be declared by the declaration component and the parameters open to the outside world may include: specifying the recommended service as an online service and a stateless service through the first parameter (workloadsubtype field); the image identifier of the recommended service, according to which the image address can be pulled; recommended The model address used by the service, which can be specified by environment variables; the configuration file used by the recommended service, which can be specified by the config field; the default resources (for example, CPU and memory), the name and version of the component (for example, sage-rec-svc) to start the service , 1.0.0); service health check probes (for example, liveness and readiness); specify the environment variables that the service opens to the outside world, which can be passed in when deploying the service.
2、按照标准协议填写完成后,可通过restfulapi将组件注册到基础设施集群。2. After filling in the standard protocol, you can register the component to the infrastructure cluster through restfulapi.
3、部署应用。部署应用可通过编写标准协议来完成。部署应用需要指定如下信息:指定使用推荐服务的组件(可通过组件名称来指定)及其版本号;部署应用时使用的应用名称;声明使用的运维能力;声明在声明组件时所声明的对外开放的参数。3. Deploy the application. Deploying applications can be accomplished by writing standard protocols. When deploying an application, you need to specify the following information: specify the component that uses the recommended service (which can be specified by the component name) and its version number; the application name used when deploying the application; the operation and maintenance capabilities used by the declaration; open parameters.
这里,根据上述服务要求,需要声明三个运维能力,即,负载均衡运维能力、自定义服务副本数运维能力(提供手动改副本资源的能力)、发布策略运维能力(提供A/B Testing的能力)。Here, according to the above service requirements, three operation and maintenance capabilities need to be declared, namely, load balancing operation and maintenance capabilities, custom service replica number operation and maintenance capabilities (providing the ability to manually change replica resources), release policy operation and maintenance capabilities (providing A/ B Testing ability).
4、通过restfulapi将部署应用的元信息创建到基础设施集群。4. Create the meta information of the deployed application to the infrastructure cluster through restfulapi.
5、部署应用的元信息到基础设施集群后,平台安装的解释器会渲染出与在线服务应用对应的第一工作负载实例和上述三个运维能力实例。5. After deploying the meta information of the application to the infrastructure cluster, the interpreter installed on the platform will render the first workload instance corresponding to the online service application and the above three operation and maintenance capability instances.
6、当在线服务应用对应的第一工作负载的控制器和上述三个运维能力的控制器监控到对应工作负载和运维能力实例的创建后,根据元信息创建预估服务。6. After the controller of the first workload corresponding to the online service application and the controllers of the above three operation and maintenance capabilities monitor the creation of the corresponding workload and the operation and maintenance capability instance, an estimated service is created according to the meta information.
7、负载均衡运维能力根据已创建Service创建Ingress规则,对外提供预估服务。7. The load balancing operation and maintenance capability creates Ingress rules based on the created Service, and provides estimated services to the outside world.
8、由于需要A/B Testing的能力,因此可组件sage-rec-svc:1.0.0升级到sage-rec-svc:1.0.1,主要更新第一工作负载中镜像。8. Due to the need for A/B Testing capabilities, the component sage-rec-svc:1.0.0 can be upgraded to sage-rec-svc:1.0.1, mainly to update the image in the first workload.
9、对已经部署应用进行升级,将组件的版本号信息从1.0.0升级到1.0.1,然后配置A/B Testing规则。9. Upgrade the deployed application, upgrade the component version number information from 1.0.0 to 1.0.1, and then configure the A/B Testing rules.
10、通过restfulapi将更新信息提交到基础设施集群,更新生效后,用户(例如,应用使用者)可以根据配置的规则及负载均衡能力访问服务。10. Submit the update information to the infrastructure cluster through restfulapi. After the update takes effect, users (for example, application users) can access the service according to the configured rules and load balancing capabilities.
根据本公开的提供应用构建服务的方法和应用构建平台以及应用部署方法和系统,通过工作负载来对平台所依托的基础设施集群的多种服务资源进行组织、封装和管理,通过运维能力来对平台所依托的基础设施集群的多种运维资源进行组织、封装和管理,从而可提供上层开发应用所需要的全部产品功能,这不仅能够提供更丰富的业务需求,且所有行为可控,同时满足社区标准和生态,便于后续和社区的融合,还能够使应用开发者仅需专注于与业务相关的开发工作,而不必关注或开发底层架构和运维细节。According to the method for providing application construction services, the application construction platform, and the application deployment method and system of the present disclosure, various service resources of the infrastructure cluster supported by the platform are organized, packaged and managed through workloads, and the operation and maintenance capabilities are used to Organize, encapsulate and manage the various operation and maintenance resources of the infrastructure cluster on which the platform relies, so as to provide all the product functions required by the upper-layer development application, which can not only provide richer business requirements, but also control all behaviors. At the same time, it satisfies community standards and ecology, which facilitates the subsequent integration with the community, and enables application developers to focus only on business-related development work without having to pay attention to or develop the underlying architecture and operation and maintenance details.
此外,根据本公开的提供应用构建服务的方法和应用构建平台以及应用部署方法和 系统,应用的管理全部围绕对工作负载和运维能力的管理。随着产品的迭代升级及探索,能够不断强化和稳定工作负载和运维能力,上层应用开发者只需通过声明使用即可。In addition, according to the method and application construction platform for providing an application construction service, and the application deployment method and system of the present disclosure, the management of the application all revolves around the management of workload and operation and maintenance capabilities. With the iterative upgrade and exploration of the product, it can continuously strengthen and stabilize the workload and operation and maintenance capabilities, and upper-layer application developers only need to declare and use it.
此外,根据本公开的提供应用构建服务的方法和应用构建平台以及应用部署方法和系统,由于组件信息可包括组件名称和组件版本号,因此,应用升级时,可新增版本号,这不会影响已有服务,只需要在应用配置文件中声明新的版本号即可。In addition, according to the method and application construction platform for providing application construction services, and the application deployment method and system of the present disclosure, since the component information may include the component name and the component version number, when the application is upgraded, a new version number may be added, which will not Affecting existing services, you only need to declare a new version number in the application configuration file.
此外,根据本公开的提供应用构建服务的方法和应用构建平台以及应用部署方法和系统,应用的交付围绕着组件的形式交付,这样可以按单个应用或者指定应用交付即可。由于从大量的yaml文件转移到工作负载和运维能力的组合声明上,原来需要全量渲染template模板,现在只需要升级对应的组件或者应用配置文件即可,而工作负载和运维能力是kubernetes的运维,可充分利用kubernetes提供的扩展机制及其自身机制的稳定性,现在的交付指定升级的应用的镜像,对组件中工作负载使用的镜像进行升级即可,不用通过离线包这种繁重交付方式,并且有了工作负载和运维能力这套标准,开发、运维、交付在标准中进行协作,大大减少了沟通成本。In addition, according to the method and application construction platform for providing application construction services, and the application deployment method and system of the present disclosure, application delivery is delivered in the form of components, so that it can be delivered as a single application or a specified application. Due to the transfer from a large number of yaml files to the combined declaration of workload and operation and maintenance capabilities, the template template needs to be fully rendered, and now only the corresponding components or application configuration files need to be upgraded, and the workload and operation and maintenance capabilities are kubernetes. Operation and maintenance can make full use of the extension mechanism provided by kubernetes and the stability of its own mechanism. Currently, the image of the specified upgraded application can be delivered, and the image used by the workload in the component can be upgraded without the heavy delivery of offline packages. With the standard set of workload and operation and maintenance capabilities, development, operation and maintenance, and delivery are coordinated in the standard, which greatly reduces the communication cost.
以上已参照图2至图6描述了根据本公开示例性实施例的提供应用构建服务的方法和应用构建平台以及应用部署方法和系统。The method for providing an application construction service, the application construction platform, and the application deployment method and system according to the exemplary embodiments of the present disclosure have been described above with reference to FIGS. 2 to 6 .
图3所示出的应用构建平台和图5所示出的通过应用构建平台应用部署系统中的各个模块可被配置为执行特定功能的软件、硬件、固件或上述项的任意组合。例如,各个模块可对应于专用的集成电路,也可对应于纯粹的软件代码,还可对应于软件与硬件相结合的模块。此外,各个模块所实现的一个或多个功能也可由物理实体设备(例如,处理器、客户端或服务器等)中的组件来统一执行。Various modules in the application building platform shown in FIG. 3 and the application deployment system through the application building platform shown in FIG. 5 may be configured as software, hardware, firmware or any combination of the above to perform specific functions. For example, each module may correspond to a dedicated integrated circuit, may also correspond to pure software code, or may correspond to a module combining software and hardware. In addition, one or more functions implemented by each module can also be uniformly performed by components in a physical entity device (eg, a processor, a client or a server, etc.).
此外,参照图4所描述的提供应用构建服务的方法和图6所描述的应用部署方法可通过记录在计算机可读存储介质上的程序(或指令)来实现。例如,根据本公开的示例性实施例,可提供存储指令的计算机可读存储介质,其中,当所述指令被至少一个计算装置运行时,促使所述至少一个计算装置执行根据本公开的提供应用构建服务的方法和/或应用部署方法。In addition, the method for providing an application construction service described with reference to FIG. 4 and the application deployment method described in FIG. 6 may be implemented by programs (or instructions) recorded on a computer-readable storage medium. For example, according to exemplary embodiments of the present disclosure, a computer-readable storage medium may be provided storing instructions that, when executed by at least one computing device, cause the at least one computing device to execute a provisioning application according to the present disclosure A method for building a service and/or an application deployment method.
上述计算机可读存储介质中的计算机程序可在诸如客户端、主机、代理装置、服务器等计算机设备中部署的环境中运行,应注意,计算机程序还可用于执行除了上述步骤以外的附加步骤或者在执行上述步骤时执行更为具体的处理,这些附加步骤和进一步处理的内容已经在参照图4和图6进行相关方法的描述过程中提及,因此这里为了避免重复将不再进行赘述。The computer program in the above-mentioned computer-readable storage medium can run in an environment deployed in computer equipment such as a client, a host, an agent device, a server, etc. It should be noted that the computer program can also be used to perform additional steps in addition to the above-mentioned steps or More specific processing is performed when the above steps are performed, and the contents of these additional steps and further processing have been mentioned in the description of the related method with reference to FIG. 4 and FIG.
应注意,根据本公开示例性实施例的应用构建平台和应用部署系统中的各个模块可完全依赖计算机程序的运行来实现相应的功能,即,各个模块在计算机程序的功能架构中与各步骤相应,使得整个系统通过专门的软件包(例如,lib库)而被调用,以实现相应的功能。It should be noted that each module in the application construction platform and the application deployment system according to the exemplary embodiment of the present disclosure can completely rely on the running of the computer program to achieve corresponding functions, that is, each module corresponds to each step in the functional architecture of the computer program , so that the whole system is called through special software packages (for example, lib library) to realize the corresponding functions.
另一方面,图3和图5所示的各个模块也可以通过硬件、软件、固件、中间件、微代码或其任意组合来实现。当以软件、固件、中间件或微代码实现时,用于执行相应操作的程序代码或者代码段可以存储在诸如存储介质的计算机可读介质中,使得处理器可通过读取并运行相应的程序代码或者代码段来执行相应的操作。On the other hand, each module shown in FIG. 3 and FIG. 5 can also be implemented by hardware, software, firmware, middleware, microcode or any combination thereof. When implemented in software, firmware, middleware, or microcode, program codes or code segments for performing corresponding operations may be stored in a computer-readable medium such as a storage medium, so that a processor can read and execute the corresponding program by reading code or code segment to perform the corresponding action.
例如,本公开的示例性实施例还可以实现为计算装置,该计算装置包括存储部件和处理器,存储部件中存储有计算机可执行指令集合,当计算机可执行指令集合被处理器执行时,执行根据本公开的示例性实施例的提供应用构建服务的方法和/或应用部署的方法。For example, exemplary embodiments of the present disclosure may also be implemented as a computing device including a storage component and a processor, the storage component stores a computer-executable instruction set, and when the computer-executable instruction set is executed by the processor, executes the A method of providing an application construction service and/or a method of application deployment according to an exemplary embodiment of the present disclosure.
具体说来,计算装置可以部署在服务器或客户端中,也可以部署在分布式网络环境中的节点装置上。此外,计算装置可以是PC计算机、平板装置、个人数字助理、智能手机、web应用或其他能够执行上述指令集合的装置。Specifically, the computing device may be deployed in a server or a client, or may be deployed on a node device in a distributed network environment. Furthermore, the computing device may be a PC computer, a tablet device, a personal digital assistant, a smartphone, a web application, or other device capable of executing the set of instructions described above.
这里,计算装置并非必须是单个的计算装置,还可以是任何能够单独或联合执行上 述指令(或指令集)的装置或电路的集合体。计算装置还可以是集成控制系统或系统管理器的一部分,或者可被配置为与本地或远程(例如,经由无线传输)以接口互联的便携式电子装置。Here, the computing device does not have to be a single computing device, but can also be any set of devices or circuits capable of individually or jointly executing the above-mentioned instructions (or instruction sets). The computing device may also be part of an integrated control system or system manager, or may be configured as a portable electronic device that interfaces locally or remotely (eg, via wireless transmission).
在计算装置中,处理器可包括中央处理器(CPU)、图形处理器(GPU)、可编程逻辑装置、专用处理器系统、微控制器或微处理器。作为示例而非限制,处理器还可包括模拟处理器、数字处理器、微处理器、多核处理器、处理器阵列、网络处理器等。In a computing device, a processor may include a central processing unit (CPU), a graphics processing unit (GPU), a programmable logic device, a special purpose processor system, a microcontroller, or a microprocessor. By way of example and not limitation, processors may also include analog processors, digital processors, microprocessors, multi-core processors, processor arrays, network processors, and the like.
根据本公开示例性实施例的提供应用构建服务的方法和/或应用部署方法中所描述的某些操作可通过软件方式来实现,某些操作可通过硬件方式来实现,此外,还可通过软硬件结合的方式来实现这些操作。Some operations described in the method for providing an application construction service and/or the application deployment method according to the exemplary embodiments of the present disclosure may be implemented by software, some operations may be implemented by hardware, and in addition, some operations may be implemented by software These operations are implemented by means of a combination of hardware.
处理器可运行存储在存储部件之一中的指令或代码,其中,存储部件还可以存储数据。指令和数据还可经由网络接口装置而通过网络被发送和接收,其中,网络接口装置可采用任何已知的传输协议。The processor may execute instructions or code stored in one of the storage components, which may also store data. Instructions and data may also be sent and received over a network via a network interface device, which may employ any known transport protocol.
存储部件可与处理器集成为一体,例如,将RAM或闪存布置在集成电路微处理器等之内。此外,存储部件可包括独立的装置,诸如,外部盘驱动、存储阵列或任何数据库系统可使用的其他存储装置。存储部件和处理器可在操作上进行耦合,或者可例如通过I/O端口、网络连接等互相通信,使得处理器能够读取存储在存储部件中的文件。The memory component may be integrated with the processor, eg, RAM or flash memory arranged within an integrated circuit microprocessor or the like. Additionally, the storage components may include separate devices, such as external disk drives, storage arrays, or any other storage device that may be used by a database system. The storage component and the processor may be operatively coupled, or may communicate with each other, eg, through I/O ports, network connections, etc., to enable the processor to read files stored in the storage component.
此外,计算装置还可包括视频显示器(诸如,液晶显示器)和用户交互接口(诸如,键盘、鼠标、触摸输入装置等)。计算装置的所有组件可经由总线和/或网络而彼此连接。In addition, the computing device may also include a video display (such as a liquid crystal display) and a user interaction interface (such as a keyboard, mouse, touch input device, etc.). All components of the computing device may be connected to each other via a bus and/or network.
根据本公开示例性实施例的提供应用构建服务的方法和/或应用部署方法可被描述为各种互联或耦合的功能块或功能示图。然而,这些功能块或功能示图可被均等地集成为单个的逻辑装置或按照非确切的边界进行操作。The method of providing an application building service and/or the application deployment method according to the exemplary embodiments of the present disclosure may be described as various interconnected or coupled functional blocks or functional diagrams. However, these functional blocks or functional diagrams may be equally integrated into a single logical device or operate along non-precise boundaries.
因此,参照图4所描述的提供应用构建服务的方法和参照图6所描述的应用部署方法可通过包括至少一个计算装置和至少一个存储指令的存储装置的系统来实现。Therefore, the method for providing an application building service described with reference to FIG. 4 and the application deployment method described with reference to FIG. 6 may be implemented by a system including at least one computing device and at least one storage device storing instructions.
根据本公开的示例性实施例,至少一个计算装置是根据本公开示例性实施例的用于提供应用构建服务的方法和/或通应用部署方法的计算装置,存储装置中存储有计算机可执行指令集合,当计算机可执行指令集合被至少一个计算装置执行时,执行参照图4所描述的提供应用构建服务的方法和/或参照图6所描述的应用部署方法。According to an exemplary embodiment of the present disclosure, at least one computing device is a computing device for providing a method for an application building service and/or a general application deployment method according to an exemplary embodiment of the present disclosure, and the storage device stores computer-executable instructions The set, when the set of computer-executable instructions is executed by at least one computing device, performs the method for providing an application building service described with reference to FIG. 4 and/or the application deployment method described with reference to FIG. 6 .
根据本公开的示例性实施例,提供一种电子设备,包括:处理器;用于存储所述处理器可执行指令的存储器;其中,所述处理器被配置为执行所述指令,以实现参照图4所描述的提供应用构建服务的方法和/或参照图6所描述的应用部署方法。According to an exemplary embodiment of the present disclosure, there is provided an electronic device, comprising: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement a reference The method for providing an application construction service described in FIG. 4 and/or the application deployment method described with reference to FIG. 6 .
以上描述了本公开的各示例性实施例,应理解,上述描述仅是示例性的,并非穷尽性的,本公开不限于所披露的各示例性实施例。在不偏离本公开的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。因此,本公开的保护范围应该以权利要求的范围为准。Various exemplary embodiments of the present disclosure have been described above, and it should be understood that the above description is merely exemplary and not exhaustive, and the present disclosure is not limited to the disclosed exemplary embodiments. Numerous modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of this disclosure. Therefore, the scope of protection of the present disclosure should be determined by the scope of the claims.
工业实用性Industrial Applicability
根据本公开的提供应用构建服务的方法和应用构建平台、应用部署方法和系统,通过工作负载来对平台所依托的基础设施集群的多种服务资源进行组织、封装和管理,通过运维能力来对平台所依托的基础设施集群的多种运维资源进行组织、封装和管理,从而可提供上层开发应用所需要的全部产品功能,这不仅能够提供更丰富的业务需求,且所有行为可控,同时满足社区标准和生态,便于后续和社区的融合,还能够使应用开发者仅需专注于与业务相关的开发工作,而不必关注或开发底层架构和运维细节。According to the method for providing application construction service, the application construction platform, the application deployment method and the system of the present disclosure, various service resources of the infrastructure cluster supported by the platform are organized, packaged and managed through workloads, and the operation and maintenance capabilities are used to Organize, encapsulate and manage the various operation and maintenance resources of the infrastructure cluster on which the platform relies, so as to provide all the product functions required by the upper-layer development application, which can not only provide richer business requirements, but also control all behaviors. At the same time, it satisfies community standards and ecology, which facilitates the subsequent integration with the community, and enables application developers to focus only on business-related development work without having to pay attention to or develop the underlying architecture and operation and maintenance details.

Claims (48)

  1. 一种包括至少一个计算装置和至少一个存储指令的存储装置的系统,其中,所述指令在被所述至少一个计算装置运行时,促使所述至少一个计算装置执行提供应用构建服务的方法的以下步骤:A system comprising at least one computing device and at least one storage device storing instructions, wherein the instructions, when executed by the at least one computing device, cause the at least one computing device to perform the following of a method of providing an application building service step:
    提供至少一个工作负载和至少一个运维能力,其中,每个工作负载封装了基础设施集群中的多种资源相关服务用于执行对应的服务,每个运维能力封装了所述基础设施集群中的多种运维相关资源以用于执行对应的运维;Provide at least one workload and at least one operation and maintenance capability, wherein each workload encapsulates multiple resource-related services in the infrastructure cluster for executing corresponding services, and each operation and maintenance capability encapsulates the A variety of operation and maintenance related resources are used to perform corresponding operation and maintenance;
    提供每个工作负载和每个运维能力各自的控制器,其中,每个控制器用于管理对应的工作负载或运维能力相关的资源;Provide respective controllers for each workload and each operation and maintenance capability, wherein each controller is used to manage resources related to the corresponding workload or operation and maintenance capability;
    提供API模块,其中,所述API模块用于使用户通过API模块配置工作负载和运维能力以执行应用的构建。An API module is provided, wherein the API module is used to enable users to configure workload and operation and maintenance capabilities through the API module to execute application construction.
  2. 如权利要求1所述的系统,其中,所述至少一个工作负载包括与在线服务应用对应的第一工作负载和与离线服务应用对应的第二工作负载中的至少一个。The system of claim 1, wherein the at least one workload includes at least one of a first workload corresponding to an online service application and a second workload corresponding to an offline service application.
  3. 如权利要求2所述的系统,其中,所述基础设施集群包括kubernetes集群;The system of claim 2, wherein the infrastructure cluster comprises a kubernetes cluster;
    第一工作负载封装了kubernetes集群中的deployment、statefulset、daemonset、pod、service和configmap原生资源。The first workload encapsulates the deployment, statefulset, daemonset, pod, service and configmap native resources in the kubernetes cluster.
  4. 如权利要求3所述的系统,其中,第一工作负载还封装了非kubernetes原生资源。The system of claim 3, wherein the first workload further encapsulates non-kubernetes native resources.
  5. 如权利要求2所述的系统,其中,所述基础设施集群包括kubernetes集群;The system of claim 2, wherein the infrastructure cluster comprises a kubernetes cluster;
    第二工作负载封装了kubernetes集群中的job、cronjob和configmap原生资源。The second workload encapsulates the job, cronjob and configmap native resources in the kubernetes cluster.
  6. 如权利要求5所述的系统,其中,第二工作负载还封装了非kubernetes原生资源。The system of claim 5, wherein the second workload further encapsulates non-kubernetes native resources.
  7. 如权利要求1所述的系统,其中,所述至少一个运维能力包括自动弹性扩缩容运维能力、负载均衡运维能力、自定义服务副本数运维能力、持久化管理运维能力和发布策略运维能力中的至少一个。The system according to claim 1, wherein the at least one operation and maintenance capability comprises automatic elastic expansion and shrinkage operation and maintenance capability, load balancing operation and maintenance capability, custom service copy number operation and maintenance capability, persistence management and operation and maintenance capability and Publish at least one of the policy operation and maintenance capabilities.
  8. 如权利要求7所述的系统,其中,所述基础设施集群包括kubernetes集群;The system of claim 7, wherein the infrastructure cluster comprises a kubernetes cluster;
    自动弹性扩缩容运维能力封装了kubernetes集群中的Horizontal Pod Autoscaler、Promethus资源,用于动态调整服务pod副本数;The automatic elastic expansion and contraction operation and maintenance capabilities encapsulate the Horizontal Pod Autoscaler and Promethus resources in the kubernetes cluster, which are used to dynamically adjust the number of service pod replicas;
    负载均衡运维能力封装了kubernetes集群中的Service、Ingress资源,用于利用kubernetes集群中的Ingress已有的负载均衡能力结合用户配置的工作负载所创建的服务提供负载均衡能力;The load balancing operation and maintenance capability encapsulates the Service and Ingress resources in the kubernetes cluster, and is used to provide load balancing capabilities by using the existing load balancing capabilities of the Ingress in the kubernetes cluster and the services created by the workload configured by the user;
    自定义服务副本数运维能力根据用户配置的工作负载拉起的对应资源,将服务副本数更新到期望值,用于将服务副本数收敛在自定义的服务副本数的数值内和修改用户配置的工作负载的副本资源大小中的至少一个;The operation and maintenance capability of customizing the number of service copies updates the number of service copies to the expected value according to the corresponding resources pulled up by the workload configured by the user, which is used to converge the number of service copies within the value of the custom number of service copies and modify the user-configured value of the copy number. At least one of the workload's replica resource sizes;
    持久化管理运维能力封装了kubernetes集群中的Persistent Volumes、Persistent Volume Claim、StorageClass资源以及多种开源的provider资源,用于提供服务数据持久化需求;Persistent management and operation and maintenance capabilities encapsulate Persistent Volumes, Persistent Volume Claim, StorageClass resources and various open source provider resources in the kubernetes cluster to provide service data persistence requirements;
    发布策略运维能力封装了开源的发布策略Flagger资源,控制Flagger的行为以使Flagger来控制工作负载拉起的资源,用于支持用户配置发布策略。The release strategy operation and maintenance capability encapsulates the open source release strategy Flagger resource, controls the behavior of the Flagger, and enables the Flagger to control the resources pulled by the workload, which is used to support the user to configure the release strategy.
  9. 一种提供应用构建服务的方法,包括:A method of providing application building services, including:
    提供至少一个工作负载和至少一个运维能力,其中,每个工作负载封装了基础设施集群中的多种资源相关服务用于执行对应的服务,每个运维能力封装了所述基础设施集群中的多种运维相关资源以用于执行对应的运维;Provide at least one workload and at least one operation and maintenance capability, wherein each workload encapsulates multiple resource-related services in the infrastructure cluster for executing corresponding services, and each operation and maintenance capability encapsulates the A variety of operation and maintenance related resources are used to perform corresponding operation and maintenance;
    提供每个工作负载和每个运维能力各自的控制器,其中,每个控制器用于管理对应的工作负载或运维能力相关的资源;Provide respective controllers for each workload and each operation and maintenance capability, wherein each controller is used to manage resources related to the corresponding workload or operation and maintenance capability;
    提供API模块,其中,所述API模块用于使用户通过API模块配置工作负载和运维能力以执行应用的构建。An API module is provided, wherein the API module is used to enable users to configure workload and operation and maintenance capabilities through the API module to execute application construction.
  10. 如权利要求9所述的方法,其中,所述至少一个工作负载包括与在线服务应用对应的第一工作负载和与离线服务应用对应的第二工作负载中的至少一个。The method of claim 9, wherein the at least one workload includes at least one of a first workload corresponding to an online service application and a second workload corresponding to an offline service application.
  11. 如权利要求10所述的方法,其中,所述基础设施集群包括kubernetes集群;The method of claim 10, wherein the infrastructure cluster comprises a kubernetes cluster;
    第一工作负载封装了kubernetes集群中的deployment、statefulset、daemonset、pod、service和configmap原生资源。The first workload encapsulates the deployment, statefulset, daemonset, pod, service and configmap native resources in the kubernetes cluster.
  12. 如权利要求11所述的方法,其中,第一工作负载还封装了非kubernetes原生资源。The method of claim 11, wherein the first workload further encapsulates non-kubernetes native resources.
  13. 如权利要求10所述的方法,其中,所述基础设施集群包括kubernetes集群;The method of claim 10, wherein the infrastructure cluster comprises a kubernetes cluster;
    第二工作负载封装了kubernetes集群中的job、cronjob和configmap原生资源。The second workload encapsulates the job, cronjob and configmap native resources in the kubernetes cluster.
  14. 如权利要求13所述的方法,其中,第二工作负载还封装了非kubernetes原生资源。The method of claim 13, wherein the second workload further encapsulates non-kubernetes native resources.
  15. 如权利要求9所述的方法,其中,所述至少一个运维能力包括自动弹性扩缩容运维能力、负载均衡运维能力、自定义服务副本数运维能力、持久化管理运维能力和发布策略运维能力中的至少一个。The method of claim 9, wherein the at least one operation and maintenance capability comprises automatic elastic expansion and contraction operation and maintenance capability, load balancing operation and maintenance capability, custom service copy number operation and maintenance capability, persistence management operation and maintenance capability, and Publish at least one of the policy operation and maintenance capabilities.
  16. 如权利要求15所述的方法,其中,所述基础设施集群包括kubernetes集群;The method of claim 15, wherein the infrastructure cluster comprises a kubernetes cluster;
    自动弹性扩缩容运维能力封装了kubernetes集群中的Horizontal Pod Autoscaler、Promethus资源,用于动态调整服务pod副本数;The automatic elastic expansion and contraction operation and maintenance capabilities encapsulate the Horizontal Pod Autoscaler and Promethus resources in the kubernetes cluster, which are used to dynamically adjust the number of service pod replicas;
    负载均衡运维能力封装了kubernetes集群中的Service、Ingress资源,用于利用kubernetes集群中的Ingress已有的负载均衡能力结合用户配置的工作负载所创建的服务提供负载均衡能力;The load balancing operation and maintenance capability encapsulates the Service and Ingress resources in the kubernetes cluster, and is used to provide load balancing capabilities by using the existing load balancing capabilities of the Ingress in the kubernetes cluster and the services created by the workload configured by the user;
    自定义服务副本数运维能力根据用户配置的工作负载拉起的对应资源,将服务副本数更新到期望值,用于将服务副本数收敛在自定义的服务副本数的数值内和修改用户配置的工作负载的副本资源大小中的至少一个;The operation and maintenance capability of customizing the number of service copies updates the number of service copies to the expected value according to the corresponding resources pulled up by the workload configured by the user, which is used to converge the number of service copies within the value of the custom number of service copies and modify the user-configured value of the copy number. At least one of the workload's replica resource sizes;
    持久化管理运维能力封装了kubernetes集群中的Persistent Volumes、Persistent Volume Claim、StorageClass资源以及多种开源的provider资源,用于提供服务数据持久化需求;Persistent management and operation and maintenance capabilities encapsulate Persistent Volumes, Persistent Volume Claim, StorageClass resources and various open source provider resources in the kubernetes cluster to provide service data persistence requirements;
    发布策略运维能力封装了开源的发布策略Flagger资源,控制Flagger的行为以使Flagger来控制工作负载拉起的资源,用于支持用户配置发布策略。The release strategy operation and maintenance capability encapsulates the open source release strategy Flagger resource, controls the behavior of the Flagger, and enables the Flagger to control the resources pulled by the workload, which is used to support the user to configure the release strategy.
  17. 一种应用构建平台,包括:An application building platform that includes:
    工作负载库,包括至少一个工作负载,其中,每个工作负载封装了所述应用构建平台所依托的基础设施集群中的多种服务相关资源以用于执行对应的服务;A workload library, including at least one workload, wherein each workload encapsulates a variety of service-related resources in the infrastructure cluster on which the application building platform relies to execute corresponding services;
    运维能力库,包括至少一个运维能力,其中,每个运维能力封装了所述基础设施集群中的多种运维相关资源以用于执行对应的运维;An operation and maintenance capability library, including at least one operation and maintenance capability, wherein each operation and maintenance capability encapsulates a variety of operation and maintenance-related resources in the infrastructure cluster for performing corresponding operation and maintenance;
    控制器库,包括每个工作负载和每个运维能力各自的控制器,其中,每个控制器用于管理对应的工作负载或运维能力相关的资源;A controller library, including respective controllers for each workload and each operation and maintenance capability, wherein each controller is used to manage resources related to the corresponding workload or operation and maintenance capability;
    API模块,用于使用户通过API模块配置工作负载和运维能力以执行应用的构建。The API module is used to enable users to configure workloads and operation and maintenance capabilities through the API module to execute application construction.
  18. 一种包括至少一个计算装置和至少一个存储指令的存储装置的系统,其中,所述指令在被所述至少一个计算装置运行时,促使所述至少一个计算装置执行提供应用部署方法的以下步骤:A system comprising at least one computing device and at least one storage device storing instructions, wherein the instructions, when executed by the at least one computing device, cause the at least one computing device to perform the following steps of providing an application deployment method:
    通过API模块接收用于注册组件的第一信息,其中,第一信息包括用于声明所述组件使用的至少一个工作负载和一组业务相关参数的信息,每个工作负载封装了基础设施集群中的多种服务相关资源以用于执行对应的服务;Receive first information for registering a component through the API module, where the first information includes information for declaring at least one workload used by the component and a set of business-related parameters, each workload encapsulating the A variety of service-related resources are used to execute corresponding services;
    通过注册组件模块根据第一信息创建所述组件以将所述组件注册到所述基础设施集群;creating the component according to the first information by a registering component module to register the component with the infrastructure cluster;
    通过所述API模块接收用于部署应用的第二信息,其中,第二信息包括用于声明使用的组件、使用的至少一个运维能力及其参数和所述一组业务相关参数的信息,其中,每 个运维能力封装了所述基础设施集群中的多种运维相关资源以用于执行对应的运维;The second information for deploying the application is received through the API module, wherein the second information includes the information for declaring used components, at least one used operation and maintenance capability and its parameters, and the set of business-related parameters, wherein , each operation and maintenance capability encapsulates a variety of operation and maintenance-related resources in the infrastructure cluster for performing corresponding operation and maintenance;
    通过部署应用模块根据第二信息创建应用部署配置文件以将所述应用部署配置文件创建到所述基础设施集群;Creating an application deployment configuration file according to the second information by the deployment application module to create the application deployment configuration file to the infrastructure cluster;
    在所述至少一个工作负载和所述至少一个运维能力被实例化后,通过所述至少一个工作负载和所述至少一个运维能力中的每个工作负载和每个运维能力各自的控制器分别根据对应业务相关参数对应的元信息和对应运维能力的参数对应的元信息创建对应的资源以完成应用的部署,其中,每个控制器用于管理对应的实例化后的工作负载或运维能力相关的资源。After the at least one workload and the at least one operation and maintenance capability are instantiated, through the respective control of the at least one workload and each of the at least one operation and maintenance capability The controller creates corresponding resources according to the meta-information corresponding to the corresponding business-related parameters and the meta-information corresponding to the parameters corresponding to the operation and maintenance capability respectively to complete the deployment of the application, wherein each controller is used to manage the corresponding instantiated workload or operation capacity-related resources.
  19. 如权利要求18所述的系统,其中,所述至少一个工作负载包括与在线服务应用对应的第一工作负载和与离线服务应用对应的第二工作负载中的至少一个。19. The system of claim 18, wherein the at least one workload includes at least one of a first workload corresponding to an online service application and a second workload corresponding to an offline service application.
  20. 如权利要求19所述的系统,其中,所述基础设施集群包括kubernetes集群;The system of claim 19, wherein the infrastructure cluster comprises a kubernetes cluster;
    第一工作负载封装了kubernetes集群中的deployment、statefulset、daemonset、pod、service和configmap原生资源。The first workload encapsulates the deployment, statefulset, daemonset, pod, service and configmap native resources in the kubernetes cluster.
  21. 如权利要求20所述的系统,其中,第一工作负载还封装了非kubernetes原生资源。The system of claim 20, wherein the first workload further encapsulates non-kubernetes native resources.
  22. 如权利要求20或21所述的系统,其中,所述一组业务相关参数包括用于指示所述在线服务应用是有状态服务还是无状态服务的第一参数;The system of claim 20 or 21, wherein the set of service-related parameters includes a first parameter for indicating whether the online service application is a stateful service or a stateless service;
    所述通过所述至少一个工作负载中的每个工作负载的控制器根据对应的元信息创建对应的资源,包括:The creating corresponding resources according to the corresponding meta information by the controller of each workload in the at least one workload includes:
    响应于用户声明使用第一工作负载并声明第一参数且第一参数指示所述在线服务应用为有状态服务,通过第一工作负载的控制器根据声明的第一参数的元信息创建statefulset、service和configmap资源;或者In response to the user declaring to use the first workload and declaring the first parameter and the first parameter indicates that the online service application is a stateful service, the controller of the first workload creates a statefulset, service according to the meta-information of the declared first parameter and configmap resources; or
    响应于用户声明使用第一工作负载并声明第一参数且第一参数指示所述在线服务应用为无状态服务,通过第一工作负载的控制器根据声明的第一参数的元信息创建deployment或daemonset资源。In response to the user declaring to use the first workload and declaring the first parameter and the first parameter indicates that the online service application is a stateless service, a deployment or daemonset is created by the controller of the first workload according to the meta-information of the declared first parameter resource.
  23. 如权利要求19所述的系统,其中,所述基础设施集群包括kubernetes集群;The system of claim 19, wherein the infrastructure cluster comprises a kubernetes cluster;
    第二工作负载封装了kubernetes集群中的job、cronjob和configmap原生资源。The second workload encapsulates the job, cronjob and configmap native resources in the kubernetes cluster.
  24. 如权利要求23所述的系统,其中,第二工作负载还封装了非kubernetes原生资源。The system of claim 23, wherein the second workload further encapsulates non-kubernetes native resources.
  25. 如权利要求23或24所述的系统,其中,所述一组业务相关参数包括用于指示所述离线服务应用是一次性服务还是定时服务的第二参数;The system of claim 23 or 24, wherein the set of service-related parameters includes a second parameter for indicating whether the offline service application is a one-time service or a timed service;
    所述通过所述至少一个工作负载中的每个工作负载的控制器根据对应的元信息创建对应的资源,包括:The creating corresponding resources according to the corresponding meta information by the controller of each workload in the at least one workload includes:
    响应于用户声明使用第二工作负载并声明第二参数且第二参数指示所述离线服务应用是一次性服务,通过第二工作负载的控制器根据声明的第二参数的元信息创建job资源;或者In response to the user declaring to use the second workload and declaring the second parameter and the second parameter indicates that the offline service application is a one-time service, creating, by the controller of the second workload, the job resource according to the meta-information of the declared second parameter; or
    响应于用户声明使用第二工作负载并声明第二参数且第二参数指示所述离线服务应用是定时服务,通过第二工作负载的控制器根据声明的第二参数的元信息创建cronjob或job资源。In response to the user declaring to use the second workload and declaring the second parameter and the second parameter indicates that the offline service application is a timed service, the controller of the second workload creates a cronjob or job resource according to the meta-information of the declared second parameter .
  26. 如权利要求18所述的系统,其中,所述至少一个运维能力包括自动弹性扩缩容运维能力、负载均衡运维能力、自定义服务副本数运维能力、持久化管理运维能力和发布策略运维能力中的至少一个。The system according to claim 18, wherein the at least one operation and maintenance capability includes automatic elastic expansion and shrinkage operation and maintenance capability, load balancing operation and maintenance capability, custom service copy number operation and maintenance capability, persistence management operation and maintenance capability and Publish at least one of the policy operation and maintenance capabilities.
  27. 如权利要求26所述的系统,其中,所述基础设施集群包括kubernetes集群;The system of claim 26, wherein the infrastructure cluster comprises a kubernetes cluster;
    自动弹性扩缩容运维能力封装了kubernetes集群中的Horizontal Pod Autoscaler、Promethus资源,用于动态调整服务pod副本数;The automatic elastic expansion and contraction operation and maintenance capability encapsulates the Horizontal Pod Autoscaler and Promethus resources in the kubernetes cluster to dynamically adjust the number of service pod replicas;
    负载均衡运维能力封装了kubernetes集群中的Service、Ingress资源,用于利用 kubernetes集群中的Ingress已有的负载均衡能力结合用户配置的工作负载所创建的服务提供负载均衡能力;The load balancing operation and maintenance capability encapsulates the Service and Ingress resources in the kubernetes cluster, and is used to provide load balancing capabilities by using the existing load balancing capabilities of the Ingress in the kubernetes cluster and the services created by the workload configured by the user;
    自定义服务副本数运维能力根据用户配置的工作负载拉起的对应资源,将服务副本数更新到期望值,用于将服务副本数收敛在自定义的服务副本数的数值内和修改用户配置的工作负载的副本资源大小中的至少一个;The operation and maintenance capability of customizing the number of service copies updates the number of service copies to the expected value according to the corresponding resources pulled up by the workload configured by the user, which is used to converge the number of service copies within the value of the custom number of service copies and modify the user-configured value of the copy number. At least one of the workload's replica resource sizes;
    持久化管理运维能力封装了kubernetes集群中的Persistent Volumes、Persistent Volume Claim、StorageClass资源以及多种开源的provider资源,用于提供服务数据持久化需求;Persistent management and operation and maintenance capabilities encapsulate Persistent Volumes, Persistent Volume Claim, StorageClass resources and various open source provider resources in the kubernetes cluster to provide service data persistence requirements;
    发布策略运维能力封装了开源的发布策略Flagger资源,控制Flagger的行为以使Flagger来控制工作负载拉起的资源,用于支持用户配置的发布策略。The release strategy operation and maintenance capability encapsulates the open-source release strategy Flagger resource, controls the behavior of the Flagger, and enables the Flagger to control the resources pulled by the workload to support the release strategy configured by the user.
  28. 如权利要求18所述的系统,其中,所述一组业务相关参数包括:用于获取将使用的镜像的地址的镜像标识、用于指定将使用的模型的地址的环境变量、用于指定将使用的配置文件的参数、镜像启动命令及参数、所述组件的名称及版本号、服务健康检查探针、服务对外开放的环境变量中的至少一个。The system of claim 18, wherein the set of business-related parameters includes: an image ID for obtaining the address of the image to be used, an environment variable for specifying the address of the model to be used, and an environment variable for specifying the address of the model to be used. At least one of the parameters of the used configuration file, the image startup command and parameters, the name and version number of the component, the service health check probe, and the environment variables that the service opens to the outside world.
  29. 如权利要求27所述的系统,其中,自动弹性扩缩容运维能力的参数包括CPU大小、存储器大小、最小副本数和最大副本数;The system according to claim 27, wherein the parameters of the automatic elastic expansion and contraction operation and maintenance capability include CPU size, memory size, minimum number of copies and maximum number of copies;
    负载均衡运维能力的参数包括请求的路径、请求的域名和请求的服务端口;The parameters of the load balancing operation and maintenance capability include the requested path, the requested domain name and the requested service port;
    自定义服务副本数运维能力的参数包括副本数以及副本的CPU大小、存储器大小和GPU大小;The parameters of the operation and maintenance capability of the custom service replica number include the number of replicas and the CPU size, memory size and GPU size of the replica;
    持久化管理运维能力的参数包括存储类型、存储大小和挂载路径;The parameters of persistent management operation and maintenance capabilities include storage type, storage size and mounting path;
    发布策略运维能力的参数包括发布策略参数和发布策略。The parameters of the release strategy operation and maintenance capability include release strategy parameters and release strategies.
  30. 如权利要求29所述的系统,其中,所述通过所述至少一个运维能力中的每个运维能力各自的控制器根据对应运维能力的参数对应的元信息创建对应的资源,包括以下步骤中的至少一个:The system according to claim 29, wherein the respective controller of each operation and maintenance capability in the at least one operation and maintenance capability creates corresponding resources according to meta-information corresponding to parameters of the corresponding operation and maintenance capability, including the following: At least one of the steps:
    当所述至少一个运维能力包括自动弹性扩缩容运维能力时,通过自动弹性扩缩容运维能力的控制器通过自动弹性扩缩容运维能力控制kubernetes的HPA,使得HPA根据设置的参数实时监控所述至少一个工作负载拉起资源的状态信息,根据自动弹性扩缩容运维能力定义的期望负载及期望副本数对所述至少一个工作负载的Pod实例数量执行弹性扩缩;When the at least one operation and maintenance capability includes the automatic elastic expansion and contraction operation and maintenance capability, the controller of the automatic elastic expansion and contraction operation and maintenance capability controls the HPA of kubernetes through the automatic elastic expansion and contraction operation and maintenance capability, so that the HPA can be configured according to the set The parameter monitors the status information of the resource pulled by the at least one workload in real time, and performs elastic scaling on the number of Pod instances of the at least one workload according to the expected load and the expected number of replicas defined by the automatic elastic expansion and contraction operation and maintenance capability;
    当所述至少一个运维能力包括负载均衡运维能力时,通过负载均衡运维能力的控制器根据与请求的路径、请求的域名和请求的服务端口对应的元信息,创建对应的负载均衡规则;When the at least one operation and maintenance capability includes a load balancing operation and maintenance capability, the controller of the load balancing operation and maintenance capability creates a corresponding load balancing rule according to the meta information corresponding to the requested path, the requested domain name and the requested service port ;
    当所述至少一个运维能力包括自定义服务副本数运维能力时,通过自定义服务副本数运维能力的控制器控制所述至少一个工作负载拉起资源的副本数,使得服务实例的副本数在设置的数值内;When the at least one operation and maintenance capability includes the operation and maintenance capability of customizing the number of service replicas, the controller of the operation and maintenance capability of customizing the number of service replicas controls the number of replicas of the resource pulled by the at least one workload, so that the replicas of the service instance The number is within the set value;
    当所述至少一个运维能力包括持久化管理运维能力时,通过持久化管理运维能力的控制器根据与存储类型、存储大小和挂载路径对应的元信息,创建对应的持久化存储卷声明以及存储类型并将存储卷挂载到pod内部指定的路径;When the at least one operation and maintenance capability includes a persistent management and operation and maintenance capability, the controller of the persistent management and operation and maintenance capability creates a corresponding persistent storage volume according to the meta-information corresponding to the storage type, storage size and mount path. Declare the storage type and mount the storage volume to the specified path inside the pod;
    当所述至少一个运维能力包括发布策略运维能力时,通过发布策略运维能力的控制器根据与设置的发布策略参数和设置的发布策略对应的元信息,创建对应的发布策略。When the at least one operation and maintenance capability includes the release policy operation and maintenance capability, the controller of the release policy operation and maintenance capability creates a corresponding release policy according to the set release policy parameters and the meta information corresponding to the set release policy.
  31. 如权利要求18所述的系统,其中,所述指令在被所述至少一个计算装置运行时,促使所述至少一个计算装置还执行以下步骤:19. The system of claim 18, wherein the instructions, when executed by the at least one computing device, cause the at least one computing device to further perform the following steps:
    通过适配模块基于所述至少一个工作负载、所述一组业务相关参数、所述至少一个运维能力和所述至少一个运维能力的参数,执行适配以获得所述一组业务相关参数对应的元信息和所述一个或多个运维能力相关的参数对应的元信息。The adaptation module performs adaptation based on the at least one workload, the set of service-related parameters, the at least one operation and maintenance capability, and the parameter of the at least one operation and maintenance capability to obtain the set of service-related parameters The corresponding meta information and the meta information corresponding to the one or more operation and maintenance capability-related parameters.
  32. 一种应用部署方法,包括:An application deployment method includes:
    通过API模块接收用于注册组件的第一信息,其中,第一信息包括用于声明所述组件使用的至少一个工作负载和一组业务相关参数的信息,每个工作负载封装了基础设施集群中的多种服务相关资源以用于执行对应的服务;Receive first information for registering a component through the API module, where the first information includes information for declaring at least one workload used by the component and a set of business-related parameters, each workload encapsulating the A variety of service-related resources are used to execute corresponding services;
    通过注册组件模块根据第一信息创建所述组件以将所述组件注册到所述基础设施集群;creating the component according to the first information by a registering component module to register the component with the infrastructure cluster;
    通过所述API模块接收用于部署应用的第二信息,其中,第二信息包括用于声明使用的组件、使用的至少一个运维能力及其参数和所述一组业务相关参数的信息,其中,每个运维能力封装了所述基础设施集群中的多种运维相关资源以用于执行对应的运维;The second information for deploying the application is received through the API module, wherein the second information includes the information for declaring used components, at least one used operation and maintenance capability and its parameters, and the set of business-related parameters, wherein , each operation and maintenance capability encapsulates a variety of operation and maintenance-related resources in the infrastructure cluster for performing corresponding operation and maintenance;
    通过部署应用模块根据第二信息创建应用部署配置文件以将所述应用部署配置文件创建到所述基础设施集群;Creating an application deployment configuration file according to the second information by the deployment application module to create the application deployment configuration file to the infrastructure cluster;
    在所述至少一个工作负载和所述至少一个运维能力被实例化后,通过所述至少一个工作负载和所述至少一个运维能力中的每个工作负载和每个运维能力各自的控制器分别根据对应业务相关参数对应的元信息和对应运维能力的参数对应的元信息创建对应的资源以完成应用的部署,其中,每个控制器用于管理对应的实例化后的工作负载或运维能力相关的资源。After the at least one workload and the at least one operation and maintenance capability are instantiated, through the respective control of the at least one workload and each of the at least one operation and maintenance capability The controller creates corresponding resources according to the meta-information corresponding to the corresponding business-related parameters and the meta-information corresponding to the parameters corresponding to the operation and maintenance capability respectively to complete the deployment of the application, wherein each controller is used to manage the corresponding instantiated workload or operation capacity-related resources.
  33. 如权利要求32所述的应用部署方法,其中,所述至少一个工作负载包括与在线服务应用对应的第一工作负载和与离线服务应用对应的第二工作负载中的至少一个。The application deployment method of claim 32, wherein the at least one workload includes at least one of a first workload corresponding to an online service application and a second workload corresponding to an offline service application.
  34. 如权利要求33所述的应用部署方法,其中,所述基础设施集群包括kubernetes集群;The application deployment method of claim 33, wherein the infrastructure cluster comprises a kubernetes cluster;
    第一工作负载封装了kubernetes集群中的deployment、statefulset、daemonset、pod、service和configmap原生资源。The first workload encapsulates the deployment, statefulset, daemonset, pod, service and configmap native resources in the kubernetes cluster.
  35. 如权利要求34所述的应用部署方法,其中,第一工作负载还封装了非kubernetes原生资源。The application deployment method of claim 34, wherein the first workload further encapsulates non-kubernetes native resources.
  36. 如权利要求34或35所述的应用部署方法,其中,所述一组业务相关参数包括用于指示所述在线服务应用是有状态服务还是无状态服务的第一参数;The application deployment method according to claim 34 or 35, wherein the set of service-related parameters includes a first parameter for indicating whether the online service application is a stateful service or a stateless service;
    所述通过所述至少一个工作负载中的每个工作负载的控制器根据对应的元信息创建对应的资源,包括:The creating corresponding resources according to the corresponding meta information by the controller of each workload in the at least one workload includes:
    响应于用户声明使用第一工作负载并声明第一参数且第一参数指示所述在线服务应用为有状态服务,通过第一工作负载的控制器根据声明的第一参数的元信息创建statefulset、service和configmap资源;或者In response to the user declaring to use the first workload and declaring the first parameter and the first parameter indicates that the online service application is a stateful service, the controller of the first workload creates a statefulset, service according to the meta-information of the declared first parameter and configmap resources; or
    响应于用户声明使用第一工作负载并声明第一参数且第一参数指示所述在线服务应用为无状态服务,通过第一工作负载的控制器根据声明的第一参数的元信息创建deployment或daemonset资源。In response to the user declaring to use the first workload and declaring the first parameter and the first parameter indicates that the online service application is a stateless service, a deployment or daemonset is created by the controller of the first workload according to the meta-information of the declared first parameter resource.
  37. 如权利要求33所述的应用部署方法,其中,所述基础设施集群包括kubernetes集群;The application deployment method of claim 33, wherein the infrastructure cluster comprises a kubernetes cluster;
    第二工作负载封装了kubernetes集群中的job、cronjob和configmap原生资源。The second workload encapsulates the job, cronjob and configmap native resources in the kubernetes cluster.
  38. 如权利要求37所述的应用部署方法,其中,第二工作负载还封装了非kubernetes原生资源。The application deployment method of claim 37, wherein the second workload further encapsulates non-kubernetes native resources.
  39. 如权利要求37或38所述的应用部署方法,其中,所述一组业务相关参数包括用于指示所述离线服务应用是一次性服务还是定时服务的第二参数;The application deployment method according to claim 37 or 38, wherein the set of service-related parameters includes a second parameter for indicating whether the offline service application is a one-time service or a timed service;
    所述通过所述至少一个工作负载中的每个工作负载的控制器根据对应的元信息创建对应的资源,包括:The creating corresponding resources according to the corresponding meta information by the controller of each workload in the at least one workload includes:
    响应于用户声明使用第二工作负载并声明第二参数且第二参数指示所述离线服务应用是一次性服务,通过第二工作负载的控制器根据声明的第二参数的元信息创建job资源;或者In response to the user declaring to use the second workload and declaring the second parameter and the second parameter indicates that the offline service application is a one-time service, creating, by the controller of the second workload, the job resource according to the meta-information of the declared second parameter; or
    响应于用户声明使用第二工作负载并声明第二参数且第二参数指示所述离线服务应 用是定时服务,通过第二工作负载的控制器根据声明的第二参数的元信息创建cronjob或job资源。In response to the user declaring to use the second workload and declaring the second parameter and the second parameter indicates that the offline service application is a timed service, the controller of the second workload creates a cronjob or job resource according to the meta-information of the declared second parameter .
  40. 如权利要求32所述的应用部署方法,其中,所述至少一个运维能力包括自动弹性扩缩容运维能力、负载均衡运维能力、自定义服务副本数运维能力、持久化管理运维能力和发布策略运维能力中的至少一个。The application deployment method according to claim 32, wherein the at least one operation and maintenance capability includes automatic elastic expansion and contraction operation and maintenance capability, load balancing operation and maintenance capability, custom service copy number operation and maintenance capability, persistent management and operation and maintenance capability At least one of capability and release policy operation and maintenance capability.
  41. 如权利要求40所述的应用部署方法,其中,所述基础设施集群包括kubernetes集群;The application deployment method of claim 40, wherein the infrastructure cluster comprises a kubernetes cluster;
    自动弹性扩缩容运维能力封装了kubernetes集群中的Horizontal Pod Autoscaler、Promethus资源,用于动态调整服务pod副本数;The automatic elastic expansion and contraction operation and maintenance capability encapsulates the Horizontal Pod Autoscaler and Promethus resources in the kubernetes cluster to dynamically adjust the number of service pod replicas;
    负载均衡运维能力封装了kubernetes集群中的Service、Ingress资源,用于利用kubernetes集群中的Ingress已有的负载均衡能力结合用户配置的工作负载所创建的服务提供负载均衡能力;The load balancing operation and maintenance capability encapsulates the Service and Ingress resources in the kubernetes cluster, and is used to provide load balancing capabilities by using the existing load balancing capabilities of the Ingress in the kubernetes cluster and the services created by the workload configured by the user;
    自定义服务副本数运维能力根据用户配置的工作负载拉起的对应资源,将服务副本数更新到期望值,用于将服务副本数收敛在自定义的服务副本数的数值内和修改用户配置的工作负载的副本资源大小中的至少一个;The operation and maintenance capability of customizing the number of service copies updates the number of service copies to the expected value according to the corresponding resources pulled by the workload configured by the user, which is used to converge the number of service copies within the value of the customized number of service copies and modify the user-configured value of the copy number. At least one of the workload's replica resource sizes;
    持久化管理运维能力封装了kubernetes集群中的Persistent Volumes、Persistent Volume Claim、StorageClass资源以及多种开源的provider资源,用于提供服务数据持久化需求;Persistent management and operation and maintenance capabilities encapsulate Persistent Volumes, Persistent Volume Claim, StorageClass resources and various open source provider resources in the kubernetes cluster to provide service data persistence requirements;
    发布策略运维能力封装了开源的发布策略Flagger资源,控制Flagger的行为以使Flagger来控制工作负载拉起的资源,用于支持用户配置的发布策略。The release strategy operation and maintenance capability encapsulates the open source release strategy Flagger resources, controls the behavior of the Flagger, and enables the Flagger to control the resources pulled by the workload to support the release strategy configured by the user.
  42. 如权利要求32所述的应用部署方法,其中,所述一组业务相关参数包括:用于获取将使用的镜像的地址的镜像标识、用于指定将使用的模型的地址的环境变量、用于指定将使用的配置文件的参数、镜像启动命令及参数、所述组件的名称及版本号、服务健康检查探针、服务对外开放的环境变量中的至少一个。The application deployment method according to claim 32, wherein the set of service-related parameters comprises: an image identifier used to obtain the address of the image to be used, an environment variable used to specify the address of the model to be used, Specify at least one of the parameters of the configuration file to be used, the image startup command and parameters, the name and version number of the component, the service health check probe, and the environment variables that the service opens to the outside world.
  43. 如权利要求41所述的应用部署方法,其中,自动弹性扩缩容运维能力的参数包括CPU大小、存储器大小、最小副本数和最大副本数;The application deployment method according to claim 41, wherein the parameters of the automatic elastic expansion and contraction capacity operation and maintenance capability include CPU size, memory size, minimum number of copies and maximum number of copies;
    负载均衡运维能力的参数包括请求的路径、请求的域名和请求的服务端口;The parameters of the load balancing operation and maintenance capability include the requested path, the requested domain name and the requested service port;
    自定义服务副本数运维能力的参数包括副本数以及副本的CPU大小、存储器大小和GPU大小;The parameters of the operation and maintenance capability of the custom service replica number include the number of replicas and the CPU size, memory size and GPU size of the replica;
    持久化管理运维能力的参数包括存储类型、存储大小和挂载路径;The parameters of persistent management operation and maintenance capabilities include storage type, storage size and mounting path;
    发布策略运维能力的参数包括发布策略参数和发布策略。The parameters of the release strategy operation and maintenance capability include release strategy parameters and release strategies.
  44. 如权利要求43所述的应用部署方法,其中,所述通过所述至少一个运维能力中的每个运维能力各自的控制器根据对应运维能力的参数对应的元信息创建对应的资源,包括以下步骤中的至少一个:The application deployment method according to claim 43, wherein the corresponding resource is created by the respective controller of each operation and maintenance capability in the at least one operation and maintenance capability according to the meta-information corresponding to the parameter of the corresponding operation and maintenance capability, Include at least one of the following steps:
    当所述至少一个运维能力包括自动弹性扩缩容运维能力时,通过自动弹性扩缩容运维能力的控制器通过自动弹性扩缩容运维能力控制kubernetes的HPA,使得HPA根据设置的参数实时监控所述至少一个工作负载拉起资源的状态信息,根据自动弹性扩缩容运维能力定义的期望负载及期望副本数对所述至少一个工作负载的Pod实例数量执行弹性扩缩;When the at least one operation and maintenance capability includes the automatic elastic expansion and contraction operation and maintenance capability, the controller of the automatic elastic expansion and contraction operation and maintenance capability controls the HPA of kubernetes through the automatic elastic expansion and contraction operation and maintenance capability, so that the HPA can be configured according to the set The parameter monitors the status information of the resource pulled by the at least one workload in real time, and performs elastic scaling on the number of Pod instances of the at least one workload according to the expected load and the expected number of replicas defined by the automatic elastic expansion and contraction operation and maintenance capability;
    当所述至少一个运维能力包括负载均衡运维能力时,通过负载均衡运维能力的控制器根据与请求的路径、请求的域名和请求的服务端口对应的元信息,创建对应的负载均衡规则;When the at least one operation and maintenance capability includes a load balancing operation and maintenance capability, the controller of the load balancing operation and maintenance capability creates a corresponding load balancing rule according to the meta information corresponding to the requested path, the requested domain name and the requested service port ;
    当所述至少一个运维能力包括自定义服务副本数运维能力时,通过自定义服务副本数运维能力的控制器控制所述至少一个工作负载拉起资源的副本数,使得服务实例的副本数在设置的数值内;When the at least one operation and maintenance capability includes the operation and maintenance capability of customizing the number of service replicas, the controller of the operation and maintenance capability of customizing the number of service replicas controls the number of replicas of the resource pulled by the at least one workload, so that the replicas of the service instance The number is within the set value;
    当所述至少一个运维能力包括持久化管理运维能力时,通过持久化管理运维能力的 控制器根据与存储类型、存储大小和挂载路径对应的元信息,创建对应的持久化存储卷声明以及存储类型并将存储卷挂载到pod内部指定的路径;When the at least one operation and maintenance capability includes a persistent management and operation and maintenance capability, the controller of the persistent management and operation and maintenance capability creates a corresponding persistent storage volume according to the meta-information corresponding to the storage type, storage size and mount path. Declare the storage type and mount the storage volume to the specified path inside the pod;
    当所述至少一个运维能力包括发布策略运维能力时,通过发布策略运维能力的控制器根据与设置的发布策略参数和设置的发布策略对应的元信息,创建对应的发布策略。When the at least one operation and maintenance capability includes the release policy operation and maintenance capability, the controller of the release policy operation and maintenance capability creates a corresponding release policy according to the set release policy parameters and the meta information corresponding to the set release policy.
  45. 如权利要求32所述的应用部署方法,还包括:The application deployment method of claim 32, further comprising:
    通过适配模块基于所述至少一个工作负载、所述一组业务相关参数、所述至少一个运维能力和所述至少一个运维能力的参数,执行适配以获得所述一组业务相关参数对应的元信息和所述一个或多个运维能力相关的参数对应的元信息。The adaptation module performs adaptation based on the at least one workload, the set of service-related parameters, the at least one operation and maintenance capability, and the parameter of the at least one operation and maintenance capability to obtain the set of service-related parameters The corresponding meta information and the meta information corresponding to the one or more operation and maintenance capability-related parameters.
  46. 一种应用部署系统,包括:An application deployment system includes:
    业务层模块,被配置为:The business layer module, configured as:
    通过API模块接收用于注册组件的第一信息,其中,第一信息包括用于声明所述组件使用的至少一个工作负载和一组业务相关参数的信息,其中,每个工作负载封装了基础设施集群中的多种服务相关资源以用于执行对应的服务,First information for registering a component is received through the API module, wherein the first information includes information for declaring at least one workload used by the component and a set of business-related parameters, wherein each workload encapsulates an infrastructure A variety of service-related resources in the cluster are used to execute corresponding services,
    通过注册组件模块根据第一信息创建所述组件以将所述组件注册到所述基础设施集群;creating the component according to the first information by a registering component module to register the component with the infrastructure cluster;
    通过所述API模块接收用于部署应用的第二信息,其中,第二信息包括用于声明使用的组件、使用的至少一个运维能力及其参数和所述一组业务相关参数的信息,其中,每个运维能力封装了所述基础设施集群中的多种运维相关资源以用于执行对应的运维;The second information for deploying the application is received through the API module, wherein the second information includes the information for declaring used components, at least one used operation and maintenance capability and its parameters, and the set of business-related parameters, wherein , each operation and maintenance capability encapsulates a variety of operation and maintenance-related resources in the infrastructure cluster for performing corresponding operation and maintenance;
    通过部署应用模块根据第二信息创建应用部署配置文件以将所述应用部署配置文件创建到所述基础设施集群;Creating an application deployment configuration file according to the second information by the deployment application module to create the application deployment configuration file to the infrastructure cluster;
    底层模块,被配置为:The low-level module, configured as:
    在所述至少一个工作负载和所述至少一个运维能力被实例化后,通过所述至少一个工作负载和所述至少一个运维能力中的每个工作负载和每个运维能力各自的控制器分别根据对应业务相关参数对应的元信息和对应运维能力的参数对应的元信息创建对应的资源以完成应用的部署,其中,每个控制器用于管理对应的实例化后的工作负载或运维能力相关的资源。After the at least one workload and the at least one operation and maintenance capability are instantiated, through the respective control of the at least one workload and each of the at least one operation and maintenance capability The controller creates corresponding resources according to the meta-information corresponding to the corresponding business-related parameters and the meta-information corresponding to the parameters corresponding to the operation and maintenance capability to complete the deployment of the application, wherein each controller is used to manage the corresponding instantiated workload or operation capacity-related resources.
  47. 一种存储指令的计算机可读存储介质,其中,当所述指令被至少一个计算装置运行时,促使所述至少一个计算装置执行如权利要求9至16中的任一权利要求所述的提供应用构建服务的方法或如权利要求32至45中的任一权利要求所述的应用部署方法。A computer-readable storage medium storing instructions, wherein the instructions, when executed by at least one computing device, cause the at least one computing device to perform a provisioning application as claimed in any one of claims 9 to 16 A method of building a service or an application deployment method as claimed in any one of claims 32 to 45.
  48. 一种电子设备,包括:An electronic device comprising:
    处理器;processor;
    用于存储所述处理器可执行指令的存储器;a memory for storing the processor-executable instructions;
    其中,所述处理器被配置为执行所述指令,以实现如权利要求9至16中的任一权利要求所述的提供应用构建服务的方法或如权利要求32至45中的任一权利要求所述的应用部署方法。wherein the processor is configured to execute the instructions to implement the method for providing an application building service as claimed in any one of claims 9 to 16 or any one of claims 32 to 45 The described application deployment method.
PCT/CN2021/113249 2020-08-20 2021-08-18 Method for providing application construction service, and application construction platform, application deployment method and system WO2022037612A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN202010845106.7 2020-08-20
CN202010845842.2 2020-08-20
CN202010845842.2A CN111984270A (en) 2020-08-20 2020-08-20 Application deployment method and system
CN202010845106.7A CN111984269B (en) 2020-08-20 2020-08-20 Method for providing application construction service and application construction platform

Publications (1)

Publication Number Publication Date
WO2022037612A1 true WO2022037612A1 (en) 2022-02-24

Family

ID=80322578

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/113249 WO2022037612A1 (en) 2020-08-20 2021-08-18 Method for providing application construction service, and application construction platform, application deployment method and system

Country Status (1)

Country Link
WO (1) WO2022037612A1 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114661312A (en) * 2022-03-25 2022-06-24 江苏安超云软件有限公司 OpenStack cluster nested deployment method and system
CN115250197A (en) * 2022-06-02 2022-10-28 苏州思萃工业互联网技术研究所有限公司 Device for automatically creating container discovery service
CN115309400A (en) * 2022-10-10 2022-11-08 阿里巴巴(中国)有限公司 Task deployment method, service platform, deployment platform, device and storage medium
CN116055497A (en) * 2023-01-18 2023-05-02 紫光云技术有限公司 Method for realizing load balancing LB multi-activity oversized cluster
CN116643950A (en) * 2023-07-19 2023-08-25 浩鲸云计算科技股份有限公司 FaaS-based cloud native application automatic operation and maintenance method
CN116755764A (en) * 2023-08-22 2023-09-15 山东浪潮数字商业科技有限公司 Automatic telescopic non-invasive gray level release system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150172204A1 (en) * 2013-12-13 2015-06-18 International Business Machines Corporation Dynamically Change Cloud Environment Configurations Based on Moving Workloads
CN109062655A (en) * 2018-06-05 2018-12-21 腾讯科技(深圳)有限公司 A kind of containerization cloud platform and server
CN109445802A (en) * 2018-09-25 2019-03-08 众安信息技术服务有限公司 The method of privatization Paas platform and its publication application based on container
CN110297641A (en) * 2019-06-25 2019-10-01 四川长虹电器股份有限公司 Layout dispositions method is applied based on kubernetes
CN111984270A (en) * 2020-08-20 2020-11-24 第四范式(北京)技术有限公司 Application deployment method and system
CN111984269A (en) * 2020-08-20 2020-11-24 第四范式(北京)技术有限公司 Method for providing application construction service and application construction platform

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150172204A1 (en) * 2013-12-13 2015-06-18 International Business Machines Corporation Dynamically Change Cloud Environment Configurations Based on Moving Workloads
CN109062655A (en) * 2018-06-05 2018-12-21 腾讯科技(深圳)有限公司 A kind of containerization cloud platform and server
CN109445802A (en) * 2018-09-25 2019-03-08 众安信息技术服务有限公司 The method of privatization Paas platform and its publication application based on container
CN110297641A (en) * 2019-06-25 2019-10-01 四川长虹电器股份有限公司 Layout dispositions method is applied based on kubernetes
CN111984270A (en) * 2020-08-20 2020-11-24 第四范式(北京)技术有限公司 Application deployment method and system
CN111984269A (en) * 2020-08-20 2020-11-24 第四范式(北京)技术有限公司 Method for providing application construction service and application construction platform

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ZONG XUMEI, REN YANHUI: "Research and Practices on Kubernetes-based PaaS", JIANGSU COMMUNICATION, 30 April 2018 (2018-04-30), pages 76 - 79, XP055901298 *

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114661312A (en) * 2022-03-25 2022-06-24 江苏安超云软件有限公司 OpenStack cluster nested deployment method and system
CN114661312B (en) * 2022-03-25 2023-06-09 安超云软件有限公司 OpenStack cluster nesting deployment method and system
CN115250197A (en) * 2022-06-02 2022-10-28 苏州思萃工业互联网技术研究所有限公司 Device for automatically creating container discovery service
CN115250197B (en) * 2022-06-02 2024-04-12 苏州思萃工业互联网技术研究所有限公司 Device for automatically creating container discovery service
CN115309400A (en) * 2022-10-10 2022-11-08 阿里巴巴(中国)有限公司 Task deployment method, service platform, deployment platform, device and storage medium
CN116055497A (en) * 2023-01-18 2023-05-02 紫光云技术有限公司 Method for realizing load balancing LB multi-activity oversized cluster
CN116643950A (en) * 2023-07-19 2023-08-25 浩鲸云计算科技股份有限公司 FaaS-based cloud native application automatic operation and maintenance method
CN116643950B (en) * 2023-07-19 2023-10-20 浩鲸云计算科技股份有限公司 FaaS-based cloud native application automatic operation and maintenance method
CN116755764A (en) * 2023-08-22 2023-09-15 山东浪潮数字商业科技有限公司 Automatic telescopic non-invasive gray level release system
CN116755764B (en) * 2023-08-22 2023-11-17 山东浪潮数字商业科技有限公司 Automatic telescopic non-invasive gray level release system

Similar Documents

Publication Publication Date Title
WO2022037612A1 (en) Method for providing application construction service, and application construction platform, application deployment method and system
CN111984269B (en) Method for providing application construction service and application construction platform
US10042628B2 (en) Automated upgrade system for a service-based distributed computer system
US10225335B2 (en) Apparatus, systems and methods for container based service deployment
US9830135B2 (en) Declarative and pluggable business logic for systems management
US8141090B1 (en) Automated model-based provisioning of resources
US9274843B2 (en) Multi-redundant switchable process pooling for cloud it services delivery
US9311161B2 (en) Automatically configured management service payloads for cloud IT services delivery
US10656971B2 (en) Agile framework for vertical application development and delivery
CN111984270A (en) Application deployment method and system
CN107463432A (en) Server production environment dispositions method, device, electronic equipment and storage medium
US20080163171A1 (en) Virtual resource templates
US20150220308A1 (en) Model-based development
WO2019199495A1 (en) Method for managing application configuration state with cloud based application management techniques
US20170364844A1 (en) Automated-application-release-management subsystem that supports insertion of advice-based crosscutting functionality into pipelines
CN111324571A (en) Container cluster management method, device and system
US9459859B2 (en) Template derivation for configuration object management
US10931517B2 (en) Methods and systems that synchronize configuration of a clustered application
US11301262B2 (en) Policy enabled application-release-management subsystem
US20150220327A1 (en) Extensible data model and service for infrastructure management
US9507748B2 (en) Platform runtime abstraction
US10452426B2 (en) Methods and systems for configuration-file inheritance
US11528186B2 (en) Automated initialization of bare metal servers
US9626251B2 (en) Undo configuration transactional compensation
US20170003991A1 (en) Host-gateway-facilitated aggregation of host-computer clusters

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21857704

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21857704

Country of ref document: EP

Kind code of ref document: A1