CN110955409A - Method and device for creating resources on cloud platform - Google Patents

Method and device for creating resources on cloud platform Download PDF

Info

Publication number
CN110955409A
CN110955409A CN201911215737.4A CN201911215737A CN110955409A CN 110955409 A CN110955409 A CN 110955409A CN 201911215737 A CN201911215737 A CN 201911215737A CN 110955409 A CN110955409 A CN 110955409A
Authority
CN
China
Prior art keywords
resource
target demand
target
configuration information
creation
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.)
Granted
Application number
CN201911215737.4A
Other languages
Chinese (zh)
Other versions
CN110955409B (en
Inventor
武建东
李涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhengzhou Apas Digital Cloud Information Technology Co Ltd
Original Assignee
Zhengzhou Apas Digital Cloud Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhengzhou Apas Digital Cloud Information Technology Co Ltd filed Critical Zhengzhou Apas Digital Cloud Information Technology Co Ltd
Priority to CN201911215737.4A priority Critical patent/CN110955409B/en
Publication of CN110955409A publication Critical patent/CN110955409A/en
Application granted granted Critical
Publication of CN110955409B publication Critical patent/CN110955409B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/10Requirements analysis; Specification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45595Network integration; Enabling network access in virtual machine instances
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

An embodiment of the present specification provides a method and an apparatus for creating a resource on a cloud platform, where the method includes: responding to a resource creating instruction of a user, acquiring resource demand information of the user, analyzing the information to obtain a resource identifier of a target demand resource, a creating dependency relationship between resource configuration information of the target demand resource and the target demand resource, and responding to the resource creating instruction, acquiring a resource identifier of an existing resource and resource configuration information of the existing resource on the cloud platform; and generating a resource creation plan according to the resource identification of the target demand resource, the resource configuration information of the target demand resource, the resource identification of the existing resource, the resource configuration information of the existing resource and the creation dependency relationship between the target demand resource, executing the resource creation plan, and creating the target demand resource on the cloud platform. Through the embodiment, the problems of low creation efficiency and irregular creation flow when developers manually create resources in the cloud platform can be solved.

Description

Method and device for creating resources on cloud platform
Technical Field
The present document relates to the field of cloud computing, and in particular, to a method and an apparatus for creating resources on a cloud platform.
Background
With the development of internet technology, more and more enterprises create resources in a cloud platform, such as creating resources of virtual machines, disk images and the like, so as to develop products. At present, when a developer creates resources in a cloud platform, the resources are mainly created in a manual mode, for example, when a virtual machine needs to be created, the developer first determines various indexes of the virtual machine to be created, and then the developer manually writes codes according to the indexes to create the virtual machine in the cloud platform.
Because the process of manually writing the codes by developers is complicated, and the code writing modes of different developers are different, the method of manually creating resources in the cloud platform by the developers has the defects of low creating efficiency and irregular creating flow.
Disclosure of Invention
An object of one embodiment of the present specification is to provide a method and an apparatus for creating a resource on a cloud platform, so as to solve the problems of low creation efficiency and irregular creation flow when a developer manually creates a resource in a cloud platform.
To solve the above technical problem, one embodiment of the present specification is implemented as follows:
in a first aspect, an embodiment of the present specification provides a method for creating a resource on a cloud platform, including:
responding to a resource creating instruction of a user, acquiring resource demand information submitted by the user, analyzing the resource demand information to obtain a resource identifier of a target demand resource, resource configuration information of the target demand resource and a creating dependency relationship between the target demand resource, and responding to the resource creating instruction, and acquiring a resource identifier of an existing resource on the cloud platform and resource configuration information of the existing resource;
determining a creation mode of the target demand resource according to the resource identifier of the target demand resource, the resource configuration information of the target demand resource, the resource identifier of the existing resource and the resource configuration information of the existing resource; the creating mode comprises at least one of newly adding resources, modifying resource configuration information of existing resources and taking the existing resources as target demand resources;
generating a resource creation plan according to the resource identification of the target demand resource, the resource configuration information of the target demand resource, the creation mode of the target demand resource and the creation dependency relationship among the target demand resources;
executing the resource creation plan to create the target demand resource on the cloud platform.
In a second aspect, another embodiment of the present specification provides an apparatus for creating a resource on a cloud platform, including:
the analysis module is used for responding to a resource creation instruction of a user, acquiring resource demand information submitted by the user, analyzing the resource demand information to obtain a resource identifier of a target demand resource, a creation dependency relationship between resource configuration information of the target demand resource and the target demand resource, and responding to the resource creation instruction to acquire a resource identifier of an existing resource on the cloud platform and resource configuration information of the existing resource;
a determining module, configured to determine a creating manner of the target demand resource according to the resource identifier of the target demand resource, the resource configuration information of the target demand resource, the resource identifier of the existing resource, and the resource configuration information of the existing resource; the creating mode comprises at least one of newly adding resources, modifying resource configuration information of existing resources and taking the existing resources as target demand resources;
the generating module is used for generating a resource creating plan according to the resource identifier of the target demand resource, the resource configuration information of the target demand resource, the creating mode of the target demand resource and the creating dependency relationship among the target demand resources;
and the execution module is used for executing the resource creation plan so as to create the target demand resource on the cloud platform.
In a third aspect, a further embodiment of the present specification provides an apparatus for creating a resource on a cloud platform, including: memory, a processor and computer-executable instructions stored on the memory and executable on the processor, which when executed by the processor implement the steps of the method of creating resources on a cloud platform as described in the first aspect above.
In a fourth aspect, a further embodiment of the present specification provides a computer-readable storage medium for storing computer-executable instructions which, when executed by a processor, implement the steps of the method of creating resources on a cloud platform as described in the first aspect above.
In the embodiment of the present specification, in response to a resource creation instruction of a user, resource demand information submitted by the user is acquired, the resource demand information is analyzed to obtain a resource identifier of a target demand resource, a creation dependency relationship between resource configuration information of the target demand resource and the target demand resource, and in response to the resource creation instruction of the user, a resource identifier of an existing resource and a resource configuration confidence of the existing resource on a cloud platform are acquired, then, a resource creation plan is generated according to the resource identifier of the target demand resource, the resource configuration information of the target demand resource, the creation dependency relationship between the target demand resources, the resource identifier of the existing resource and the resource configuration information of the existing resource, and finally, the resource creation plan is executed to create the target demand resource on the cloud platform. Therefore, according to the embodiment, the user can automatically create the resource only by submitting the resource requirement information without writing the creation code, the efficiency of creating the resource can be improved, and the user only needs to submit the resource requirement information without writing the creation code, so that the problem of irregular creation flow caused by different code writing modes of different users is avoided, and the flow of creating the resource is standardized.
Drawings
In order to more clearly illustrate the technical solutions in one or more embodiments of the present disclosure, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present disclosure, and for those skilled in the art, other drawings can be obtained according to these drawings without any creative effort.
Fig. 1 is a schematic application scenario diagram of a method for creating a resource on a cloud platform according to an embodiment of the present specification;
FIG. 2 is a flowchart illustrating a method for creating a resource on a cloud platform according to an embodiment of the present disclosure;
fig. 3 is a schematic diagram illustrating a module composition of an apparatus for creating a resource on a cloud platform according to an embodiment of the present specification;
fig. 4 is a schematic structural diagram of an apparatus for creating a resource on a cloud platform according to an embodiment of the present specification.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in one or more embodiments of the present disclosure, the technical solutions in one or more embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in one or more embodiments of the present disclosure, and it is obvious that the described embodiments are only a part of the embodiments of the present disclosure, and not all embodiments. All other embodiments that can be derived by a person skilled in the art from one or more of the embodiments described herein without making any inventive step shall fall within the scope of protection of this document.
An object of one embodiment of the present specification is to provide a method and an apparatus for creating a resource on a cloud platform, so as to solve the problems of low creation efficiency and irregular creation flow when a developer manually creates a resource in a cloud platform.
Fig. 1 is a schematic view of an application scenario of a method for creating resources on a cloud platform according to an embodiment of the present disclosure, and as shown in fig. 1, the scenario includes a computer device and a plurality of cloud platforms, the computer device is illustrated by taking the computer device 100 in fig. 1 as an example, and the plurality of cloud platforms are illustrated by taking the cloud platforms 201, 202, and 203 in fig. 1 as an example. The computer device 100 is installed with a specific application program, a user can submit resource requirement information on the application program and send a resource creation instruction, and the application program can respond to the resource creation instruction of the user and automatically create resources in at least one cloud platform based on the resource requirement information submitted by the user through the method for creating resources in the embodiment of the present specification.
Fig. 2 is a schematic flowchart of a method for creating a resource on a cloud platform according to an embodiment of the present specification, and as shown in fig. 2, the flowchart includes the following steps:
step S202, responding to a resource creating instruction of a user, acquiring resource demand information submitted by the user, analyzing the resource demand information to obtain a resource identifier of a target demand resource, a creating dependency relationship between resource configuration information of the target demand resource and the target demand resource, and responding to the resource creating instruction, acquiring a resource identifier of an existing resource and resource configuration information of the existing resource on a cloud platform;
step S204, determining a creation mode of the target demand resource according to the resource identifier of the target demand resource, the resource configuration information of the target demand resource, the resource identifier of the existing resource and the resource configuration information of the existing resource; the creating mode comprises at least one of newly adding resources, modifying resource configuration information of existing resources and taking the existing resources as target demand resources;
step S206, generating a resource creation plan according to the resource identifier of the target demand resource, the resource configuration information of the target demand resource, the creation mode of the target demand resource and the creation dependency relationship between the target demand resources;
in step S208, the resource creation plan is executed to create the target demand resource on the cloud platform.
In the embodiment of the present specification, in response to a resource creation instruction of a user, resource demand information submitted by the user is acquired, the resource demand information is analyzed to obtain a resource identifier of a target demand resource, a creation dependency relationship between resource configuration information of the target demand resource and the target demand resource, and in response to the resource creation instruction of the user, a resource identifier of an existing resource and a resource configuration confidence of the existing resource on a cloud platform are acquired, then, a resource creation plan is generated according to the resource identifier of the target demand resource, the resource configuration information of the target demand resource, the creation dependency relationship between the target demand resources, the resource identifier of the existing resource and the resource configuration information of the existing resource, and finally, the resource creation plan is executed to create the target demand resource on the cloud platform. Therefore, according to the embodiment, the user can automatically create the resource only by submitting the resource requirement information without writing the creation code, the efficiency of creating the resource can be improved, and the user only needs to submit the resource requirement information without writing the creation code, so that the problem of irregular creation flow caused by different code writing modes of different users is avoided, and the flow of creating the resource is standardized.
The method for creating resources in this embodiment may be applied to a server (such as the computer device in fig. 1), and executed by a specific application program in the server. The user can submit the resource requirement information in the application program and click the button marked with the identifier of 'creating the resource' or other equivalent meanings, and the application program determines to receive the resource creating instruction of the user after detecting that the user clicks the button.
In step S202, the server responds to the resource creating instruction of the user, and obtains the resource requirement information submitted by the user. The resource demand information may be a file in a txt format or an html format, and the resource demand information records a resource identifier of the target demand resource, resource configuration information of the target demand resource, and a creation dependency relationship between the target demand resource. In one example, the resource requirement information records the resource identifier of the target requirement resource, the resource configuration information of the target requirement resource and the creation dependency relationship between the target requirement resource in a specified format through a specified language (such as C language or C + + language).
In the embodiment, developers can define the resource requirement information in the form of codes, so that the process of creating resources becomes simple, flexible and uniform, different developers can define the resource requirement information according to a set code format, the process of creating resources can be standardized, the creating efficiency is improved, and resource management is facilitated.
In this embodiment, the resource includes, but is not limited to, a virtual machine, a disk, a mirror, load balancing, a DNS (Domain name system), and the like. The resource identification of the target demand resource can be understood as a resource name of the target demand resource, such as DNS1, DNS2, virtual machine 1, virtual machine 2, and the like. Taking the target demand resource as the virtual machine as an example, the resource configuration information of the target demand resource may be, for example, information such as a memory size of the virtual machine, a Central Processing Unit (CPU) number of the virtual machine, and the like. The creation order of each target demand resource can be determined according to the creation dependency relationship among the target demand resources, for example, the target demand resources include resource 1, resource 2 and resource 3, the creation dependency relationship among the target demand resources is recorded in the resource demand information as resource 3 dependent resource 2 and resource 2 dependent resource 1, and it can be determined according to the dependency relationship that resource 1 needs to be created first, then resource 2 needs to be created based on resource 1, and then resource 3 needs to be created based on resource 2.
In step S202, the server parses the resource requirement information submitted by the user, so as to obtain the resource identifier of the target requirement resource, the resource configuration information of the target requirement resource, and the creation dependency relationship between the target requirement resource. In an example, the creation dependency relationship is uniformly recorded at a preset position in the resource requirement information, for example, the creation dependency relationship "resource 3 depends on resource 2, resource 2 depends on resource 1" is uniformly recorded at the preset position, and the server may directly read the creation dependency relationship from the preset position in the resource requirement information. In another example, the creation dependency relationship in the resource demand information is recorded in a plurality of positions in a distributed manner, for example, "resource 3 depends on resource 2" is recorded at a first position, and "resource 2 depends on resource 1" is recorded at a second position, and the server needs to read and obtain each creation dependency relationship from each position and integrate the creation dependency relationships to obtain a complete creation dependency relationship.
In step S202, the server further responds to the resource creating instruction of the user to obtain the resource identifier of the existing resource and the resource configuration information of the existing resource on the cloud platform. The cloud platform may be exemplified as an Ali cloud platform, an Tencent cloud platform, or the like. The existing resources on the cloud platform may be previously created resources.
In the step S204, determining a creation mode of the target demand resource according to the resource identifier of the target demand resource, the resource configuration information of the target demand resource, the resource identifier of the existing resource, and the resource configuration information of the existing resource; the creating mode comprises at least one of adding the resources, modifying the resource configuration information of the existing resources and taking the existing resources as the target demand resources.
The method comprises the following steps:
(a1) judging whether existing resources with the same resource identification as the target required resources exist or not, if not, determining that the creation mode of the target required resources is a newly added resource, and if so, acquiring resource configuration information of the same existing resources;
(a2) if the resource configuration information of the target demand resource is the same as the resource configuration information of the same existing resource, determining that the creation mode of the target demand resource is to take the existing resource as the target demand resource;
(a3) and if the resource configuration information of the target demand resource is different from the resource configuration information of the same existing resource, determining that the creation mode of the target demand resource is to modify the resource configuration information of the existing resource.
Specifically, for each target demand resource, the resource identifier of the target demand resource is searched in the resource identifiers of the existing resources, if the resource identifier of the target demand resource is found, it is determined that the existing resource identical to the resource identifier of the target demand resource exists, and if the resource identifier of the target demand resource is not found, it is determined that the existing resource identical to the resource identifier of the target demand resource does not exist.
For each target demand resource, if it is determined that there is no existing resource with the same resource identifier as the target demand resource, it is determined that the target demand resource needs to be newly created on the cloud platform, and therefore, it is determined that the creation mode of the target demand resource is a newly added resource. And if the existing resource identical to the resource identifier of the target demand resource exists, acquiring the resource configuration information of the identical existing resource.
Then, whether the resource configuration information of the same existing resource is the same as the resource configuration information of the target demand resource is judged, if so, the target demand resource is determined to exist on the cloud platform, and the creation mode of the target demand resource is determined to be that the existing resource is used as the target demand resource, namely, the same existing resource is used as the target demand resource.
If the resource configuration information of the same existing resource is different from the resource configuration information of the target demand resource, it is determined that the resource identifier of the target demand resource already exists on the cloud platform, but the resource configuration information is inconsistent, and therefore, it is determined that the target demand resource is created in a manner of modifying the resource configuration information of the existing resource, that is, modifying the resource configuration information of the same existing resource into the resource configuration information of the target demand resource.
In this embodiment, if the number of the target demand resources is at least one, the above-mentioned actions (a1) to (a3) are performed for each target demand resource, so as to determine the creation manner of each target demand resource.
As can be seen from the above actions (a1) to (a3), for any target demand resource, if the resource identifier and the resource configuration information of an existing resource on the cloud platform are the same as the resource identifier and the resource configuration information of the target demand resource, it is determined that the target demand resource is created in a manner that the existing resource is used as the target demand resource, that is, the same existing resource is used as the target demand resource.
If the resource identifier of a certain existing resource is the same as the resource identifier of the target required resource but the resource configuration information of the same existing resource is different from the resource configuration information of the target required resource, determining that the target required resource is created in a manner of modifying the resource configuration information of the existing resource, that is, modifying the resource configuration information of the same existing resource into the resource configuration information of the target required resource. On the contrary, if the existing resource which is the same as the resource identifier of the target demand resource does not exist on the cloud platform, the creation mode of the target demand resource is determined to be the new resource.
In one case, for any target demand resource, if an existing resource identical to the resource configuration information of the target demand resource exists on the cloud platform but the resource identifier of the existing resource is different from the resource identifier of the target demand resource, it is determined that the target demand resource does not exist on the cloud platform, and it is determined that the creation mode of the target demand resource is a new resource.
Therefore, through the above actions (a1) to (a3), the creation mode of the target demand resource can be automatically determined, and a tedious process that a developer manually determines the creation mode of the target demand resource is avoided.
After determining the creation mode of each target demand resource, in step S206, a resource creation plan is generated according to the resource identifier of the target demand resource, the resource configuration information of the target demand resource, the creation mode of the target demand resource, and the creation dependency relationship between the target demand resources.
In one example, the resource requirement information records a resource identifier of the target requirement resource, resource configuration information of the target requirement resource, and a creation dependency relationship between the target requirement resource. The resource creating plan records a resource identifier of the target demand resource, resource configuration information of the target demand resource, a creating dependency relationship between the target demand resources, and a creating mode of the target demand resource. In this example, in step S206, the resource identifier of the target demand resource, the resource configuration information of the target demand resource, the creation dependency relationship between the target demand resources, and the creation mode of the target demand resource may be integrated to obtain the resource creation plan.
In another example, the step S206 specifically includes:
(b1) determining an operating environment condition required for operating the target demand resource on the cloud platform according to the resource identifier of the target demand resource and the resource configuration information of the target demand resource;
(b2) if the operating environment of the cloud platform conforms to the operating environment condition, generating a resource creation plan according to the resource identifier of the target demand resource, the resource configuration information of the target demand resource, the creation mode of the target demand resource and the creation dependency relationship between the target demand resources;
the resource creating plan records resource identification of the target demand resources, resource configuration information of the target demand resources, creating dependency relationship among the target demand resources and creating modes of the target demand resources.
Specifically, taking the target demand resource as a virtual machine as an example, the resource identifier of the target demand resource may be, for example, the virtual machine 1, and the resource configuration information of the target demand resource may be, for example, the memory 500M, and the number of CPUs is 4. Based on this, according to the resource identifier of the target demand resource and the resource configuration information of the target demand resource, determining that the operating environment condition required for operating the target demand resource on the cloud platform is as follows: the residual memory is more than 500M, and the number of residual CPUs is more than 4.
And then, judging whether the operating environment of the cloud platform meets the determined operating environment conditions, if so, generating a resource creating plan according to the resource identification of the target demand resource, the resource configuration information of the target demand resource, the creating mode of the target demand resource and the creating dependency relationship among the target demand resource, and if not, outputting prompt information to prompt a user that the current operating environment of the cloud platform does not meet the operating environment conditions corresponding to the target demand resource.
When the resource creation plan is generated, the resource identifier of the target demand resource, the resource configuration information of the target demand resource, the creation dependency relationship between the target demand resources, and the creation mode of the target demand resource may be integrated to obtain the resource creation plan.
After the resource creation plan is generated, step S208 is executed to execute the resource creation plan to create the target demand resource on the cloud platform.
In one example, if the number of the cloud platform is one and the number of the target demand resources is at least one, in step S208, the target demand resources to be currently created are determined according to the creation dependency relationship between the target demand resources, then an interface on the cloud platform for creating the target demand resources to be currently created is called, and the target demand resources are created according to the determined creation mode of the target demand resources. For example, if the creation mode is to add a new resource, the target demand resource is created on the cloud platform according to the resource identifier and the resource configuration information of the target demand resource through the interface, if the creation mode is to modify the resource configuration information of the existing resource, the existing resource identical to the resource identifier of the target demand resource is searched on the cloud platform according to the resource identifier of the target demand resource through the interface, the resource configuration information of the existing resource is modified into the resource configuration information of the target demand resource, and if the creation mode is to use the existing resource as the target demand resource, the existing resource identical to the resource identifier of the target demand resource is searched on the cloud platform according to the resource identifier of the target demand resource through the interface, and the existing resource is used as the target demand resource.
In another example, the number of the cloud platforms is at least one, and each cloud platform comprises at least one target demand resource; in the step S208, a resource creation plan is executed to create the target demand resource on the cloud platform, specifically:
(c1) analyzing the resource creation plan to obtain the creation dependency relationship among the target demand resources;
(c2) determining a target platform to be called currently in each cloud platform according to the creation dependency relationship and the inclusion relationship between the target demand resources and the cloud platforms, and determining first resources to be created on the target platform currently in each target demand resource;
(c3) calling a target platform, and executing a resource creation plan on the target platform to create a first resource on the target platform;
(c4) and repeating the steps of determining the target platform, the first resource and creating the first resource to create each target demand resource on each cloud platform.
Specifically, the creation dependency relationship between the target demand resources is obtained by analyzing the resource creation plan, for example, the creation dependency relationship between the target demand resources is obtained by reading from a preset position in the resource creation plan. Then, an inclusion relation between the target demand resources and the cloud platform is obtained, a target platform to be called currently is determined in each cloud platform according to the creation dependency relation and the inclusion relation between the target demand resources and the cloud platform, and first resources to be created on the target platform currently are determined in each target demand resources.
For example, the target demand resources include a resource 1, a resource 2 and a resource 3, and a creation dependency relationship between the target demand resources is that the resource 3 depends on the resource 2 and the resource 2 depends on the resource 1, where the resource 1 is located on the cloud platform 1, the resource 2 is located on the cloud platform 2, and the resource 3 is located on the cloud platform 1, and it can be determined according to the dependency relationship and the inclusion relationship that the resource 1 needs to be created first, then the resource 2 is created based on the resource 1, then the resource 3 is created based on the resource 2, and it is determined that the cloud platform 1 needs to be called first, then the cloud platform 2 is called, and then the cloud platform 1 is called. Therefore, according to the dependency relationship and the inclusion relationship, it can be determined that the target platform to be called currently is the cloud platform 1, and the first resource to be created on the target platform currently is the resource 1.
And then, calling the target platform, and executing a resource creation plan on the target platform through an interface for creating the first resource on the target platform so as to create the first resource on the target platform. And finally, repeating the steps of determining the target platform, the first resource and creating the first resource so as to create each target demand resource on each cloud platform.
Specifically, a target platform is called, an interface used for creating the first resource on the target platform is determined, the interface is called, and a resource creation plan is executed on the target platform so as to create the first resource on the target platform. And repeating the above actions (c1), (c2) and (c3), and determining the target platform (such as the cloud platform 2 in the above example) which needs to be called next time and the first resource (such as the resource 2 in the above example) which needs to be created next time, so as to continue to create the first resource on the target platform, so as to achieve the purpose of creating each target demand resource on each cloud platform.
In the action (c3), executing the resource creation plan on the target platform to create the first resource on the target platform, specifically:
(c31) analyzing the resource creating plan to obtain a resource identifier, resource configuration information and a resource creating mode of the first resource;
(c32) if the resource creating mode of the first resource is a newly added resource, the first resource is newly added on the target platform according to the resource identifier and the resource configuration information of the first resource;
(c33) if the resource creating mode of the first resource is to modify the resource configuration information of the existing resource, the existing resource which is the same as the resource identifier of the first resource is determined on the target platform, and the determined resource configuration information of the existing resource is modified into the resource configuration information of the first resource, so that the first resource is created on the target platform;
(c34) and if the resource creating mode of the first resource is to use the existing resource as the target demand resource, determining the existing resource with the same resource identifier as the first resource on the target platform, and using the determined existing resource as the first resource.
Firstly, the resource identification, the resource configuration information and the resource creating mode of the first resource are obtained by analyzing from the resource creating plan. If the resource creating mode of the first resource is a newly added resource, the first resource is newly added on the target platform according to the resource identifier and the resource configuration information of the first resource, different target platforms are provided with a standard flow of the newly added resource, and the process can be executed according to the standard flow of the newly added resource of the target platform.
If the resource creating mode of the first resource is to modify the resource configuration information of the existing resource, it is indicated that the existing resource with the same resource identifier as the first resource but different resource configuration information exists on the target platform, so that the existing resource with the same resource identifier as the first resource is determined on the target platform, and the determined resource configuration information of the existing resource is modified into the resource configuration information of the first resource, so as to create the first resource on the target platform.
If the resource creating mode of the first resource is to use the existing resource as the target demand resource, it indicates that the resource identifier and the resource configuration information of a certain resource and the first resource are the same on the target platform, so the existing resource which is the same as the resource identifier of the first resource is determined on the target platform, and the determined existing resource is used as the first resource.
Therefore, according to the embodiment, the user can automatically create the resource only by submitting the resource requirement information without writing the creation code, the efficiency of creating the resource can be improved, and the user only needs to submit the resource requirement information without writing the creation code, so that the problem of irregular creation flow caused by different code writing modes of different users is avoided, and the flow of creating the resource is standardized.
In this embodiment, after the resource creation plan is generated, the resource creation plan may also be provided to the user, and after a confirmation instruction of the user for the resource creation plan is received, the resource creation plan is executed to create the target required resource on the cloud platform, so that the target required resource is created after the user confirms, and the accuracy of resource creation is ensured.
In this embodiment, the number of the cloud platforms is at least one, and each cloud platform includes at least one target demand resource; in step S208, after executing the resource creation plan to create the target demand resource on the cloud platform, the method may further:
(d1) acquiring a preset target demand resource calling sequence;
(d2) determining the calling sequence of each cloud platform according to the calling sequence of the target demand resources and the inclusion relation between the target demand resources and the cloud platforms;
(d3) calling each target demand resource through an interface of each cloud platform according to the calling sequence of each cloud platform and the calling sequence of the target demand resource;
(d4) and constructing to obtain a target operation environment by using each called target demand resource, and realizing a corresponding target function in the target operation environment.
First, a preset target demand resource calling sequence is obtained, where the calling sequence may be, for example, calling resource 1 first, then calling resource 2, and finally calling resource 3. Then, determining the calling sequence of each cloud platform according to the calling sequence of the target demand resource and the inclusion relationship between the target demand resource and the cloud platform, for example, the calling sequence of the target demand resource is that resource 1 is called first, resource 2 is called, and resource 3 is called last, the inclusion relationship between the target demand resource and the cloud platform is that resource 1 and resource 3 are located on cloud platform 1, resource 2 is located on cloud platform 2, so that the calling sequence of each cloud platform is determined to be: the method comprises the steps of calling the cloud platform 1, then calling the cloud platform 2 and then calling the cloud platform 3.
And further, calling each target demand resource through an interface of each cloud platform according to the calling sequence of each cloud platform and the calling sequence of the target demand resource. For example, in the previous example, the cloud platform 1 is called through the interface of the cloud platform 1 to call the resource 1, the cloud platform 2 is called through the interface of the cloud platform 2 to call the resource 2, and the cloud platform 1 is called through the interface of the cloud platform 1 to call the resource 3.
And finally, constructing by using each called target demand resource to obtain a target operation environment, and realizing a corresponding target function in the target operation environment. In one example, a test environment of the application software is built by using each called target demand resource, and a software test function is realized in the test environment of the application software.
Under a software test scene, a test environment is built in a mode of creating and calling resources on a cloud platform, and the method has the advantages of being high in test environment building efficiency and not occupying local storage.
In a specific embodiment, the resource requirement information is written in any one of HCL, YAML and JSON, and meanwhile, two components, namely a parser and an executor, are configured in advance, the parser is used for executing step S202 to parse the resource requirement information, and the executor is used for executing steps S204, S206 and S208 to create the resource on the cloud platform.
An example of resource demand information is as follows:
Figure BDA0002299446370000121
when the parser executes step S202, the provider field in this example may be parsed into a cloud platform identifier, and the resource field may be parsed into configuration information of a cloud resource.
In one example, the resolver may determine to obtain the creation dependency relationship according to a depended _ on field in the resource requirement information. For example:
Figure BDA0002299446370000122
indicating that creating an alias _ dns resource named test requires first creating an alias _ instance resource named test.
The determined creation dependency may be exemplified by:
Figure BDA0002299446370000131
represents: firstly creating test1 and test2 machines, then respectively creating host name resolutions corresponding to the two machines, and finally creating lb with the name of test and adding the two machines into the lb.
In summary, according to the embodiment, the user does not need to write the creation code, and only needs to submit the resource requirement information, the resource can be automatically created, so that the efficiency of creating the resource can be improved, and the user does not need to write the creation code, but only needs to submit the resource requirement information, so that the problem of irregular creation flow caused by different code writing modes of different users is avoided, and the flow of creating the resource is standardized. In addition, in the embodiment, the cloud platforms can be plugged in, resources can be created on the cloud platforms by calling the plug-in of each cloud platform, and the method is simple and convenient.
Fig. 3 is a schematic diagram illustrating a module composition of an apparatus for creating a resource on a cloud platform according to an embodiment of the present specification, and as shown in fig. 3, the apparatus includes:
the analysis module 31 is configured to, in response to a resource creation instruction of a user, acquire resource demand information submitted by the user, analyze the resource demand information to obtain a resource identifier of a target demand resource, a creation dependency relationship between resource configuration information of the target demand resource and the target demand resource, and, in response to the resource creation instruction, acquire a resource identifier of an existing resource on the cloud platform and resource configuration information of the existing resource;
a determining module 32, configured to determine a creating manner of the target demand resource according to the resource identifier of the target demand resource, the resource configuration information of the target demand resource, the resource identifier of the existing resource, and the resource configuration information of the existing resource; the creating mode comprises at least one of newly adding resources, modifying resource configuration information of existing resources and taking the existing resources as target demand resources;
a generating module 33, configured to generate a resource creating plan according to the resource identifier of the target demand resource, the resource configuration information of the target demand resource, the creating manner of the target demand resource, and the creating dependency relationship between the target demand resources;
an executing module 34, configured to execute the resource creation plan to create the target demand resource on the cloud platform.
Optionally, the determining module 32 is specifically configured to:
judging whether existing resources with the same resource identification as the target demand resources exist or not, if not, determining that the creation mode of the target demand resources is a newly added resource, and if so, acquiring resource configuration information of the same existing resources;
if the resource configuration information of the target demand resource is the same as the resource configuration information of the same existing resource, determining that the creation mode of the target demand resource is to use the existing resource as the target demand resource;
and if the resource configuration information of the target demand resource is different from the resource configuration information of the same existing resource, determining that the creation mode of the target demand resource is to modify the resource configuration information of the existing resource.
Optionally, the generating module 33 is specifically configured to:
determining an operating environment condition required for operating the target demand resource on the cloud platform according to the resource identifier of the target demand resource and the resource configuration information of the target demand resource;
if the operating environment of the cloud platform meets the operating environment condition, generating a resource creation plan according to the resource identifier of the target demand resource, the resource configuration information of the target demand resource, the creation mode of the target demand resource and the creation dependency relationship between the target demand resources;
the resource creating plan records a resource identifier of the target demand resource, resource configuration information of the target demand resource, a creating mode of the target demand resource, and a creating dependency relationship between the target demand resources.
Optionally, the number of the cloud platforms is at least one; each cloud platform comprises at least one target demand resource; the execution module 34 is specifically configured to:
analyzing the resource creation plan to obtain the creation dependency relationship among the target demand resources;
according to the creation dependency relationship and the inclusion relationship between the target demand resources and the cloud platforms, determining a target platform to be called currently in each cloud platform, and determining first resources to be created on the target platform currently in each target demand resource;
calling the target platform, and executing the resource creation plan on the target platform to create the first resource on the target platform;
and repeating the steps of determining a target platform, the first resource and creating the first resource so as to create each target demand resource on each cloud platform.
Optionally, the executing module 34 is further specifically configured to:
analyzing the resource creating plan to obtain the resource identifier, the resource configuration information and the resource creating mode of the first resource;
if the resource creating mode of the first resource is a newly added resource, newly adding the first resource on the target platform according to the resource identifier and the resource configuration information of the first resource;
if the resource creating mode of the first resource is to modify the resource configuration information of the existing resource, determining the existing resource with the same resource identifier as the first resource on the target platform, and modifying the determined resource configuration information of the existing resource into the resource configuration information of the first resource so as to create the first resource on the target platform;
if the resource creating mode of the first resource is to use an existing resource as a target demand resource, determining the existing resource with the same resource identifier as the first resource on the target platform, and using the determined existing resource as the first resource.
Optionally, the number of the cloud platforms is at least one; each cloud platform comprises at least one target demand resource; the device also comprises a building module for:
after the resource creation plan is executed to create the target demand resource on the cloud platform, acquiring a preset target demand resource calling sequence;
determining the calling sequence of each cloud platform according to the calling sequence of the target demand resources and the inclusion relation between the target demand resources and the cloud platforms;
calling each target demand resource through an interface of each cloud platform according to the calling sequence of each cloud platform and the calling sequence of the target demand resource;
and constructing to obtain a target operation environment by utilizing each called target demand resource, and realizing a corresponding target function in the target operation environment.
In the embodiment of the present specification, in response to a resource creation instruction of a user, resource demand information submitted by the user is acquired, the resource demand information is analyzed to obtain a resource identifier of a target demand resource, a creation dependency relationship between resource configuration information of the target demand resource and the target demand resource, and in response to the resource creation instruction of the user, a resource identifier of an existing resource and a resource configuration confidence of the existing resource on a cloud platform are acquired, then, a resource creation plan is generated according to the resource identifier of the target demand resource, the resource configuration information of the target demand resource, the creation dependency relationship between the target demand resources, the resource identifier of the existing resource and the resource configuration information of the existing resource, and finally, the resource creation plan is executed to create the target demand resource on the cloud platform. Therefore, according to the embodiment, the user can automatically create the resource only by submitting the resource requirement information without writing the creation code, the efficiency of creating the resource can be improved, and the user only needs to submit the resource requirement information without writing the creation code, so that the problem of irregular creation flow caused by different code writing modes of different users is avoided, and the flow of creating the resource is standardized.
The apparatus for creating a resource on a cloud platform provided in an embodiment of the present specification can implement each process in the foregoing method embodiment for creating a resource on a cloud platform, and achieve the same function and effect, which is not repeated here.
Further, an embodiment of the present specification further provides a device for creating a resource on a cloud platform, and fig. 4 is a schematic structural diagram of the device for creating a resource on a cloud platform provided in an embodiment of the present specification, and as shown in fig. 4, the device includes: memory 601, processor 602, bus 603, and communication interface 604. The memory 601, processor 602, and communication interface 604 communicate via the bus 603. the communication interface 604 may include input and output interfaces including, but not limited to, a keyboard, mouse, display, microphone, and the like.
In fig. 4, the memory 601 stores thereon computer-executable instructions executable on the processor 602, and when executed by the processor 602, the computer-executable instructions implement the following processes:
responding to a resource creating instruction of a user, acquiring resource demand information submitted by the user, analyzing the resource demand information to obtain a resource identifier of a target demand resource, resource configuration information of the target demand resource and a creating dependency relationship between the target demand resource, and responding to the resource creating instruction, and acquiring a resource identifier of an existing resource on the cloud platform and resource configuration information of the existing resource;
determining a creation mode of the target demand resource according to the resource identifier of the target demand resource, the resource configuration information of the target demand resource, the resource identifier of the existing resource and the resource configuration information of the existing resource; the creating mode comprises at least one of newly adding resources, modifying resource configuration information of existing resources and taking the existing resources as target demand resources;
generating a resource creation plan according to the resource identification of the target demand resource, the resource configuration information of the target demand resource, the creation mode of the target demand resource and the creation dependency relationship among the target demand resources;
executing the resource creation plan to create the target demand resource on the cloud platform.
Optionally, when the computer-executable instructions are executed by the processor, determining a creation mode of the target demand resource according to the resource identifier of the target demand resource, the resource configuration information of the target demand resource, the resource identifier of the existing resource, and the resource configuration information of the existing resource, including:
judging whether existing resources with the same resource identification as the target demand resources exist or not, if not, determining that the creation mode of the target demand resources is a newly added resource, and if so, acquiring resource configuration information of the same existing resources;
if the resource configuration information of the target demand resource is the same as the resource configuration information of the same existing resource, determining that the creation mode of the target demand resource is to use the existing resource as the target demand resource;
and if the resource configuration information of the target demand resource is different from the resource configuration information of the same existing resource, determining that the creation mode of the target demand resource is to modify the resource configuration information of the existing resource.
Optionally, when executed by the processor, the computer-executable instructions generate a resource creation plan according to the resource identifier of the target demand resource, the resource configuration information of the target demand resource, the creation mode of the target demand resource, and the creation dependency relationship between the target demand resources, including:
determining an operating environment condition required for operating the target demand resource on the cloud platform according to the resource identifier of the target demand resource and the resource configuration information of the target demand resource;
if the operating environment of the cloud platform meets the operating environment condition, generating a resource creation plan according to the resource identifier of the target demand resource, the resource configuration information of the target demand resource, the creation mode of the target demand resource and the creation dependency relationship between the target demand resources;
the resource creating plan records a resource identifier of the target demand resource, resource configuration information of the target demand resource, a creating mode of the target demand resource, and a creating dependency relationship between the target demand resources.
Optionally, the number of cloud platforms is at least one when the computer executable instructions are executed by the processor; each cloud platform comprises at least one target demand resource; executing the resource creation plan to create the target demand resource on the cloud platform, including:
analyzing the resource creation plan to obtain the creation dependency relationship among the target demand resources;
according to the creation dependency relationship and the inclusion relationship between the target demand resources and the cloud platforms, determining a target platform to be called currently in each cloud platform, and determining first resources to be created on the target platform currently in each target demand resource;
calling the target platform, and executing the resource creation plan on the target platform to create the first resource on the target platform;
and repeating the steps of determining a target platform, the first resource and creating the first resource so as to create each target demand resource on each cloud platform.
Optionally, the computer-executable instructions, when executed by the processor, execute the resource creation plan on the target platform to create the first resource on the target platform, comprising:
analyzing the resource creating plan to obtain the resource identifier, the resource configuration information and the resource creating mode of the first resource;
if the resource creating mode of the first resource is a newly added resource, newly adding the first resource on the target platform according to the resource identifier and the resource configuration information of the first resource;
if the resource creating mode of the first resource is to modify the resource configuration information of the existing resource, determining the existing resource with the same resource identifier as the first resource on the target platform, and modifying the determined resource configuration information of the existing resource into the resource configuration information of the first resource so as to create the first resource on the target platform;
if the resource creating mode of the first resource is to use an existing resource as a target demand resource, determining the existing resource with the same resource identifier as the first resource on the target platform, and using the determined existing resource as the first resource.
Optionally, the number of cloud platforms is at least one when the computer executable instructions are executed by the processor; each cloud platform comprises at least one target demand resource; after executing the resource creation plan to create the target demand resource on the cloud platform, the process further includes:
acquiring a preset target demand resource calling sequence;
determining the calling sequence of each cloud platform according to the calling sequence of the target demand resources and the inclusion relation between the target demand resources and the cloud platforms;
calling each target demand resource through an interface of each cloud platform according to the calling sequence of each cloud platform and the calling sequence of the target demand resource;
and constructing to obtain a target operation environment by utilizing each called target demand resource, and realizing a corresponding target function in the target operation environment.
In the embodiment of the present specification, in response to a resource creation instruction of a user, resource demand information submitted by the user is acquired, the resource demand information is analyzed to obtain a resource identifier of a target demand resource, a creation dependency relationship between resource configuration information of the target demand resource and the target demand resource, and in response to the resource creation instruction of the user, a resource identifier of an existing resource and a resource configuration confidence of the existing resource on a cloud platform are acquired, then, a resource creation plan is generated according to the resource identifier of the target demand resource, the resource configuration information of the target demand resource, the creation dependency relationship between the target demand resources, the resource identifier of the existing resource and the resource configuration information of the existing resource, and finally, the resource creation plan is executed to create the target demand resource on the cloud platform. Therefore, according to the embodiment, the user can automatically create the resource only by submitting the resource requirement information without writing the creation code, the efficiency of creating the resource can be improved, and the user only needs to submit the resource requirement information without writing the creation code, so that the problem of irregular creation flow caused by different code writing modes of different users is avoided, and the flow of creating the resource is standardized.
The device for creating resources on a cloud platform provided in an embodiment of the present specification can implement each process in the foregoing method embodiment for creating resources on a cloud platform, and achieve the same function and effect, which is not repeated here.
Further, another embodiment of the present specification also provides a computer-readable storage medium for storing computer-executable instructions, which when executed by a processor implement the following process:
responding to a resource creating instruction of a user, acquiring resource demand information submitted by the user, analyzing the resource demand information to obtain a resource identifier of a target demand resource, resource configuration information of the target demand resource and a creating dependency relationship between the target demand resource, and responding to the resource creating instruction, and acquiring a resource identifier of an existing resource on the cloud platform and resource configuration information of the existing resource;
determining a creation mode of the target demand resource according to the resource identifier of the target demand resource, the resource configuration information of the target demand resource, the resource identifier of the existing resource and the resource configuration information of the existing resource; the creating mode comprises at least one of newly adding resources, modifying resource configuration information of existing resources and taking the existing resources as target demand resources;
generating a resource creation plan according to the resource identification of the target demand resource, the resource configuration information of the target demand resource, the creation mode of the target demand resource and the creation dependency relationship among the target demand resources;
executing the resource creation plan to create the target demand resource on the cloud platform.
Optionally, when the computer-executable instructions are executed by a processor, determining a creation mode of the target demand resource according to the resource identifier of the target demand resource, the resource configuration information of the target demand resource, the resource identifier of the existing resource, and the resource configuration information of the existing resource, including:
judging whether existing resources with the same resource identification as the target demand resources exist or not, if not, determining that the creation mode of the target demand resources is a newly added resource, and if so, acquiring resource configuration information of the same existing resources;
if the resource configuration information of the target demand resource is the same as the resource configuration information of the same existing resource, determining that the creation mode of the target demand resource is to use the existing resource as the target demand resource;
and if the resource configuration information of the target demand resource is different from the resource configuration information of the same existing resource, determining that the creation mode of the target demand resource is to modify the resource configuration information of the existing resource.
Optionally, when executed by the processor, the computer-executable instructions generate a resource creation plan according to the resource identifier of the target demand resource, the resource configuration information of the target demand resource, the creation mode of the target demand resource, and the creation dependency relationship between the target demand resources, including:
determining an operating environment condition required for operating the target demand resource on the cloud platform according to the resource identifier of the target demand resource and the resource configuration information of the target demand resource;
if the operating environment of the cloud platform meets the operating environment condition, generating a resource creation plan according to the resource identifier of the target demand resource, the resource configuration information of the target demand resource, the creation mode of the target demand resource and the creation dependency relationship between the target demand resources;
the resource creating plan records a resource identifier of the target demand resource, resource configuration information of the target demand resource, a creating mode of the target demand resource, and a creating dependency relationship between the target demand resources.
Optionally, the number of cloud platforms is at least one when the computer executable instructions are executed by a processor; each cloud platform comprises at least one target demand resource; executing the resource creation plan to create the target demand resource on the cloud platform, including:
analyzing the resource creation plan to obtain the creation dependency relationship among the target demand resources;
according to the creation dependency relationship and the inclusion relationship between the target demand resources and the cloud platforms, determining a target platform to be called currently in each cloud platform, and determining first resources to be created on the target platform currently in each target demand resource;
calling the target platform, and executing the resource creation plan on the target platform to create the first resource on the target platform;
and repeating the steps of determining a target platform, the first resource and creating the first resource so as to create each target demand resource on each cloud platform.
Optionally, the computer-executable instructions, when executed by a processor, execute the resource creation plan on the target platform to create the first resource on the target platform, comprising:
analyzing the resource creating plan to obtain the resource identifier, the resource configuration information and the resource creating mode of the first resource;
if the resource creating mode of the first resource is a newly added resource, newly adding the first resource on the target platform according to the resource identifier and the resource configuration information of the first resource;
if the resource creating mode of the first resource is to modify the resource configuration information of the existing resource, determining the existing resource with the same resource identifier as the first resource on the target platform, and modifying the determined resource configuration information of the existing resource into the resource configuration information of the first resource so as to create the first resource on the target platform;
if the resource creating mode of the first resource is to use an existing resource as a target demand resource, determining the existing resource with the same resource identifier as the first resource on the target platform, and using the determined existing resource as the first resource.
Optionally, the number of cloud platforms is at least one when the computer executable instructions are executed by a processor; each cloud platform comprises at least one target demand resource; after executing the resource creation plan to create the target demand resource on the cloud platform, the process further includes:
acquiring a preset target demand resource calling sequence;
determining the calling sequence of each cloud platform according to the calling sequence of the target demand resources and the inclusion relation between the target demand resources and the cloud platforms;
calling each target demand resource through an interface of each cloud platform according to the calling sequence of each cloud platform and the calling sequence of the target demand resource;
and constructing to obtain a target operation environment by utilizing each called target demand resource, and realizing a corresponding target function in the target operation environment.
In the embodiment of the present specification, in response to a resource creation instruction of a user, resource demand information submitted by the user is acquired, the resource demand information is analyzed to obtain a resource identifier of a target demand resource, a creation dependency relationship between resource configuration information of the target demand resource and the target demand resource, and in response to the resource creation instruction of the user, a resource identifier of an existing resource and a resource configuration confidence of the existing resource on a cloud platform are acquired, then, a resource creation plan is generated according to the resource identifier of the target demand resource, the resource configuration information of the target demand resource, the creation dependency relationship between the target demand resources, the resource identifier of the existing resource and the resource configuration information of the existing resource, and finally, the resource creation plan is executed to create the target demand resource on the cloud platform. Therefore, according to the embodiment, the user can automatically create the resource only by submitting the resource requirement information without writing the creation code, the efficiency of creating the resource can be improved, and the user only needs to submit the resource requirement information without writing the creation code, so that the problem of irregular creation flow caused by different code writing modes of different users is avoided, and the flow of creating the resource is standardized.
The computer-readable storage medium provided in an embodiment of the present specification can implement the foregoing processes in the embodiment of the method for creating a resource on a cloud platform, and achieve the same functions and effects, which are not repeated here.
The computer-readable storage medium includes a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of the present specification and is not intended to limit the present document. Various modifications and changes may occur to the embodiments described herein, as will be apparent to those skilled in the art. Any modifications, equivalents, improvements, etc. which come within the spirit and principle of the disclosure are intended to be included within the scope of the claims of this document.

Claims (12)

1. A method for creating resources on a cloud platform, comprising:
responding to a resource creating instruction of a user, acquiring resource demand information submitted by the user, analyzing the resource demand information to obtain a resource identifier of a target demand resource, resource configuration information of the target demand resource and a creating dependency relationship between the target demand resource, and responding to the resource creating instruction, and acquiring a resource identifier of an existing resource on the cloud platform and resource configuration information of the existing resource;
determining a creation mode of the target demand resource according to the resource identifier of the target demand resource, the resource configuration information of the target demand resource, the resource identifier of the existing resource and the resource configuration information of the existing resource; the creating mode comprises at least one of newly adding resources, modifying resource configuration information of existing resources and taking the existing resources as target demand resources;
generating a resource creation plan according to the resource identification of the target demand resource, the resource configuration information of the target demand resource, the creation mode of the target demand resource and the creation dependency relationship among the target demand resources;
executing the resource creation plan to create the target demand resource on the cloud platform.
2. The method according to claim 1, wherein determining a creation mode of the target demand resource according to the resource identifier of the target demand resource, the resource configuration information of the target demand resource, the resource identifier of the existing resource, and the resource configuration information of the existing resource comprises:
judging whether existing resources with the same resource identification as the target demand resources exist or not, if not, determining that the creation mode of the target demand resources is a newly added resource, and if so, acquiring resource configuration information of the same existing resources;
if the resource configuration information of the target demand resource is the same as the resource configuration information of the same existing resource, determining that the creation mode of the target demand resource is to use the existing resource as the target demand resource;
and if the resource configuration information of the target demand resource is different from the resource configuration information of the same existing resource, determining that the creation mode of the target demand resource is to modify the resource configuration information of the existing resource.
3. The method according to claim 1, wherein generating a resource creation plan according to the resource identifier of the target demand resource, the resource configuration information of the target demand resource, the creation mode of the target demand resource, and the creation dependency relationship between the target demand resources comprises:
determining an operating environment condition required for operating the target demand resource on the cloud platform according to the resource identifier of the target demand resource and the resource configuration information of the target demand resource;
if the operating environment of the cloud platform meets the operating environment condition, generating a resource creation plan according to the resource identifier of the target demand resource, the resource configuration information of the target demand resource, the creation mode of the target demand resource and the creation dependency relationship between the target demand resources;
the resource creating plan records a resource identifier of the target demand resource, resource configuration information of the target demand resource, a creating mode of the target demand resource, and a creating dependency relationship between the target demand resources.
4. The method of claim 1, wherein the number of cloud platforms is at least one; each cloud platform comprises at least one target demand resource; executing the resource creation plan to create the target demand resource on the cloud platform, including:
analyzing the resource creation plan to obtain the creation dependency relationship among the target demand resources;
according to the creation dependency relationship and the inclusion relationship between the target demand resources and the cloud platforms, determining a target platform to be called currently in each cloud platform, and determining first resources to be created on the target platform currently in each target demand resource;
calling the target platform, and executing the resource creation plan on the target platform to create the first resource on the target platform;
and repeating the steps of determining a target platform, the first resource and creating the first resource so as to create each target demand resource on each cloud platform.
5. The method of claim 4, wherein executing the resource creation plan on the target platform to create the first resource on the target platform comprises:
analyzing the resource creating plan to obtain the resource identifier, the resource configuration information and the resource creating mode of the first resource;
if the resource creating mode of the first resource is a newly added resource, newly adding the first resource on the target platform according to the resource identifier and the resource configuration information of the first resource;
if the resource creating mode of the first resource is to modify the resource configuration information of the existing resource, determining the existing resource with the same resource identifier as the first resource on the target platform, and modifying the determined resource configuration information of the existing resource into the resource configuration information of the first resource so as to create the first resource on the target platform;
if the resource creating mode of the first resource is to use an existing resource as a target demand resource, determining the existing resource with the same resource identifier as the first resource on the target platform, and using the determined existing resource as the first resource.
6. The method of any one of claims 1 to 5, wherein the number of cloud platforms is at least one; each cloud platform comprises at least one target demand resource; after executing the resource creation plan to create the target demand resource on the cloud platform, the method further comprises:
acquiring a preset target demand resource calling sequence;
determining the calling sequence of each cloud platform according to the calling sequence of the target demand resources and the inclusion relation between the target demand resources and the cloud platforms;
calling each target demand resource through an interface of each cloud platform according to the calling sequence of each cloud platform and the calling sequence of the target demand resource;
and constructing to obtain a target operation environment by utilizing each called target demand resource, and realizing a corresponding target function in the target operation environment.
7. An apparatus for creating resources on a cloud platform, comprising:
the analysis module is used for responding to a resource creation instruction of a user, acquiring resource demand information submitted by the user, analyzing the resource demand information to obtain a resource identifier of a target demand resource, a creation dependency relationship between resource configuration information of the target demand resource and the target demand resource, and responding to the resource creation instruction to acquire a resource identifier of an existing resource on the cloud platform and resource configuration information of the existing resource;
a determining module, configured to determine a creating manner of the target demand resource according to the resource identifier of the target demand resource, the resource configuration information of the target demand resource, the resource identifier of the existing resource, and the resource configuration information of the existing resource; the creating mode comprises at least one of newly adding resources, modifying resource configuration information of existing resources and taking the existing resources as target demand resources;
the generating module is used for generating a resource creating plan according to the resource identifier of the target demand resource, the resource configuration information of the target demand resource, the creating mode of the target demand resource and the creating dependency relationship among the target demand resources;
and the execution module is used for executing the resource creation plan so as to create the target demand resource on the cloud platform.
8. The apparatus of claim 7, wherein the determining module is specifically configured to:
judging whether existing resources with the same resource identification as the target demand resources exist or not, if not, determining that the creation mode of the target demand resources is a newly added resource, and if so, acquiring resource configuration information of the same existing resources;
if the resource configuration information of the target demand resource is the same as the resource configuration information of the same existing resource, determining that the creation mode of the target demand resource is to use the existing resource as the target demand resource;
and if the resource configuration information of the target demand resource is different from the resource configuration information of the same existing resource, determining that the creation mode of the target demand resource is to modify the resource configuration information of the existing resource.
9. The apparatus of claim 7, wherein the generating module is specifically configured to:
determining an operating environment condition required for operating the target demand resource on the cloud platform according to the resource identifier of the target demand resource and the resource configuration information of the target demand resource;
if the operating environment of the cloud platform meets the operating environment condition, generating a resource creation plan according to the resource identifier of the target demand resource, the resource configuration information of the target demand resource, the creation mode of the target demand resource and the creation dependency relationship between the target demand resources;
the resource creating plan records a resource identifier of the target demand resource, resource configuration information of the target demand resource, a creating mode of the target demand resource, and a creating dependency relationship between the target demand resources.
10. The apparatus of claim 7, wherein the number of cloud platforms is at least one; each cloud platform comprises at least one target demand resource; the execution module is specifically configured to:
analyzing the resource creation plan to obtain the creation dependency relationship among the target demand resources;
according to the creation dependency relationship and the inclusion relationship between the target demand resources and the cloud platforms, determining a target platform to be called currently in each cloud platform, and determining first resources to be created on the target platform currently in each target demand resource;
calling the target platform, and executing the resource creation plan on the target platform to create the first resource on the target platform;
and repeating the steps of determining a target platform, the first resource and creating the first resource so as to create each target demand resource on each cloud platform.
11. The apparatus of claim 10, wherein the execution module is further specifically configured to:
analyzing the resource creating plan to obtain the resource identifier, the resource configuration information and the resource creating mode of the first resource;
if the resource creating mode of the first resource is a newly added resource, newly adding the first resource on the target platform according to the resource identifier and the resource configuration information of the first resource;
if the resource creating mode of the first resource is to modify the resource configuration information of the existing resource, determining the existing resource with the same resource identifier as the first resource on the target platform, and modifying the determined resource configuration information of the existing resource into the resource configuration information of the first resource so as to create the first resource on the target platform;
if the resource creating mode of the first resource is to use an existing resource as a target demand resource, determining the existing resource with the same resource identifier as the first resource on the target platform, and using the determined existing resource as the first resource.
12. The apparatus of any one of claims 7 to 11, wherein the number of cloud platforms is at least one; each cloud platform comprises at least one target demand resource; the device also comprises a building module for:
after the resource creation plan is executed to create the target demand resource on the cloud platform, acquiring a preset target demand resource calling sequence;
determining the calling sequence of each cloud platform according to the calling sequence of the target demand resources and the inclusion relation between the target demand resources and the cloud platforms;
calling each target demand resource through an interface of each cloud platform according to the calling sequence of each cloud platform and the calling sequence of the target demand resource;
and constructing to obtain a target operation environment by utilizing each called target demand resource, and realizing a corresponding target function in the target operation environment.
CN201911215737.4A 2019-12-02 2019-12-02 Method and device for creating resources on cloud platform Active CN110955409B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911215737.4A CN110955409B (en) 2019-12-02 2019-12-02 Method and device for creating resources on cloud platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911215737.4A CN110955409B (en) 2019-12-02 2019-12-02 Method and device for creating resources on cloud platform

Publications (2)

Publication Number Publication Date
CN110955409A true CN110955409A (en) 2020-04-03
CN110955409B CN110955409B (en) 2023-03-28

Family

ID=69979424

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911215737.4A Active CN110955409B (en) 2019-12-02 2019-12-02 Method and device for creating resources on cloud platform

Country Status (1)

Country Link
CN (1) CN110955409B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112328318A (en) * 2020-09-27 2021-02-05 北京华胜天成科技股份有限公司 Method and device for automatic planning of proprietary cloud platform and storage medium
CN112511596A (en) * 2020-11-05 2021-03-16 苏州浪潮智能科技有限公司 Method and equipment for creating cloud resources in cloud platform
CN113301154A (en) * 2021-05-24 2021-08-24 建信金融科技有限责任公司 Public cloud resource creating method and device, storage medium and electronic equipment
CN113535358A (en) * 2021-07-20 2021-10-22 中国工商银行股份有限公司 Task processing method and device

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104461699A (en) * 2014-12-29 2015-03-25 成都致云科技有限公司 Virtual host creating method and device and distributed storage system
WO2017148249A1 (en) * 2016-03-03 2017-09-08 华为技术有限公司 Resource configuration method and network device thereof
CN107402862A (en) * 2016-03-17 2017-11-28 阿里巴巴集团控股有限公司 For realizing the method and apparatus of resource layout in client
CN107493310A (en) * 2016-06-13 2017-12-19 腾讯科技(深圳)有限公司 A kind of cloud resource processing method and cloud management platform
CN107665141A (en) * 2016-07-27 2018-02-06 腾讯科技(深圳)有限公司 A kind of configuration method for database and its equipment
CN107783786A (en) * 2016-08-26 2018-03-09 华为数字技术(成都)有限公司 A kind of method and apparatus for creating device resource
CN108170520A (en) * 2018-01-29 2018-06-15 北京搜狐新媒体信息技术有限公司 A kind of cloud computing resources management method and device
CN108733736A (en) * 2017-04-25 2018-11-02 中兴通讯股份有限公司 Asset creation methods, devices and systems
CN110286884A (en) * 2019-06-21 2019-09-27 北京百度网讯科技有限公司 Micro services method of combination, device, equipment and computer readable storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104461699A (en) * 2014-12-29 2015-03-25 成都致云科技有限公司 Virtual host creating method and device and distributed storage system
WO2017148249A1 (en) * 2016-03-03 2017-09-08 华为技术有限公司 Resource configuration method and network device thereof
CN107402862A (en) * 2016-03-17 2017-11-28 阿里巴巴集团控股有限公司 For realizing the method and apparatus of resource layout in client
CN107493310A (en) * 2016-06-13 2017-12-19 腾讯科技(深圳)有限公司 A kind of cloud resource processing method and cloud management platform
CN107665141A (en) * 2016-07-27 2018-02-06 腾讯科技(深圳)有限公司 A kind of configuration method for database and its equipment
CN107783786A (en) * 2016-08-26 2018-03-09 华为数字技术(成都)有限公司 A kind of method and apparatus for creating device resource
CN108733736A (en) * 2017-04-25 2018-11-02 中兴通讯股份有限公司 Asset creation methods, devices and systems
CN108170520A (en) * 2018-01-29 2018-06-15 北京搜狐新媒体信息技术有限公司 A kind of cloud computing resources management method and device
CN110286884A (en) * 2019-06-21 2019-09-27 北京百度网讯科技有限公司 Micro services method of combination, device, equipment and computer readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王侃等: "基于OpenStack云平台的弹性资源配置系统", 《数码世界》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112328318A (en) * 2020-09-27 2021-02-05 北京华胜天成科技股份有限公司 Method and device for automatic planning of proprietary cloud platform and storage medium
CN112511596A (en) * 2020-11-05 2021-03-16 苏州浪潮智能科技有限公司 Method and equipment for creating cloud resources in cloud platform
CN113301154A (en) * 2021-05-24 2021-08-24 建信金融科技有限责任公司 Public cloud resource creating method and device, storage medium and electronic equipment
CN113301154B (en) * 2021-05-24 2023-07-28 建信金融科技有限责任公司 Public cloud resource creation method and device, storage medium and electronic equipment
CN113535358A (en) * 2021-07-20 2021-10-22 中国工商银行股份有限公司 Task processing method and device

Also Published As

Publication number Publication date
CN110955409B (en) 2023-03-28

Similar Documents

Publication Publication Date Title
CN110955409B (en) Method and device for creating resources on cloud platform
KR101645052B1 (en) Debugging pipeline
WO2021184725A1 (en) User interface test method and apparatus, storage medium, and computer device
CN110221982B (en) Performance test method, device and equipment of business system and readable storage medium
CN111782330B (en) Page data acquisition method, device and equipment based on Web application
CN109918055B (en) Application program generation method and device
CN111597110B (en) Page test method and device, electronic equipment and storage medium
CN112433940A (en) Software development kit SDK testing method and related equipment
CN113778897B (en) Automatic test method, device and equipment for interface and storage medium
CN110727429A (en) Front-end page generation method, device and equipment
CN111240987B (en) Method and device for detecting migration program, electronic equipment and computer readable storage medium
CN111078529B (en) Client writing module testing method and device and electronic equipment
CN117112060A (en) Component library construction method and device, electronic equipment and storage medium
CN112650689A (en) Test method, test device, electronic equipment and storage medium
CN116841543A (en) Development method for dynamically generating cross-platform multi-terminal application based on Flutter
CN115048082A (en) Micro front-end system construction method and device, server and readable storage medium
CN115599359A (en) Code generation method, device, equipment and medium
CN110825370A (en) Mobile terminal application development method, device and system
CN112379967B (en) Simulator detection method, device, equipment and medium
CN114741294A (en) Page debugging method, device, equipment and storage medium
CN113051262A (en) Data quality inspection method, device, equipment and storage medium
CN112181802A (en) Test method and device
CN114116244A (en) Data processing method, device and system, electronic equipment and storage medium
CN112068814A (en) Method, device, system and medium for generating executable file
CN111338968A (en) Project function module debugging method, device, medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant