CN111274007A - Terraform-based cloud platform resource elastic expansion implementation method and system - Google Patents

Terraform-based cloud platform resource elastic expansion implementation method and system Download PDF

Info

Publication number
CN111274007A
CN111274007A CN202010017922.9A CN202010017922A CN111274007A CN 111274007 A CN111274007 A CN 111274007A CN 202010017922 A CN202010017922 A CN 202010017922A CN 111274007 A CN111274007 A CN 111274007A
Authority
CN
China
Prior art keywords
service
management module
management
terraform
resources
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
CN202010017922.9A
Other languages
Chinese (zh)
Other versions
CN111274007B (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.)
Shandong Huimao Electronic Port Co Ltd
Original Assignee
Shandong Huimao Electronic Port 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 Shandong Huimao Electronic Port Co Ltd filed Critical Shandong Huimao Electronic Port Co Ltd
Priority to CN202010017922.9A priority Critical patent/CN111274007B/en
Publication of CN111274007A publication Critical patent/CN111274007A/en
Application granted granted Critical
Publication of CN111274007B publication Critical patent/CN111274007B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/485Task life-cycle, e.g. stopping, restarting, resuming execution
    • G06F9/4856Task life-cycle, e.g. stopping, restarting, resuming execution resumption being on a different machine, e.g. task migration, virtual machine migration
    • G06F9/4862Task life-cycle, e.g. stopping, restarting, resuming execution resumption being on a different machine, e.g. task migration, virtual machine migration the task being a mobile agent, i.e. specifically designed to migrate
    • G06F9/4868Task life-cycle, e.g. stopping, restarting, resuming execution resumption being on a different machine, e.g. task migration, virtual machine migration the task being a mobile agent, i.e. specifically designed to migrate with creation or replication
    • 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/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons
    • 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5072Grid computing
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a method and a system for realizing elastic expansion of cloud platform resources based on Terraform, belonging to the field of cloud computing pass, aiming at solving the technical problem of ensuring that resources are created as required, meeting the requirement of dynamic adjustment according to business flow, improving the actual utilization rate of the resources and effectively reducing the operation cost, and the technical scheme is as follows: the method comprises the steps of editing a Terraform template according to a tenant elastic expansion strategy by using an open-source Terraform tool and an Etcd database, executing the Terraform template by using the Terraform tool of a provider plug-in provided by a cloud platform, and further dynamically controlling resources of the tenant on the cloud platform, so that the effect of elastic expansion and contraction of the resources is achieved, and the creation and deletion operations of the tenant resources and the decoupling and separation of infrastructure resource management and upper application on the cloud platform are realized. The system adopts the technical architecture of micro-service, and comprises a UI layer, a business logic layer and an infrastructure management layer; the UI layer is used for interacting with the user, receiving user configuration, forwarding to the service logic layer for processing and presenting a processing result to the user.

Description

Terraform-based cloud platform resource elastic expansion implementation method and system
Technical Field
The invention belongs to the field of cloud computing pass, and particularly relates to a method and a system for achieving elastic expansion of cloud platform resources based on Terraform.
Background
With the rapid development of cloud computing technology, more and more government authorities, enterprises and individuals migrate applications from a traditional computing center to a cloud center, more and more applications are deployed on a cloud platform, the access volume uncertainty of the applications is larger and larger, the traffic is probably relatively stable under most conditions, but the access volume of a certain special period is increased rapidly, the high availability requirement on the applications is higher and higher, and on the other hand, the operation cost of tenants needs to be considered.
For an application with relatively stable access flow, after deployment, the computing resources required by dynamic adjustment (elastic expansion) are not needed, but for a specific moment, a specific period or dynamic adjustment of the computing resources based on monitoring alarms and the like, the traditional cloud server product cannot meet the requirement.
Therefore, how to ensure that resources are created as required, meet the requirement of dynamic adjustment according to business flow, improve the actual utilization rate of resources, and effectively reduce the operation cost is a technical problem to be solved urgently at present.
Patent document No. CN107506241A discloses a method for automatic elastic expansion and contraction of a cloud platform, which includes creating an elastic expansion and contraction policy of a cloud host, mainly including cpu usage and threshold information of memory usage, and applying the policy to a specified cloud host; monitoring the cloud host applying the expansion strategy in real time by combining a cloud platform monitoring function, and executing the corresponding expansion strategy according to configuration when the expansion threshold is reached; after the cloud host executes the expansion strategy according to the configured expansion strategy, the expansion or reduction work of the cloud host is completed. However, when the technical scheme dynamically adjusts the computing resources at a specific moment and a specific period or based on monitoring alarm and the like, the resources cannot be created as required, the requirement of dynamic adjustment according to the service flow is met, the actual utilization rate of the resources is improved, and the operation cost is effectively reduced.
Disclosure of Invention
The technical task of the invention is to provide a method and a system for realizing elastic expansion of cloud platform resources based on Terraform, so as to solve the problems of ensuring that the resources are created as required, meeting the requirements of dynamic adjustment according to business flow, improving the actual utilization rate of the resources and effectively reducing the operation cost.
The technical task of the invention is realized according to the following mode, a method for realizing elastic expansion and contraction of resources of a cloud platform based on Terraform is disclosed, and the method comprises the steps of using an open-source Terraform tool and an Etcd database, editing a Terraform template according to a tenant elastic expansion and contraction strategy, executing the Terraform template through the Terraform tool of a provider plug-in provided by a cloud platform, further dynamically controlling the resources of tenants on the cloud platform, achieving the effect of elastic expansion and contraction of the resources, and realizing the creation and deletion operations of the tenant resources and the decoupling and separation of infrastructure resource management and upper application on the cloud platform;
the elastic expansion strategy customized by the tenant comprises three types of strategies, namely a timing strategy, a periodic strategy and a trigger strategy based on monitoring alarm; the behavior of elastic stretching includes three actions, namely increasing resources, decreasing resources and adjusting resources.
A cloud platform resource elastic expansion system based on Terraform adopts a technical framework of micro-services, and comprises a UI layer, a business logic layer and an infrastructure management layer;
the UI layer is used for interacting with a user, receiving user configuration, forwarding to the service logic layer for processing, presenting a processing result to the user, interacting with a third-party developer and providing a functional API for the third-party developer;
the business logic layer is used for data model definition and business process management;
and the infrastructure management layer is used for carrying out infrastructure management on the user wave cloud through a Terraform tool with the deployed Inspurloud provider plug-in.
Preferably, the UI layer includes, in a preferred embodiment,
the AS-Front end application micro-service unit is used for interacting with a user, receiving user configuration, forwarding to a service logic layer for processing and presenting a processing result to the user;
and the OpenAPI unit is used for interacting with a third-party developer and providing a functional API for the third-party developer.
Preferably, the Service logic layer comprises an AS-Service back-end micro-Service unit which elastically stretches and contracts and a used external micro-Service unit, wherein the used external micro-Service unit comprises a Time-Service public timing task platform micro-Service subunit, an ECS-Service cloud server micro-Service subunit and an SLB-Service micro-Service subunit;
the AS-Service back-end micro-Service unit is used for defining data model definition and Service process management, managing an elastic telescopic timing task through the Time-Service timing task management micro-Service subunit, butt-jointing a cloud server and a load balancing product through the ESC-Service cloud server micro-Service subunit and the SLB-Service micro-Service subunit, receiving user input of a UI layer and input of a public timing task platform side, controlling Service logic and processes, and dynamically increasing and reducing resources through dynamic adjustment of an infrastructure management layer template.
Preferably, the infrastructure management layer includes,
the infrastructure management micro-Service unit is used for receiving the template and the parameters issued by the AS-Service rear-end micro-Service subunit and finishing the dynamic creation and deletion of user resources on the wave cloud;
the insturcloud provider plug-in unit is used for realizing management of the cloud server ECS, the cloud hard disk EBS and the elastic public network IP EIP on the wave cloud platform in a mode of packaging the product API, and connecting the cloud server ECS, the cloud hard disk EBS and the elastic public network IP EIP on the wave cloud platform to the billing management system BBS to realize cost management of the order.
Preferably, the AS-Service back-end micro-Service unit is divided into different modules according to functions, and comprises an API interface management module, a flexible group instance management module, a flexible configuration management module, a flexible strategy management module, a database management module, an activity management module, a timing task management module and a template management module, wherein the flexible strategy is managed by using a flexible rule management module, and initialization and manual triggering operations are completed by the timing task management module and the activity management module; and the activity management module receives the trigger input of the timing task management module and the telescopic group instance management module, produces an execution template by virtue of the template management module, and calls an interface provided by the Terraform microservice to finish the execution of the activity content.
Preferably, the API interface management module is configured to face a restful API interface encapsulated by the front-end UI layer and the OpenAPI unit, perform interface authority control for identity authentication and authorization management, forward an external call to a function module other than API interface management, and feed back a processing result to a caller;
the flexible group instance management module is a core function module and is used for creating, deleting and inquiring a flexible group instance, using a flexible strategy, moving in and out a cloud server instance and triggering activities; the method comprises the following steps that the creation, query and deletion operations of an instance are maintained inside a telescopic group instance management module, and meanwhile the moving-in and moving-out operations of a cloud server are maintained;
the flexible configuration management module is used for defining and managing flexible configuration of the flexible group and corresponding to management of basic configuration of the cloud server, and the management of the basic configuration of the cloud server comprises a mirror image, a cloud hard disk and a security group;
the flexible strategy management module is used for basic operations of creating, deleting and inquiring flexible strategies and rules;
the data management module is used for the data model definition of the telescopic group examples, the telescopic rules and the timing tasks, the data adding, deleting, modifying and checking operation and the exclusive lock to realize the lock protection of the telescopic group examples so as to achieve the mutual exclusion processing of the telescopic group example operation;
the activity management module is used for executing elastic telescopic action;
the timing task management module is used for being in butt joint with the timing task management platform to complete management of the elastic telescopic timing task, and the management of the elastic telescopic timing task comprises creation, inquiry, deletion, change and timing task execution;
the template management module is used for providing template definition and generation support for the activity management module and controlling the number and configuration dynamic change of the cloud servers.
Preferably, the flexible scaling action of the activity management module includes an initialization activity of scaling group instances, an expected instance count maintenance activity, a maximum/minimum instance count maintenance activity, a manual trigger rule activity, and a timed task trigger rule activity, each activity being completed by an independent thread.
Preferably, the initialization activities of the scalable group instances respectively start an expected instance number maintaining activity and a maximum/minimum instance number maintaining activity, and the expected instance number maintaining activity starts the maximum/minimum instance number maintaining activity;
the initialization activities of the instances of the telescopic group respectively have unidirectional threads between the manual trigger rule activities and the timed task trigger rule activities, and bidirectional mutual exclusion threads exist between every two of the expected instance number maintaining activities, the maximum/minimum instance number maintaining activities, the manual trigger rule activities and the timed task trigger rule activities.
Preferably, the timing task of the timing task management module specifically includes:
(1) expected number of instances to maintain timing tasks: after the expected number of instances arrives, the timing task is deleted;
(2) maximum/minimum number of instances maintain timing tasks: always present;
(3) and timing tasks corresponding to the timing telescoping rule: and (4) user-defining.
The method and the system for realizing elastic expansion of the cloud platform resources based on the Terraform have the following advantages:
according to the method, a target template is edited according to a tenant strategy, the template is executed through a Terraform to be in butt joint with a cloud platform, the operations such as creation and deletion of tenant resources are achieved, and compared with a traditional method for directly docking the cloud platform to create and delete the resources, decoupling and separation of infrastructure resource management and upper-layer application on the cloud platform are achieved; meanwhile, the invention has good performance and transverse expansion function by virtue of the scheduling and management capability of a third-party open source tool;
the invention is based on the timing strategy, and dynamically expands and contracts resources: aiming at the problem of dynamically adjusting resources at a specific moment, the invention provides a function of triggering dynamic telescopic resources based on a timing strategy, thereby well meeting the requirement of dynamically adjusting resources at the specific moment; the dynamic scaling strategy comprises the following steps: increasing resources, reducing resources and adjusting resources to a target value.
And (III) dynamically scaling resources based on a periodic strategy: aiming at the problem of dynamically adjusting resources in a specific period, the invention provides a function of triggering dynamic telescopic resources based on a period strategy, wherein the period strategy is divided into three types, namely daily, weekly and monthly, so that the requirement of dynamically adjusting resources at a specific moment is well met; the dynamic scaling strategy comprises the following steps: increasing resources, reducing resources and adjusting resources to a target value.
The invention monitors alarm strategy based on specific performance index, and dynamically expands and contracts resources: based on the problem of dynamic resource adjustment of performance monitoring alarm, the invention provides a function of triggering dynamic flexible resource based on performance monitoring alarm, and the monitored performance indexes are as follows: the average utilization rate of the CPU, the average utilization rate of the memory and the network flow are three, so that the requirement of dynamically adjusting resources at the time of resource utilization saturation or starvation is well met. The dynamic scaling strategy comprises the following steps: increasing resources, reducing resources and adjusting resources to a target value;
the elastic expansion strategy customized by the tenant comprises three types of strategies, namely a timing strategy, a periodic strategy and a trigger strategy based on monitoring alarm; the three triggering strategies and the three elastic stretching behaviors well ensure the establishment of resources as required and the requirement of dynamic adjustment according to service flow, improve the actual utilization rate of the resources and effectively reduce the operation cost;
the automatic telescopic object is resources on a user cloud platform, comprises a cloud server, a cloud hard disk and an elastic IP, and is equivalent to automatic management of infrastructure for a user; the Terraform is an automatic arrangement tool for efficient construction, modification and version control infrastructure for opening sources, dynamic creation, deletion and change of resources are realized by editing a template and maintaining the state of the resources, and the Terraform realizes automatic arrangement management of the resources on a cloud platform through a provider plug-in provided by the cloud platform;
seventhly, aiming at the application with large flow fluctuation or strong periodicity, by a user-defined expansion strategy, under the condition of specific time, period or monitoring index threshold, the expansion and contraction of resources are dynamically triggered, so that on one hand, the pressure of operators is relieved; on the other hand, resources can be created and deleted as required, so that the utilization rate of the resources is improved, and the operation cost is reduced;
(eighth) the invention dynamically creates resources based on the Terraform resource orchestration tool: in order to create resources on the cloud platform, an open-source resource arranging tool Terraform is used for butting the cloud platform, and a provider plug-in is created by developing corresponding cloud platform resources, so that the dynamic creation of the resources on the cloud platform is realized;
(ninthly) dynamically deleting resources based on a Terraform resource arrangement tool: in order to dynamically delete the resources created on the cloud platform, an open-source resource arranging tool Terraform is used for butting the cloud platform, and a provider plug-in is deleted by developing the corresponding cloud platform resources, so that the resources on the cloud platform are dynamically deleted.
Drawings
The invention is further described below with reference to the accompanying drawings.
Fig. 1 is a structural block diagram of a Terraform-based cloud platform resource elastic expansion system;
FIG. 2 is a block diagram of the AS-Service back-end micro-Service unit;
fig. 3 is a schematic diagram illustrating the active state switching between the elastic stretching actions of the activity management module.
Detailed Description
The method and system for implementing elastic scaling of resources of a terrafrorm-based cloud platform according to the present invention are described in detail below with reference to the accompanying drawings and specific embodiments of the description.
Example 1:
the invention 1 relates to a method for realizing elastic expansion of resources of a cloud platform based on Terraform, which is characterized in that an open-source Terraform tool and an Etcd database are used, a Terraform template is edited according to a tenant elastic expansion strategy, and the Terraform template is executed through the Terraform tool of a provider plug-in provided by a cloud platform, so that the resources of tenants on the cloud platform are dynamically controlled, the effect of elastic expansion of the resources is achieved, and the creation and deletion operations of the tenant resources and the decoupling and separation of infrastructure resource management and upper application on the cloud platform are realized;
the elastic expansion strategy customized by the tenant comprises three types of strategies, namely a timing strategy, a periodic strategy and a trigger strategy based on monitoring alarm; the behavior of elastic stretching includes three actions, namely increasing resources, decreasing resources and adjusting resources.
Example 2:
as shown in fig. 1, the Terraform-based cloud platform resource elastic expansion and contraction system of the present invention adopts a technical architecture of micro-services, including a UI layer, a business logic layer, and an infrastructure management layer;
the UI layer is used for interacting with a user, receiving user configuration, forwarding to the service logic layer for processing, presenting a processing result to the user, interacting with a third-party developer and providing a functional API for the third-party developer; the UI layer includes a layer of a UI,
the AS-Front end application micro-service unit is used for interacting with a user, receiving user configuration, forwarding to a service logic layer for processing and presenting a processing result to the user;
and the OpenAPI unit is used for interacting with a third-party developer and providing a functional API for the third-party developer.
The business logic layer is used for data model definition and business process management; the Service logic layer comprises an AS-Service rear-end micro-Service unit which is elastically telescopic and an external micro-Service unit which is used, wherein the external micro-Service unit comprises a Time-Service public timing task platform micro-Service subunit, an ECS-Service cloud server micro-Service subunit and an SLB-Service micro-Service subunit;
the AS-Service back-end micro-Service unit is used for defining data model definition and Service process management, managing an elastic telescopic timing task through the Time-Service timing task management micro-Service subunit, butt-jointing a cloud server and a load balancing product through the ESC-Service cloud server micro-Service subunit and the SLB-Service micro-Service subunit, receiving user input of a UI layer and input of a public timing task platform side, controlling Service logic and processes, and dynamically increasing and reducing resources through dynamic adjustment of an infrastructure management layer template. AS shown in fig. 2, the AS-Service back-end micro-Service unit is divided into different modules according to functions, including an API interface management module, a flexible group instance management module, a flexible configuration management module, a flexible policy management module, a database management module, an activity management module, a timed task management module and a template management module, and uses a flexible rule management module to manage flexible policies, and completes initialization and manual triggering operations through the timed task management module and the activity management module; and the activity management module receives the trigger input of the timing task management module and the telescopic group instance management module, produces an execution template by virtue of the template management module, and calls an interface provided by the Terraform microservice to finish the execution of the activity content.
The API interface management module is used for facing a restful API interface packaged by a front-end UI layer and an OpenAPI unit, performing interface authority control of identity authentication and authorization management, forwarding an external call to a functional module except for API interface management, and feeding back a processing result to a caller;
the flexible group instance management module is a core function module and is used for creating, deleting and inquiring a flexible group instance, using a flexible strategy, moving in and out a cloud server instance and triggering activities; the method comprises the following steps that the creation, query and deletion operations of an instance are maintained inside a telescopic group instance management module, and meanwhile the moving-in and moving-out operations of a cloud server are maintained;
the flexible configuration management module is used for defining and managing flexible configuration of the flexible group and corresponding to management of basic configuration of the cloud server, and the management of the basic configuration of the cloud server comprises a mirror image, a cloud hard disk and a security group;
the flexible strategy management module is used for basic operations of creating, deleting and inquiring flexible strategies and rules;
the data management module is used for the data model definition of the telescopic group examples, the telescopic rules and the timing tasks, the data adding, deleting, modifying and checking operation and the exclusive lock to realize the lock protection of the telescopic group examples so as to achieve the mutual exclusion processing of the telescopic group example operation;
the activity management module is used for executing elastic telescopic action; the flexible scaling action of the activity management module comprises an initialization activity of a scaling group instance, an expected instance number maintaining activity, a maximum/minimum instance number maintaining activity, a manual trigger rule activity and a timed task trigger rule activity, each activity is completed by an independent thread, as shown in fig. 3, the initialization activity of the scaling group instance respectively starts the expected instance number maintaining activity and the maximum/minimum instance number maintaining activity, and the expected instance number maintaining activity starts the maximum/minimum instance number maintaining activity; the initialization activities of the instances of the telescopic group respectively have unidirectional threads between the manual trigger rule activities and the timed task trigger rule activities, and bidirectional mutual exclusion threads exist between every two of the expected instance number maintaining activities, the maximum/minimum instance number maintaining activities, the manual trigger rule activities and the timed task trigger rule activities.
The timing task management module is used for being in butt joint with the timing task management platform to complete management of the elastic telescopic timing task, and the management of the elastic telescopic timing task comprises creation, inquiry, deletion, change and timing task execution; the timing task of the timing task management module specifically includes:
(1) expected number of instances to maintain timing tasks: after the expected number of instances arrives, the timing task is deleted;
(2) maximum/minimum number of instances maintain timing tasks: always present;
(3) and timing tasks corresponding to the timing telescoping rule: and (4) user-defining.
The template management module is used for providing template definition and generation support for the activity management module and controlling the number and configuration dynamic change of the cloud servers.
The infrastructure management layer is used for managing the infrastructure on the user wave cloud through a Terraform tool with an Inspurloud provider plug-in deployed; the infrastructure management layer includes a layer of,
the infrastructure management micro-Service unit is used for receiving the template and the parameters issued by the AS-Service rear-end micro-Service subunit and finishing the dynamic creation and deletion of user resources on the wave cloud;
the insturcloud provider plug-in unit is used for realizing management of the cloud server ECS, the cloud hard disk EBS and the elastic public network IP EIP on the wave cloud platform in a mode of packaging the product API, and connecting the cloud server ECS, the cloud hard disk EBS and the elastic public network IP EIP on the wave cloud platform to the billing management system BBS to realize cost management of the order.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A cloud platform resource elastic expansion implementation method based on Terraform is characterized in that an open-source Terraform tool and an Etcd database are used, a Terraform template is edited according to a tenant elastic expansion strategy, and the Terraform template is executed through the Terraform tool of a provider plug-in provided by a cloud platform, so that resources of tenants on the cloud platform are dynamically controlled, the effect of elastic expansion and contraction of the resources is achieved, and creation and deletion operations of the tenant resources and decoupling and separation of infrastructure resource management and upper-layer application on the cloud platform are achieved;
the elastic expansion strategy customized by the tenant comprises three types of strategies, namely a timing strategy, a periodic strategy and a trigger strategy based on monitoring alarm; the behavior of elastic stretching includes three actions, namely increasing resources, decreasing resources and adjusting resources.
2. A cloud platform resource elastic expansion system based on Terraform is characterized in that the system adopts a technical framework of micro-services, and comprises a UI layer, a business logic layer and an infrastructure management layer;
the UI layer is used for interacting with a user, receiving user configuration, forwarding to the service logic layer for processing, presenting a processing result to the user, interacting with a third-party developer and providing a functional API for the third-party developer;
the business logic layer is used for data model definition and business process management;
and the infrastructure management layer is used for carrying out infrastructure management on the user wave cloud through a Terraform tool with the deployed Inspurloud provider plug-in.
3. The Terraform based cloud platform resource elastic scaling system according to claim 2, wherein the UI layer comprises,
the AS-Front end application micro-service unit is used for interacting with a user, receiving user configuration, forwarding to a service logic layer for processing and presenting a processing result to the user;
and the OpenAPI unit is used for interacting with a third-party developer and providing a functional API for the third-party developer.
4. The terrafrorm-based cloud platform resource elastic expansion and contraction system of claim 2, wherein the Service logic layer comprises an AS-Service back-end micro-Service unit of the elastic expansion and contraction itself and an external micro-Service unit used, the external micro-Service unit used comprises a Time-Service public timing task platform micro-Service sub-unit, an ECS-Service cloud server micro-Service sub-unit and an SLB-Service micro-Service sub-unit;
the AS-Service back-end micro-Service unit is used for defining data model definition and Service process management, managing an elastic telescopic timing task through the Time-Service timing task management micro-Service subunit, butt-jointing a cloud server and a load balancing product through the ESC-Service cloud server micro-Service subunit and the SLB-Service micro-Service subunit, receiving user input of a UI layer and input of a public timing task platform side, controlling Service logic and processes, and dynamically increasing and reducing resources through dynamic adjustment of an infrastructure management layer template.
5. The Terraform based cloud platform resource elastic scaling system according to claim 2, wherein the infrastructure management layer comprises,
the infrastructure management micro-Service unit is used for receiving the template and the parameters issued by the AS-Service rear-end micro-Service subunit and finishing the dynamic creation and deletion of user resources on the wave cloud;
the insturcloud provider plug-in unit is used for realizing management of the cloud server ECS, the cloud hard disk EBS and the elastic public network IP EIP on the wave cloud platform in a mode of packaging the product API, and connecting the cloud server ECS, the cloud hard disk EBS and the elastic public network IP EIP on the wave cloud platform to the billing management system BBS to realize cost management of the order.
6. The terrafrorm-based cloud platform resource elastic expansion system of claim 4, wherein the AS-Service backend micro-Service units are divided into different modules according to functions, and include an API interface management module, an expansion group instance management module, an expansion configuration management module, an expansion policy management module, a database management module, an activity management module, a timed task management module, and a template management module, and the expansion policy is managed by using an expansion rule management module, and initialization and manual triggering operations are completed by the timed task management module and the activity management module; and the activity management module receives the trigger input of the timing task management module and the telescopic group instance management module, produces an execution template by virtue of the template management module, and calls an interface provided by the Terraform microservice to finish the execution of the activity content.
7. The Terraform-based cloud platform resource elastic expansion system of claim 6, wherein the API interface management module is used for facing a Restful API interface packaged by a front-end UI layer and an OpenAPI unit, performing interface authority control of identity authentication and authorization management, forwarding external calls to a function module except for API interface management, and feeding back a processing result to a caller;
the flexible group instance management module is used for creating, deleting and inquiring a flexible group instance, using a flexible strategy, moving in and out a cloud server instance and triggering activities; the method comprises the following steps that the creation, query and deletion operations of an instance are maintained inside a telescopic group instance management module, and meanwhile the moving-in and moving-out operations of a cloud server are maintained;
the flexible configuration management module is used for defining and managing flexible configuration of the flexible group and corresponding to management of basic configuration of the cloud server, and the management of the basic configuration of the cloud server comprises a mirror image, a cloud hard disk and a security group;
the flexible strategy management module is used for basic operations of creating, deleting and inquiring flexible strategies and rules;
the data management module is used for the data model definition of the telescopic group examples, the telescopic rules and the timing tasks, the data adding, deleting, modifying and checking operation and the exclusive lock to realize the lock protection of the telescopic group examples so as to achieve the mutual exclusion processing of the telescopic group example operation;
the activity management module is used for executing elastic telescopic action;
the timing task management module is used for being in butt joint with the timing task management platform to complete management of the elastic telescopic timing task, and the management of the elastic telescopic timing task comprises creation, inquiry, deletion, change and timing task execution;
the template management module is used for providing template definition and generation support for the activity management module and controlling the number and configuration dynamic change of the cloud servers.
8. The Terraform-based cloud platform resource elastic scaling system according to claim 7, wherein the elastic scaling actions of the activity management module include an initialization activity of scaling group instances, an expected number of instances maintenance activity, a maximum/minimum number of instances maintenance activity, a manual trigger rule activity, and a timed task trigger rule activity, each activity being completed by an independent thread.
9. The terrafrorm-based cloud platform resource elastic scaling system of claim 8, wherein the initialization activities of the scaling group instances respectively start an expected instance number maintaining activity and a maximum/minimum instance number maintaining activity, the expected instance number maintaining activity starts the maximum/minimum instance number maintaining activity;
the initialization activities of the instances of the telescopic group respectively have unidirectional threads between the manual trigger rule activities and the timed task trigger rule activities, and bidirectional mutual exclusion threads exist between every two of the expected instance number maintaining activities, the maximum/minimum instance number maintaining activities, the manual trigger rule activities and the timed task trigger rule activities.
10. The Terraform-based cloud platform resource elastic scaling system according to claim 7, wherein the timed task of the timed task management module specifically comprises:
(1) expected number of instances to maintain timing tasks: after the expected number of instances arrives, the timing task is deleted;
(2) maximum/minimum number of instances maintain timing tasks: always present;
(3) and timing tasks corresponding to the timing telescoping rule: and (4) user-defining.
CN202010017922.9A 2020-03-31 2020-03-31 Terraform-based cloud platform resource elastic expansion implementation method and system Active CN111274007B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010017922.9A CN111274007B (en) 2020-03-31 2020-03-31 Terraform-based cloud platform resource elastic expansion implementation method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010017922.9A CN111274007B (en) 2020-03-31 2020-03-31 Terraform-based cloud platform resource elastic expansion implementation method and system

Publications (2)

Publication Number Publication Date
CN111274007A true CN111274007A (en) 2020-06-12
CN111274007B CN111274007B (en) 2023-04-14

Family

ID=70996998

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010017922.9A Active CN111274007B (en) 2020-03-31 2020-03-31 Terraform-based cloud platform resource elastic expansion implementation method and system

Country Status (1)

Country Link
CN (1) CN111274007B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111884826A (en) * 2020-06-13 2020-11-03 苏州浪潮智能科技有限公司 Elastic scaling processing method, system and device for strategy and execution of isomerization
CN112130974A (en) * 2020-09-10 2020-12-25 厦门市美亚柏科信息股份有限公司 Cloud computing resource configuration method and device, electronic equipment and storage medium
CN114710488A (en) * 2022-03-29 2022-07-05 浪潮云信息技术股份公司 Method, device, equipment and medium for realizing elastic expansion and contraction across available areas

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107193546A (en) * 2017-04-11 2017-09-22 国网天津市电力公司信息通信公司 A kind of micro services business application system
US20190122156A1 (en) * 2017-10-20 2019-04-25 International Business Machines Corporation Orchestration Engine Blueprint Milestones
CN109947537A (en) * 2019-03-28 2019-06-28 山东浪潮云信息技术有限公司 Create the system and method for cloud container service
TW201937379A (en) * 2017-12-05 2019-09-16 美商敏捷棧公司 System and method for managing data center and cloud application infrastructure, and non-transitory computer readable medium
CN110750333A (en) * 2019-10-25 2020-02-04 浪潮云信息技术有限公司 Full life cycle management method for cloud service factory platform
CN110781002A (en) * 2019-10-24 2020-02-11 浪潮云信息技术有限公司 Elastic expansion method, management system, terminal and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107193546A (en) * 2017-04-11 2017-09-22 国网天津市电力公司信息通信公司 A kind of micro services business application system
US20190122156A1 (en) * 2017-10-20 2019-04-25 International Business Machines Corporation Orchestration Engine Blueprint Milestones
TW201937379A (en) * 2017-12-05 2019-09-16 美商敏捷棧公司 System and method for managing data center and cloud application infrastructure, and non-transitory computer readable medium
CN109947537A (en) * 2019-03-28 2019-06-28 山东浪潮云信息技术有限公司 Create the system and method for cloud container service
CN110781002A (en) * 2019-10-24 2020-02-11 浪潮云信息技术有限公司 Elastic expansion method, management system, terminal and storage medium
CN110750333A (en) * 2019-10-25 2020-02-04 浪潮云信息技术有限公司 Full life cycle management method for cloud service factory platform

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111884826A (en) * 2020-06-13 2020-11-03 苏州浪潮智能科技有限公司 Elastic scaling processing method, system and device for strategy and execution of isomerization
CN112130974A (en) * 2020-09-10 2020-12-25 厦门市美亚柏科信息股份有限公司 Cloud computing resource configuration method and device, electronic equipment and storage medium
CN112130974B (en) * 2020-09-10 2022-10-25 厦门市美亚柏科信息股份有限公司 Cloud computing resource configuration method and device, electronic equipment and storage medium
CN114710488A (en) * 2022-03-29 2022-07-05 浪潮云信息技术股份公司 Method, device, equipment and medium for realizing elastic expansion and contraction across available areas
CN114710488B (en) * 2022-03-29 2024-05-03 浪潮云信息技术股份公司 Method, device, equipment and medium for realizing elastic expansion and contraction across available areas

Also Published As

Publication number Publication date
CN111274007B (en) 2023-04-14

Similar Documents

Publication Publication Date Title
CN111274007B (en) Terraform-based cloud platform resource elastic expansion implementation method and system
Schmidt Middleware for real-time and embedded systems
WO2019152117A1 (en) Systems and methods for synchronizing microservice data stores
CN103618762A (en) System and method for enterprise service bus state pretreatment based on AOP
CN104618693A (en) Cloud computing based online processing task management method and system for monitoring video
Hu et al. Distributed computer system resources control mechanism based on network-centric approach
JP7161560B2 (en) Artificial intelligence development platform management method, device, medium
EP3049959A1 (en) Processing a hybrid flow associated with a service class
Guo et al. Energy-efficient fault-tolerant scheduling algorithm for real-time tasks in cloud-based 5G networks
EP3457668B1 (en) Clustering in unified communication and collaboration services
CN101908981B (en) Method for shielding and uniformly processing alarm and performance data
CN114840318A (en) Scheduling method for preempting hardware key encryption and decryption resources through multiple processes
CN103414739B (en) Use Cloud Server automatic monitored control system and the method for automatic drift
Liu et al. Service resource management in edge computing based on microservices
CN111666167A (en) Input event reading processing optimization method, nonvolatile memory and terminal equipment
CN107454189A (en) The office automation system of function is arranged with intelligent meeting
Ding et al. Task allocation in hybrid big data analytics for urban IoT applications
CN110109986B (en) Task processing method, system, server and task scheduling system
WO2016197858A1 (en) Method and device for message notification
CN100426241C (en) Message level soft interrupt processing method in service system structure
CN113992509A (en) SDN network service configuration issuing method, device and storage medium
CN113391927A (en) Method, device and system for processing business event and storage medium
Li et al. An energy-efficient data transfer strategy with link rate control for Cloud
CN111475275A (en) Scheduling method and scheduling server
US11971849B2 (en) Managing fleet of multi-tenant logical databases in relational database management system servers

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