WO2024255085A1 - 业务服务建立方法、装置、计算机设备和存储介质 - Google Patents
业务服务建立方法、装置、计算机设备和存储介质 Download PDFInfo
- Publication number
- WO2024255085A1 WO2024255085A1 PCT/CN2023/130004 CN2023130004W WO2024255085A1 WO 2024255085 A1 WO2024255085 A1 WO 2024255085A1 CN 2023130004 W CN2023130004 W CN 2023130004W WO 2024255085 A1 WO2024255085 A1 WO 2024255085A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- service
- container group
- component
- target
- declaration
- Prior art date
- Legal status (The legal status 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 status listed.)
- Ceased
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45562—Creating, deleting, cloning virtual machine instances
Definitions
- the present application relates to computer technology, and in particular to a method, apparatus, computer equipment, storage medium and computer program product for establishing a business service.
- a business service is a software service that implements a certain business, such as database service, middleware service, etc.
- Embodiments of the present application provide a business service establishment method, apparatus, computer equipment, computer-readable storage medium, and computer program product.
- the present application provides a method for establishing a business service.
- the method comprises:
- Acquire service demand information for a target business service and acquire an instance template preset for the target business service as a target instance template
- a service model corresponding to the target business service is obtained; the service model is used to provide the target business service to the demander corresponding to the service demand information.
- the present application also provides a business service establishment device.
- the device includes:
- a data acquisition module used to acquire service demand information for a target business service, and acquire an instance template preset for the target business service as a target instance template;
- An instance creation module used to create a service instance corresponding to the target business service based on the service demand information and the target instance template;
- a component creation module used to create a service component based on the component declaration information contained in the service instance, and obtain each service component corresponding to the target business service; the component declaration information is used to instruct the creation of service components that match each component type specified by the target instance template;
- a container creation module configured to create a container group set corresponding to the service component based on the container group declaration information contained in the service component, and obtain a container group set corresponding to each of the service components; the container group declaration information contained in the service component is obtained from the service instance;
- a model determination module is used to obtain a service model corresponding to the target business service based on the service instance, the various service components, and the container group set corresponding to each of the service components; the service model is used to provide the target business service to the demander corresponding to the service demand information.
- a computer device includes a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the above-mentioned business service establishment method when executing the computer-readable instructions.
- a computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of the business service establishment method.
- a computer program product includes computer-readable instructions, which, when executed by a processor, implement the steps of the business service establishment method.
- FIG1 is an application environment diagram of a business service establishment method in one embodiment
- FIG2 is a schematic diagram of a process flow of a method for establishing a business service in one embodiment
- FIG3 is a schematic diagram of a service model in one embodiment
- FIG4 is a schematic diagram of a process of generating a configuration file corresponding to a container group in one embodiment
- FIG5 is a schematic diagram of a container group configuration component generating a configuration file corresponding to a container group in one embodiment
- FIG6 is a schematic diagram of initializing storage specifications of a container group in one embodiment
- FIG7 is a schematic diagram of monitoring the running status of a service component through a probe in one embodiment
- FIG8 is a schematic diagram of horizontal expansion of a container group in one embodiment
- FIG9 is a schematic diagram of vertical upgrading of a container group in one embodiment
- FIG10 is a schematic diagram of generating a data snapshot for a container group in one embodiment
- FIG11 is a schematic diagram of a recovery service instance in one embodiment
- FIG12 is a structural block diagram of a business service establishment device in one embodiment
- FIG. 13 is a diagram showing the internal structure of a computer device in one embodiment.
- the business service establishment method provided in the embodiment of the present application involves cloud technology.
- Cloud storage is a new concept extended and developed from the concept of cloud computing.
- a distributed cloud storage system (hereinafter referred to as storage system) refers to a storage system that uses cluster applications, grid technology, and distributed storage file systems to bring together a large number of different types of storage devices (storage devices are also called storage nodes) in the network through application software or application interfaces to work together and provide external data storage and business access functions.
- a database can be seen as an electronic filing cabinet - a place where electronic files are stored, and users can add, query, update, delete, and other operations on the data in the files.
- the so-called “database” is a collection of data that is stored together in a certain way, can be shared with multiple users, has as little redundancy as possible, and is independent of the application.
- a database management system is a computer software system designed for managing databases. It generally has basic functions such as storage, retrieval, security, and backup.
- Database management systems can be classified according to the database model they support, such as relational, XML (Extensible Markup Language); or according to the type of computer they support, such as server clusters, mobile phones; or according to the query language used, such as SQL (Structured Query Language), XQuery; or according to performance priorities, such as maximum scale, maximum operating speed; or Regardless of the classification used, some DBMSs are able to cross categories, for example, supporting multiple query languages simultaneously.
- the business service establishment method provided in the embodiment of the present application can be applied in the application environment shown in Figure 1.
- the terminal 102 communicates with the server 104 through the network.
- the data storage system can store the data that the server 104 needs to process.
- the data storage system can be integrated on the server 104, or it can be placed on the cloud or other servers.
- the terminal 102 can be, but is not limited to, various desktop computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices.
- the Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc.
- Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc.
- the server can be an independent physical server, or it can be a server cluster or distributed system composed of multiple physical servers, or it can be a cloud server that provides cloud computing services.
- the terminal and the server can be directly or indirectly connected via wired or wireless communication, and this application is not limited here.
- the business service establishment method provided in the embodiment of the present application can be executed by the terminal 102 or the server 104 alone, or can be executed by the terminal 102 and the server 104 in collaboration.
- the server can obtain service demand information for the target business service from the terminal.
- the server obtains the instance template preset for the target business service as the target instance template, and creates a service instance corresponding to the target business service based on the service demand information and the target instance template.
- the server creates a service component based on the component declaration information contained in the service instance, and obtains each service component corresponding to the target business service.
- the component declaration information is used to indicate the creation of service components that match each component type specified by the target instance template.
- the server creates a container group set corresponding to the service component based on the container group declaration information contained in the service component, and obtains a container group set corresponding to each service component.
- the container group declaration information contained in the service component is obtained from the service instance.
- a service model corresponding to the target business service is obtained.
- the service model is used to provide the target business service to the demander corresponding to the service demand information.
- the server can return the access entry of the service model to the terminal so that the terminal can use the target business service.
- instance templates corresponding to various business services are pre-set to quickly establish corresponding business services.
- the personalized service demand information of the target business service and the instance template corresponding to the target business service are combined to obtain the service instance corresponding to the target business service.
- the service components corresponding to the target business service are created based on the component declaration information contained in the service instance.
- the container group set corresponding to the service component is created based on the container group declaration information contained in the service component.
- the service model for providing the target business service is formed by the service instance corresponding to the target business service, each service component, and the container group set corresponding to each service component.
- the business service is abstracted into a three-layer structure model.
- the three-layer structure model includes service instances, service components, and container group sets corresponding to service components.
- the service instance management creates relevant information about service components and container group sets.
- Each component management creates relevant information about its own container group set to achieve orderly business service establishment.
- Various business services can be abstracted into a three-layer structure model with strong versatility, which ensures the versatility of business service establishment and improves the efficiency of business service establishment. Based on such a three-layer structure model, business services are realized in a cloud-native way in containerization.
- a method for establishing a business service is provided, and the method is applied to a processing server for illustration. This embodiment is illustrated by applying the method to a processing server. It is understandable that the method can also be applied to a computer device, which can be a terminal or a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server.
- the method for establishing a business service includes the following steps:
- Step S202 obtaining service requirement information for a target business service, and obtaining a preset instance template for the target business service as a target instance template.
- the processing server is a server that processes business service establishment requests and establishes and deploys business services on related devices.
- the processing server can deploy the business service on a cloud server.
- the target business service refers to the business service that is currently to be deployed and established.
- the terminal can provide users with various business service establishment portals, and users can select the required business service on the terminal, and use the business service selected by the user as the target business service.
- the subsequent processing server establishes and deploys the target business service on the node cluster for the user, and returns the access portal of the successfully established target business service to the terminal so that the user can use the target business service.
- Service demand information refers to the personalized demand information of the target business service demander for the target business service.
- the service demand information can be the deployment region requirements, deployment availability zone requirements, deployment hard disk requirements, deployment backup requirements, deployment node requirements, etc. of the database service.
- the instance template is a specification template pre-set for the characteristics of the business service.
- the instance template is used to declare the common metadata required to establish the business service.
- the instance template includes the component type required by the business service, the common component configuration parameters, and the common container group configuration parameters. It can be understood that the component types contained in a business service are determined.
- ClickHouse consists of two components, namely zookeeper and clickhouse.
- Zookeeper is used for metadata management of ClickHouse
- clickhouse is used for data storage and calculation of ClickHouse.
- the ClickHouse database service is deployed on a cluster containing multiple nodes. Zookeeper is responsible for scheduling and communication between nodes in the node cluster, and clickhouse is responsible for data storage and data calculation on nodes in the node cluster.
- the user determines the required target business service and service requirement information for the target business service on the terminal.
- the terminal sends the service requirement information for the target business service to the processing server, and the processing server obtains the instance template preset for the target business service as the target instance template, and deploys the target business service based on the service requirement information and the target instance template.
- the demander can perform a business service establishment operation on the client.
- the client In response to the business service establishment operation, the client generates a business service establishment request.
- the business service establishment request carries the service type information and service requirement information corresponding to the target business service.
- the client further sends the business service establishment request to the processing server.
- the processing server After receiving the business service establishment request, the processing server parses the business service establishment request to obtain the service type information and service requirement information. Based on the service type information, the server obtains the preset instance template for the target business service as the target instance template, and deploys the target business service based on the service requirement information and the target instance template.
- Step S204 Create a service instance corresponding to the target business service based on the service demand information and the target instance template.
- the service requirement information and the target instance template are combined to create a personalized service instance corresponding to the target business service.
- the service instance corresponding to the target business service is used to indicate various metadata required to establish the target business service.
- the service instance corresponding to the business service is Cluster, which is a business cluster instance.
- Cluster represents a cluster instance created for the business service and is implemented by K8s CRD.
- the instance template corresponding to the business service is ClusterPreset, which is a business cluster instance template.
- the business cluster instance template represents a specification template pre-configured by Cluster.
- a ClusterPreset corresponding to a business service includes information such as the image, cpu/memory, and parameter configuration of the component corresponding to the business service.
- ClusterPreset is implemented by K8s CRD.
- K8s (Kubernetes) is a container orchestration system widely used in the cloud native field.
- CRD Customer Resource Definition
- the target instance template is a yaml file for custom resource types implemented based on K8s CRD.
- the general information required for the target business service has been filled in the yaml file, and the service requirement information for the target business service is personalized requirement information.
- the service requirement information is filled into the yaml file, and a service instance corresponding to the target business service is created based on the filled yaml file.
- Step S206 creating a service component based on the component declaration information contained in the service instance to obtain each service component corresponding to the target business service; the component declaration information is used to instruct the creation of service components that match each component type specified by the target instance template.
- business services are generally composed of one or more components. Different components are responsible for different For example, for the ClickHouse database service, ClickHouse consists of two components, zookeeper and clickhouse. Zookeeper is used for metadata management of the ClickHouse database, and clickhouse is used for data storage and calculation of the ClickHouse database. The zookeeper component and the clickhouse component work together to implement the ClickHouse database service.
- the component declaration information is used to declare and indicate the metadata required to create the components of the business service.
- the service instance corresponding to the target business service includes the component declaration information corresponding to the target business service.
- the component declaration information corresponding to the target business service includes the component type required by the target business service, component configuration parameters, startup dependencies between components, and other information.
- the component type required by the target business service is determined based on the service characteristics of the target business service, and the component type required by the target business service is specified in the instance template corresponding to the target business service.
- ClickHouse consists of two components, zookeeper and clickhouse.
- the instance template corresponding to the ClickHouse database service specifies that two components are required, zookeeper and clickhouse.
- the startup dependency relationship between the components required for the target business service is also determined based on the service characteristics of the target business service.
- the startup dependency relationship between the components required for the target business service is specified in the instance template corresponding to the target business service.
- ClickHouse consists of two components, zookeeper and clickhouse.
- the component zookeeper needs to be started successfully before the clickhouse component that depends on zookeeper can be started.
- the startup dependency relationship between the zookeeper component and the clickhouse component is specified in the instance template corresponding to the ClickHouse database service.
- the component configuration parameters of the components required by the target business service include general configuration parameters and adjustable configuration parameters.
- the general configuration parameters are specified in the instance template corresponding to the target business service.
- the adjustable configuration parameters can be adjusted according to user needs or use default parameters.
- the default parameters of the adjustable configuration parameters can be specified in the instance template corresponding to the target business service.
- the processing server creates a service component based on the component declaration information contained in the service instance.
- the component declaration information includes component configuration parameters of various components required for the target business service. Based on the component configuration parameters, the corresponding component can be created to obtain the various service components corresponding to the target business service.
- Step S208 creating a container group set corresponding to the service component based on the container group declaration information contained in the service component, and obtaining a container group set corresponding to each service component; the container group declaration information contained in the service component is obtained from the service instance.
- a component can be implemented by one or more container groups.
- a container group includes a group of related containers, which can also be called a pod.
- a container is an isolated unit that packages the related resources required to run an application.
- the container introduces the application code, its libraries and dependencies, any configuration files, and other system tools it depends on.
- the container realizes the cross-platform portability of the application, the isolation between processes, and the efficiency of development and deployment.
- the container groups required by a component constitute the container group set corresponding to the component.
- the container group declaration information is used to declare and indicate the metadata required to create the container group set required for the component.
- the container group declaration information corresponding to the target business service includes information such as the number of pods required for the components of the target business service, pod configuration parameters, etc.
- the container group declaration information includes information such as the number of pods required for the components, the image (mirror) required for each pod, the cpu/memory required for each pod, and the disk specifications required for each pod.
- the service instance corresponding to the target business service includes the container group declaration information corresponding to the target business service, and the service component corresponding to the target business service can obtain the container group declaration information from the service instance corresponding to the target business service, that is, inherit the container group declaration information from the service instance corresponding to the target business service.
- the container group configuration parameters of the container group set required by the service component corresponding to the target business service include general configuration parameters and adjustable configuration parameters.
- the general configuration parameters are specified in the instance template corresponding to the target business service.
- the adjustable configuration parameters can be adjusted according to user needs, or the default parameters can be used.
- the default parameters of the adjustable configuration parameters can be specified in the instance template corresponding to the target business service.
- the processing server creates a container group set corresponding to the service component based on the container group declaration information contained in the service component.
- the container group declaration information includes container group configuration parameters of each container group in the container group set required by the service component of the target business service.
- the corresponding container group can be created based on the container group configuration parameters.
- the container groups corresponding to the same service component constitute a container group set, and finally the container group sets corresponding to each service component are obtained.
- Step S210 based on the service instance, each service component, and the container group set corresponding to each service component, a service model corresponding to the target business service is obtained; the service model is used to provide the target business service to the demander corresponding to the service demand information.
- each service component corresponding to the target business service and each corresponding container group set form a service model corresponding to the target business service, and provides the target business service to the demander corresponding to the service demand information through the service model corresponding to the target business service.
- the service model corresponding to the target business service the service instance is used for global management, the service instance and the service component are in a parent-child relationship, the service component is used for the management of the container group set, the service component and the corresponding container group set are in a parent-child relationship, and the container group set is used for data processing for the target business service.
- the service demand information submitted by the user can include the number of pod shards, the number of pod replicas, and the disk specifications required by the pod.
- the number of pod shards is used to determine how many pods the data stored in the database needs to be distributed in a distributed manner.
- the number of pod replicas is used to determine how many pods are needed as backup pods to back up the data stored in the database.
- the disk specifications required by the pod are used to determine the capacity of the pod to store business data.
- the processing server receives a business service establishment request for the ClickHouse database service, which carries service demand information.
- the processing server obtains the ClusterPreset corresponding to the ClickHouse database service, combines the service demand information and ClusterPreset to create the Cluster corresponding to the ClickHouse database service, and the Cluster corresponding to the ClickHouse database service is recorded as cluster1.
- Cluster manager instance controller
- a zookeeper component is created based on the zookeeper-related configuration parameters in cluster1, and the zookeeper component is recorded as set1.
- Set1 inherits the relevant configuration parameters of the pod required by the zookeeper component from cluster1.
- Cluster manager designed based on K8s, create the clickhouse component based on the clickhouse related configuration parameters in cluster1, record the clickhouse component as set2, and set2 inherits the related configuration parameters of the pod required by the clickhouse component from cluster1.
- set controller designed based on K8s, create the pod set required by the zookeeper component based on the pod related configuration parameters in the zookeeper component.
- set controller designed based on K8s, create the pod set required by the clickhouse component based on the pod related configuration parameters in the clickhouse component.
- the service model of the ClickHouse database service required by the user includes a three-layer structure, namely cluster1 representing the ClickHouse database instance, set1 and set2 representing the ClickHouse database component, and each pod required by the ClickHouse database component.
- the processing server can return the service access entry corresponding to the established ClickHouse database service to the user, and the user can use the ClickHouse database service based on the service access entry.
- the business end deployed by the demander for the target business service can send the business request to the service model corresponding to the target business service through the access portal of the target business service.
- the service model distributes the business request to a specific container group, and the container group that receives the business request performs the corresponding business processing.
- the service model can distribute business requests based on a load balancing strategy.
- the load balancing strategy refers to determining the load conditions of each container group in the container group set based on the resource utilization rate of each container group in the container group set corresponding to the service component used to process the business request, and distributing the business request based on the load conditions.
- instance templates corresponding to various business services are pre-set to quickly establish corresponding business services.
- the personalized service demand information of the target business service and the instance template corresponding to the target business service are combined to obtain the service instance corresponding to the target business service.
- the service components corresponding to the target business service are created based on the component declaration information contained in the service instance.
- the container group set corresponding to the service component is created based on the container group declaration information contained in the service component.
- the service model for providing the target business service is formed by the service instance corresponding to the target business service, the service components, and the container group set corresponding to each service component.
- the business service is abstracted into a three-layer structure model.
- the three-layer structure model includes service instances, service components, and the container group set corresponding to the service components.
- the service instance management creates relevant information about the service components and the container group set.
- Each component management creates relevant information about its own container group set to achieve orderly business service establishment.
- Various business services can be abstracted into a three-layer structure model with strong versatility, which ensures the versatility of business service establishment and improves the efficiency of business service establishment. Based on such a three-layer structure
- the model is containerized in a cloud-native way to implement business services.
- creating a service instance corresponding to a target business service based on service requirement information and a target instance template includes:
- the target instance template includes a component declaration area and a container group declaration area; the component declaration area is used to indicate component declaration information, and the container group declaration area is used to indicate container group declaration information.
- the target instance template includes a component declaration area and a container group declaration area.
- the component declaration area is used to indicate component declaration information, that is, the content contained in the component declaration area constitutes the component declaration information.
- the container group declaration area is used to indicate container group declaration information, that is, the content contained in the container group declaration area constitutes the container group declaration information.
- the processing server obtains the service demand information for the target business service, it fills the service demand information into the target instance template, and obtains the service instance corresponding to the target business service based on the filled target instance template.
- the target instance template can be a template file in the form of key-value, and the service demand information includes at least one demand item.
- the target instance template is searched for keys that match each demand item, and the specific information of the demand item is used as the value corresponding to the matching key.
- the service requirement information for the target business service is filled into the target instance template for the target business service, so that a service instance corresponding to the target business service can be quickly created.
- a service component is created based on component declaration information included in a service instance to obtain each service component corresponding to a target business service, including:
- the service instance Based on the component declaration information contained in the service instance, determine the component types required for the target business service and the component configuration information corresponding to each component type; based on each component configuration information, create service components that match the corresponding component type to obtain the service components corresponding to the target business service.
- the component declaration information includes the component types required by the target business service.
- the component types are used to determine what type of components the target business service needs.
- the component declaration information includes component configuration information corresponding to each component type required by the target business service.
- the component configuration information is used to determine the configuration parameters of the components required by the target business service.
- the component configuration information includes various field information required to create components of the corresponding component types.
- the processing server determines each component type required by the target business service and the component configuration information corresponding to each component type. Based on each component configuration information, service components matching the corresponding component types are created to obtain each service component corresponding to the target business service.
- the component declaration information declares each component type required by the target business service and the component configuration information corresponding to each component type. Based on the component declaration information, each service component corresponding to the target business service can be quickly created.
- a container group set corresponding to the service component is created based on the container group declaration information contained in the service component to obtain a container group set corresponding to each service component, including:
- any service component in each service component based on the container group declaration information contained in the service component, determine the number of container groups required by the service component, and create each container group to be configured that matches the number of container groups; based on the container group declaration information contained in the service component, determine the container group configuration information corresponding to each container group to be configured, and based on the container group configuration information, initialize the corresponding container group to be configured to obtain a configured container group; based on each configured container group, obtain a container group set corresponding to the service component.
- the container group declaration information includes the number of container groups required by the service component, and the number of container groups is used to determine how many pods the service component needs.
- the processing server can create each container group to be configured that matches the number of container groups.
- the container group declaration information includes the container group configuration information of the container group required by the service component, and the container group configuration information is used to determine the configuration parameters of the pod.
- Each pod has its own corresponding container group configuration information.
- the processing server can initialize the corresponding container group to be configured based on the container group configuration information to obtain the configured container group, and finally each configured container group constitutes the container group set corresponding to the service component.
- initializing the container group to be configured includes initializing the namespace (NS) of the container group to be configured.
- K8s uses the namespace to place a group of related resources in the same namespace.
- pods corresponding to a business service are placed in the same namespace, and pods corresponding to different business services are placed in different namespaces to achieve the purpose of business service isolation. For example, the pods corresponding to user A's MySQL database service are placed in namespace a, and the pods corresponding to user B's MySQL database service are placed in namespace b.
- initializing the container group to be configured includes initializing the storage specification of the container group to be configured.
- the storage specification of the pod is used to determine the storage capacity and storage directory of the data in the pod.
- the storage specification of the pod can be configured according to user needs.
- initializing the container group to be configured includes initializing a network of the container group to be configured.
- the network of the pod is used for communication between different pods.
- initializing the container group to be configured includes initializing the configuration file of the container group to be configured.
- the configuration file of the pod is used for the process running of the pod.
- the configuration file of the pod can be set using the ConfigMap provided by K8s, or can be set using other customized components.
- the container group declaration information declares the number of container groups and container group configuration information required by the service component. Based on the container group declaration information, a container group set corresponding to each service component can be quickly created.
- the corresponding container group to be configured is initialized to obtain the configured container group, including:
- Step S402 For any container group to be configured, container group runtime identification information corresponding to the container group to be configured is obtained through the container group configuration component, and personalized requirement information and container group runtime identification information in the container group configuration information corresponding to the container group to be configured are rendered to obtain container group personalized configuration information corresponding to the container group to be configured.
- Step S404 obtain a container group configuration file template corresponding to the target business service through the container group configuration component, render the container group personalized configuration information and the container group configuration file template, and obtain a target configuration file corresponding to the container group to be configured.
- Step S406 Send the target configuration file to the container to be configured through the container group configuration component to obtain a configured container group initialized on the configuration file.
- the container group configuration component is a pre-set component used to configure the final configuration file required by the container group.
- the personalized demand information in the container group configuration information is determined based on the service demand information submitted by the user. For example, how many pods need to be created and the storage specifications of each pod.
- the container group runtime identification information refers to the information used by the container group to identify itself during operation.
- the container group runtime identification information includes at least one information such as the name, domain name, IP, and status of the pod.
- the container group configuration information is the relevant parameters before the container group runs, and the container group configuration information exists before the pod is created.
- the container group runtime identification information is the relevant parameters when the container group runs, and the container group runtime identification information exists only after the pod is created. For example, before creating a pod, you only know how many pods to create, what the pod image is, and other information required to create the pod. After the pod is created, the pod name, domain name, IP, status, and other information that identifies the pod are generated.
- Each business service has a corresponding container group configuration file template.
- the container group configuration file template is a template for the pod provided by the business developer of the business to which the business service belongs.
- database services there are various database services such as MySQL, MariaDB, PostgreSQL, SQL Server, ClickHouse, MongoDB, and Redis.
- MySQL database service belongs to the MySQL database.
- the engineers of the MySQL database will write the configuration file template for the pod required by the MySQL database, that is, the database provider of the MySQL database will write the configuration file template for the pod required by the MySQL database.
- the container group configuration file template includes existing basic configuration parameters and personalized configuration parameters to be supplemented.
- Basic configuration parameters are common configuration parameters between different pods of the same type, and personalized configuration parameters are configuration parameters unique to each pod. You can get a complete configuration file by supplementing the personalized configuration parameters to be supplemented in the configuration file template.
- the processing server may generate target configuration files corresponding to the container groups to be configured through the container group configuration component, and send each target configuration file to the corresponding container group to be configured, thereby obtaining each configured container group initialized on the configuration file.
- the container group configuration component When generating the target configuration file, first obtain the container group runtime identification information corresponding to the container group to be configured through the container group configuration component, render the personalized demand information in the container group configuration information corresponding to the container group to be configured and the container group runtime identification information corresponding to the container group to be configured, that is, combine the personalized demand information and the container group runtime identification information to obtain the container group personalized configuration information corresponding to the container group to be configured. Then, obtain the container group configuration file template corresponding to the target business service through the container group configuration component, render the container group personalized configuration information and the container group configuration file template, that is, fill the container group personalized configuration information into the container group configuration file template, and finally obtain the target configuration file corresponding to the container group to be configured.
- the personalized requirement information and the container group runtime identification information in the container group configuration information are rendered by the container group configuration component to obtain the container group personalized configuration information, and the container group personalized configuration information and the container group configuration file template are rendered to obtain a complete target configuration file.
- the container group configuration component can quickly generate the personalized configuration file required by the container group, thereby helping to ensure that the container group runs normally as required.
- obtaining a container group configuration file template corresponding to a target business service through a container group configuration component includes:
- a template index of a container group configuration file template for a target business service is obtained from the container group declaration information through a container group configuration component, and based on the template index, the container group configuration file template is obtained from a preset storage area; wherein the container group configuration file template is submitted to the preset storage area for storage through a template unification tool, and the template unification tool is used to unify the formats of container group configuration file templates respectively provided by multiple business developers corresponding to the business type to which the target business service belongs.
- business services have corresponding business types.
- the business type corresponding to various database services is database
- the business type corresponding to various middleware services is middleware.
- Business developers are enterprises or manufacturers that develop businesses.
- databases including MySQL, MariaDB, PostgreSQL, SQL Server, ClickHouse, MongoDB, Redis and other databases
- MySQL database will provide the pod configuration file template required by MySQL database
- the developer of ClickHouse database will provide the pod configuration file template required by ClickHouse database.
- the template unification tool is a pre-set tool for unifying the template format of configuration files.
- the template unification tool is used to convert container group configuration files provided by multiple business developers corresponding to the same business type into a unified format for subsequent processing of container group configuration components.
- the container group configuration file templates provided by multiple business developers corresponding to the same business type are uploaded to the template unification tool, and each container group configuration file template is converted into a unified format through the template unification tool.
- the template unification tool submits each container group configuration file template in a unified format to a preset storage area for storage.
- Storing the container group configuration file template in a preset storage area means storing the container group configuration file template in a preset storage area.
- the preset storage area can be set according to actual needs. After storing the container group configuration file template, a template index corresponding to the container group configuration file template can be obtained, and the corresponding container group configuration file template can be quickly found through the template index.
- the template index of the container group configuration file template can be written into the instance template corresponding to the corresponding business service in advance, so that subsequent template indexes can be transferred between service instances and service components corresponding to the corresponding business service.
- container group configuration file templates provided by multiple business developers corresponding to the business type of the target business service can be obtained in advance, and the formats of the container group configuration file templates can be unified through a template unification tool, and the container group configuration file templates in the unified format can be submitted to a preset storage area for storage.
- the template index corresponding to its container group configuration file template is obtained, and the template index is written into the corresponding instance template.
- the container group configuration component can be used to obtain the template index of the container group configuration file template for the target business service from the container group declaration information, and obtain the container group configuration file template from the preset storage area based on the template index.
- the template unification tool is used in advance to unify the formats of the container group configuration file templates provided by multiple business developers corresponding to the business type of the target business service, so that the subsequent container group configuration components only need to be The logic should be written based on a format.
- the template index of the container group configuration file template for the target business service is pre-written into the container group declaration information, which can facilitate the container group configuration component to quickly obtain the container group configuration file template to generate the configuration file required by the container group.
- the configuration of each component pod required by the business service may be different, and a configuration needs to be maintained for each pod.
- Pods often need to be aware of their own shard ID, allocated CPU, allocated Memory, and other information such as the IP and domain name of other pods in the cluster. This information is generally recorded in the pod configuration file and provided to the processes in the pod.
- the present application method generates a pod configuration file through the ConfigCenter component (container group configuration component).
- ClusterParams represents the individual parameter configuration of the business service demander (i.e., the user of the business service).
- the upper-layer service obtains ClusterParams based on the demander configuration, and then passes it to the instance controller Cluster Manager through Cluster.
- the instance controller Cluster Manager passes ClusterParams to the ConfigCenter component by accessing the ConfigCenter component's API, which is an internal interface.
- ConfigTemplates represents the configuration file template for pod, and supports Go Template rendering by default. Taking the database as an example, the ConfigTemplates of different databases are written by engineers of different databases. ConfigTemplates are submitted to the object storage (ObjectStorage) by ConfigCli tool (i.e., template unification tool).
- the ConfigCenter component can obtain ConfigTemplates from ObjectStorage through StorageProvider, which is an external storage interface for accessing the external object ObjectStorage.
- ValueRender (the first rendering module) represents rendering the passed-in ClusterParams parameter with the pod runtime information, that is, merging the ClusterParams and the container group runtime identification information to obtain the required variable value Value.
- ConfigRender (the second rendering module) is the central module of the ConfigCenter component. It can be seen as a stateless string template rendering function. It renders the variable value Value obtained in the previous step with ConfigTemplates, that is, merges the variable value Value with ConfigTemplates to generate the target configuration file ConfigArtifacts.
- ConfigArtifacts is a configuration file generated by the ConfigCenter component and can be directly sent to the corresponding Pod for use by the process.
- the ConfigCenter component sends ConfigArtifacts to the pod through the HTTP Server, which is an external interface.
- the corresponding container group to be configured is initialized to obtain the configured container group, including:
- the container group configuration information includes storage specifications, which are used to indicate the storage capacity of the pod for storing business data.
- Volume is a channel for pods to transfer data with external storage devices. Volume is used to bind and mount a directory on a hard disk with a directory in a pod, so that the data in the pod can be saved on the hard disk. Persistent Volume refers to a directory on the hard disk, which has "persistence", that is, the content in this directory will not be cleared due to the deletion of the pod. In this way, when the pod is restarted or rebuilt on other nodes, it can still access these contents by mounting this volume. "Persistence" means that the files written by the pod in its own directory will be saved on the hard disk, making this directory "persistent”. Hard disks support multiple disks such as local hard disks and cloud hard disks. Cloud hard disks allow dynamic plug-in and pull-out.
- the pod can be restored to other nodes, but for local hard disks, it can only be restored to the original node. Unless data is migrated, the pod can be restored to other nodes.
- a persistent volume template (StorageClass, SC) is a pre-set storage type template. Different hard disks are divided into specific storage types according to specifications and performance, and can be selected according to needs to flexibly control costs.
- the persistent volume content (PersistentVolume, PV) represents the storage abstraction of the underlying hard disk and is associated with the real hard disk.
- Persistent Volume Declaration (PersistentVolumeClaim, PVC) represents the underlying storage object abstracted for pod use, declaring the required storage capacity (such as 100G), Node exclusive or shared, file system or block device, etc. It can be understood that SC is a PV creation template used to dynamically create PV. PV defines a directory for persistent storage on the hard disk.
- PVC describes the properties of the persistent storage that the pod wants to use, such as the size of the volume storage, read and write permissions, etc.
- the target business service can be a stateful service.
- a stateful service refers to a service that needs to persist data, sessions or service status, and strictly relies on the correctness and consistency of the saved data when the service is started, run and restored.
- database services are stateful services, including MySQL, MariaDB, PostgreSQL, SQL Server, ClickHouse, MongoDB, Redis and other database services.
- Middleware services are also stateful services, including RabbitMQ, RocketMQ, ActiveMQ, Kafka, ZeroMQ, MetaMq and other message middleware services.
- Multiple pods under the components required by stateful services usually need to persist business data, so a PVC needs to be set for each pod to declare the required storage specifications.
- the pod mounts the corresponding PVC to declare the required storage specifications, such as a storage capacity of 20Gi and a storage volume mode of filesystem.
- the PVC is bound to the corresponding PV, and the underlying CSI plug-in implements the specific PV persistent storage.
- PV attributes include storage capacity (20Gi), storage type (StorageClass), and deletion retention policy (Retain means that the corresponding PV is retained when the PVC is deleted).
- the PV is associated with the real hard disk (Disk) system at the bottom layer, and its attributes include region (region), available zone (zone), capacity (20Gi), type (SSD), etc. In this way, the data written by the pod in its own directory can find the corresponding PV through PVC, find the hard disk through PV, and finally write it to the directory on the hard disk.
- the storage specification of the container group is initialized, and the business data stored on the container group can be ultimately stored on a remote hard disk through a persistent volume declaration, which helps to achieve persistent data storage.
- the business service establishment method further includes:
- each service component in order based on the service component startup dependency sequence provided by the component declaration information; monitor the running status of each service component through the probes set for each service component; after the probes set for the service components with high startup priority monitor the successful startup of each container group in the container group set managed by the service component, trigger the startup of the service component with the next startup priority; after each service component is successfully started, return the creation success message corresponding to the target business service to the demander.
- the target business service can only operate normally if the service components are started in order according to the startup dependency sequence.
- the service component startup dependency sequence is recorded in the component declaration information provided by the service instance corresponding to the target business service.
- the service component startup dependency sequence is used to start each service component in order after creating the service component and the container group set corresponding to the service component, so as to realize the operation of the target business service.
- the probe set for the service component with a high startup priority monitors that each container group in the container group set managed by the service component is successfully started, it triggers the startup of the service component with the next startup priority. After each service component is successfully started, it means that the target business service can operate normally. At this time, the corresponding creation success message of the target business service can be returned to the demand side of the target business service.
- the service model of the ClickHouse database service includes cluster1 representing the ClickHouse database instance, set1 and set2 representing the ClickHouse database components, and
- the ClickHouse database service consists of two components, zookeeper and clickhouse.
- the zookeeper component needs to be started successfully before the clickhouse component that depends on the zookeeper component can be started.
- probes may not be configured, and the pods between these components may be started in parallel.
- each service component is started in order with the help of probes set for each service component, which can ensure that each service component is started in order and thus ensure that the target business service can run successfully.
- the business service establishment method further includes:
- a container group adjustment request for a target business service is obtained; the container group adjustment request carries a container group adjustment parameter; the container group declaration information contained in the service instance is updated based on the container group adjustment parameter; and the corresponding service component and the corresponding container group set are updated based on the updated container group declaration information.
- the container group adjustment request is used to adjust the pod, which can be to upgrade or downgrade or expand or shrink the pod.
- the container group adjustment parameters are used to indicate the adjustment requirements for the pod.
- Scaling or shrinking the pod means increasing or reducing the pod. If the number of replicas needs to be increased, the number of pods can be increased.
- Upgrading or downgrading the pod means increasing or reducing the storage specifications of the pod, such as vertically upgrading or downgrading the CPU/Memory/Disk required by the pod.
- the processing server can obtain a container group adjustment request for the target business service, which carries container group adjustment parameters, and updates the container group declaration information contained in the service instance based on the container group adjustment parameters. For example, if the container group adjustment request is used for pod expansion, the number of pods in the container group declaration information is adjusted; if the container group adjustment request is used for pod upgrade, the pod storage specification in the container group declaration information is adjusted.
- the service instance changes, the service component and the corresponding container group set are updated synchronously. For example, the component controller monitors changes in information in the service instance in real time. If it is detected that the corresponding container group declaration information in the service instance has changed, the corresponding container group set is synchronously updated based on the updated container group declaration information.
- the Cluster Manager implemented based on K8s's CRD controls the underlying K8s StatefulSet to implement dynamic scaling of the database (that is, adding and subtracting the number of replicas, also called horizontal scaling) and vertical upgrading and downgrading of the database (adjustment of pod specifications such as CPU/Memory/Disk).
- the dynamic scaling of the database can be referred to in Figure 8, where two pods under set1 are added.
- the vertical upgrade of the database can be referred to in Figure 9, where the storage specification of the pod under set1 is increased from 4C8G to 8C16G.
- the dynamic scaling of the database is a reduction in the number of replicas
- the vertical downgrading of the database is a reduction in the storage specification.
- the relevant pod network traffic will be removed in advance. After the underlying scaling or downgrade pod detects that Running is operating normally, the business traffic will be connected to achieve smooth operation and maintenance operations without affecting the business.
- the database service when the database service is running, if it is necessary to query the data stored in the database, the target pod can be determined from the various pods used for data storage and computing based on the load balancing strategy, and the required data can be queried from the target pod. If pod1 for data storage and computing needs to be vertically upgraded or downgraded, when determining the target pod, the target pod is determined from the various pods used for data storage and computing other than pod1. After pod1 completes vertical upgrade and downgrade, pod1 can be considered when determining the target pod.
- the container group set corresponding to the service component supports dynamic expansion and contraction and vertical upgrading and downgrading, and has strong flexibility.
- the business service establishment method further includes:
- the service instance When the destruction of the service instance is triggered, the service instance is backed up to obtain a backup instance; the container groups in the container group set corresponding to each service component are respectively used as the first container group; a persistent volume snapshot declaration corresponding to the first container group is created based on the persistent volume declaration corresponding to the first container group, and a persistent volume snapshot content corresponding to the first container group is created based on the persistent volume content corresponding to the first container group, and the persistent volume snapshot declaration and the persistent volume snapshot content corresponding to the first container group are bound, and a first container group pair is generated based on the bound persistent volume snapshot declaration and the persistent volume snapshot content corresponding to the first container group.
- the corresponding data snapshot is stored by associating the container group operation identification information corresponding to the first container group with the data snapshot; and the data snapshots corresponding to each container group in the container group set corresponding to the backup instance and each service component are stored in association with each other.
- Persistent Volume Snapshot Declaration (VolumeSnapshot, VSS) represents the abstract resource object of persistent volume snapshot.
- Persistent Volume Snapshot Content (VolumeSnapshotContent, VSC) represents the abstract resource object of persistent volume snapshot content, which is associated with the real backend snapshot storage resources, such as COS/NFS, etc.
- COS Cloud Object Storage
- NFS Network File System
- Container group operation identification information is used to identify the container group, for example, it can be the name of the pod.
- a snapshot backup is automatically initiated to back up the data stored in the service instance and the container group set for subsequent recovery of the service instance.
- the service instance is backed up to obtain a backup instance, which includes the same metadata as the service instance and is used to restore the service model corresponding to the target business service.
- the business data stored in the pod is backed up so that the business data stored in the pod can be synchronously restored when the service model is restored.
- the container groups in the container group set corresponding to each service component are respectively used as the first container group.
- any first container group call the relevant interface provided by K8s to create the VSS corresponding to the first container group based on the PVC corresponding to the first container group, call the relevant interface provided by K8s to create the VSC corresponding to the first container group based on the PV corresponding to the first container group, bind the VSS and VSC corresponding to the first container group, and generate the data snapshot corresponding to the first container group based on the bound VSS and VSC corresponding to the first container group. Furthermore, the container group operation identification information corresponding to the first container group is associated with the data snapshot and stored, and the container group operation identification information is used to indicate which pod the data snapshot belongs to.
- a snapshot backup of the business data in the pod can also be initiated at a scheduled time.
- Data snapshots can be made based on Block technology or based on XFS Reflink technology.
- VSS is created from the PVC mounted on the pod
- VSC is created from the PV bound to the PVC mounted on the pod
- VSS and VSC are bound
- Snapshot is created through VSC based on the data stored in the relevant directory on the hard disk associated with the PV corresponding to the pod. Snapshot requests can be initiated at different time points, and the generated Snapshot stores the data at the corresponding time points. That is, N number of Snapshots can be generated for the same hard disk, and each Snapshot stores data at different time points on the relevant directory on the hard disk.
- the business data stored in the service instance and the container group set are backed up in time, which helps to quickly restore the service instance later.
- the business service establishment method further includes:
- a backup instance When triggering recovery of a service instance, obtain a backup instance; create a service component based on the component declaration information contained in the backup instance to obtain each recovery component; create a container group set corresponding to the recovery component based on the container group declaration information contained in the recovery component to obtain a container group set corresponding to each recovery component; use the container groups in the container group set corresponding to each recovery component as second container groups; obtain the corresponding data snapshot based on the container group operation identification information corresponding to the second container group, generate a persistent volume snapshot declaration and persistent volume snapshot content corresponding to the second container group based on the data snapshot corresponding to the second container group, generate a persistent volume content corresponding to the second container group based on the persistent volume snapshot content corresponding to the second container group, generate a persistent volume declaration corresponding to the second container group based on the persistent volume snapshot declaration corresponding to the second container group, bind the persistent volume content and persistent volume declaration corresponding to the second container group, and apply the persistent volume declaration corresponding to the second container group to the second container group.
- the process of restoring the service instance can be initiated at any time according to user needs.
- the backup instance that has been backed up in advance is obtained, the service model is restored based on the backup instance, the data snapshot that has been backed up in advance is obtained, and the business data stored on the pod in the service model is restored based on the data snapshot.
- service components are created based on the component declaration information contained in the backup instance to obtain various recovery components
- container group sets corresponding to the recovery components are created based on the container group declaration information contained in the recovery components to obtain container group sets corresponding to various recovery components.
- the backup instance, various recovery components and container group sets corresponding to various recovery components constitute the service model recovered for the target business service.
- the container groups in the container group set corresponding to each recovery component are respectively used as the second container group.
- the corresponding data snapshot is obtained based on the container group operation identification information corresponding to the second container group, and the relevant interface provided by K8s is called to generate the VSS and VSC corresponding to the second container group based on the data snapshot corresponding to the second container group, and the relevant interface provided by K8s is called to generate the PV corresponding to the second container group based on the VSC corresponding to the second container group, and the PVC corresponding to the second container group is generated based on the VSS corresponding to the second container group.
- the PVC and PV corresponding to the second container group are bound, and the PVC corresponding to the second container group is applied to the second container group.
- the second container group can read the business data from the corresponding hard disk and store it in its own directory. It can be understood that the container group operation identification information of the pod created based on the same metadata is the same. For example, before destruction, the name of the first pod is pod1, and when it is restored, the name of the first pod is also pod1.
- three pods are created based on cluster1 through the corresponding set.
- cluster1 is destroyed, cluster1 is backed up, and snapshots corresponding to pod1, pod2, and pod3 are generated respectively.
- the process of restoring cluster1 can be initiated at any time according to the needs.
- Cluster2 is generated based on the backup of cluster1, and a set is created based on cluster2.
- Three pods are created based on the set, namely pod1', pod2', and pod3'. For the business data that pod1', pod2', and pod3' need to store, the snapshots corresponding to pod1', pod2', and pod3' are obtained.
- VSS and VSC are created based on the snapshot, and VSS and VSC are bound to each other.
- PVC is created with VSS as the data source
- PV is created with VSC as the data source.
- PVC and PV are bound to each other.
- PVC is mounted under the corresponding pod.
- pod1', pod2', and pod3' will run, and finally cluster2 will run normally.
- the service model storing the business data consistent with that before the destruction can be quickly restored to ensure the continued operation of the target business service.
- the target business service is a target database service
- the service instance is used to indicate metadata required to establish the target database service
- each service component is responsible for implementing each function of the target database service
- each container group belonging to the same container group set is used to cooperate to implement the functions provided by the corresponding service component.
- Database services are usually composed of multiple components, so the containerization of multiple components needs to be considered to implement the containerized management of database services.
- Different components are responsible for implementing different functions of the target database service.
- a database service includes a database coordination component and a database engine component.
- the database service is generally implemented through a node cluster.
- the database coordination component is used to coordinate the communication between the node clusters, and the database engine component is used to store and calculate the business data in the database to achieve business data management.
- Each container group belonging to the same container group set is used to cooperate to implement the functions provided by the corresponding service component.
- multiple shard pods and multiple replica pods can be set.
- a shard pod is responsible for managing a part of the business data.
- the business data managed by each shard pod is combined into complete business data stored in the database.
- a replica pod is used for data backup of a part of the business data. For the same part of the business data, multiple replica pods can be set for multiple backups.
- the method of the present application can be applied to a scenario where a cloud vendor provides database services to customers.
- Database services are a typical stateful service that requires data, sessions, or service states to be persistently stored.
- database services are composed of multiple components: common database services are generally composed of one or more components, so the containerization management of database services needs to consider the containerization of multiple components.
- the method of this application abstracts common database services into a general three-layer resource model, which is cluster->sets->pods from top to bottom, corresponding to database instances, database components, and database process pods, respectively. Through such a three-layer resource model, the containerization of multiple database services can be supported. When a customer purchases a database service from a cloud vendor, he can choose the database type and personalized demand information for the database service.
- the cloud vendor's processing server After receiving the customer's request, the cloud vendor's processing server obtains the instance template corresponding to the database type required by the customer, and quickly creates the database instance required by the customer based on the customer's personalized demand information and the instance template.
- the database instance declares the various metadata required to implement the database service required by the user, creates the database component based on the component declaration information in the database instance, and creates the database process pod corresponding to the database component based on the pod declaration information inherited by the database component from the database instance.
- ClickHouse database service customers can open the business service creation page of ClickHouse database service on the client provided by cloud vendors.
- the business service creation page contains the components required for ClickHouse database service: zookeeper and clickhouse.
- the demander can configure the corresponding parameters for each component to obtain service demand information.
- Customers can configure the number of shards, the number of pods under the shards, the pod specifications, the number of replicas corresponding to the shards, and other information for each component.
- the client Based on the service type information and service demand information of ClickHouse database service, the client generates a business service establishment request and sends it to the processing server of the cloud vendor.
- the processing server creates the service instance cluster1 corresponding to the ClickHouse database service, creates zookeeper component set1 and clickhouse component set2 under cluster1, creates the pod required by the customer under set1, and creates the pod required by the customer under set2.
- the ClickHouse database service consists of two components, zookeeper and clickhouse.
- the zookeeper component needs to be started successfully before the clickhouse component that depends on the zookeeper component can be started.
- the database instance records the startup dependency order of the database components.
- This application method uses the K8s readinessProbe probe to detect the component that starts first. When all the pod detection results under the component are Running normally, the next component is started in sequence.
- the method of this application After creating the pod, the method of this application generates the configuration file required by the pod and quickly sends the configuration file to the pod to achieve differentiated configuration for the pod.
- the database needs to be dynamically scaled up or down.
- the underlying database service needs to support the dynamic scaling of the number of replicas without affecting the normal operation of the upper-layer business.
- the database also needs to be upgraded vertically.
- the database service not only needs to scale up or down the number of replicas, but also vertically upgrade or downgrade the specifications of the existing pods (such as CPU/Memory/Disk), such as upgrading CPU/Memory from 4C8G to 8C16G, without affecting the normal operation of the upper-layer business. If the database needs to be dynamically scaled up or down or vertically upgraded, it can be achieved by modifying the database instance.
- the database instance If the database instance is updated, it will be updated synchronously to achieve dynamic scaling or vertical upgrade or downgrade.
- the relevant pod network traffic When performing dynamic scaling or vertical upgrade or downgrade, the relevant pod network traffic will be removed in advance. After the dynamic scaling or vertical upgrade or downgrade is completed, the relevant pod will be connected to the business traffic to achieve smooth operation and maintenance without affecting the business.
- the database needs to be backed up and restored.
- the database service needs to take snapshots regularly during normal operation, such as taking a full database snapshot backup every hour; automatic snapshot backup is also required when the database service is destroyed, so that the database instance with complete data can be quickly restored based on the backup when needed.
- the present application method can back up the database instance on demand and back up the business data stored in the database process pod. It can be understood that the database components and database process pods are created based on the database instance. Only the database instance needs to be backed up to quickly restore the database components and database process pods, but the business data stored in the database process pod needs to be restored separately.
- the generated snapshot backup can support a variety of back-end storage, such as COS object storage, NFS, cloud snapshots, etc. Its cost is much lower than that of ordinary cloud hard disks, so it can bring significant cost reduction and efficiency improvement effects to the business.
- the embodiment of the present application also provides a business service establishment device for implementing the business service establishment method involved above.
- the implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more business service establishment device embodiments provided below can refer to the limitations on the business service establishment method above, and will not be repeated here.
- a business service establishment device including: a data acquisition module 1202, an instance creation module 1204, a component creation module 1206, a container creation module 1208, and a model determination module 1210, wherein:
- the data acquisition module 1202 is used to acquire service demand information for the target business service and acquire an instance template preset for the target business service as a target instance template.
- the instance creation module 1204 is used to create a service instance corresponding to the target business service based on the service demand information and the target instance template.
- the component creation module 1206 is used to create service components based on the component declaration information contained in the service instance to obtain various service components corresponding to the target business service; the component declaration information is used to instruct the creation of service components that match various component types specified by the target instance template.
- the container creation module 1208 is used to create a container group set corresponding to the service component based on the container group declaration information contained in the service component, and obtain the container group set corresponding to each service component; the container group declaration information contained in the service component is obtained from the service instance.
- the model determination module 1210 is used to obtain the service model corresponding to the target business service based on the service instance, each service component, and the container group set corresponding to each service component; the service model is used to provide the target business service to the demander corresponding to the service demand information.
- the instance creation module 1204 is further configured to:
- the target instance template includes a component declaration area and a container group declaration area; the component declaration area is used to indicate component declaration information, and the container group declaration area is used to indicate container group declaration information.
- the component creation module 1206 is further configured to:
- the service instance Based on the component declaration information contained in the service instance, determine the component types required for the target business service and the component configuration information corresponding to each component type; based on each component configuration information, create service components that match the corresponding component type to obtain the service components corresponding to the target business service.
- the container creation module 1208 is further configured to:
- any service component in each service component based on the container group declaration information contained in the service component, determine the number of container groups required by the service component, and create each container group to be configured that matches the number of container groups; based on the container group declaration information contained in the service component, determine the container group configuration information corresponding to each container group to be configured, and based on the container group configuration information, initialize the corresponding container group to be configured to obtain a configured container group; based on each configured container group, obtain a container group set corresponding to the service component.
- the container creation module 1208 is further configured to:
- the container group runtime identification information corresponding to the container group to be configured is obtained through the container group configuration component, and the personalized requirement information and the container group runtime identification information in the container group configuration information corresponding to the container group to be configured are rendered to obtain the container group personalized configuration information corresponding to the container group to be configured;
- the container group configuration file template corresponding to the target business service is obtained through the container group configuration component, and the container group personalized configuration information and the container group configuration file template are rendered to obtain the target configuration file corresponding to the container group to be configured;
- the target configuration file is sent to the container to be configured through the container group configuration component to obtain the configured container group initialized on the configuration file.
- the container creation module 1208 is further configured to:
- a template index of a container group configuration file template for a target business service is obtained from the container group declaration information through a container group configuration component, and based on the template index, the container group configuration file template is obtained from a preset storage area; wherein the container group configuration file template is submitted to the preset storage area for storage through a template unification tool, and the template unification tool is used to unify the formats of container group configuration file templates respectively provided by multiple business developers corresponding to the business type to which the target business service belongs.
- the container creation module 1208 is further configured to:
- the business service establishment device is further used to:
- each service component in order based on the service component startup dependency sequence provided by the component declaration information; monitor the running status of each service component through the probes set for each service component; after the probes set for the service components with high startup priority monitor the successful startup of each container group in the container group set managed by the service component, trigger the startup of the service component with the next startup priority; after each service component is successfully started, return the creation success message corresponding to the target business service to the demander.
- the business service establishment device is further used to:
- the container group adjustment request carries a container group adjustment parameter; based on the container group adjustment parameter, update the container group declaration information contained in the service instance; based on the updated container group declaration information, update the corresponding service component and the corresponding container group set.
- the business service establishment device is further used to:
- the service instance When the destruction of the service instance is triggered, the service instance is backed up to obtain a backup instance; the container groups in the container group set corresponding to each service component are respectively used as the first container group; a persistent volume snapshot declaration corresponding to the first container group is created based on the persistent volume declaration corresponding to the first container group, and the persistent volume snapshot content corresponding to the first container group is created based on the persistent volume content corresponding to the first container group, and the persistent volume snapshot declaration and the persistent volume snapshot content corresponding to the first container group are bound, and a data snapshot corresponding to the first container group is generated based on the bound persistent volume snapshot declaration and the persistent volume snapshot content corresponding to the first container group, and the container group operation identification information corresponding to the first container group and the data snapshot are associated and stored; the data snapshots corresponding to each container group in the backup instance and the container group set corresponding to each service component are associated and stored.
- the business service establishment device is further used to:
- a backup instance When triggering recovery of a service instance, obtain a backup instance; create a service component based on the component declaration information contained in the backup instance to obtain each recovery component; create a container group set corresponding to the recovery component based on the container group declaration information contained in the recovery component to obtain a container group set corresponding to each recovery component; use the container groups in the container group set corresponding to each recovery component as second container groups; obtain the corresponding data snapshot based on the container group operation identification information corresponding to the second container group, generate a persistent volume snapshot declaration and persistent volume snapshot content corresponding to the second container group based on the data snapshot corresponding to the second container group, generate a persistent volume content corresponding to the second container group based on the persistent volume snapshot content corresponding to the second container group, generate a persistent volume declaration corresponding to the second container group based on the persistent volume snapshot declaration corresponding to the second container group, bind the persistent volume content and persistent volume declaration corresponding to the second container group, and apply the persistent volume declaration corresponding to the second container group to the second container group.
- the target business service is a target database service
- the service instance is used to indicate metadata required to establish the target database service
- each service component is responsible for implementing each function of the target database service
- each container group belonging to the same container group set is used to cooperate to implement the functions provided by the corresponding service component.
- the business service establishment device pre-sets instance templates corresponding to various business services to quickly establish corresponding business services.
- the personalized service demand information of the target business service and the instance template corresponding to the target business service are combined to obtain the service instance corresponding to the target business service.
- the information creates each service component corresponding to the target business service, and based on the container group declaration information contained in the service component, creates a container group set corresponding to the service component.
- the service model for providing the target business service is formed through the service instance corresponding to the target business service, each service component, and the container group set corresponding to each service component.
- the business service is abstracted into a three-layer structure model.
- the three-layer structure model includes service instances, service components, and container group sets corresponding to service components.
- the service instance management creates relevant information about service components and container group sets. Each component management creates relevant information about its own container group set to achieve orderly business service establishment.
- Various business services can be abstracted into a three-layer structure model with strong versatility, which ensures the versatility of business service establishment and improves the efficiency of business service establishment. Based on such a three-layer structure model, business services are implemented in a cloud-native containerized manner.
- Each module in the above-mentioned business service establishment device can be implemented in whole or in part by software, hardware or a combination thereof.
- Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.
- a computer device which may be a server, and its internal structure diagram may be shown in FIG13.
- the computer device includes a processor, a memory, an input/output interface (Input/Output, referred to as I/O) and a communication interface.
- the processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface.
- the processor of the computer device is used to provide computing and control capabilities.
- the memory of the computer device includes a non-volatile storage medium and an internal memory.
- the non-volatile storage medium stores an operating system, a computer-readable instruction and a database.
- the internal memory provides an environment for the operation of the operating system and the computer-readable instructions in the non-volatile storage medium.
- the database of the computer device is used to store data such as instance templates and configuration file templates.
- the input/output interface of the computer device is used to exchange information between the processor and an external device.
- the communication interface of the computer device is used to communicate with an external terminal through a network connection.
- FIG. 13 is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied.
- the specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
- a computer device including a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps in the above-mentioned method embodiments when executing the computer-readable instructions.
- a computer-readable storage medium which stores computer-readable instructions.
- the steps in the above-mentioned method embodiments are implemented.
- a computer program product includes computer-readable instructions.
- the computer-readable instructions are executed by a processor, the steps in the above-mentioned method embodiments are implemented.
- user information including but not limited to user device information, user personal information, etc.
- data including but not limited to data used for analysis, stored data, displayed data, etc.
- any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory.
- Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc.
- Volatile memory can include random access memory (RAM) or external cache memory, etc.
- RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
- the database may include at least one of a relational database and a non-relational database.
- the non-relational database may include a distributed database based on blockchain, etc., but is not limited thereto.
- the processor involved in each embodiment provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, etc., but is not limited thereto.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
本申请涉及一种业务服务建立方法、装置、计算机设备、存储介质和计算机程序产品。所述方法包括:获取针对目标业务服务的服务需求信息,获取针对目标业务服务预设的实例模板作为目标实例模板(步骤S202);基于服务需求信息和目标实例模板创建目标业务服务对应的服务实例(步骤S204);基于服务实例包含的组件声明信息创建服务组件,得到目标业务服务对应的各个服务组件,组件声明信息用于指示创建与目标实例模板规定的各个组件类型分别匹配的服务组件(步骤S206);基于服务组件包含的容器组声明信息创建服务组件对应的容器组集合,得到各个服务组件各自对应的容器组集合,服务组件包含的容器组声明信息是从服务实例中获取的(步骤S208);基于服务实例、各个服务组件、各个服务组件各自对应的容器组集合,得到目标业务服务对应的服务模型;服务模型用于向服务需求信息对应的需求方提供目标业务服务(步骤S210)。
Description
相关申请
本申请要求2023年06月15日申请的,申请号为2023107133874,名称为“业务服务建立方法、装置、计算机设备和存储介质”的中国专利申请的优先权,在此将其全文引入作为参考。
本申请涉及计算机技术,特别是涉及一种业务服务建立方法、装置、计算机设备、存储介质和计算机程序产品。
随着计算机技术的发展,出现了各种各样的业务服务,一个业务服务为实现某种业务的软件服务,例如,数据库服务、中间件服务等。
传统技术中,在服务器上部署、建立任意的业务服务,通常都需要开发人员从零开始部署、从头开始部署,无法实现通用化的业务服务建立,存在业务服务建立效率低的问题。
发明内容
本申请实施例提供了一种业务服务建立方法、装置、计算机设备、计算机可读存储介质和计算机程序产品。
本申请提供了一种业务服务建立方法。所述方法包括:
获取针对目标业务服务的服务需求信息,获取针对所述目标业务服务预设的实例模板作为目标实例模板;
基于所述服务需求信息和所述目标实例模板创建所述目标业务服务对应的服务实例;
基于所述服务实例包含的组件声明信息创建服务组件,得到所述目标业务服务对应的各个服务组件;所述组件声明信息用于指示创建与所述目标实例模板规定的各个组件类型分别匹配的服务组件;
基于所述服务组件包含的容器组声明信息创建服务组件对应的容器组集合,得到所述各个服务组件各自对应的容器组集合;所述服务组件包含的容器组声明信息是从所述服务实例中获取的;
基于所述服务实例、所述各个服务组件、所述各个服务组件各自对应的容器组集合,得到所述目标业务服务对应的服务模型;所述服务模型用于向所述服务需求信息对应的需求方提供所述目标业务服务。
本申请还提供了一种业务服务建立装置。所述装置包括:
数据获取模块,用于获取针对目标业务服务的服务需求信息,获取针对所述目标业务服务预设的实例模板作为目标实例模板;
实例创建模块,用于基于所述服务需求信息和所述目标实例模板创建所述目标业务服务对应的服务实例;
组件创建模块,用于基于所述服务实例包含的组件声明信息创建服务组件,得到所述目标业务服务对应的各个服务组件;所述组件声明信息用于指示创建与所述目标实例模板规定的各个组件类型分别匹配的服务组件;
容器创建模块,用于基于所述服务组件包含的容器组声明信息创建服务组件对应的容器组集合,得到所述各个服务组件各自对应的容器组集合;所述服务组件包含的容器组声明信息是从所述服务实例中获取的;
模型确定模块,用于基于所述服务实例、所述各个服务组件、所述各个服务组件各自对应的容器组集合,得到所述目标业务服务对应的服务模型;所述服务模型用于向所述服务需求信息对应的需求方提供所述目标业务服务。
一种计算机设备,包括存储器和处理器,所述存储器存储有计算机可读指令,所述处理器执行所述计算机可读指令时实现上述业务服务建立方法所述的步骤。
一种计算机可读存储介质,其上存储有计算机可读指令,所述计算机可读指令被处理器执行时实现上述业务服务建立方法所述的步骤。
一种计算机程序产品,包括计算机可读指令,所述计算机可读指令被处理器执行时实现上述业务服务建立方法所述的步骤。
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征、目的和优点将从说明书、附图以及权利要求书变得明显。
为了更清楚地说明本申请实施例或传统技术中的技术方案,下面将对实施例或传统技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据公开的附图获得其他的附图。
图1为一个实施例中业务服务建立方法的应用环境图;
图2为一个实施例中业务服务建立方法的流程示意图;
图3为一个实施例中服务模型的示意图;
图4为一个实施例中生成容器组对应的配置文件的流程示意图;
图5为一个实施例中容器组配置组件生成容器组对应的配置文件的示意图;
图6为一个实施例中对容器组的存储规格进行初始化的示意图;
图7为一个实施例中通过探针监测服务组件运行状态的示意图;
图8为一个实施例中容器组水平扩容的示意图;
图9为一个实施例中容器组垂直升级的示意图;
图10为一个实施例中为容器组生成数据快照的示意图;
图11为一个实施例中恢复服务实例的示意图;
图12为一个实施例中业务服务建立装置的结构框图;
图13为一个实施例中计算机设备的内部结构图。
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请实施例提供的业务服务建立方法涉及云技术。
云存储(cloud storage)是在云计算概念上延伸和发展出来的一个新的概念,分布式云存储系统(以下简称存储系统)是指通过集群应用、网格技术以及分布存储文件系统等功能,将网络中大量各种不同类型的存储设备(存储设备也称之为存储节点)通过应用软件或应用接口集合起来协同工作,共同对外提供数据存储和业务访问功能的一个存储系统。
数据库(Database),简而言之可视为电子化的文件柜——存储电子文件的处所,用户可以对文件中的数据进行新增、查询、更新、删除等操作。所谓“数据库”是以一定方式储存在一起、能与多个用户共享、具有尽可能小的冗余度、与应用程序彼此独立的数据集合。
数据库管理系统(英语:Database Management System,简称DBMS)是为管理数据库而设计的电脑软件系统,一般具有存储、截取、安全保障、备份等基础功能。数据库管理系统可以依据它所支持的数据库模型来作分类,例如关系式、XML(Extensible Markup Language,即可扩展标记语言);或依据所支持的计算机类型来作分类,例如服务器群集、移动电话;或依据所用查询语言来作分类,例如SQL(结构化查询语言(Structured Query Language)、XQuery;或依据性能冲量重点来作分类,例如最大规模、最高运行速度;亦
或其他的分类方式。不论使用哪种分类方式,一些DBMS能够跨类别,例如,同时支持多种查询语言。
本申请实施例提供的业务服务建立方法,可以应用于如图1所示的应用环境中。其中,终端102通过网络与服务器104进行通信。数据存储系统可以存储服务器104需要处理的数据。数据存储系统可以集成在服务器104上,也可以放在云上或其他服务器上。终端102可以但不限于是各种台式计算机、笔记本电脑、智能手机、平板电脑、物联网设备和便携式可穿戴设备,物联网设备可为智能音箱、智能电视、智能空调、智能车载设备等。便携式可穿戴设备可为智能手表、智能手环、头戴设备等。服务器可以是独立的物理服务器,也可以是多个物理服务器构成的服务器集群或者分布式系统,还可以是提供云计算服务的云服务器。终端以及服务器可以通过有线或无线通信方式进行直接或间接地连接,本申请在此不做限制。
本申请实施例提供的业务服务建立方法,可以由终端102或者服务器104单独执行,也可以由终端102和服务器104协作执行。例如,服务器可以从终端获取针对目标业务服务的服务需求信息。服务器获取针对目标业务服务预设的实例模板作为目标实例模板,基于服务需求信息和目标实例模板创建目标业务服务对应的服务实例。服务器基于服务实例包含的组件声明信息创建服务组件,得到目标业务服务对应的各个服务组件,组件声明信息用于指示创建与目标实例模板规定的各个组件类型分别匹配的服务组件。服务器基于服务组件包含的容器组声明信息创建服务组件对应的容器组集合,得到各个服务组件各自对应的容器组集合,服务组件包含的容器组声明信息是从服务实例中获取的。基于服务实例、各个服务组件、各个服务组件各自对应的容器组集合,得到目标业务服务对应的服务模型。服务模型用于向服务需求信息对应的需求方提供目标业务服务。服务器可以向终端返回服务模型的访问入口,以便终端使用目标业务服务。
这样,预先设置各种业务服务分别对应的实例模板以便快速建立相应的业务服务。针对目标业务服务,将目标业务服务个性化的服务需求信息和目标业务服务对应的实例模板组合得到目标业务服务对应的服务实例,基于服务实例包含的组件声明信息创建目标业务服务对应的各个服务组件,基于服务组件包含的容器组声明信息创建服务组件对应的容器组集合,通过目标业务服务对应的服务实例、各个服务组件、各个服务组件各自对应的容器组集合构成用于提供目标业务服务的服务模型。将业务服务抽象为三层结构的模型,三层结构的模型包括服务实例、服务组件、服务组件对应的容器组集合,服务实例管理创建服务组件和容器组集合的相关信息,各个组件管理创建各自容器组集合的相关信息,实现有序的业务服务建立,各种业务服务都可以抽象为三层结构的模型,通用性强,保障了业务服务建立的通用性,提高了业务服务建立的效率。基于这样三层结构的模型用云原生的方式容器化实现业务服务。
在一个实施例中,如图2所示,提供了一种业务服务建立方法,以该方法应用于处理服务器来举例说明。本实施例以该方法应用于处理服务器进行举例说明,可以理解的是,该方法也可以应用于计算机设备,计算机设备可以是终端或服务器,还可以应用于包括终端和服务器的系统,并通过终端和服务器的交互实现。参考图2,业务服务建立方法包括以下步骤:
步骤S202,获取针对目标业务服务的服务需求信息,获取针对目标业务服务预设的实例模板作为目标实例模板。
其中,处理服务器是服务器,用于处理业务服务建立请求,在相关设备上建立、部署业务服务。例如,处理服务器可以将业务服务部署在云服务器上。
目标业务服务是指当前待部署、待建立的业务服务。例如,可以通过终端向用户提供各种业务服务的建立入口,用户可以在终端上从中选择所需的业务服务,将用户选择的业务服务作为目标业务服务,后续处理服务器为用户在节点集群上建立、部署目标业务服务,向终端返回建立成功的目标业务服务的访问入口,以便用户使用目标业务服务。
用户在选择所需的业务服务时,可以同步提出服务需求,服务需求可以是针对服务部署地点的要求、针对服务部署规模的要求等。服务需求信息是指目标业务服务的需求方针对目标业务服务的个性化需求信息。例如,针对某种数据库服务,服务需求信息可以是数据库服务的部署地域要求、部署可用区要求、部署硬盘要求、部署备份要求、部署节点要求等。
将一个对象实例化得到对应的实例。将业务服务实例化得到对应的服务实例。各种业务服务存在各自的特性,针对各种业务服务可以预先设置对应的实例模板。实例模板是针对业务服务的特性预先设置的规格模板,实例模板用于声明建立业务服务所需的通用的元数据。例如,实例模板包括业务服务所需的组件类型、通用的组件配置参数、通用的容器组配置参数。可以理解,一种业务服务包含的组件类型是确定的,例如,针对ClickHouse数据库服务,ClickHouse由两个组件构成,分别是zookeeper、clickhouse,zookeeper用于ClickHouse的元数据管理,clickhouse用于ClickHouse的数据存算,例如,ClickHouse数据库服务部署在包含多个节点的集群上,zookeeper负责节点集群中节点之间的调度、通信,clickhouse负责节点集群中节点上数据的存储、数据的运算。
具体地,用户在终端上确定所需的目标业务服务和针对目标业务服务的服务需求信息,终端将针对目标业务服务的服务需求信息发送至处理服务器,进而处理服务器获取针对目标业务服务预设的实例模板作为目标实例模板,基于服务需求信息和目标实例模板进行目标业务服务的部署。
需求方可在客户端上执行业务服务建立操作,客户端响应于该业务服务建立操作,生成业务服务建立请求,业务服务建立请求携带目标业务服务对应的服务类型信息和服务需求信息,客户端进一步将业务服务建立请求发送给处理服务器。处理服务器接收到业务服务建立请求后,对业务服务建立请求进行解析,得到服务类型信息和服务需求信息,基于服务类型信息获取针对目标业务服务预设的实例模板作为目标实例模板,基于服务需求信息和目标实例模板进行目标业务服务的部署。
步骤S204,基于服务需求信息和目标实例模板创建目标业务服务对应的服务实例。
具体地,在确定针对目标业务服务的服务需求信息和目标实例模板后,将服务需求信息和目标实例模板组合,以创建目标业务服务对应的个性化的服务实例。目标业务服务对应的服务实例用于指示建立目标业务服务所需的各种元数据。
在一个实施例中,业务服务对应的服务实例为Cluster,Cluster为业务集群实例,Cluster表示针对业务服务创建出来的集群实例,由K8s CRD实现。业务服务对应的实例模板为ClusterPreset,ClusterPreset为业务集群实例模板,业务集群实例模板表示为Cluster提前预配置的规格模板,例如,一种业务服务对应的ClusterPreset包括该业务服务对应组件的image(镜像)、cpu/memory、参数配置等信息。ClusterPreset由K8s CRD实现。K8s(Kubernetes)是一种在云原生领域广泛使用的容器编排系统,具备高可扩展、高可用、故障自愈、开源生态等特性,作为底座可支持大规模生产级集群部署。CRD(Custom Resource Definition)是K8s的用户在K8s中自定义的资源类型,不需要修改K8s源码来创建自定义的API server,该功能大大提高了K8s的扩展能力。用户自定义的CRD可以通过对应设计的CRD controller实现对应的功能特性。
在一个实施例中,目标实例模板为基于K8s CRD实现的、用于自定义资源类型的yaml文件,该yaml文件中已经填写了目标业务服务所需的通用信息,针对目标业务服务的服务需求信息为个性化需求信息,将服务需求信息填充至该yaml文件,基于填充后的该yaml文件创建目标业务服务对应的服务实例。
步骤S206,基于服务实例包含的组件声明信息创建服务组件,得到目标业务服务对应的各个服务组件;组件声明信息用于指示创建与目标实例模板规定的各个组件类型分别匹配的服务组件。
其中,业务服务一般是由一个或多个组件构成的,不同的组件用于负责业务服务中不
同的功能。例如,针对ClickHouse数据库服务,ClickHouse由两个组件构成,分别是zookeeper、clickhouse,zookeeper用于ClickHouse数据库的元数据管理,clickhouse用于ClickHouse数据库的数据存算,zookeeper组件和clickhouse组件配合实现ClickHouse数据库服务。
组件声明信息用于声明、指示创建业务服务所需组件需要使用的元数据。目标业务服务对应的服务实例包括目标业务服务对应的组件声明信息,目标业务服务对应的组件声明信息包括目标业务服务所需的组件类型、组件配置参数、组件之间的启动依赖关系等信息。
可以理解,目标业务服务所需的组件类型是基于目标业务服务的服务特性确定的,目标业务服务对应的实例模板中就规定了目标业务服务需要的组件类型。例如,针对ClickHouse数据库服务,ClickHouse由两个组件构成,分别是zookeeper、clickhouse,ClickHouse数据库服务对应的实例模板中就规定了需要两种组件,分别为zookeeper、clickhouse。目标业务服务所需组件之间的启动依赖关系也是基于目标业务服务的服务特性确定的,目标业务服务对应的实例模板中就规定了目标业务服务所需组件之间的启动依赖关系。例如,针对ClickHouse数据库服务,ClickHouse由两个组件构成,分别是zookeeper、clickhouse,组件zookeeper需要先启动成功后,依赖zookeeper的clickhouse组件才能启动,ClickHouse数据库服务对应的实例模板中就规定了zookeeper组件和clickhouse组件之间的启动依赖关系。目标业务服务所需组件的组件配置参数包括通用配置参数和可调配置参数,目标业务服务对应的实例模板中就规定了通用配置参数,可调配置参数可以根据用户需求进行调整,也可以采用默认参数,目标业务服务对应的实例模板中可以规定可调配置参数的默认参数。
具体地,处理服务器基于服务实例包含的组件声明信息创建服务组件,组件声明信息包括目标业务服务所需的各种组件的组件配置参数,基于组件配置参数就可以创建对应的组件,得到目标业务服务对应的各个服务组件。
步骤S208,基于服务组件包含的容器组声明信息创建服务组件对应的容器组集合,得到各个服务组件各自对应的容器组集合;服务组件包含的容器组声明信息是从服务实例中获取的。
其中,一个组件的功能可以是由一个或多个容器组实现的。容器组包括一组相关的容器,容器组也可以称为pod。容器是将运行应用程序所需的相关资源进行统一打包后的隔离单元。容器会引入应用程序代码、其库和依赖项、任何配置文件以及它所依赖的其他系统工具。容器实现了应用程序的跨平台移植性、进程间的隔离性、开发部署的高效性等。一个组件所需的各个容器组组成组件对应的容器组集合。
容器组声明信息用于声明、指示创建组件所需容器组集合需要使用的元数据。目标业务服务对应的容器组声明信息包括目标业务服务的组件所需的pod数量、pod配置参数等信息。例如,容器组声明信息包括组件所需的pod数量、各个pod所需的image(镜像)、各个pod所需的cpu/memory、各个pod所需的磁盘规格等信息。目标业务服务对应的服务实例包括目标业务服务对应的容器组声明信息,目标业务服务对应的服务组件可以从目标业务服务对应的服务实例中获取容器组声明信息,也就是,从目标业务服务对应的服务实例中继承容器组声明信息。
可以理解,目标业务服务对应的服务组件所需容器组集合的容器组配置参数包括通用配置参数和可调配置参数,目标业务服务对应的实例模板中就规定了通用配置参数,可调配置参数可以根据用户需求进行调整,也可以采用默认参数,目标业务服务对应的实例模板中可以规定可调配置参数的默认参数。
具体地,处理服务器基于服务组件包含的容器组声明信息创建服务组件对应的容器组集合,容器组声明信息包括目标业务服务的服务组件所需容器组集合中各个容器组的容器组配置参数,基于容器组配置参数就可以创建对应的容器组,同一服务组件对应的各个容器组组成容器组集合,最终得到各个服务组件各自对应的容器组集合。
步骤S210,基于服务实例、各个服务组件、各个服务组件各自对应的容器组集合,得到目标业务服务对应的服务模型;服务模型用于向服务需求信息对应的需求方提供目标业务服务。
具体地,处理服务器依次创建目标业务服务对应的服务实例、各个服务组件、各个服务组件各自对应的容器组集合后,将目标业务服务对应的各个服务组件、各个服务组件各自对应的容器组集合组成目标业务服务对应的服务模型,通过目标业务服务对应的服务模型向服务需求信息对应的需求方提供目标业务服务。在目标业务服务对应的服务模型中,服务实例用于全局管理,服务实例和服务组件为父子关系,服务组件用于容器组集合的管理,服务组件和对应的容器组集合为父子关系,容器组集合用于针对目标业务服务的数据处理。
以ClickHouse数据库服务为例,用户需要ClickHouse数据库服务,用户可以提交针对ClickHouse数据库服务的服务需求信息,用户提交的服务需求信息可以包括pod分片数(shards)、pod副本数(replicas)、pod所需磁盘规格,pod分片数用于确定数据库中存储的数据需要以分布式的方式分布在多少pod上,pod副本数用于确定需要有多少pod作为备份pod来备份数据库中存储的数据,Pod所需磁盘规格用于确定pod存储业务数据的容量。处理服务器接收针对ClickHouse数据库服务的业务服务建立请求,该请求携带服务需求信息,处理服务器获取ClickHouse数据库服务对应的ClusterPreset,将服务需求信息和ClusterPreset组合创建ClickHouse数据库服务对应的Cluster,ClickHouse数据库服务对应的Cluster记为cluster1。通过基于K8s设计的Cluster manager(实例控制器),基于cluster1中zookeeper相关配置参数创建zookeeper组件,将zookeeper组件记为set1。set1从cluster1中继承zookeeper组件所需pod的相关配置参数。通过基于K8s设计的Cluster manager(实例控制器),基于cluster1中clickhouse相关配置参数创建clickhouse组件,将clickhouse组件记为set2,set2从cluster1中继承clickhouse组件所需pod的相关配置参数。通过基于K8s设计的set controller(组件控制器),基于zookeeper组件中pod相关配置参数创建zookeeper组件所需的pod集合。通过基于K8s设计的set controller(组件控制器),基于clickhouse组件中pod相关配置参数创建clickhouse组件所需的pod集合。参考图3,用户需要的ClickHouse数据库服务的服务模型包括三层结构,分别为表示ClickHouse数据库实例的cluster1、表示ClickHouse数据库组件的set1和set2,ClickHouse数据库组件所需的各个pod。处理服务器可以向用户返回建立的ClickHouse数据库服务对应的服务访问入口,用户可以基于该服务访问入口使用ClickHouse数据库服务。
需求方针对目标业务服务部署的业务端在接收到业务请求后,可将业务请求通过目标业务服务的访问入口发送至目标业务服务对应的服务模型,服务模型对业务请求进行分发,将业务请求分发到具体的容器组,接收到业务请求的容器组执行对应的业务处理。服务模型可以基于负载均衡策略对业务请求进行分发。负载均衡策略,是指基于用于处理业务请求的服务组件对应的容器组集合中各个容器组的资源利用率,判定容器组集合中各个容器组的负载情况,基于负载情况对业务请求进行分发。
上述业务服务建立方法中,预先设置各种业务服务分别对应的实例模板以便快速建立相应的业务服务。针对目标业务服务,将目标业务服务个性化的服务需求信息和目标业务服务对应的实例模板组合得到目标业务服务对应的服务实例,基于服务实例包含的组件声明信息创建目标业务服务对应的各个服务组件,基于服务组件包含的容器组声明信息创建服务组件对应的容器组集合,通过目标业务服务对应的服务实例、各个服务组件、各个服务组件各自对应的容器组集合构成用于提供目标业务服务的服务模型。将业务服务抽象为三层结构的模型,三层结构的模型包括服务实例、服务组件、服务组件对应的容器组集合,服务实例管理创建服务组件和容器组集合的相关信息,各个组件管理创建各自容器组集合的相关信息,实现有序的业务服务建立,各种业务服务都可以抽象为三层结构的模型,通用性强,保障了业务服务建立的通用性,提高了业务服务建立的效率。基于这样三层结构
的模型用云原生的方式容器化实现业务服务。
在一个实施例中,基于服务需求信息和目标实例模板创建目标业务服务对应的服务实例,包括:
将服务需求信息填充至目标实例模板,得到目标业务服务对应的服务实例;目标实例模板包括组件声明区域和容器组声明区域;组件声明区域用于指示组件声明信息,容器组声明区域用于指示容器组声明信息。
其中,目标实例模板包括组件声明区域和容器组声明区域。组件声明区域用于指示组件声明信息,也就是,组件声明区域包含的内容组成组件声明信息。容器组声明区域用于指示容器组声明信息,也就是,容器组声明区域包含的内容组成容器组声明信息。
具体地,处理服务器获取到针对目标业务服务的服务需求信息后,将服务需求信息填充至目标实例模板中,基于填充后的目标实例模板得到目标业务服务对应的服务实例。目标实例模板可以是key-value形式的模板文件,服务需求信息包括至少一个需求项,在填充目标实例模板时,在目标实例模板中查询与各个需求项分别匹配的key,将需求项的具体信息作为相匹配的key对应的value。
上述实施例中,将针对目标业务服务的服务需求信息填充至针对目标业务服务的目标实例模板,可以快速创建目标业务服务对应的服务实例。
在一个实施例中,基于服务实例包含的组件声明信息创建服务组件,得到目标业务服务对应的各个服务组件,包括:
基于服务实例包含的组件声明信息,确定目标业务服务所需的各个组件类型和各个组件类型分别对应的组件配置信息;基于各个组件配置信息,分别创建与相应的组件类型匹配的服务组件,得到目标业务服务对应的各个服务组件。
具体地,组件声明信息包括目标业务服务所需的各个组件类型,组件类型用于确定目标业务服务需要什么类型的组件,组件声明信息包括目标业务服务所需的各个组件类型分别对应的组件配置信息,组件配置信息用于确定目标业务服务需要的组件的配置参数,组件配置信息包括创建相应组件类型的组件需要的各种字段信息。处理服务器基于服务实例包含的组件声明信息,确定目标业务服务所需的各个组件类型和各个组件类型分别对应的组件配置信息,基于各个组件配置信息分别创建与相应的组件类型匹配的服务组件,得到目标业务服务对应的各个服务组件。
上述实施例中,组件声明信息声明了目标业务服务所需的各个组件类型和各个组件类型分别对应的组件配置信息,基于组件声明信息可以快速创建目标业务服务对应的各个服务组件。
在一个实施例中,基于服务组件包含的容器组声明信息创建服务组件对应的容器组集合,得到各个服务组件各自对应的容器组集合,包括:
针对各个服务组件中任意一个服务组件,基于服务组件包含的容器组声明信息,确定服务组件所需的容器组数量,创建与容器组数量匹配的各个待配置容器组;基于服务组件包含的容器组声明信息,确定各个待配置容器组分别对应的容器组配置信息,基于容器组配置信息,对相应的待配置容器组进行初始化,得到已配置容器组;基于各个已配置容器组得到服务组件对应的容器组集合。
具体地,容器组声明信息包括服务组件所需的容器组数量,容器组数量用于确定服务组件需要多少个pod。处理服务器可以创建与容器组数量匹配的各个待配置容器组。容器组声明信息包括服务组件所需容器组的容器组配置信息,容器组配置信息用于确定pod的配置参数。各个pod存在各自对应的容器组配置信息。处理服务器可以基于容器组配置信息,对相应的待配置容器组进行初始化,得到已配置容器组,最终各个已配置容器组组成服务组件对应的容器组集合。
在一个实施例中,对待配置容器组进行初始化包括对待配置容器组的命名空间(Namespace,NS)进行初始化。K8s通过命名空间将一组相关资源放在同一个命名空间
内,以达到资源隔离和权限限制的目的。一个业务服务对应的各个pod放在同一命名空间中,不同业务服务对应的各个pod放在不同的命名空间中,以达到业务服务隔离的目的。例如,用户A的MySQL数据库服务对应的各个pod放在命名空间a中,用户B的MySQL数据库服务对应的各个pod放在命名空间b中。
在一个实施例中,对待配置容器组进行初始化包括对待配置容器组的存储规格进行初始化。pod的存储规格用于确定pod中数据的存储容量和存储目录。pod的存储规格可以根据用户需要进行配置。
在一个实施例中,对待配置容器组进行初始化包括对待配置容器组的网络进行初始化。pod的网络用于不同pod之间的通信。
在一个实施例中,对待配置容器组进行初始化包括对待配置容器组的配置文件进行初始化。pod的配置文件用于pod的进程运行。pod的配置文件可以使用K8s自带的ConfigMap进行设置,也可以使用自定义的其他组件进行设置。
上述实施例中,容器组声明信息声明了服务组件所需的容器组数量和容器组配置信息,基于容器组声明信息可以快速创建各个服务组件各自对应的容器组集合。
在一个实施例中,如图4所示,基于容器组配置信息,对相应的待配置容器组进行初始化,得到已配置容器组,包括:
步骤S402,针对任意的待配置容器组,通过容器组配置组件,获取待配置容器组对应的容器组运行时标识信息,将待配置容器组对应的容器组配置信息中的个性化需求信息和容器组运行时标识信息进行渲染,得到待配置容器组对应的容器组个性化配置信息。
步骤S404,通过容器组配置组件,获取目标业务服务对应的容器组配置文件模板,将容器组个性化配置信息和容器组配置文件模板进行渲染,得到待配置容器组对应的目标配置文件。
步骤S406,通过容器组配置组件,将目标配置文件下发到待配置容器中,得到在配置文件上初始化的已配置容器组。
其中,容器组配置组件是预先设置的、用于配置容器组需要的最终配置文件的组件。容器组配置信息中的个性化需求信息是基于用户提交的服务需求信息确定的。例如,需要创建几个pod、各个pod的存储规格。容器组运行时标识信息是指容器组在运行过程中用于标识自身的信息。例如,容器组运行时标识信息包括pod的名称、域名、IP、状态等至少一种信息。
可以理解,容器组配置信息是容器组运行前的相关参数,在创建pod之前就存在容器组配置信息。容器组运行时标识信息是容器组运行时的相关参数,在创建pod之后才会存在容器组运行时标识信息。例如,在创建pod之前,只知道要创建几个pod、pod的镜像是什么等创建pod所需信息,在创建pod之后,才会生成pod的名称、域名、IP、状态等标识pod的信息。
各个业务服务存在对应的容器组配置文件模板,容器组配置文件模板是业务服务所属业务的业务开发方提供的、针对pod的模板。例如,针对数据库服务,具体包括MySQL、MariaDB、PostgreSQL、SQL Server、ClickHouse、MongoDB、Redis等各种数据库服务。以MySQL数据库服务为例,MySQL数据库服务属于MySQL数据库,MySQL数据库的工程师会编写MySQL数据库所需pod的配置文件模板,即MySQL数据库的数据库提供商会编写MySQL数据库所需pod的配置文件模板。
容器组配置文件模板包括已有的基础配置参数和待补充的个性化配置参数。基础配置参数是同一类型的不同pod之间通用的配置参数,个性化配置参数是各个pod特有的配置参数。对配置文件模板中待补充的个性化配置参数进行补充就可以得到完整的配置文件。
具体地,处理服务器可以通过容器组配置组件生成各个待配置容器组分别对应的目标配置文件,将各个目标配置文件下发到对应的待配置容器组中,从而得到在配置文件上初始化的各个已配置容器组。
在生成目标配置文件时,先通过容器组配置组件,获取待配置容器组对应的容器组运行时标识信息,将待配置容器组对应的容器组配置信息中的个性化需求信息和待配置容器组对应的容器组运行时标识信息进行渲染,也就是,将个性化需求信息和容器组运行时标识信息进行组合,得到待配置容器组对应的容器组个性化配置信息。然后通过容器组配置组件,获取目标业务服务对应的容器组配置文件模板,将容器组个性化配置信息和容器组配置文件模板进行渲染,也就是,将容器组个性化配置信息填充至容器组配置文件模板中,最终得到待配置容器组对应的目标配置文件。
上述实施例中,通过容器组配置组件,将容器组配置信息中的个性化需求信息和容器组运行时标识信息进行渲染,得到容器组个性化配置信息,将容器组个性化配置信息和容器组配置文件模板进行渲染,得到完整的目标配置文件。通过容器组配置组件可以快速生成容器组所需的个性化配置文件,进而有助于保障容器组按照需求正常运行。
在一个实施例中,通过容器组配置组件,获取目标业务服务对应的容器组配置文件模板,包括:
通过容器组配置组件,从容器组声明信息中获取针对目标业务服务的容器组配置文件模板的模板索引,基于模板索引,从预设存储区域中获取容器组配置文件模板;其中,容器组配置文件模板是通过模板统一工具提交到预设存储区域中存储的,模板统一工具用于对目标业务服务所属业务类型对应的多个业务开发方分别提供的容器组配置文件模板进行格式统一。
其中,业务服务存在对应的业务类型,例如,各种数据库服务对应的业务类型为数据库,各种中间件服务对应的业务类型为中间件。业务开发方为开发业务的企业或厂商。例如,针对数据库,具体包括MySQL、MariaDB、PostgreSQL、SQL Server、ClickHouse、MongoDB、Redis等各种数据库,MySQL数据库的开发商会提供MySQL数据库所需的pod配置文件模板,ClickHouse数据库的开发商会提供ClickHouse数据库所需的pod配置文件模板。
模板统一工具是预先设置的、用于统一配置文件模板格式的工具。模板统一工具用于将同一业务类型对应的多个业务开发方分别提供的容器组配置文件转换为统一的格式,以便后续容器组配置组件的处理。
将同一业务类型对应的多个业务开发方分别提供的容器组配置文件模板上传至模板统一工具,通过模板统一工具将各个容器组配置文件模板转换为统一的格式,模板统一工具将统一格式的各个容器组配置文件模板提交到预设存储区域中存储。
将容器组配置文件模板存储在预设存储区域中是指,将容器组配置文件模板存储在预先设置的存储区域中。预先设置的存储区域可以根据实际需要进行设置。存储容器组配置文件模板后即可得到容器组配置文件模板对应的模板索引,通过模板索引可以快速查找到对应的容器组配置文件模板。
在通过存储容器组配置文件模板得到容器组配置文件模板对应的模板索引后,可以预先将容器组配置文件模板的模板索引写入相应业务服务对应的实例模板中,使得后续模板索引可以在相应业务服务对应的服务实例、服务组件之间传递。
具体地,可以预先获取目标业务服务所属业务类型对应的多个业务开发方分别提供的容器组配置文件模板,通过模板统一工具将各个容器组配置文件模板进行格式统一,将统一格式的各个容器组配置文件模板提交到预设存储区域中存储。针对任意的业务服务,获取其容器组配置文件模板对应的模板索引,将模板索引写入相应的实例模板中。
针对目标业务服务,在通过容器组配置组件获取对应的容器组配置文件模板时,具体可以通过容器组配置组件,从容器组声明信息中获取针对目标业务服务的容器组配置文件模板的模板索引,基于模板索引从预设存储区域中获取容器组配置文件模板。
上述实施例中,预先通过模板统一工具将目标业务服务所属业务类型对应的多个业务开发方分别提供的容器组配置文件模板进行格式统一,能够方便后续容器组配置组件只需
要基于一种格式进行逻辑编写。将针对目标业务服务的容器组配置文件模板的模板索引预先写入容器组声明信息,能够方便容器组配置组件快速获取容器组配置文件模板来生成容器组所需配置文件。
在一个实施例中,业务服务所需每个组件的pod的配置都可能不同,需要为每个pod维护一份配置。pod常常还需要感知到自己的分片ID、分配的CPU、分配的Memory,以及集群中其它pod的IP、域名等信息,这些信息一般记录在pod的配置文件中,提供给pod中的进程使用。本申请方法通过ConfigCenter组件(容器组配置组件)生成pod的配置文件。
参考图5,ClusterParams表示业务服务的需求方(即业务服务的使用者)的个性参数配置。通常由上层服务根据需求方配置获得ClusterParams,再通过Cluster传递给实例控制器Cluster Manager。实例控制器Cluster Manager通过访问ConfigCenter组件的API,将ClusterParams传递给ConfigCenter组件,该API为内部接口。
ConfigTemplates表示针对pod的配置文件模版,默认支持Go Template渲染。以数据库为例,不同数据库的ConfigTemplates是由不同数据库的工程师们编写。ConfigTemplates由ConfigCli tool(即模板统一工具)提交到对象存储(ObjectStorage)。ConfigCenter组件可以通过StorageProvider从ObjectStorage获取ConfigTemplates,StorageProvider为访问外部对象ObjectStorage的外部存储接口。
ValueRender(第一渲染模块)表示将传入的ClusterParams参数与pod运行时信息进行渲染,即将ClusterParams和容器组运行时标识信息进行合并,得到需要的变量值Value。
ConfigRender(第二渲染模块)是ConfigCenter组件的中心模块,可以看成一个无状态的字符串模版渲染函数,将上一步得到的变量值Value与ConfigTemplates进行渲染,即将变量值Value与ConfigTemplates进行合并,生成目标配置文件ConfigArtifacts。ConfigArtifacts是ConfigCenter组件生成的配置文件,可直接下发到对应的Pod中供进程使用。ConfigCenter组件通过HTTP Server将ConfigArtifacts下发给pod,该HTTP Server为外部接口。
在一个实施例中,基于容器组配置信息,对相应的待配置容器组进行初始化,得到已配置容器组,包括:
创建与容器组配置信息中的存储规格匹配的目标持久卷声明;基于目标持久卷声明包含的目标持久卷模板生成目标持久卷内容,将目标持久卷内容和与容器组配置信息中的存储规格匹配的硬盘关联;绑定目标持久卷内容和目标持久卷声明,将目标持久卷声明写入待配置容器组,得到在存储规格上初始化的已配置容器组;在存储规格上初始化的已配置容器组中的数据用于写入硬盘。
其中,容器组配置信息包括存储规格,存储规格用于指示pod存储业务数据的存储容量。
Volume(存储卷)是pod与外部存储设备进行数据传递的通道。Volume用于将一个硬盘上的目录跟一个pod里的目录绑定挂载在一起,从而pod里的数据可以保存到硬盘上。持久化Volume(持久卷)指的是硬盘上的目录,具备“持久性”,即这个目录里面的内容,不会因为pod的删除而被清理掉。这样,当pod被重启或者在其他节点上重建出来之后,它仍然能够通过挂载这个Volume访问到这些内容。“持久化”指的是pod在自身目录里写入的文件都会保存在硬盘中,从而使得这个目录具备了“持久性”。硬盘支持本地硬盘、云硬盘等多种磁盘。云硬盘是允许动态插拔的,若一个pod里的目录和云硬盘上的目录绑定挂载在一起,则pod可以恢复到其他节点上,但是针对本地硬盘,只能恢复到原来的节点上,除非进行数据搬迁后,pod才可以恢复到其他节点。
持久卷模板(StorageClass,SC)是预先设置的存储类型模板。将不同硬盘按照规格、性能高低等划分为特定的存储类型,按需求从中进行选择,灵活控制成本。持久卷内容(PersistentVolume,PV)表示底层硬盘的存储抽象,关联了真正的硬盘。持久卷声明
(PersistentVolumeClaim,PVC)表示为pod使用而抽象出来的底层存储对象,声明需要的存储容量(如100G)、Node(节点)独占或共用、文件系统或块设备等。可以理解,SC是PV的创建模板,用于实现动态创建PV。PV定义了一个持久化存储在硬盘上的目录。PVC描述的是pod想要使用的持久化存储的属性,比如Volume存储的大小、读写权限等。
具体地,目标业务服务可以是有状态服务,有状态服务是指需要将数据、会话或服务状态做持久保存,服务启动、运行和恢复时均严格依赖所保存数据的正确性和一致性的服务。例如,数据库服务就是有状态服务,具体包括MySQL、MariaDB、PostgreSQL、SQL Server、ClickHouse、MongoDB、Redis等各种数据库服务。中间件服务也是有状态服务,具体包括RabbitMQ、RocketMQ、ActiveMQ、Kafka、ZeroMQ、MetaMq等各种消息中间件服务。有状态服务所需的组件下面的多个pod通常都需要持久化存储业务数据,因此需要为每一个pod设置一个PVC来声明所需要的存储规格。
在为pod配置PVC时,通过调用K8s提供的相关接口创建与容器组配置信息中的存储规格匹配的目标PVC,基于目标PVC中包含的目标SC生成对应的目标PV,将目标PV和与容器组配置信息中的存储规格匹配的硬盘(本地硬盘或云硬盘)关联,绑定目标PV和目标PVC,将目标PVC写入待配置容器组,得到在存储规格上初始化的已配置容器组。
参考图6,pod挂载了相应的PVC来声明所需要的存储规格,如存储容量为20Gi、存储卷模式为文件系统(filesystem)。PVC绑定有相应的PV,由底层的CSI插件实现具体的PV持久化存储实现。PV属性有存储容量(20Gi)、存储类型(StorageClass)、删除保留策略(Retain表示PVC删除时保留对应的PV)。PV底层关联了真正的硬盘(Disk)系统,其属性有区域(region)、可用区(zone)、容量(20Gi)、类型(SSD)等。这样,pod在自身目录里写入的数据可以通过PVC找到对应的PV,通过PV找到硬盘,最终写入在硬盘的目录上。
上述实施例中,对容器组的存储规格进行初始化,容器组上存储业务数据可以通过持久卷声明最终存储在远端的硬盘上,有助于实现数据持久化存储。
在一个实施例中,业务服务建立方法还包括:
基于组件声明信息提供的服务组件启动依赖顺序,有序启动各个服务组件;通过针对各个服务组件分别设置的探针监测各个服务组件的运行状态,在针对启动优先级高的服务组件设置的探针监测到服务组件管理的容器组集合中各个容器组成功启动后,触发启动下一启动优先级的服务组件;在各个服务组件成功启动后,向需求方返回目标业务服务对应的创建成功消息。
具体地,目标业务服务所需的服务组件之间有启动依赖顺序,按照启动依赖顺序有序启动各个服务组件,目标业务服务才能够正常运作。目标业务服务对应的服务实例提供的组件声明信息中记录了服务组件启动依赖顺序,服务组件启动依赖顺序用于在创建服务组件和服务组件对应的容器组集合后,有序启动各个服务组件,实现目标业务服务的运行。
在创建服务组件和服务组件对应的容器组集合后,为各个服务组件分别设置对应的探针,探针用于监测服务组件的运行状态,服务组件的运行状态通过服务组件对应的容器组集合中各个容器组的运行状态来体现。在创建服务组件和服务组件对应的容器组集合后,按照服务组件启动依赖顺序,有序启动各个服务组件。通过探针探测需要先启动的服务组件的运行状态,在需要先启动的服务组件下面的各个容器组都成功启动、正常运行后,再启动下一个服务组件,也就是,在针对启动优先级高的服务组件设置的探针监测到服务组件管理的容器组集合中各个容器组成功启动后,触发启动下一启动优先级的服务组件。在各个服务组件成功启动后,表示目标业务服务可以正常运作,此时可以向目标业务服务的需求方返回目标业务服务对应的创建成功消息。
以ClickHouse数据库服务为例,参考图7,ClickHouse数据库服务的服务模型包括表示ClickHouse数据库实例的cluster1、表示ClickHouse数据库组件的set1和set2、表示数
据库进程的pod。ClickHouse数据库服务由两个组件构成,分别是zookeeper、clickhouse,并且zookeeper组件需要先启动成功后,依赖zookeeper组件的clickhouse组件才能启动。利用K8s readinessProbe探针探测先启动的组件,当set1下面的所有pod探测结果都是Running正常运行后,再按序启动下一个组件。
可以理解,如果部分组件之间没有前后依赖关系,则可以不配置探针,此时这些组件之间的pod可以是以并行的方式启动。
上述实施例中,基于组件声明信息提供的服务组件启动依赖顺序,借助针对各个服务组件分别设置的探针,有序启动各个服务组件,能够保障各个服务组件有序启动,进而保障目标业务服务能够成功运行。
在一个实施例中,业务服务建立方法还包括:
获取针对目标业务服务的容器组调整请求;容器组调整请求携带容器组调整参数;基于容器组调整参数更新服务实例包含的容器组声明信息;基于更新后的容器组声明信息,更新对应的服务组件和对应的容器组集合。
其中,容器组调整请求用于对pod进行调整,具体可以是对pod进行升降级或扩缩容。容器组调整参数用于指示针对pod的调整需求。针对pod的扩缩容是指增加pod或减少pod,如若需要增加副本数,则可以增加pod的数量。针对pod的升降级是指增加pod的存储规格或减少pod的存储规格,如对pod所需的CPU/Memory/Disk进行垂直的升降级。
具体地,随着目标业务服务的业务量的增大或减小,目标业务服务对应的服务模型中的pod可以灵活进行相应的调整。处理服务器可以获取针对目标业务服务的容器组调整请求,容器组调整请求中携带容器组调整参数,基于容器组调整参数更新服务实例包含的容器组声明信息,例如,若容器组调整请求用于pod的扩容,则调整容器组声明信息中的pod数量,若容器组调整请求用于pod的升级,则调整容器组声明信息中的pod存储规格。若服务实例发生变更,会同步更新服务组件和对应的容器组集合。例如,组件控制器实时监测服务实例中信息的变更,若监测到服务实例中相应的容器组声明信息发生变化,则基于更新后的容器组声明信息,同步更新对应的容器组集合。
例如,以数据库服务为例,通过基于K8s的CRD实现的Cluster Manager(实例控制器),控制底层K8s StatefulSet实现数据库的动态扩缩容(即副本数的加减,也叫水平扩缩容)、实现数据库的垂直升降级(pod规格如CPU/Memory/Disk的调整)特性。数据库的动态扩容可以参考图8,set1下的pod增加两个。数据库的垂直升级可以参考图9,set1下的pod的存储规格从4C8G增加到8C16G。相应的,数据库的动态缩容则是副本数减小,数据库的垂直降级则是存储规格的减小。
进一步的,为了不影响上层业务正常使用,在进行动态扩缩容或垂直升降级操作时,会提前将相关的pod网络流量摘掉,待底层扩缩容或升降级的pod探测到Running正常运行后,再接入业务流量,实现不影响业务的平滑运维操作。以数据库服务为例,数据库服务在运行时,若需要查询数据库中存储的数据,可以基于负载均衡策略从用于进行数据存算的各个pod中确定目标pod,从目标pod上查询所需数据。若需要对进行数据存算的pod1进行垂直升降级,则在确定目标pod时,从除pod1以外的其他用于进行数据存算的各个pod中确定目标pod。在pod1完成垂直升降级后,在确定目标pod时就可以考虑pod1。
上述实施例中,服务组件对应的容器组集合支持动态扩缩容和垂直升降级,灵活性较强。
在一个实施例中,业务服务建立方法还包括:
在触发针对服务实例的销毁时,对服务实例进行备份,得到备份实例;将各个服务组件各自对应的容器组集合中的容器组分别作为第一容器组;基于第一容器组对应的持久卷声明创建第一容器组对应的持久卷快照声明,基于第一容器组对应的持久卷内容创建第一容器组对应的持久卷快照内容,绑定第一容器组对应的持久卷快照声明和持久卷快照内容,基于第一容器组对应的经过绑定的持久卷快照声明和持久卷快照内容生成第一容器组对
应的数据快照,将第一容器组对应的容器组运行标识信息和数据快照关联存储;将备份实例、各个服务组件各自对应的容器组集合中各个容器组分别对应的数据快照关联存储。
其中,快照(Snapshot)用于记录某一时间点的系统状态和数据。持久卷快照声明(VolumeSnapshot,VSS)表示持久卷快照的抽象资源对象。持久卷快照内容(VolumeSnapshotContent,VSC)表示持久卷快照内容的抽象资源对象,关联了真正的后端快照存储资源,如COS/NFS等。COS(Cloud Object Storage)为云对象存储服务,是非结构化对象分布式、海量存取系统。NFS(Network File System)为网络文件系统,是分布式、海量存取系统。容器组运行标识信息用于标识容器组,例如,可以是pod的名称。
具体地,在触发针对目标业务服务对应的服务实例的销毁时,自动发起快照备份,对服务实例和容器组集合中存储的数据进行备份,以便后续服务实例的恢复。在触发针对目标业务服务对应的服务实例的销毁时,对服务实例进行备份,得到备份实例,备份实例包括和服务实例一样的元数据,用于恢复目标业务服务对应的服务模型。
在触发针对目标业务服务对应的服务实例的销毁时,对pod中存储的业务数据进行备份,以便在恢复服务模型时同步恢复pod中存储的业务数据。将各个服务组件各自对应的容器组集合中的容器组分别作为第一容器组。针对任意的第一容器组,调用K8s提供的相关接口基于第一容器组对应的PVC创建第一容器组对应的VSS,调用K8s提供的相关接口基于第一容器组对应的PV创建第一容器组对应的VSC,绑定第一容器组对应的VSS和VSC,基于第一容器组对应的经过绑定的VSS和VSC生成第一容器组对应的数据快照。进一步的,将第一容器组对应的容器组运行标识信息和数据快照关联存储,通过容器组运行标识信息来表示数据快照属于哪个pod。
最终,将备份实例、各个服务组件各自对应的容器组集合中各个容器组分别对应的数据快照关联存储,以便后续的数据恢复。
可以理解,除了在触发针对服务实例的销毁时发起针对pod中业务数据的快照备份,还可以定时发起针对pod中业务数据的快照备份。可以基于Block技术制作数据快照,也可以通过基于XFS Reflink技术制作数据快照。
例如,针对pod中业务数据的数据快照的生成,参考图10,通过调用K8s提供的相关接口,分别从pod挂载的PVC创建VSS,pod挂载的PVC所绑定的PV创建VSC,将VSS和VSC绑定,通过VSC基于pod对应的PV关联的硬盘中相关目录上存储的数据创建Snapshot。在不同的时间点都可以发起快照请求,生成的Snapshot存储有相应时间点的数据,也就是,针对同一硬盘可以生成N数量的Snapshot,每个Snapshot存储有硬盘中相关目录上不同时间点的数据。
上述实施例中,在触发针对服务实例的销毁时,及时对服务实例和容器组集合中存储的业务数据进行备份,有助于后续快速恢复服务实例。
在一个实施例中,业务服务建立方法还包括:
在触发针对服务实例的恢复时,获取备份实例;基于备份实例包含的组件声明信息创建服务组件,得到各个恢复组件;基于恢复组件包含的容器组声明信息创建恢复组件对应的容器组集合,得到各个恢复组件各自对应的容器组集合;将各个恢复组件各自对应的容器组集合中的容器组分别作为第二容器组;基于第二容器组对应的容器组运行标识信息获取对应的数据快照,基于第二容器组对应的数据快照生成第二容器组对应的持久卷快照声明和持久卷快照内容,基于第二容器组对应的持久卷快照内容生成第二容器组对应的持久卷内容,基于第二容器组对应的持久卷快照声明生成第二容器组对应的持久卷声明,绑定第二容器组对应的持久卷内容和持久卷声明,将第二容器组对应的持久卷声明应用到第二容器组。
具体地,可以根据用户需求随时发起恢复服务实例的流程。在触发针对目标业务服务对应的服务实例的恢复时,获取预先备份好的备份实例,基于备份实例恢复服务模型,获取预先备份好的数据快照,基于数据快照恢复服务模型中pod上存储的业务数据。
在基于备份实例恢复服务模型时,与通过服务实例创建服务组件和对应的容器组集合的过程类似,基于备份实例包含的组件声明信息创建服务组件,得到各个恢复组件,基于恢复组件包含的容器组声明信息创建恢复组件对应的容器组集合,得到各个恢复组件各自对应的容器组集合,备份实例、各个恢复组件和各个恢复组件各自对应的容器组集合组成针对目标业务服务恢复出来的服务模型。
在基于数据快照恢复业务数据时,将各个恢复组件各自对应的容器组集合中的容器组分别作为第二容器组,针对任意的第二容器组,基于第二容器组对应的容器组运行标识信息获取对应的数据快照,调用K8s提供的相关接口基于第二容器组对应的数据快照生成第二容器组对应的VSS和VSC,调用K8s提供的相关接口基于第二容器组对应的VSC生成第二容器组对应的PV,基于第二容器组对应的VSS生成第二容器组对应的PVC,绑定第二容器组对应的PVC和PV,将第二容器组对应的PVC应用到第二容器组,第二容器组就可以从相应的硬盘上读取业务数据存储在自身目录中。可以理解,基于同样的元数据创建出来的pod的容器组运行标识信息是相同的,例如,在销毁前,第一个pod的名称为pod1,则在恢复时,第一个pod的名称也是pod1。
例如,参考图11,基于cluster1通过相应的set创建出3个pod,在cluster1销毁时,对cluster1进行备份,并且分别生成pod1、pod2、pod3对应的Snapshot。在数据快照有效期内,可根据需求随时发起恢复cluster1的流程。基于cluster1的备份生成cluster2,基于cluster2创建set,基于set创建出3个pod,分别为pod1’、pod2’、pod3’。针对pod1’、pod2’、pod3’需要存储的业务数据,获取pod1’、pod2’、pod3’分别对应的Snapshot,从Snapshot开始,基于Snapshot创建VSS和VSC,将VSS和VSC相互绑定,然后以VSS为数据源创建PVC,以VSC为数据源创建PV,将PVC和PV相互绑定,将PVC挂载在相应的pod下,最终pod1’、pod2’、pod3’将会运行起来,最终使得cluster2正常运行。
上述实施例中,在触发针对服务实例的恢复时,基于预先备份的备份实例和数据快照,能够快速恢复出存储有与销毁前一致业务数据的服务模型,保障目标业务服务的继续运行。
在一个实施例中,目标业务服务为目标数据库服务,服务实例用于指示建立目标数据库服务所需的元数据,各个服务组件用于分别负责实现目标数据库服务具备的各个功能,属于同一容器组集合中的各个容器组用于配合实现相应的服务组件提供的功能。
具体地,随着云原生技术的广泛普及与生产实践,越来越多的数据库服务需要从传统的物理机进程管理,向云原生容器化管理迁移,实现云原生的快速迭代、高效部署、弹性伸缩、底层差异屏蔽等。本申请方法可以用于数据库服务的容器化实现,适用于多种数据库服务。数据库服务通常由多组件构成,因此实现数据库服务的容器化管理需要考虑多个组件的容器化,不同的组件用于负责实现目标数据库服务具备的不同功能。例如,一种数据库服务包括数据库协调组件和数据库引擎组件,数据库服务一般通过节点集群实现,数据库协调组件用于对节点集群之间的通信进行协调,数据库引擎组件用于对数据库中业务数据进行数据存算,实现业务数据管理。属于同一容器组集合中的各个容器组用于配合实现相应的服务组件提供的功能。例如,针对数据库引擎组件,可以设置多个分片pod和多个副本pod,一个分片pod负责管理一部分业务数据,各个分片pod管理的业务数据组合起来为数据库中存储的完整业务数据,一个副本pod用于一部分业务数据的数据备份,针对同一部分业务数据,可以设置多个副本pod来进行多次备份。
在一个具体的实施例中,本申请方法可以应用于云厂商为客户提供数据库服务的场景下。数据库服务是一种典型的有状态服务,需要将数据、会话或服务状态做持久保存。
传统技术一般是利用K8s中的StatefulSet实现有状态服务的单个组件管理及持久化存储,核心能力是pod名称固定、数据持久化存储,但无法实现多种数据库、多种组件的通用管理能力,如组件依赖关系、差异化配置、动态扩缩容、动态升降级、数据备份与恢复等核心能力。本申请方法实现了数据库服务的通用模型抽象及上述提到的数据库核心管理能力。
可以理解,数据库服务由多组件构成:常见的数据库服务一般由一个或多个组件构成,因此实现数据库服务的容器化管理需要考虑多个组件的容器化。本申请方法将常见的数据库服务抽象为通用的三层资源模型,从上到下依次为cluster->sets->pods,分别对应于数据库实例、数据库组件、数据库进程pod。通过这样的三层资源模型,可以支持多种数据库服务的容器化。客户向云厂商购买数据库服务时,可以选择数据库类型以及针对数据库服务的个性化需求信息,云厂商的处理服务器接收到客户请求后,获取客户所需数据库类型对应的实例模板,基于客户的个性化需求信息结合实例模板快速创建客户所需的数据库实例,数据库实例中声明了实现用户所需数据库服务所需的各个元数据,基于数据库实例中的组件声明信息创建数据库组件,基于数据库组件从数据库实例中继承的pod声明信息创建数据库组件对应的数据库进程pod。以ClickHouse数据库服务为例,客户可在云厂商为客户提供的客户端上打开ClickHouse数据库服务的业务服务创建页面,该业务服务创建页面包含ClickHouse数据库服务所需的组件:zookeeper和clickhouse,需求方可分别为每个组件配置对应的参数,得到服务需求信息。客户可以为每个组件配置分片数、分片下pod数量、pod规格、分片对应的副本数等信息。客户端基于ClickHouse数据库服务的服务类型信息和服务需求信息,生成业务服务建立请求,并发送至云厂商的处理服务器,处理服务器基于服务类型信息和服务需求信息,创建ClickHouse数据库服务对应的服务实例cluster1,在cluster1下创建zookeeper组件set1和clickhouse组件set2,在set1下创建客户所需的pod,在set2下创建客户所需的pod。
并且,数据库服务的组件之间通常有启动依赖顺序,例如,ClickHouse数据库服务由两个组件构成,分别是zookeeper、clickhouse,zookeeper组件需要先启动成功后,依赖zookeeper组件的clickhouse组件才能启动。数据库实例记录了数据库组件的启动依赖顺序,本申请方法利用K8s readinessProbe探针探测先启动的组件,当该组件下面的所有pod探测结果都是Running正常运行后,再按序启动下一个组件。
并且,数据库服务的组件之间有差异化配置,数据库服务的多个组件之间都有特定的配置,且每个组件内的不同pod可能具有不同的配置,本申请方法在创建pod后,生成pod所需的配置文件,将配置文件快速下发至pod以实现针对pod的差异化配置。
并且,数据库需要动态扩缩容,随着数据库服务支撑的上层业务量增大或减小波动,底层数据库服务需要支持副本数(replicas)的动态扩缩容,且不能影响上层业务的正常运行。数据库也需要垂直升降级,数据库服务不仅需要副本数的扩缩容,还可能对已有pod的规格(如CPU/Memory/Disk)进行垂直的升降级,如CPU/Memory从4C8G升级到8C16G,且不能影响上层业务的正常运行。若需要对数据库进行动态扩缩容或垂直升降级,可以通过修改数据库实例来实现,若监测到数据库实例有所更新,则同步进行更新,以实现动态扩缩容或垂直升降级。在进行动态扩缩容或垂直升降级时,会提前将相关的pod网络流量摘掉,待动态扩缩容或垂直升降级完毕,相关的pod再接入业务流量,实现不影响业务的平滑运维操作。
并且,数据库需要备份与恢复,数据库服务为了保障数据的安全性与可靠性,在正常运行过程中需要定期打快照,如每1h进行一次全量的数据库快照备份;在数据库服务销毁的时候也需要自动快照备份,以便在需要的时候可以基于备份快速恢复出数据完整的数据库实例。本申请方法可以按需对数据库实例进行备份,对数据库进程pod中存储的业务数据进行备份。可以理解,数据库组件和数据库进程pod是依赖于数据库实例创建的,只需要对数据库实例进行备份,就可以快速恢复数据库组件和数据库进程pod,但是数据库进程pod中存储的业务数据需要另外恢复。生成的快照备份可支持多种后端存储,如COS对象存储、NFS、云快照等,其成本相比于普通的云硬盘低很多,因此可以为业务带来显著的降本增效效果。
应该理解的是,虽然如上所述的各实施例所涉及的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确
的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,如上所述的各实施例所涉及的流程图中的至少一部分步骤可以包括多个步骤或者多个阶段,这些步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤中的步骤或者阶段的至少一部分轮流或者交替地执行。
基于同样的发明构思,本申请实施例还提供了一种用于实现上述所涉及的业务服务建立方法的业务服务建立装置。该装置所提供的解决问题的实现方案与上述方法中所记载的实现方案相似,故下面所提供的一个或多个业务服务建立装置实施例中的具体限定可以参见上文中对于业务服务建立方法的限定,在此不再赘述。
在一个实施例中,如图12所示,提供了一种业务服务建立装置,包括:数据获取模块1202、实例创建模块1204、组件创建模块1206、容器创建模块1208和模型确定模块1210,其中:
数据获取模块1202,用于获取针对目标业务服务的服务需求信息,获取针对目标业务服务预设的实例模板作为目标实例模板。
实例创建模块1204,用于基于服务需求信息和目标实例模板创建目标业务服务对应的服务实例。
组件创建模块1206,用于基于服务实例包含的组件声明信息创建服务组件,得到目标业务服务对应的各个服务组件;组件声明信息用于指示创建与目标实例模板规定的各个组件类型分别匹配的服务组件。
容器创建模块1208,用于基于服务组件包含的容器组声明信息创建服务组件对应的容器组集合,得到各个服务组件各自对应的容器组集合;服务组件包含的容器组声明信息是从服务实例中获取的。
模型确定模块1210,用于基于服务实例、各个服务组件、各个服务组件各自对应的容器组集合,得到目标业务服务对应的服务模型;服务模型用于向服务需求信息对应的需求方提供目标业务服务。
在一个实施例中,实例创建模块1204还用于:
将服务需求信息填充至目标实例模板,得到目标业务服务对应的服务实例;目标实例模板包括组件声明区域和容器组声明区域;组件声明区域用于指示组件声明信息,容器组声明区域用于指示容器组声明信息。
在一个实施例中,组件创建模块1206还用于:
基于服务实例包含的组件声明信息,确定目标业务服务所需的各个组件类型和各个组件类型分别对应的组件配置信息;基于各个组件配置信息,分别创建与相应的组件类型匹配的服务组件,得到目标业务服务对应的各个服务组件。
在一个实施例中,容器创建模块1208还用于:
针对各个服务组件中任意一个服务组件,基于服务组件包含的容器组声明信息,确定服务组件所需的容器组数量,创建与容器组数量匹配的各个待配置容器组;基于服务组件包含的容器组声明信息,确定各个待配置容器组分别对应的容器组配置信息,基于容器组配置信息,对相应的待配置容器组进行初始化,得到已配置容器组;基于各个已配置容器组得到服务组件对应的容器组集合。
在一个实施例中,容器创建模块1208还用于:
针对任意的待配置容器组,通过容器组配置组件,获取待配置容器组对应的容器组运行时标识信息,将待配置容器组对应的容器组配置信息中的个性化需求信息和容器组运行时标识信息进行渲染,得到待配置容器组对应的容器组个性化配置信息;通过容器组配置组件,获取目标业务服务对应的容器组配置文件模板,将容器组个性化配置信息和容器组配置文件模板进行渲染,得到待配置容器组对应的目标配置文件;通过容器组配置组件,将目标配置文件下发到待配置容器中,得到在配置文件上初始化的已配置容器组。
在一个实施例中,容器创建模块1208还用于:
通过容器组配置组件,从容器组声明信息中获取针对目标业务服务的容器组配置文件模板的模板索引,基于模板索引,从预设存储区域中获取容器组配置文件模板;其中,容器组配置文件模板是通过模板统一工具提交到预设存储区域中存储的,模板统一工具用于对目标业务服务所属业务类型对应的多个业务开发方分别提供的容器组配置文件模板进行格式统一。
在一个实施例中,容器创建模块1208还用于:
创建与容器组配置信息中的存储规格匹配的目标持久卷声明;基于目标持久卷声明包含的目标持久卷模板生成目标持久卷内容,将目标持久卷内容和与容器组配置信息中的存储规格匹配的硬盘关联;绑定目标持久卷内容和目标持久卷声明,将目标持久卷声明写入待配置容器组,得到在存储规格上初始化的已配置容器组;在存储规格上初始化的已配置容器组中的数据用于写入硬盘。
在一个实施例中,业务服务建立装置还用于:
基于组件声明信息提供的服务组件启动依赖顺序,有序启动各个服务组件;通过针对各个服务组件分别设置的探针监测各个服务组件的运行状态,在针对启动优先级高的服务组件设置的探针监测到服务组件管理的容器组集合中各个容器组成功启动后,触发启动下一启动优先级的服务组件;在各个服务组件成功启动后,向需求方返回目标业务服务对应的创建成功消息。
在一个实施例中,业务服务建立装置还用于:
获取针对目标业务服务的容器组调整请求;容器组调整请求携带容器组调整参数;基于容器组调整参数更新服务实例包含的容器组声明信息;基于更新后的容器组声明信息,更新对应的服务组件和对应的容器组集合。
在一个实施例中,业务服务建立装置还用于:
在触发针对服务实例的销毁时,对服务实例进行备份,得到备份实例;将各个服务组件各自对应的容器组集合中的容器组分别作为第一容器组;基于第一容器组对应的持久卷声明创建第一容器组对应的持久卷快照声明,基于第一容器组对应的持久卷内容创建第一容器组对应的持久卷快照内容,绑定第一容器组对应的持久卷快照声明和持久卷快照内容,基于第一容器组对应的经过绑定的持久卷快照声明和持久卷快照内容生成第一容器组对应的数据快照,将第一容器组对应的容器组运行标识信息和数据快照关联存储;将备份实例、各个服务组件各自对应的容器组集合中各个容器组分别对应的数据快照关联存储。
在一个实施例中,业务服务建立装置还用于:
在触发针对服务实例的恢复时,获取备份实例;基于备份实例包含的组件声明信息创建服务组件,得到各个恢复组件;基于恢复组件包含的容器组声明信息创建恢复组件对应的容器组集合,得到各个恢复组件各自对应的容器组集合;将各个恢复组件各自对应的容器组集合中的容器组分别作为第二容器组;基于第二容器组对应的容器组运行标识信息获取对应的数据快照,基于第二容器组对应的数据快照生成第二容器组对应的持久卷快照声明和持久卷快照内容,基于第二容器组对应的持久卷快照内容生成第二容器组对应的持久卷内容,基于第二容器组对应的持久卷快照声明生成第二容器组对应的持久卷声明,绑定第二容器组对应的持久卷内容和持久卷声明,将第二容器组对应的持久卷声明应用到第二容器组。
在一个实施例中,目标业务服务为目标数据库服务,服务实例用于指示建立目标数据库服务所需的元数据,各个服务组件用于分别负责实现目标数据库服务具备的各个功能,属于同一容器组集合中的各个容器组用于配合实现相应的服务组件提供的功能。
上述业务服务建立装置,预先设置各种业务服务分别对应的实例模板以便快速建立相应的业务服务。针对目标业务服务,将目标业务服务个性化的服务需求信息和目标业务服务对应的实例模板组合得到目标业务服务对应的服务实例,基于服务实例包含的组件声明
信息创建目标业务服务对应的各个服务组件,基于服务组件包含的容器组声明信息创建服务组件对应的容器组集合,通过目标业务服务对应的服务实例、各个服务组件、各个服务组件各自对应的容器组集合构成用于提供目标业务服务的服务模型。将业务服务抽象为三层结构的模型,三层结构的模型包括服务实例、服务组件、服务组件对应的容器组集合,服务实例管理创建服务组件和容器组集合的相关信息,各个组件管理创建各自容器组集合的相关信息,实现有序的业务服务建立,各种业务服务都可以抽象为三层结构的模型,通用性强,保障了业务服务建立的通用性,提高了业务服务建立的效率。基于这样三层结构的模型用云原生的方式容器化实现业务服务。
上述业务服务建立装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。
在一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图13所示。该计算机设备包括处理器、存储器、输入/输出接口(Input/Output,简称I/O)和通信接口。其中,处理器、存储器和输入/输出接口通过系统总线连接,通信接口通过输入/输出接口连接到系统总线。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质和内存储器。该非易失性存储介质存储有操作系统、计算机可读指令和数据库。该内存储器为非易失性存储介质中的操作系统和计算机可读指令的运行提供环境。该计算机设备的数据库用于存储实例模板、配置文件模板等数据。该计算机设备的输入/输出接口用于处理器与外部设备之间交换信息。该计算机设备的通信接口用于与外部的终端通过网络连接通信。该计算机可读指令被处理器执行时以实现一种业务服务建立方法。
本领域技术人员可以理解,图13中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
在一个实施例中,还提供了一种计算机设备,包括存储器和处理器,存储器中存储有计算机可读指令,该处理器执行计算机可读指令时实现上述各方法实施例中的步骤。
在一个实施例中,提供了一种计算机可读存储介质,存储有计算机可读指令,该计算机可读指令被处理器执行时实现上述各方法实施例中的步骤。
在一个实施例中,提供了一种计算机程序产品,该计算机程序产品包括计算机可读指令,该计算机可读指令被处理器执行时实现上述各方法实施例中的步骤。
需要说明的是,本申请所涉及的用户信息(包括但不限于用户设备信息、用户个人信息等)和数据(包括但不限于用于分析的数据、存储的数据、展示的数据等),均为经用户授权或者经过各方充分授权的信息和数据,且相关数据的收集、使用和处理需要遵守相关国家和地区的相关法律法规和标准。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一非易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、数据库或其它介质的任何引用,均可包括非易失性和易失性存储器中的至少一种。非易失性存储器可包括只读存储器(Read-Only Memory,ROM)、磁带、软盘、闪存、光存储器、高密度嵌入式非易失性存储器、阻变存储器(ReRAM)、磁变存储器(Magnetoresistive Random Access Memory,MRAM)、铁电存储器(Ferroelectric Random Access Memory,FRAM)、相变存储器(Phase Change Memory,PCM)、石墨烯存储器等。易失性存储器可包括随机存取存储器(Random Access Memory,RAM)或外部高速缓冲存储器等。作为说明而非局限,RAM可以是多种形式,比如静态随机存取存储器(Static Random Access Memory,SRAM)或动态随机存取存储器(Dynamic Random Access Memory,DRAM)等。本申请所提供的各实施例中所涉
及的数据库可包括关系型数据库和非关系型数据库中至少一种。非关系型数据库可包括基于区块链的分布式数据库等,不限于此。本申请所提供的各实施例中所涉及的处理器可为通用处理器、中央处理器、图形处理器、数字信号处理器、可编程逻辑器、基于量子计算的数据处理逻辑器等,不限于此。
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请的保护范围应以所附权利要求为准。
Claims (27)
- 一种业务服务建立方法,其特征在于,由计算机设备执行,所述方法包括:获取针对目标业务服务的服务需求信息,获取针对所述目标业务服务预设的实例模板作为目标实例模板;基于所述服务需求信息和所述目标实例模板创建所述目标业务服务对应的服务实例;基于所述服务实例包含的组件声明信息创建服务组件,得到所述目标业务服务对应的各个服务组件,所述组件声明信息用于指示创建与所述目标实例模板规定的各个组件类型分别匹配的服务组件;基于所述服务组件包含的容器组声明信息创建服务组件对应的容器组集合,得到所述各个服务组件各自对应的容器组集合,所述服务组件包含的容器组声明信息是从所述服务实例中获取的;及基于所述服务实例、所述各个服务组件、所述各个服务组件各自对应的容器组集合,得到所述目标业务服务对应的服务模型,所述服务模型用于向所述服务需求信息对应的需求方提供所述目标业务服务。
- 根据权利要求1所述的方法,其特征在于,所述基于所述服务需求信息和所述目标实例模板创建所述目标业务服务对应的服务实例,包括:将所述服务需求信息填充至所述目标实例模板,得到所述目标业务服务对应的服务实例,所述目标实例模板包括组件声明区域和容器组声明区域,所述组件声明区域用于指示组件声明信息,所述容器组声明区域用于指示容器组声明信息。
- 根据权利要求1或2所述的方法,其特征在于,所述基于所述服务实例包含的组件声明信息创建服务组件,得到所述目标业务服务对应的各个服务组件,包括:基于所述服务实例包含的组件声明信息,确定所述目标业务服务所需的各个组件类型和所述各个组件类型分别对应的组件配置信息;及基于各个组件配置信息,分别创建与相应的组件类型匹配的服务组件,得到所述目标业务服务对应的各个服务组件。
- 根据权利要求1至3中任一项所述的方法,其特征在于,所述基于所述服务组件包含的容器组声明信息创建服务组件对应的容器组集合,得到所述各个服务组件各自对应的容器组集合,包括:针对所述各个服务组件中任意一个服务组件,基于服务组件包含的容器组声明信息,确定服务组件所需的容器组数量,创建与所述容器组数量匹配的各个待配置容器组;基于所述服务组件包含的容器组声明信息,确定各个待配置容器组分别对应的容器组配置信息,基于所述容器组配置信息,对相应的待配置容器组进行初始化,得到已配置容器组;及基于各个已配置容器组得到服务组件对应的容器组集合。
- 根据权利要求4所述的方法,其特征在于,所述基于所述容器组配置信息,对相应的待配置容器组进行初始化,得到已配置容器组,包括:针对任意一个待配置容器组,通过容器组配置组件,获取待配置容器组对应的容器组运行时标识信息,将待配置容器组对应的容器组配置信息中的个性化需求信息和容器组运行时标识信息进行渲染,得到待配置容器组对应的容器组个性化配置信息;通过所述容器组配置组件,获取所述目标业务服务对应的容器组配置文件模板,将所述容器组个性化配置信息和所述容器组配置文件模板进行渲染,得到待配置容器组对应的目标配置文件;及通过容器组配置组件,将所述目标配置文件下发到待配置容器中,得到在配置文件上初始化的已配置容器组。
- 根据权利要求5所述的方法,其特征在于,所述通过所述容器组配置组件,获取 所述目标业务服务对应的容器组配置文件模板,包括:通过所述容器组配置组件,从所述容器组声明信息中获取针对所述目标业务服务的容器组配置文件模板的模板索引,基于所述模板索引,从预设存储区域中获取所述容器组配置文件模板,其中,所述容器组配置文件模板是通过模板统一工具提交到所述预设存储区域中存储的,所述模板统一工具用于对所述目标业务服务所属业务类型对应的多个业务开发方分别提供的容器组配置文件模板进行格式统一。
- 根据权利要求4所述的方法,其特征在于,所述基于所述容器组配置信息,对相应的待配置容器组进行初始化,得到已配置容器组,包括:创建与所述容器组配置信息中的存储规格匹配的目标持久卷声明;基于所述目标持久卷声明包含的目标持久卷模板生成目标持久卷内容,将所述目标持久卷内容和与所述容器组配置信息中的存储规格匹配的硬盘关联;及绑定所述目标持久卷内容和所述目标持久卷声明,将所述目标持久卷声明写入待配置容器组,得到在存储规格上初始化的已配置容器组,所述在存储规格上初始化的已配置容器组中的数据用于写入所述硬盘。
- 根据权利要求1至7中任一项所述的方法,其特征在于,所述方法还包括:基于所述组件声明信息提供的服务组件启动依赖顺序,有序启动所述各个服务组件;通过针对所述各个服务组件分别设置的探针监测各个服务组件的运行状态,在针对启动优先级高的服务组件设置的探针监测到服务组件管理的容器组集合中各个容器组成功启动后,触发启动下一启动优先级的服务组件;及在所述各个服务组件成功启动后,向所述需求方返回所述目标业务服务对应的创建成功消息。
- 根据权利要求1至8中任一项所述的方法,其特征在于,所述方法还包括:获取针对所述目标业务服务的容器组调整请求;所述容器组调整请求携带容器组调整参数;基于所述容器组调整参数更新所述服务实例包含的容器组声明信息;及基于更新后的容器组声明信息,更新对应的服务组件和对应的容器组集合。
- 根据权利要求1至9中任一项所述的方法,其特征在于,所述方法还包括:在触发针对所述服务实例的销毁时,对所述服务实例进行备份,得到备份实例;将所述各个服务组件各自对应的容器组集合中的容器组分别作为第一容器组;基于所述第一容器组对应的持久卷声明创建所述第一容器组对应的持久卷快照声明,基于所述第一容器组对应的持久卷内容创建所述第一容器组对应的持久卷快照内容,绑定所述第一容器组对应的持久卷快照声明和持久卷快照内容,基于所述第一容器组对应的经过绑定的持久卷快照声明和持久卷快照内容生成所述第一容器组对应的数据快照,将所述第一容器组对应的容器组运行标识信息和数据快照关联存储;及将所述备份实例、所述各个服务组件各自对应的容器组集合中各个容器组分别对应的数据快照关联存储。
- 根据权利要求10所述的方法,其特征在于,所述方法还包括:在触发针对所述服务实例的恢复时,获取所述备份实例;基于所述备份实例包含的组件声明信息创建服务组件,得到各个恢复组件;基于所述恢复组件包含的容器组声明信息创建恢复组件对应的容器组集合,得到所述各个恢复组件各自对应的容器组集合;将所述各个恢复组件各自对应的容器组集合中的容器组分别作为第二容器组;及基于所述第二容器组对应的容器组运行标识信息获取对应的数据快照,基于所述第二容器组对应的数据快照生成所述第二容器组对应的持久卷快照声明和持久卷快照内容,基于所述第二容器组对应的持久卷快照内容生成所述第二容器组对应的持久卷内容,基于所述第二容器组对应的持久卷快照声明生成所述第二容器组对应的持久卷声明,绑定所述第 二容器组对应的持久卷内容和持久卷声明,将所述第二容器组对应的持久卷声明应用到所述第二容器组。
- 根据权利要求1至11中任一项所述的方法,其特征在于,所述目标业务服务为目标数据库服务,所述服务实例用于指示建立所述目标数据库服务所需的元数据,所述各个服务组件用于分别负责实现所述目标数据库服务具备的各个功能,属于同一容器组集合中的各个容器组用于配合实现相应的服务组件提供的功能。
- 一种业务服务建立装置,其特征在于,所述装置包括:数据获取模块,用于获取针对目标业务服务的服务需求信息,获取针对所述目标业务服务预设的实例模板作为目标实例模板;实例创建模块,用于基于所述服务需求信息和所述目标实例模板创建所述目标业务服务对应的服务实例;组件创建模块,用于基于所述服务实例包含的组件声明信息创建服务组件,得到所述目标业务服务对应的各个服务组件,所述组件声明信息用于指示创建与所述目标实例模板规定的各个组件类型分别匹配的服务组件;容器创建模块,用于基于所述服务组件包含的容器组声明信息创建服务组件对应的容器组集合,得到所述各个服务组件各自对应的容器组集合,所述服务组件包含的容器组声明信息是从所述服务实例中获取的;及模型确定模块,用于基于所述服务实例、所述各个服务组件、所述各个服务组件各自对应的容器组集合,得到所述目标业务服务对应的服务模型,所述服务模型用于向所述服务需求信息对应的需求方提供所述目标业务服务。
- 根据权利要求13所述的装置,其特征在于,所述实例创建模块还用于:将所述服务需求信息填充至所述目标实例模板,得到所述目标业务服务对应的服务实例,所述目标实例模板包括组件声明区域和容器组声明区域,所述组件声明区域用于指示组件声明信息,所述容器组声明区域用于指示容器组声明信息。
- 根据权利要求13或14所述的装置,其特征在于,所述组件创建模块还用于:基于所述服务实例包含的组件声明信息,确定所述目标业务服务所需的各个组件类型和所述各个组件类型分别对应的组件配置信息;及基于各个组件配置信息,分别创建与相应的组件类型匹配的服务组件,得到所述目标业务服务对应的各个服务组件。
- 根据权利要求13至15中任一项所述的装置,其特征在于,所述容器创建模块还用于:针对所述各个服务组件中任意一个服务组件,基于服务组件包含的容器组声明信息,确定服务组件所需的容器组数量,创建与所述容器组数量匹配的各个待配置容器组;基于所述服务组件包含的容器组声明信息,确定各个待配置容器组分别对应的容器组配置信息,基于所述容器组配置信息,对相应的待配置容器组进行初始化,得到已配置容器组;及基于各个已配置容器组得到服务组件对应的容器组集合。
- 根据权利要求16所述的装置,其特征在于,所述容器创建模块还用于:针对任意的待配置容器组,通过容器组配置组件,获取待配置容器组对应的容器组运行时标识信息,将所述容器组配置信息中的个性化需求信息和所述容器组运行时标识信息进行渲染,得到待配置容器组对应的容器组个性化配置信息;通过所述容器组配置组件,获取所述目标业务服务对应的容器组配置文件模板,将所述容器组个性化配置信息和所述容器组配置文件模板进行渲染,得到待配置容器组对应的目标配置文件;及通过容器组配置组件,将所述目标配置文件下发到待配置容器中,得到在配置文件上初始化的已配置容器组。
- 根据权利要求17所述的装置,其特征在于,所述容器创建模块还用于:通过所述容器组配置组件,从所述容器组声明信息中获取针对所述目标业务服务的容器组配置文件模板的模板索引,基于所述模板索引,从预设存储区域中获取所述容器组配置文件模板,其中,所述容器组配置文件模板是通过模板统一工具提交到所述预设存储区域中存储的,所述模板统一工具用于对所述目标业务服务所属业务类型对应的多个业务开发方分别提供的容器组配置文件模板进行格式统一。
- 根据权利要求16所述的装置,其特征在于,所述容器创建模块还用于:创建与所述容器组配置信息中的存储规格匹配的目标持久卷声明;基于所述目标持久卷声明包含的目标持久卷模板生成目标持久卷内容,将所述目标持久卷内容和与所述容器组配置信息中的存储规格匹配的硬盘关联;及绑定所述目标持久卷内容和所述目标持久卷声明,将所述目标持久卷声明写入待配置容器组,得到在存储规格上初始化的已配置容器组,所述在存储规格上初始化的已配置容器组中的数据用于写入所述硬盘。
- 根据权利要求13至19中任一项所述的装置,其特征在于,所述装置还用于:基于所述组件声明信息提供的服务组件启动依赖顺序,有序启动所述各个服务组件;通过针对所述各个服务组件分别设置的探针监测各个服务组件的运行状态,在针对启动优先级高的服务组件设置的探针监测到服务组件管理的容器组集合中各个容器组成功启动后,触发启动下一启动优先级的服务组件;及在所述各个服务组件成功启动后,向所述需求方返回所述目标业务服务对应的创建成功消息。
- 根据权利要求13至20中任一项所述的装置,其特征在于,所述装置还用于:获取针对所述目标业务服务的容器组调整请求;所述容器组调整请求携带容器组调整参数;基于所述容器组调整参数更新所述服务实例包含的容器组声明信息;及基于更新后的容器组声明信息,更新对应的服务组件和对应的容器组集合。
- 根据权利要求13至21中任一项所述的装置,其特征在于,所述装置还用于:在触发针对所述服务实例的销毁时,对所述服务实例进行备份,得到备份实例;将所述各个服务组件各自对应的容器组集合中的容器组分别作为第一容器组;基于所述第一容器组对应的持久卷声明创建所述第一容器组对应的持久卷快照声明,基于所述第一容器组对应的持久卷内容创建所述第一容器组对应的持久卷快照内容,绑定所述第一容器组对应的持久卷快照声明和持久卷快照内容,基于所述第一容器组对应的经过绑定的持久卷快照声明和持久卷快照内容生成所述第一容器组对应的数据快照,将所述第一容器组对应的容器组运行标识信息和数据快照关联存储;及将所述备份实例、所述各个服务组件各自对应的容器组集合中各个容器组分别对应的数据快照关联存储。
- 根据权利要求22所述的装置,其特征在于,所述装置还用于:在触发针对所述服务实例的恢复时,获取所述备份实例;基于所述备份实例包含的组件声明信息创建服务组件,得到各个恢复组件;基于所述恢复组件包含的容器组声明信息创建恢复组件对应的容器组集合,得到所述各个恢复组件各自对应的容器组集合;将所述各个恢复组件各自对应的容器组集合中的容器组分别作为第二容器组;及基于所述第二容器组对应的容器组运行标识信息获取对应的数据快照,基于所述第二容器组对应的数据快照生成所述第二容器组对应的持久卷快照声明和持久卷快照内容,基于所述第二容器组对应的持久卷快照内容生成所述第二容器组对应的持久卷内容,基于所述第二容器组对应的持久卷快照声明生成所述第二容器组对应的持久卷声明,绑定所述第二容器组对应的持久卷内容和持久卷声明,将所述第二容器组对应的持久卷声明应用到所 述第二容器组。
- 根据权利要求13至23中任一项所述的装置,其特征在于,所述目标业务服务为目标数据库服务,所述服务实例用于指示建立所述目标数据库服务所需的元数据,所述各个服务组件用于分别负责实现所述目标数据库服务具备的各个功能,属于同一容器组集合中的各个容器组用于配合实现相应的服务组件提供的功能。
- 一种计算机设备,包括存储器和处理器,所述存储器存储有计算机可读指令,其特征在于,所述处理器执行所述计算机可读指令时实现权利要求1至12中任一项所述的方法的步骤。
- 一种计算机可读存储介质,其上存储有计算机可读指令,其特征在于,所述计算机可读指令被处理器执行时实现权利要求1至12中任一项所述的方法的步骤。
- 一种计算机程序产品,包括计算机可读指令,其特征在于,所述计算机可读指令被处理器执行时实现权利要求1至12中任一项所述的方法的步骤。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310713387.4A CN119149164A (zh) | 2023-06-15 | 2023-06-15 | 业务服务建立方法、装置、计算机设备和存储介质 |
| CN202310713387.4 | 2023-06-15 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2024255085A1 true WO2024255085A1 (zh) | 2024-12-19 |
Family
ID=93802404
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2023/130004 Ceased WO2024255085A1 (zh) | 2023-06-15 | 2023-11-06 | 业务服务建立方法、装置、计算机设备和存储介质 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN119149164A (zh) |
| WO (1) | WO2024255085A1 (zh) |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111831269A (zh) * | 2020-07-21 | 2020-10-27 | 腾讯科技(深圳)有限公司 | 一种应用开发系统、运行方法、设备及存储介质 |
| CN114253459A (zh) * | 2020-09-22 | 2022-03-29 | 北京金山云网络技术有限公司 | 创建持久数据卷的方法、装置和服务器 |
| CN114489956A (zh) * | 2022-02-17 | 2022-05-13 | 青岛聚看云科技有限公司 | 一种基于云平台的实例启动方法及装置 |
| US20220398070A1 (en) * | 2021-06-15 | 2022-12-15 | HCL America Inc. | Method and system for automatically creating instances of containerized servers |
-
2023
- 2023-06-15 CN CN202310713387.4A patent/CN119149164A/zh active Pending
- 2023-11-06 WO PCT/CN2023/130004 patent/WO2024255085A1/zh not_active Ceased
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111831269A (zh) * | 2020-07-21 | 2020-10-27 | 腾讯科技(深圳)有限公司 | 一种应用开发系统、运行方法、设备及存储介质 |
| CN114253459A (zh) * | 2020-09-22 | 2022-03-29 | 北京金山云网络技术有限公司 | 创建持久数据卷的方法、装置和服务器 |
| US20220398070A1 (en) * | 2021-06-15 | 2022-12-15 | HCL America Inc. | Method and system for automatically creating instances of containerized servers |
| CN114489956A (zh) * | 2022-02-17 | 2022-05-13 | 青岛聚看云科技有限公司 | 一种基于云平台的实例启动方法及装置 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN119149164A (zh) | 2024-12-17 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US12175237B2 (en) | Integration of containers with external elements | |
| US10762075B2 (en) | Database interface agent for a tenant-based upgrade system | |
| US10310949B1 (en) | Disaster restore of big data application with near zero RTO | |
| US9251183B2 (en) | Managing tenant-specific data sets in a multi-tenant environment | |
| US9477727B2 (en) | Abstracting data for use by a mobile device having occasional connectivity | |
| US8977662B1 (en) | Storing data objects from a flat namespace in a hierarchical directory structured file system | |
| US20240419423A1 (en) | Dependency based application deployment | |
| CN111684437B (zh) | 按时间顺序排序的错位更新键-值存储系统 | |
| US20250390394A1 (en) | Service cluster instance backup and recovery methods and related devices | |
| CN114237871A (zh) | 云资源的编排方法、装置、计算机设备和存储介质 | |
| US11294892B2 (en) | Virtual archiving of database records | |
| US20260037388A1 (en) | Backup and recovery for software-as-a-service data | |
| US20260037387A1 (en) | Relational software-as-a-service data protection | |
| US11977457B2 (en) | Backup and recovery under group-level encryption | |
| US11334600B1 (en) | Partial reloading in data synchronization | |
| CN119621163B (zh) | 服务部署方法、系统、设备及存储介质 | |
| CN119597719A (zh) | 文件处理方法、装置、设备、可读存储介质和程序产品 | |
| WO2024255085A1 (zh) | 业务服务建立方法、装置、计算机设备和存储介质 | |
| JP7674796B2 (ja) | 分散データ・ストレージ環境におけるセキュアなデータ複製 | |
| CN115421856A (zh) | 一种数据恢复方法及装置 | |
| US20170168793A1 (en) | Split installation of a software product | |
| CN115687375B (zh) | 数据库更新方法、装置、计算机设备和存储介质 | |
| US12524317B1 (en) | Backup and recovery for computing objects with hierarchical page structures | |
| US20250165356A1 (en) | Recovery framework for software-as-a-service data | |
| CN115048393B (zh) | 资源管理方法、装置、系统、设备、介质和程序产品 |
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: 23941307 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |