A method for implementing cloud platform resource orchestration
By converting the resource configuration template of user needs into Terraform templates, and using the Cloud-Init tool, the automatic deployment of the automatic creation and application of resources on the cloud platform solves the problem of tedious manual installation and high operating costs, and improves resources. The utilization rate and reduced operating costs.
Patent Information
- Application Number
- CN202010749867.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-30
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2040-07-30
AI Technical Summary
When deploying application resources on cloud platforms, manual installation is cumbersome, and the high availability expansion of cloud platforms is not fully utilized, resulting in increased operating costs.
Through the resource configuration templates of user needs, the Terraform template that can create Terraform can be created, and the Cloud-INIT tool in the cloud platform is used to automatically install and deploy resource applications to realize the automatic deployment of resource creation and application.
The automatic deployment of resource creation and application is realized, which improves the actual utilization rate of resources and reduces operating costs.
Smart Images

Figure CN111880811B_ABST
Abstract
Description
Technical Field
[0001] The invention discloses a method for implementing cloud platform resource orchestration, and relates to the technical field of resource management, and specifically to a method for implementing cloud platform resource orchestration based on Terraform and cloud-init. Background Art
[0002] With the rapid development of cloud computing technology, more and more government agencies, enterprises and individuals are migrating applications from traditional computing centers to cloud centers. As a result, more and more applications are deployed on cloud platforms. However, the manual installation of application resources is cumbersome and not conducive to the high availability expansion of application resources on cloud platforms. It also increases the operating costs of cloud platforms. Summary of the invention
[0003] In view of the problems of the prior art, the present invention provides a method for implementing cloud platform resource orchestration, which has the characteristics of strong versatility and simple implementation, and has broad application prospects.
[0004] The specific scheme proposed by the present invention is:
[0005] A method for implementing cloud platform resource orchestration, converting and creating Terraform templates that can be recognized by Terraform according to resource configuration templates required by users,
[0006] According to the Terraform template, use the cloud-init tool in the cloud platform to install the corresponding resource applications and automatically deploy the applications in the resources.
[0007] The cloud platform resource orchestration implementation method adopts a microservice architecture to implement the cloud platform resource orchestration.
[0008] In the cloud platform resource orchestration implementation method, a microservice architecture is used to interact with users through front-end microservices to receive resource configuration templates required by users.
[0009] Create a Terraform template that can be recognized by Terraform through backend microservice conversion. According to the Terraform template, use the cloud-init tool in the cloud platform to install the corresponding resource applications and automatically deploy the applications in the resources.
[0010] In the implementation method of a cloud platform resource orchestration, the received resource configuration template is first verified and parsed by the backend microservice, and the number and type of resource creation are controlled. Then, the resource creation parameters are replaced according to the resource configuration template, the resource stack and the resource configuration template are bound, and the resource configuration template is converted into a Terraform template.
[0011] A cloud platform resource orchestration implementation system, including a business logic module and a management module.
[0012] The business logic module converts and creates Terraform templates that Terraform can recognize based on the resource configuration templates required by the user.
[0013] The management module installs the corresponding resource applications based on the Terraform template and uses the cloud-init tool in the cloud platform to automatically deploy the applications in the resources.
[0014] The cloud platform resource orchestration implementation system adopts a microservice architecture and utilizes business logic modules and management modules to implement cloud platform resource orchestration.
[0015] The business logic module in the implementation system of the cloud platform resource orchestration includes a template management module, a resource stack management module and a service orchestration engine module.
[0016] The template management module verifies and parses the received resource configuration templates and controls the quantity and type of resource creation.
[0017] The resource stack management module replaces the resource creation parameters according to the resource configuration template, binds the resource stack and resource configuration template,
[0018] The service orchestration engine module converts the resource configuration template into a Terraform template.
[0019] A device for implementing cloud platform resource orchestration, comprising: at least one memory and at least one processor;
[0020] The at least one memory is used to store a machine-readable program;
[0021] The at least one processor is used to call the machine-readable program to execute the method for implementing cloud platform resource orchestration.
[0022] The benefits of the present invention are:
[0023] The present invention provides a method for implementing cloud platform resource orchestration. Based on the function of Terraform to automatically create resources according to the template edited by the user, the user resource template is converted into a Terraform template, and the required resources can be created when the user needs the resources. At the same time, based on the function of cloud-init to install applications in the cloud platform server resources, after the cloud server resource creation and orchestration are completed, cloud-init can automatically install the application according to the installation application script parameters passed by the user, so as to achieve the purpose of automatic resource creation and automatic application deployment, ensure the on-demand creation of resources and the installation of applications, improve the actual utilization rate of resources, and effectively reduce the operating cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 It is a schematic flow chart of the method of the present invention;
[0025] Figure 2 It is a schematic diagram of the system framework of the present invention. DETAILED DESCRIPTION
[0026] Terraform is an open source automated orchestration tool for efficient construction, modification and version control of infrastructure. It enables dynamic creation, deletion and application installation of resources by editing templates and installing application scripts, as well as resource status maintenance. Terraform can provide corresponding provider plug-ins through the cloud platform to achieve automated orchestration and management of resources on the cloud platform.
[0027] Cloud-init is a tool developed specifically for initializing virtual machines in cloud environments. It is used to read relevant data from various data sources when creating a virtual machine and customize the configuration of the virtual machine accordingly.
[0028] The objects for automatically creating resources and installing applications in the present invention are resources on the user's cloud platform, including cloud servers, cloud hard disks, elastic IPs, etc.
[0029] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and implement it, but the embodiments are not intended to limit the present invention.
[0030] The present invention provides a method for implementing cloud platform resource orchestration, which converts and creates a Terraform template recognizable by Terraform according to the resource configuration template required by the user.
[0031] According to the Terraform template, use the cloud-init tool in the cloud platform to install the corresponding resource applications and automatically deploy the applications in the resources.
[0032] The function of automatically creating resources based on Terraform according to the template edited by the user solves the problem of users manually creating resources when they need them. At the same time, based on the function of installing applications in cloud server resources based on cloud-init, after the cloud server resources are created according to the Terraform template, cloud-init can automatically install the application according to the installation application script parameters passed by the user in the Terraform template, thereby achieving the purpose of automatic resource creation and automatic application deployment.
[0033] In one embodiment of the method of the present invention, resource orchestration is performed using the technical architecture of microservices, and the specific process is as follows:
[0034] Use the front-end application microservice Ros-front to interact with users, receive user-configured templates and script files, forward them to the business logic layer for processing, and present the processing results to users.
[0035] Use the backend microservice AS-Service to receive the resource creation template and application deployment script files delivered by the frontend microservice. By verifying the resource template and deployment script and creating parameter replacement, the template is converted into a template file recognizable by Terraform. The converted template file is used to call the corresponding management microservice. The management microservice deploys the Terraform tool with the Inspurcloud provider plug-in, receives the template files and parameters recognizable by Terraform, and implements resource orchestration management of products such as cloud servers, cloud hard disks, and EIP on the cloud platform.
[0036] In another embodiment of the method of the present invention, based on the above embodiment, each module under the microservice architecture is used to specifically implement the resource orchestration and application deployment process:
[0037] In the backend microservice AS-Service, the template management module is used to configure the template for receiving user resources, perform verification and analysis, and store them in the database. The template management module can also control the number and type of cloud resource creation.
[0038] Use the resource stack management module to replace the resource creation parameters according to the template and bind the relationship between the resource stack and the template. The resource stack is a group of resources, which are the resources to be created defined in the template.
[0039] The service orchestration engine module is used to convert the resource configuration template file, and the script file is executed and converted to the value of the cloud server creation parameter user_data through the Terraform internal function. After the conversion, the resource configuration template and script file are converted into a basic resource template that can be recognized by Terraform, that is, a Terraform template.
[0040] Then use the Terraform execution program and cloud platform Terraformprovider plug-in built into the Terraform engine module. The cloud basic resource API can be integrated into the Terraform provider plug-in. Use the Terraform command to execute the Terraform provider plug-in to realize the dynamic creation of resources on the cloud platform and manage resource orchestration.
[0041] At the same time, the cloud-init tool in the cloud server is used to deploy applications in resources by reading the script file in the user_data parameter passed when the cloud server is created.
[0042] The present invention also provides a cloud platform resource arrangement implementation system, including a business logic module and a management module.
[0043] The business logic module converts and creates Terraform templates that Terraform can recognize based on the resource configuration templates required by the user.
[0044] The management module installs the corresponding resource applications based on the Terraform template and uses the cloud-init tool in the cloud platform to automatically deploy the applications in the resources.
[0045] The information interaction, execution process and other contents between the modules in the above-mentioned system are based on the same concept as the embodiment of the method of the present invention. For the specific contents, please refer to the description in the embodiment of the method of the present invention, and no further description is given here.
[0046] It should be noted that not all steps and modules in the above-mentioned processes and system structure diagrams are necessary, and some steps or modules can be ignored according to actual needs. The execution order of each step is not fixed and can be adjusted as needed. The system structure described in the above-mentioned embodiments can be a physical structure or a logical structure, that is, some modules may be implemented by the same physical entity, or some modules may be implemented by multiple physical entities, or some components in multiple independent devices may be implemented together.
[0047] The present invention also provides a device for implementing cloud platform resource orchestration, comprising: at least one memory and at least one processor;
[0048] The at least one memory is used to store a machine-readable program;
[0049] The at least one processor is used to call the machine-readable program to execute the method for implementing the cloud platform resource arrangement. The information interaction, execution process and other contents of the device of the present invention are based on the same concept as the embodiment of the method of the present invention. For specific contents, please refer to the description in the embodiment of the method of the present invention, and will not be repeated here.
[0050] In addition, it should be clear that not only can the program code read by the computer be executed by the processor, but the processor can also enable the operating system operating on the computer to complete part or all of the actual operations based on the instructions of the program code, thereby realizing the functions of any of the above embodiments.
[0051] The above-described embodiments are only preferred embodiments for fully illustrating the present invention, and the protection scope of the present invention is not limited thereto. Equivalent substitutions or changes made by those skilled in the art based on the present invention are within the protection scope of the present invention. The protection scope of the present invention shall be subject to the claims.
Claims
1. A method for implementing cloud platform resource orchestration, characterized in that The cloud platform resource orchestration is realized by adopting microservice architecture. The front-end microservice Ros-front interacts with users, receives resource configuration templates and application deployment script files required by users, forwards them to the business logic layer for processing, and uses the back-end microservice AS-Service to receive resource creation templates and application deployment script files delivered by the front-end microservice. The received resource configuration template is verified and parsed through the backend microservice AS-Service, and the quantity and type of resource creation are controlled. Then replace the resource creation parameters according to the resource configuration template, bind the resource stack and resource configuration template. The resource stack is a set of resources to be created defined in the resource configuration template. Convert the resource configuration template, execute the application deployment script file, and convert it into the value of the cloud server creation parameter user_data through the Terraform internal function, so that the resource configuration template and application deployment script file are converted into Terraform templates that Terraform can recognize. Use the Terraform command to execute the Terraform provider plug-in of the cloud platform to manage resource orchestration and realize dynamic resource creation of the cloud platform. According to the Terraform template, use the cloud-init tool in the cloud platform to install the corresponding resource applications and automatically deploy the applications in the resources.
2. A cloud platform resource orchestration implementation system, characterized by It includes business logic module and management module. The business logic module under the microservice architecture includes template management module, resource stack management module and service orchestration engine module. It interacts with users through the front-end microservice Ros-front, receives resource configuration templates and application deployment script files required by users, forwards them to the business logic layer for processing, and uses the back-end microservice AS-Service to receive resource creation templates and application deployment script files delivered by the front-end microservice. The template management module in the backend microservice AS-Service is used to verify and parse the received resource configuration template, and control the number and type of resource creation. The resource stack management module then replaces the resource creation parameters according to the resource configuration template and binds the resource stack and resource configuration template. The resource stack is a set of resources to be created defined in the resource configuration template. The service orchestration engine module converts the resource configuration template, executes the application deployment script file, and converts it into the value of the cloud server creation parameter user_data through the Terraform internal function, so that the resource configuration template and application deployment script file are converted into Terraform templates that Terraform can recognize. The Terraform command in the service orchestration engine module is used to execute the Terraform provider plug-in of the cloud platform to manage resource orchestration and realize dynamic resource creation of the cloud platform. The management module uses the cloud-init tool in the cloud platform according to the Terraform template to install the corresponding resource applications and automatically deploy the applications in the resources.
3. A cloud platform resource orchestration implementation device, characterized in that: include: at least one memory and at least one processor; The at least one memory is used to store a machine-readable program; The at least one processor is used to call the machine-readable program to execute the method for implementing cloud platform resource orchestration as described in claim 1.
Citation Information
Patent Citations
Resource presentation method, device and computer terminal
CN109145034A
Method and system for realizing elastic expansion and contraction of cloud platform resources based on Terraform
CN111274007A