技术领域technical field
本发明涉及云计算领域,特别是一种基于模型的混合云构造方法。The invention relates to the field of cloud computing, in particular to a model-based hybrid cloud construction method.
背景技术Background technique
随着云计算技术的普及,涌现出众多不同用途、不同类型的云计算平台。为了满足遗产系统整合和动态资源扩展等需求,一些大型企业常常需要构造混合云来统一管理不同云平台中的计算和存储资源。然而,不同云计算平台的管理系统存在差异,给混合云的构造带来极大的困难:With the popularization of cloud computing technology, many cloud computing platforms with different purposes and types have emerged. In order to meet the needs of legacy system integration and dynamic resource expansion, some large enterprises often need to construct hybrid clouds to manage computing and storage resources in different cloud platforms in a unified manner. However, there are differences in the management systems of different cloud computing platforms, which brings great difficulties to the construction of hybrid clouds:
首先,云平台管理接口的异构性:不同云计算平台往往提供不同类型的管理接口,在功能名称、调用方法、输入参数、返回信息及管理效果等方面均存在差异,给管理系统的开发带来了极大复杂度。First of all, the heterogeneity of cloud platform management interfaces: different cloud computing platforms often provide different types of management interfaces, and there are differences in function names, calling methods, input parameters, return information, and management effects, etc. Here comes great complexity.
其次,云平台管理机制的异构性:不同云计算平台往往提供不同类型的管理机制,在资源分类、组织方式及系统特性等方面均存在差异,给管理系统的开发带来了极大难度。Secondly, the heterogeneity of cloud platform management mechanisms: Different cloud computing platforms often provide different types of management mechanisms, and there are differences in resource classification, organization methods, and system characteristics, which brings great difficulties to the development of management systems.
发明内容Contents of the invention
本发明的目的在于提供一种基于模型的混合云构造方法,以克服现有技术中存在的缺陷。The purpose of the present invention is to provide a model-based hybrid cloud construction method to overcome the defects in the prior art.
为实现上述目的,本发明的技术方案是:一种基于模型的混合云构造方法,通过一模型同步中间件对一统一模型到一云资源模型的元素映射关系进行设定,使得所述统一模型上的管理操作自动转换为所述云资源模型上对应的管理操作,并作用到云平台的云资源上,完成模型间的同步关系;所述统一模型通过所述云平台共有资源类型以及管理功能进行描述,并提供对异构云平台进行管理的统一视图;所述云资源模型用于屏蔽云平台管理接口异构性,并通过所述云平台中受管模块的功能信息以及所述云平台管理接口的调用方法进行描述;所述模型同步中间件用于将所述统一模型映射到所述云资源模型。To achieve the above object, the technical solution of the present invention is: a model-based hybrid cloud construction method, which sets the element mapping relationship from a unified model to a cloud resource model through a model synchronization middleware, so that the unified model The management operations on the cloud resource model are automatically converted to the corresponding management operations on the cloud resource model, and act on the cloud resources of the cloud platform to complete the synchronization relationship between models; the unified model shares resource types and management functions through the cloud platform Describe and provide a unified view of heterogeneous cloud platform management; the cloud resource model is used to shield the cloud platform management interface heterogeneity, and through the function information of the managed module in the cloud platform and the cloud platform The calling method of the management interface is described; the model synchronization middleware is used to map the unified model to the cloud resource model.
在本发明一实施例中,所述统一模型包括:对云平台使用者资源进行统一管理的使用者模型以及为云平台管理提供全局视图的管理员模型;In an embodiment of the present invention, the unified model includes: a user model for unified management of cloud platform user resources and an administrator model for providing a global view for cloud platform management;
所述使用者模型的受管单元包括:描述使用者基本信息的使用者Account、描述项目基本信息以及所述云平台使用者资源分配情况的项目Project、表示虚拟机映像文件的虚拟机映像Image、表示虚拟机资源配置类型的资源配置类型ServerType、描述子网基本信息的网络子网Network、为虚拟机增加额外存储的磁盘卷Volume、描述虚拟机基本信息的虚拟机Server;所述主要受管单元均包含cloudName属性以及dataCenterId属性,分别表示该主要受管单元所属的云平台以及数据中心;The managed unit of the user model includes: the user Account describing the basic information of the user, the project Project describing the basic information of the project and the resource allocation of the user of the cloud platform, the virtual machine image Image representing the virtual machine image file, The resource configuration type ServerType indicating the virtual machine resource configuration type, the network subnet Network describing the basic information of the subnet, the disk volume Volume adding additional storage for the virtual machine, and the virtual machine Server describing the basic information of the virtual machine; the main managed unit Both include the cloudName attribute and the dataCenterId attribute, respectively indicating the cloud platform and data center to which the main managed unit belongs;
所述管理员模型的受管单元包括:数据中心DataCenter、为虚拟机提供运行环境以及描述虚拟化软件物理节点中计算资源信息的物理机ComputeNode、描述了映像文件操作系统类型基本信息的公共虚拟机映像文件PublicImage、提供多种形式存储管理的虚拟机映像文件存储池ImageStore、虚拟机磁盘卷存储池VolumeStore以及描述云平台公共网络资源中公共IP资源的网络资源PublicNetwork。The managed unit of the administrator model includes: DataCenter, a physical machine ComputeNode that provides an operating environment for virtual machines and describes computing resource information in physical nodes of virtualization software, and a public virtual machine that describes the basic information of the image file operating system type The image file PublicImage, the virtual machine image file storage pool ImageStore that provides various forms of storage management, the virtual machine disk volume storage pool VolumeStore, and the network resource PublicNetwork describing the public IP resources in the public network resources of the cloud platform.
在本发明一实施例中,通过采用代理机制生成所述云资源模型,并按照如下步骤实现:In an embodiment of the present invention, the cloud resource model is generated by using a proxy mechanism, and implemented according to the following steps:
步骤S11:描述所述云资源模型的体系结构;将云资源的受管单元描述为代理机制中的模型元素,并将受管单元的属性描述为所述模型元素对应的属性;Step S11: Describe the architecture of the cloud resource model; describe the managed units of the cloud resources as model elements in the proxy mechanism, and describe the attributes of the managed units as attributes corresponding to the model elements;
步骤S12:描述云平台双系统的管理能力;通过将云平台运行系统的管理API嵌入所述模型元素的属性中,在所述模型元素中描述属性的管理方法;Step S12: describe the management capability of the cloud platform dual system; by embedding the management API of the cloud platform operating system into the attribute of the model element, describe the management method of the attribute in the model element;
步骤S13:所述代理机制生成同步引擎,以支持所述云资源模型与所述云平台运行系统的双向同步。Step S13: The proxy mechanism generates a synchronization engine to support the two-way synchronization between the cloud resource model and the cloud platform operating system.
在本发明一实施例中,所述映射关系包括:模型元素间一对一映射关系、模型元素间多对一映射关系以及模型元素间一对多映射关系;In an embodiment of the present invention, the mapping relationship includes: a one-to-one mapping relationship between model elements, a many-to-one mapping relationship between model elements, and a one-to-many mapping relationship between model elements;
所述模型元素间一对一映射关系包括:所述统一模型中的一个元素与所述云资源模型中的一个元素相对应,所述统一模型中该元素的属性与所述云资源模型中元素的属性中相对应;The one-to-one mapping relationship between the model elements includes: an element in the unified model corresponds to an element in the cloud resource model, and an attribute of the element in the unified model corresponds to an element in the cloud resource model Corresponding in the attributes;
所述模型元素间多对一映射关系包括:所述统一模型中的两个或多个元素与所述云资源模型中的一个元素相对应,所述云资源模型中该元素的属性对应分布在所述统一模型中两个或多个元素的属性中;The many-to-one mapping relationship between model elements includes: two or more elements in the unified model correspond to one element in the cloud resource model, and the attributes of the element in the cloud resource model are correspondingly distributed in in the attributes of two or more elements in said unified model;
所述模型元素间一对多映射关系包括:所述统一模型中的一个元素与所述云资源模型中的两个或多个元素对应,所述统一模型中该元素的属性与所述云资源模型中两个或多个元素的属性对应。The one-to-many mapping relationship between the model elements includes: one element in the unified model corresponds to two or more elements in the cloud resource model, and the attribute of the element in the unified model corresponds to the cloud resource A property correspondence between two or more elements in a model.
在本发明一实施例中,在所述映射关系的设定过程中,包括以下模型操作:Get操作、Set操作、List操作、Add操作以及Remove操作;In an embodiment of the present invention, in the process of setting the mapping relationship, the following model operations are included: Get operation, Set operation, List operation, Add operation and Remove operation;
在设定所述模型元素间一对一映射关系过程中,所述统一模型中元素的Add操作、Remove操作或List操作对应转换为所述云资源模型中元素的Add操作、Remove操作或List操作,所述统一模型中该元素属性的Get操作或Set操作转换为所述云资源模型中对应元素属性的Get操作或Set操作;In the process of setting the one-to-one mapping relationship between the model elements, the Add operation, Remove operation or List operation of the element in the unified model is correspondingly converted into the Add operation, Remove operation or List operation of the element in the cloud resource model , the Get operation or Set operation of the element attribute in the unified model is converted into the Get operation or Set operation of the corresponding element attribute in the cloud resource model;
在设定所述模型元素间多对一映射关系过程中,所述统一模型中的两个或多个元素的Add操作、Remove操作或List操作对应转换为所述云资源模型中元素的Add操作、Remove操作或List操作,所述统一模型中的两个或多个元素中每个元素属性的Get操作或Set操作分别转换为所述云资源模型中元素对应属性的Get操作或Set操作;In the process of setting the many-to-one mapping relationship between the model elements, the Add operation, Remove operation or List operation of two or more elements in the unified model is correspondingly converted into the Add operation of the elements in the cloud resource model , Remove operation or List operation, the Get operation or Set operation of each element attribute in the two or more elements in the unified model is respectively converted into the Get operation or Set operation of the corresponding attribute of the element in the cloud resource model;
在设定所述模型元素间一对多映射关系过程中,所述统一模型中元素的Add操作或Remove操作对应转换为所述云资源模型中两个或多个元素中任一元素的Add操作或Remove操作;所述统一模型中元素属性的Get操作或Set操作对应转换为所述云资源模型中两个或多个元素中每个元素属性的Get操作或Set操作;所述统一模型中元素的List操作对应转换为所述云资源模型中两个或多个元素中每个元素的List操作。In the process of setting the one-to-many mapping relationship between the model elements, the Add operation or Remove operation of the element in the unified model is correspondingly converted into the Add operation of any one of the two or more elements in the cloud resource model or Remove operation; the Get operation or Set operation of the element attribute in the unified model is correspondingly converted into the Get operation or Set operation of each element attribute in two or more elements in the cloud resource model; the element in the unified model The List operation correspondingly converts to the List operation of each element in the two or more elements in the cloud resource model.
在本发明一实施例中,采用XML文件形式对所述模型元素间一对一映射关系、所述模型元素间多对一映射关系以及所述模型元素间一对多映射关系中的模型操作进行描述。In an embodiment of the present invention, the model operations in the one-to-one mapping relationship between the model elements, the many-to-one mapping relationship between the model elements, and the one-to-many mapping relationship between the model elements are performed in the form of an XML file describe.
相较于现有技术,本发明具有以下有益效果:采用本发明所提出的一种基于模型的混合云构造方法,开发人员仅需要定义统一模型与云资源模型间的元素映射关系,任何统一模型上的管理操作就能够自动转换为云资源模型上对应的管理操作,并最终作用到云资源上。而且,开发人员能够面向统一模型进行管理程序的开发,而不用处理管理接口调用及底层数据交互等繁杂、琐碎的编程工作。有效地能够降低混合云管理系统开发的难度和复杂度。Compared with the prior art, the present invention has the following beneficial effects: using a model-based hybrid cloud construction method proposed by the present invention, developers only need to define the element mapping relationship between the unified model and the cloud resource model, any unified model The management operations on the cloud resource model can be automatically converted to the corresponding management operations on the cloud resource model, and finally act on the cloud resources. Moreover, developers can develop management programs for a unified model without having to deal with complicated and trivial programming tasks such as management interface calls and underlying data interactions. It can effectively reduce the difficulty and complexity of hybrid cloud management system development.
附图说明Description of drawings
图1为本发明一种基于模型的混合云构造方法的框架示意图。FIG. 1 is a schematic framework diagram of a model-based hybrid cloud construction method in the present invention.
图2为本发明一种基于模型的混合云构造方法中使用者模型的示意图。FIG. 2 is a schematic diagram of a user model in a model-based hybrid cloud construction method of the present invention.
图3为本发明一种基于模型的混合云构造方法中管理员模型的示意图。FIG. 3 is a schematic diagram of an administrator model in a model-based hybrid cloud construction method of the present invention.
图4为本发明一种基于模型的混合云构造方法中云资源模型与运行系统的同步过程示意图。FIG. 4 is a schematic diagram of a synchronization process between a cloud resource model and an operating system in a model-based hybrid cloud construction method according to the present invention.
图5为本发明一种基于模型的混合云构造方法中模型操作的映射规则示意图。FIG. 5 is a schematic diagram of mapping rules for model operations in a model-based hybrid cloud construction method according to the present invention.
图6为本发明一种基于模型的混合云构造方法中模型操作描述示意图。FIG. 6 is a schematic diagram illustrating model operation in a model-based hybrid cloud construction method of the present invention.
具体实施方式Detailed ways
下面结合附图,对本发明的技术方案进行具体说明。The technical solution of the present invention will be specifically described below in conjunction with the accompanying drawings.
本发明提出一种基于模型的混合云构造方法,通过一模型同步中间件对一统一模型到一云资源模型的元素映射关系进行设定,使得所述统一模型上的管理操作自动转换为所述云资源模型上对应的管理操作,并作用到云平台的云资源上,完成模型间的同步关系。The present invention proposes a model-based hybrid cloud construction method, which sets the element mapping relationship from a unified model to a cloud resource model through a model synchronization middleware, so that the management operations on the unified model are automatically converted to the described The corresponding management operations on the cloud resource model are applied to the cloud resources of the cloud platform to complete the synchronization relationship between the models.
如图1所示,所述统一模型通过所述云平台共有资源类型以及管理功能进行描述,并提供对异构云平台进行管理的统一视图;在本实施例中,统一模型是在云计算平台领域知识的基础上,对常见云平台共有的资源类型及管理功能进行描述,让管理员可以通过统一视图对异构云平台进行管理。As shown in Figure 1, the unified model is described through the common resource types and management functions of the cloud platform, and provides a unified view for managing heterogeneous cloud platforms; in this embodiment, the unified model is in the cloud computing platform On the basis of domain knowledge, describe the common resource types and management functions of common cloud platforms, so that administrators can manage heterogeneous cloud platforms through a unified view.
所述云资源模型用于屏蔽云平台管理接口异构性,并通过所述云平台中受管模块的功能信息以及所述云平台管理接口的调用方法进行描述;在本实施例中,云资源模型屏蔽云平台管理接口的异构性,管理员仅需要对云平台受管模块的功能信息和云平台管理接口的调用方法进行描述,就可以在模型层对云计算平台进行管理。The cloud resource model is used to shield the heterogeneity of the cloud platform management interface, and is described through the function information of the managed module in the cloud platform and the calling method of the cloud platform management interface; in this embodiment, the cloud resource The model shields the heterogeneity of the cloud platform management interface. The administrator only needs to describe the function information of the cloud platform managed module and the calling method of the cloud platform management interface to manage the cloud computing platform at the model layer.
所述模型同步中间件用于将所述统一模型映射到所述云资源模型;在本实施例中,模型同步中间件实现统一模型到云资源模型的映射,屏蔽不同类型云平台的运行时软件体系结构模型的差异。The model synchronization middleware is used to map the unified model to the cloud resource model; in this embodiment, the model synchronization middleware realizes the mapping from the unified model to the cloud resource model, and shields runtime software of different types of cloud platforms Differences in architectural models.
进一步的,在本实施例中,管理员仅需要对统一模型到云资源模型的元素映射关系进行定义,转换方法就能够自动生成相应的模型转换程序,以保障模型间的同步关系,让管理员可以面向云平台统一模型进行混合云管理程序开发。Furthermore, in this embodiment, the administrator only needs to define the element mapping relationship between the unified model and the cloud resource model, and the conversion method can automatically generate the corresponding model conversion program to ensure the synchronization relationship between the models, allowing the administrator Hybrid cloud hypervisor development can be carried out for the cloud platform unified model.
混合云管理实际上是对不同类型的公有云服务或企业私有云进行协同管理。进一步的,在本实施例中,在云计算平台领域知识的基础上,提出一种云平台软件体系结构的统一模型,对常见云平台共有的资源类型及管理操作进行描述。如图2以及图3所示,所述统一模型包括:对云平台使用者资源进行统一管理的使用者模型以及为云平台管理提供全局视图的管理员模型;Hybrid cloud management is actually the collaborative management of different types of public cloud services or enterprise private clouds. Furthermore, in this embodiment, based on the domain knowledge of the cloud computing platform, a unified model of cloud platform software architecture is proposed to describe common resource types and management operations of common cloud platforms. As shown in Figures 2 and 3, the unified model includes: a user model that uniformly manages cloud platform user resources and an administrator model that provides a global view for cloud platform management;
使用者模型能够对云平台使用者所拥有的计算、存储、网络等资源进行统一管理,其资源分配的最小单元是虚拟机server,每个虚拟机都存在一个项目project中。如图2所示,所述使用者模型的受管单元包括:描述使用者基本信息的使用者Account、描述项目基本信息以及所述云平台使用者资源分配情况的项目Project、表示虚拟机映像文件的虚拟机映像Image、表示虚拟机资源配置类型的资源配置类型ServerType、描述子网基本信息的网络子网Network、为虚拟机增加额外存储的磁盘卷Volume、描述虚拟机基本信息的虚拟机Server。使用者Account包含该使用者所有关联项目的列表Projects。项目Project描述项目的基本信息,以及计算、存储、网络等资源的分配情况,允许多个使用者共享虚拟资源,因此,Project包含该项目所有关联使用者的列表ProjectAccounts。Image表示一个虚拟机映像文件,是虚拟机软件系统的载体,Images则表示项目可以使用的虚拟机映像文件的集合。ServerType表示虚拟机资源配置类型,描述了CPU、内存、存储等资源配置信息,ServerTypes则表示项目可以使用的虚拟机资源配置类型的集合。Network表示网络子网,描述该子网的基本信息,并包含该子网拥有的所有公共IP地址的列表PublicIps;PublicIp表示可供外部网络访问的Ip地址,为网络子网中拥有该IP地址的虚拟机提供外部网络的访问入口。Volume表示磁盘卷,可为虚拟机增加额外的存储,Volumes则表示项目中所有磁盘卷的集合。Server表示虚拟机,描述虚拟机的映像文件imageId、资源配置等基本信息,其中,资源配置信息可以通过指定虚拟机配置类型serverTypeId或设置CPU、内存、磁盘等属性值两种方式进行描述;同时,Server还包含虚拟机所使用的虚拟网卡的列表Nics;Nic表示虚拟网卡,描述虚拟网卡的ip地址、mac地址,以及所在的网络子网等网络配置信息。The user model can uniformly manage computing, storage, network and other resources owned by cloud platform users. The smallest unit of resource allocation is a virtual machine server, and each virtual machine exists in a project. As shown in Figure 2, the managed unit of the user model includes: the user Account describing the basic information of the user, the project Project describing the basic information of the project and the resource allocation of the cloud platform user, and the virtual machine image file The virtual machine image Image, the resource configuration type ServerType indicating the virtual machine resource configuration type, the network subnet Network describing the basic information of the subnet, the disk volume Volume adding additional storage for the virtual machine, and the virtual machine Server describing the basic information of the virtual machine. A user Account contains a list Projects of all associated projects for that user. The project Project describes the basic information of the project, as well as the allocation of resources such as computing, storage, and network, and allows multiple users to share virtual resources. Therefore, the Project contains the list ProjectAccounts of all associated users of the project. Image represents a virtual machine image file, which is the carrier of the virtual machine software system, and Images represents a collection of virtual machine image files that can be used by the project. ServerType represents the type of virtual machine resource configuration, which describes resource configuration information such as CPU, memory, and storage, and ServerTypes represents the collection of virtual machine resource configuration types that can be used by the project. Network represents a network subnet, describes the basic information of the subnet, and contains a list of all public IP addresses owned by the subnet PublicIps; PublicIp represents the IP address accessible from the external network, which is the IP address in the network subnet The virtual machine provides access to the external network. Volume represents a disk volume, which can add additional storage to a virtual machine, and Volumes represents a collection of all disk volumes in the project. Server represents a virtual machine and describes basic information such as the image file imageId and resource configuration of the virtual machine. The resource configuration information can be described by specifying the virtual machine configuration type serverTypeId or setting attribute values such as CPU, memory, and disk; at the same time, The Server also includes a list Nics of virtual network cards used by the virtual machine; Nic represents a virtual network card, and describes network configuration information such as an ip address, a mac address, and a network subnet of the virtual network card.
此外,在本实施例中,使用者模型的主要受管单元均包含cloudName属性以及dataCenterId属性,分别表示该主要受管单元所属的云平台以及数据中心。In addition, in this embodiment, each main managed unit of the user model includes a cloudName attribute and a dataCenterId attribute, respectively indicating the cloud platform and the data center to which the main managed unit belongs.
管理员模型能够为云平台管理提供一个的全局视图,对计算、存储、网络等资源进行统一管理。在本实施例中所示,如图3所示,所述管理员模型的受管单元包括:数据中心DataCenter、为虚拟机提供运行环境以及描述虚拟化软件物理节点中计算资源信息的物理机ComputeNode、描述了映像文件操作系统类型基本信息的公共虚拟机映像文件PublicImage、提供多种形式存储管理的虚拟机映像文件存储池ImageStore、虚拟机磁盘卷存储池VolumeStore、描述云平台公共网络资源中公共IP资源的网络资源PublicNetwork、以及项目Project和使用者Account等。如图3所示,CloudManagement是管理员模型的根元素,其包含:数据中心列表DataCenters、项目列表Projects和使用者列表Accounts;其中,Projects表示所有项目的集合,Accounts表示所有使用者的集合;在本实施例中,管理员模型中的项目以及使用者均与使用者模型中项目以及使用者的配置以及功能相同。DataCenter表示数据中心,包含物理机列表ComputeNodes、公共虚拟机映像文件列表PublicImages、公共虚拟机资源配置类型列表ServerTypes、映像文件存储池列表ImageStores、磁盘卷存储池列表VolumeStores、网络资源列表PublicNetworks。ComputeNode表示安装虚拟化软件的物理节点,为虚拟机提供运行环境,描述了物理节点的计算资源等信息。PublicImage表示公共虚拟机映像文件,可供所有项目使用,描述了映像文件的操作系统类型等基本信息。ServerType表示公共虚拟机资源配置类型,可供所有项目使用,描述了虚拟机CPU、内存、磁盘等配置信息。ImageStore表示虚拟机映像文件的存储池提供了NFS、AmazonS3等多种形式的存储管理。VolumeStore则表示虚拟机磁盘卷的存储池,包含SCSI、FC-SAN等多种形式。PublicNetwork表示云平台拥有的公共网络资源,包含IP网段列表IpRanges,描述了可供使用的公共IP资源。与使用者模型类似,管理员模型的受管单元也包含cloudName和dataCenterId属性,分别指出该受管单元所属的云平台及数据中心。The administrator model can provide a global view for cloud platform management, and perform unified management of computing, storage, network and other resources. As shown in this embodiment, as shown in FIG. 3 , the managed units of the administrator model include: a data center DataCenter, a physical machine ComputeNode that provides an operating environment for a virtual machine, and describes computing resource information in a virtualized software physical node , the public virtual machine image file PublicImage that describes the basic information of the operating system type of the image file, the virtual machine image file storage pool ImageStore that provides various forms of storage management, the virtual machine disk volume storage pool VolumeStore, and the description of the public IP in the public network resources of the cloud platform The network resource PublicNetwork of the resource, as well as the project Project and the user Account, etc. As shown in Figure 3, CloudManagement is the root element of the administrator model, which includes: data center list DataCenters, project list Projects, and user list Accounts; among them, Projects represents the collection of all projects, and Accounts represents the collection of all users; In this embodiment, the configuration and functions of the items and users in the administrator model are the same as those of the items and users in the user model. DataCenter represents a data center, including the physical machine list ComputeNodes, the public virtual machine image file list PublicImages, the public virtual machine resource configuration type list ServerTypes, the image file storage pool list ImageStores, the disk volume storage pool list VolumeStores, and the network resource list PublicNetworks. ComputeNode indicates the physical node where the virtualization software is installed, provides the running environment for the virtual machine, and describes the computing resources of the physical node and other information. PublicImage represents a public virtual machine image file, which can be used by all projects, and describes basic information such as the operating system type of the image file. ServerType indicates the configuration type of public virtual machine resources, which can be used by all projects, and describes the configuration information of virtual machine CPU, memory, disk, etc. ImageStore indicates that the storage pool of virtual machine image files provides various forms of storage management such as NFS and AmazonS3. VolumeStore represents the storage pool of virtual machine disk volumes, including SCSI, FC-SAN and other forms. PublicNetwork represents the public network resources owned by the cloud platform, including the IP network segment list IpRanges, which describes the available public IP resources. Similar to the user model, the managed unit of the administrator model also includes cloudName and dataCenterId attributes, which respectively indicate the cloud platform and data center to which the managed unit belongs.
为了使管理员能够通过模型读写实现系统监控,云资源模型与云平台运行时系统需要保持因果关联:系统的任何运行时信息均将反映到云资源模型上,而云资源模型的任何变化也会作用到运行系统上。In order to enable administrators to implement system monitoring through model reading and writing, the cloud resource model and the cloud platform runtime system need to maintain a causal relationship: any runtime information of the system will be reflected on the cloud resource model, and any changes in the cloud resource model will also will affect the running system.
云平台管理接口的异构性给混合云管理系统开发带来极大的复杂度,在本实施例中,采用代理机制进行云资源模型的构造,并通过云资源模型实现在模型层对单一的云计算平台进行管理。代理机制对目标系统使用到的管理逻辑做统一的梳理,针对一些通用的应用场景做相应的开发,通过对管理接口的封装,为开发提供统一和简便的相关接口,并维护目标运行系统与体系结构层的双向同步。代理机制面向目标系统构造模型主要分为两个部分:The heterogeneity of the cloud platform management interface brings great complexity to the development of the hybrid cloud management system. In this embodiment, the proxy mechanism is used to construct the cloud resource model, and through the cloud resource model, a single Cloud computing platform for management. The proxy mechanism unifies the management logic used by the target system, and develops correspondingly for some general application scenarios. By encapsulating the management interface, it provides a unified and convenient related interface for development, and maintains the target operating system and system Bi-directional synchronization of fabric layers. The agent mechanism-oriented system construction model is mainly divided into two parts:
(1)描述目标系统体系结构(1) Describe the target system architecture
在代理机制中,用模型元素描述体系结构的类,用模型元素属性描述类的属性,并且可以在元素中描述与其它元素的关联关系。所有元素将组织成一个以顶层元素为根的树,本质上等价于一个类图,每一个模型元素对应于其中的一个类,并且可以描述模型元素之间的关系,从而用体系结构层反应目标系统。In the proxy mechanism, the class of the architecture is described by the model element, the attribute of the class is described by the attribute of the model element, and the relationship with other elements can be described in the element. All elements will be organized into a tree with the top-level element as the root, which is essentially equivalent to a class diagram, each model element corresponds to one of the classes, and can describe the relationship between model elements, thus using the architecture layer to respond target system.
(2)描述目标系统管理能力(2) Describe the target system management capabilities
描述完目标系统的体系结构,为了使体系结构与运行系统实现数据的实时同步关联。开发人员可以通过代理机制,在每个模型元素中描述其属性值的来源以及对属性的管理方法,例如通过数据库、文件等介质对运行系统的数据进行读写,或调用运行系统提供的管理API对运行系统进行操作等方式,从而使代理机制中的元素具备对运行系统的访问能力。模型元素属性的值来源的方式可以是外部事实对象、固定值、固定散列值、动态Sql语句、外部函数等等,其中最常用的两种方式是通过动态Sql语句对数据库中的数据进行操作,以及通过外部函数的方式封装管理API。After describing the architecture of the target system, in order to realize the real-time synchronous correlation of data between the architecture and the running system. Developers can use the proxy mechanism to describe the source of its attribute value and the management method of the attribute in each model element, such as reading and writing the data of the running system through a medium such as a database or a file, or calling the management API provided by the running system Operate the operating system, etc., so that the elements in the proxy mechanism have access to the operating system. The value sources of model element attributes can be external fact objects, fixed values, fixed hash values, dynamic Sql statements, external functions, etc., and the two most commonly used methods are to operate on data in the database through dynamic Sql statements , and encapsulate the management API through external functions.
完成以上两个部分工作,代理机制能自动生成同步引擎,以支持体系结构与运行系统间的双向同步。After completing the above two parts, the agent mechanism can automatically generate a synchronization engine to support the two-way synchronization between the architecture and the operating system.
进一步的,在本实施例中,开发人员通过采用代理机制生成所述云资源模型,并按照如下步骤实现:Further, in this embodiment, the developer generates the cloud resource model by using a proxy mechanism, and implements it according to the following steps:
步骤S11:描述所述云资源模型的体系结构;将云资源的受管单元描述为代理机制中的模型元素,并将受管单元的属性描述为所述模型元素对应的属性;Step S11: Describe the architecture of the cloud resource model; describe the managed units of the cloud resources as model elements in the proxy mechanism, and describe the attributes of the managed units as attributes corresponding to the model elements;
步骤S12:描述云平台双系统的管理能力;通过将云平台运行系统的管理API嵌入所述模型元素的属性中,在所述模型元素中描述属性的管理方法;Step S12: describe the management capability of the cloud platform dual system; by embedding the management API of the cloud platform operating system into the attribute of the model element, describe the management method of the attribute in the model element;
步骤S13:所述代理机制生成同步引擎,以支持所述云资源模型与所述云平台运行系统的双向同步。Step S13: The proxy mechanism generates a synchronization engine to support the two-way synchronization between the cloud resource model and the cloud platform operating system.
通过上述过程,云平台运行系统的任何运行时信息均将反映到云资源模型上,而云资源模型的任何变化也会作用到运行系统上。如图4所示,同步引擎为云平台中每一个虚拟机在云资源模型中创建一个可管理的“虚拟机”模型单元;而当某个“虚拟机”模型单元被删除的时候,同步引擎也能够发现云资源模型的变化,确定目标虚拟机并将其在云平台中关闭。Through the above process, any runtime information of the cloud platform operating system will be reflected on the cloud resource model, and any change in the cloud resource model will also be applied to the operating system. As shown in Figure 4, the synchronization engine creates a manageable "virtual machine" model unit in the cloud resource model for each virtual machine in the cloud platform; and when a "virtual machine" model unit is deleted, the synchronization engine It is also able to detect changes in the cloud resource model, determine the target virtual machine and shut it down in the cloud platform.
在本实施例中,统一模型为云计算平台的使用和管理分别提供了统一视图,为了进一步使使用者和管理员能够通过统一模型对云资源进行操作,需要实现统一模型到云资源模型的映射。In this embodiment, the unified model provides a unified view for the use and management of the cloud computing platform. In order to further enable users and administrators to operate cloud resources through the unified model, it is necessary to realize the mapping from the unified model to the cloud resource model .
映射规则用于描述统一模型到云资源模型的元素映射关系,任何一个统一模型中的元素属性与一个云资源模型中相应的元素属性保持值的对应,且任何一组统一模型上的模型操作转换为一组云资源模型上元素相应的操作以达到预期的管理效果。模型元素间存在三种基本映射关系,其他映射关系均可表示为以下三种基本映射关系的组合。进一步的,在本实施例中,映射关系包括:模型元素间一对一映射关系、模型元素间多对一映射关系以及模型元素间一对多映射关系。The mapping rules are used to describe the element mapping relationship between the unified model and the cloud resource model. The element attributes in any unified model and the corresponding element attributes in a cloud resource model maintain value correspondence, and the model operation conversion on any set of unified models Perform corresponding operations on elements on a set of cloud resource models to achieve expected management effects. There are three basic mapping relationships between model elements, and other mapping relationships can be expressed as a combination of the following three basic mapping relationships. Further, in this embodiment, the mapping relationship includes: a one-to-one mapping relationship between model elements, a many-to-one mapping relationship between model elements, and a one-to-many mapping relationship between model elements.
所述模型元素间一对一映射关系包括:所述统一模型中的一个元素与所述云资源模型中的一个元素相对应,所述统一模型中该元素的属性与所述云资源模型中元素的属性中相对应,统一模型中元素的属性可以在云资源模型中对应的元素中找到对应的属性。通常是指统一模型中存在一种元素,云资源模型中也存在一种元素,它们均是为了描述同一类型的事物。The one-to-one mapping relationship between the model elements includes: an element in the unified model corresponds to an element in the cloud resource model, and an attribute of the element in the unified model corresponds to an element in the cloud resource model Corresponding in the attribute of the element, the attribute of the element in the unified model can find the corresponding attribute in the corresponding element in the cloud resource model. It usually means that there is an element in the unified model, and there is also an element in the cloud resource model, both of which are used to describe the same type of things.
所述模型元素间多对一映射关系包括:所述统一模型中的两个或多个元素与所述云资源模型中的一个元素相对应,所述云资源模型中该元素的属性对应分布在所述统一模型中两个或多个元素的属性中。通常是指统一模型中存在两种或两种以上的元素,共同描述某一事物,而云资源模型中仅用一种元素来描述这一事物。The many-to-one mapping relationship between model elements includes: two or more elements in the unified model correspond to one element in the cloud resource model, and the attributes of the element in the cloud resource model are correspondingly distributed in In the attributes of two or more elements in the unified model. Usually, it means that there are two or more elements in the unified model that jointly describe a certain thing, while only one element is used to describe this thing in the cloud resource model.
所述模型元素间一对多映射关系包括:所述统一模型中的一个元素与所述云资源模型中的两个或多个元素对应,所述统一模型中该元素的属性与所述云资源模型中两个或多个元素的属性对应。通常是指统一模型中存在一种元素,用来描述某一类事物,而云资源模型中的两种或多种类型的元素分别描述该类事物的不同子类型事物。The one-to-many mapping relationship between the model elements includes: one element in the unified model corresponds to two or more elements in the cloud resource model, and the attribute of the element in the unified model corresponds to the cloud resource A property correspondence between two or more elements in a model. It usually means that there is one element in the unified model, which is used to describe a certain type of thing, and two or more types of elements in the cloud resource model respectively describe different subtypes of this type of thing.
进一步的,在本实施例中,统一模型中的元素属性值与云资源模型中的元素属性值也存在映射关系,即同一种功能或内涵的配置参数或系统指标,在统一模型和云资源模型中有着不同的值表示。如,虚拟机配置信息“CPU:2.5GHz;Memory:1G”在统一模型中表示为属性ServerTypeId的值为“small”,在云资源模型中则表示为属性ServiceOffering的值为“a7d50774-d553-4ea6-b03e-6a168af2de14”;因此,在统一模型到云资源模型的映射过程中,也需要保持其值的对应关系。Further, in this embodiment, there is also a mapping relationship between element attribute values in the unified model and element attribute values in the cloud resource model, that is, configuration parameters or system indicators of the same function or connotation are in the unified model and cloud resource model There are different value representations in . For example, the virtual machine configuration information "CPU: 2.5GHz; Memory: 1G" is expressed as the value of the attribute ServerTypeId "small" in the unified model, and the value of the attribute ServiceOffering is "a7d50774-d553-4ea6" in the cloud resource model -b03e-6a168af2de14"; therefore, in the process of mapping from the unified model to the cloud resource model, it is also necessary to maintain the corresponding relationship of its values.
云平台使用者和管理员通过模型操作进行系统参数的监测和管理任务的执行。在所述映射关系的设定过程中,包括以下模型操作:Get操作、Set操作、List操作、Add操作以及Remove操作。为了实现统一模型到云平台运行时模型的映射,需要将任何一个统一模型上的模型操作转换为一个云资源模型上对应的模型操作,以达到预期的管理效果。如图5所示,为本实施例中的模型操作的映射规则。Cloud platform users and administrators monitor system parameters and execute management tasks through model operations. In the process of setting the mapping relationship, the following model operations are included: Get operation, Set operation, List operation, Add operation and Remove operation. In order to realize the mapping from the unified model to the runtime model of the cloud platform, it is necessary to convert any model operation on a unified model into a corresponding model operation on a cloud resource model to achieve the expected management effect. As shown in FIG. 5 , it is the mapping rule of the model operation in this embodiment.
在设定所述模型元素间一对一映射关系过程中,所述统一模型中元素的Add操作、Remove操作或List操作对应转换为所述云资源模型中元素的Add操作、Remove操作或List操作,所述统一模型中该元素属性的Get操作或Set操作转换为所述云资源模型中对应元素属性的Get操作或Set操作。在本实施例中,图5所示,存在统一模型中元素A与云资源模型中元素B对应;那么,对元素A的Add转换成对元素B的相同操作,对元素A属性的Get操作或Set操作则转换成对元素B对应属性的相同操作。In the process of setting the one-to-one mapping relationship between the model elements, the Add operation, Remove operation or List operation of the element in the unified model is correspondingly converted into the Add operation, Remove operation or List operation of the element in the cloud resource model , the Get operation or Set operation of the element attribute in the unified model is converted into the Get operation or Set operation of the corresponding element attribute in the cloud resource model. In this embodiment, as shown in FIG. 5, there is a correspondence between element A in the unified model and element B in the cloud resource model; then, the Add to element A is converted into the same operation on element B, and the Get operation on the attribute of element A or The Set operation is transformed into the same operation on the corresponding attribute of element B.
在设定所述模型元素间多对一映射关系过程中,所述统一模型中的两个或多个元素的Add操作、Remove操作或List操作对应转换为所述云资源模型中元素的Add操作、Remove操作或List操作,所述统一模型中的两个或多个元素中每个元素属性的Get操作或Set操作分别转换为所述云资源模型中元素对应属性的Get操作或Set操作;在本实施例中,如图5所示,存在统一模型中的元素A与云资源模型中元素B对应,且元素B的某些属性同时与统一模型中C元素的属性关联;那么,对元素A和元素C属性的Get操作或Set操作转换成对元素B对应属性的Get操作或Set操作,对元素A的Add操作、Remove操作或List操作则转化成对元素B的相同操作,特别的,当元素B被创建时,属性的初始值同时从元素A和元素C中获取。In the process of setting the many-to-one mapping relationship between the model elements, the Add operation, Remove operation or List operation of two or more elements in the unified model is correspondingly converted into the Add operation of the elements in the cloud resource model , Remove operation or List operation, the Get operation or Set operation of each element attribute in the two or more elements in the unified model is respectively converted into the Get operation or Set operation of the corresponding attribute of the element in the cloud resource model; In this embodiment, as shown in Figure 5, element A in the unified model corresponds to element B in the cloud resource model, and some attributes of element B are associated with attributes of element C in the unified model; then, for element A The Get operation or Set operation on the attribute of element C is converted into the Get operation or Set operation on the corresponding attribute of element B, and the Add operation, Remove operation or List operation on element A is converted into the same operation on element B. In particular, when When element B is created, the initial value of the attribute is obtained from both element A and element C.
在设定所述模型元素间一对多映射关系过程中,所述统一模型中元素的Add操作或Remove操作对应转换为所述云资源模型中两个或多个元素中任一元素的Add操作或Remove操作;所述统一模型中元素属性的Get操作或Set操作对应转换为所述云资源模型中两个或多个元素中每个元素属性的Get操作或Set操作;所述统一模型中元素的List操作对应转换为所述云资源模型中两个或多个元素中每个元素的List操作;在本实施例中,如图5所示,存在统一模型中的元素A与云资源模型中元素B或元素C对应;那么,对元素A及其属性的操作转化成对其对应元素和属性的相同操作;特别地,对元素A的List操作则转换成同时对元素B和元素C执行List操作。In the process of setting the one-to-many mapping relationship between the model elements, the Add operation or Remove operation of the element in the unified model is correspondingly converted into the Add operation of any one of the two or more elements in the cloud resource model or Remove operation; the Get operation or Set operation of the element attribute in the unified model is correspondingly converted into the Get operation or Set operation of each element attribute in two or more elements in the cloud resource model; the element in the unified model The List operation correspondingly converts to the List operation of each element in two or more elements in the cloud resource model; in this embodiment, as shown in Figure 5, there is element A in the unified model and the cloud resource model Element B or element C corresponds; then, the operation on element A and its attributes is transformed into the same operation on its corresponding element and attribute; in particular, the List operation on element A is transformed into performing List on element B and element C at the same time operate.
通过上述映射规则进行模型操作转换,任何作用在统一模型上的操作将映射为作用在云资源模型上的对应操作。如图6所示,在本实施例中,采用XML文件形式对所述模型元素间一对一映射关系、所述模型元素间多对一映射关系以及所述模型元素间一对多映射关系中的模型操作进行描述。同时,根据云平台基本信息,传送到目标云资源模型并执行,以实现预期的管理效果。Through the above mapping rules for model operation transformation, any operation acting on the unified model will be mapped to the corresponding operation acting on the cloud resource model. As shown in Figure 6, in this embodiment, the one-to-one mapping relationship between the model elements, the many-to-one mapping relationship between the model elements, and the one-to-many mapping relationship between the model elements are recorded in the form of an XML file. The model operation is described. At the same time, according to the basic information of the cloud platform, it is transmitted to the target cloud resource model and executed to achieve the expected management effect.
以上是本发明的较佳实施例,凡依本发明技术方案所作的改变,所产生的功能作用未超出本发明技术方案的范围时,均属于本发明的保护范围。The above are the preferred embodiments of the present invention, and all changes made according to the technical solution of the present invention, when the functional effect produced does not exceed the scope of the technical solution of the present invention, all belong to the protection scope of the present invention.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510610313.3ACN105141702A (en) | 2015-09-23 | 2015-09-23 | Model-based mixed cloud construction method |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510610313.3ACN105141702A (en) | 2015-09-23 | 2015-09-23 | Model-based mixed cloud construction method |
| Publication Number | Publication Date |
|---|---|
| CN105141702Atrue CN105141702A (en) | 2015-12-09 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201510610313.3APendingCN105141702A (en) | 2015-09-23 | 2015-09-23 | Model-based mixed cloud construction method |
| Country | Link |
|---|---|
| CN (1) | CN105141702A (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105939375A (en)* | 2016-04-13 | 2016-09-14 | 福州大学 | PaaS hybrid cloud construction method based on model |
| CN106534306A (en)* | 2016-11-14 | 2017-03-22 | 北京大学(天津滨海)新代信息技术研究院 | Extensible heterogeneous cloud platform adaptation method and system |
| CN107493310A (en)* | 2016-06-13 | 2017-12-19 | 腾讯科技(深圳)有限公司 | A kind of cloud resource processing method and cloud management platform |
| CN107888399A (en)* | 2016-09-29 | 2018-04-06 | 西门子公司 | A kind of platform services PaaS platform management method and device |
| CN109710380A (en)* | 2018-12-25 | 2019-05-03 | 杭州数梦工场科技有限公司 | Manage the method and device of virtual resource in Cloud Server |
| CN110213092A (en)* | 2019-05-21 | 2019-09-06 | 深信服科技股份有限公司 | Resource access method, platform management equipment, storage medium and the device of mixed cloud |
| CN114629770A (en)* | 2022-03-01 | 2022-06-14 | 北京计算机技术及应用研究所 | Unified management method for heterogeneous cloud platform |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103473437A (en)* | 2013-08-02 | 2013-12-25 | 福州大学 | Cloud service platform selection method based on fuzzy ideal target analysis |
| WO2014058411A1 (en)* | 2012-10-08 | 2014-04-17 | Hewlett-Packard Development Company, L.P. | Hybrid cloud environment |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2014058411A1 (en)* | 2012-10-08 | 2014-04-17 | Hewlett-Packard Development Company, L.P. | Hybrid cloud environment |
| CN103473437A (en)* | 2013-08-02 | 2013-12-25 | 福州大学 | Cloud service platform selection method based on fuzzy ideal target analysis |
| Title |
|---|
| 陈星等: "基于运行时模型的多样化云资源管理方法", 《软件学报》* |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105939375A (en)* | 2016-04-13 | 2016-09-14 | 福州大学 | PaaS hybrid cloud construction method based on model |
| CN107493310A (en)* | 2016-06-13 | 2017-12-19 | 腾讯科技(深圳)有限公司 | A kind of cloud resource processing method and cloud management platform |
| CN107493310B (en)* | 2016-06-13 | 2020-08-21 | 腾讯科技(深圳)有限公司 | Cloud resource processing method and cloud management platform |
| CN107888399A (en)* | 2016-09-29 | 2018-04-06 | 西门子公司 | A kind of platform services PaaS platform management method and device |
| CN106534306A (en)* | 2016-11-14 | 2017-03-22 | 北京大学(天津滨海)新代信息技术研究院 | Extensible heterogeneous cloud platform adaptation method and system |
| CN109710380A (en)* | 2018-12-25 | 2019-05-03 | 杭州数梦工场科技有限公司 | Manage the method and device of virtual resource in Cloud Server |
| CN110213092A (en)* | 2019-05-21 | 2019-09-06 | 深信服科技股份有限公司 | Resource access method, platform management equipment, storage medium and the device of mixed cloud |
| CN114629770A (en)* | 2022-03-01 | 2022-06-14 | 北京计算机技术及应用研究所 | Unified management method for heterogeneous cloud platform |
| CN114629770B (en)* | 2022-03-01 | 2024-04-19 | 北京计算机技术及应用研究所 | Unified management method for heterogeneous cloud platform |
| Publication | Publication Date | Title |
|---|---|---|
| US11709705B2 (en) | Event proxies for functions-as-a-service (FaaS) infrastructures | |
| US9946578B2 (en) | Managing the persistent data of a pre-installed application in an elastic virtual machine instance | |
| US11385892B1 (en) | Optimal software architecture recommendations by an application modernization service | |
| CN105141702A (en) | Model-based mixed cloud construction method | |
| AU2014311782B2 (en) | Scalable distributed storage architecture | |
| US8336047B2 (en) | Provisioning virtual resources using name resolution | |
| CN103051710B (en) | A kind of virtual cloud platform management system | |
| US8490091B2 (en) | Virtual machine placement to improve memory utilization | |
| US9600308B2 (en) | Virtual machine monitoring in cloud infrastructures | |
| US9063789B2 (en) | Hybrid cloud integrator plug-in components | |
| US9009697B2 (en) | Hybrid cloud integrator | |
| US12124561B2 (en) | Embedding security requirements in container images | |
| US20190079744A1 (en) | Systems and methods for a policy-driven orchestration of deployment of distributed applications | |
| US20110119669A1 (en) | Hypervisor file system | |
| US9529933B2 (en) | Dynamic assignment of business logic based on schema mapping metadata | |
| WO2019057055A1 (en) | Task processing method and apparatus, electronic device, and storage medium | |
| CN105939375A (en) | PaaS hybrid cloud construction method based on model | |
| US8707005B2 (en) | Data control systems for virtual environments | |
| CN206149327U (en) | An information cloud management platform and enterprise information system | |
| CN103473113A (en) | A General Virtual Machine Adoption Method | |
| US9229659B2 (en) | Identifying and accessing reference data in an in-memory data grid | |
| CN108809715A (en) | A kind of method and device of deployment management platform | |
| CN118151891B (en) | Application management method and related equipment | |
| US12423334B2 (en) | Collecting and supporting querying of high-cardinality time-series data | |
| US20230195514A1 (en) | Uniform addressing in business process engine |
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| RJ01 | Rejection of invention patent application after publication | Application publication date:20151209 | |
| RJ01 | Rejection of invention patent application after publication |