CN113934446B - Micro-service configuration system and method based on container cloud platform - Google Patents

Micro-service configuration system and method based on container cloud platform Download PDF

Info

Publication number
CN113934446B
CN113934446B CN202111535354.2A CN202111535354A CN113934446B CN 113934446 B CN113934446 B CN 113934446B CN 202111535354 A CN202111535354 A CN 202111535354A CN 113934446 B CN113934446 B CN 113934446B
Authority
CN
China
Prior art keywords
configuration
service
micro
automatically
configuration information
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.)
Active
Application number
CN202111535354.2A
Other languages
Chinese (zh)
Other versions
CN113934446A (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.)
Zhongdian Cloud Computing Technology Co ltd
Original Assignee
CLP Cloud Digital Intelligence 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 CLP Cloud Digital Intelligence Technology Co Ltd filed Critical CLP Cloud Digital Intelligence Technology Co Ltd
Priority to CN202111535354.2A priority Critical patent/CN113934446B/en
Publication of CN113934446A publication Critical patent/CN113934446A/en
Application granted granted Critical
Publication of CN113934446B publication Critical patent/CN113934446B/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/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Abstract

The invention provides a micro-service configuration system and a method based on a container cloud platform, wherein the system comprises the following steps: the management service module is used for acquiring configuration information of a target environment, and the configuration agent service module is in communication connection with the management service module to acquire the configuration information of the target environment and automatically inject the configuration information into a start script command to complete micro-service target environment configuration. According to the invention, by adding the configuration agent and the configuration management service, the automatic injection of the micro-service configuration under the container cloud environment can be safely and quickly completed, and the start command of the micro-service is automatically regenerated through the automatic injection of the related configuration, so that the difficulty of repeatability test comparison brought by repackaging and deployment and the possibility of misoperation brought by the repeatability test comparison are avoided. The system is simple and easy to use, safe, rapid and easy to manage, convenient to deploy and suitable for the requirement of automatic injection configuration of various micro-service services of the container cloud cluster.

Description

Micro-service configuration system and method based on container cloud platform
Technical Field
The invention relates to the technical field of micro service platforms, in particular to a micro service configuration system and method based on a container cloud platform.
Background
The micro service platform provides functions of convenient service management, current limiting degradation and the like, so that the service is more concentrated on development of self service codes, management can be brought in only by configuring related service addresses in the development process, after the service is containerized, cloud deployment is carried out, corresponding strategies are also executed, most of basic environments are written into the codes, and if the environment changes next time, developers need to repackage, deploy and release.
In this case, the developer needs to care about the configuration information of the deployed target environment, which increases the design difficulty for the developer and deviates from the direction that only the core service code is originally wanted to be concerned. Moreover, after the relevant information of the environment configuration is complex, relevant personnel need to perform repeated repacking, deployment and release, necessary tests are performed after release, some configuration information is not modified or is modified incorrectly, unnecessary production loss of service can be caused, and comparison workload of developers is unnecessarily increased and artificial errors can be generated.
For small companies, it is true that it can be handled for a period of time, as the research and development personnel are limited, and the number of business servers is relatively not so large, compared to manual configuration, comparison, distribution and testing. With the increase of containers, the problem of managing the configuration of the container micro-service on the server is increasingly highlighted, and the traditional method for configuring the micro-service is increasingly unconscious.
Moreover, the configuration of the micro service container cloud platform of most enterprises is bound in the code of the business, which causes the great insecurity of the server cluster. Due to the complexity of the cloud cluster environment of the micro-service container, under the condition of large traffic, it is difficult to package, mirror and deploy the corresponding micro-service in a quick time, and the correctness of configuration and the safety of operation are ensured.
Disclosure of Invention
The invention provides a micro-service configuration system and method based on a container cloud platform, and aims to solve the technical problem of how to realize automatic injection of micro-service configuration.
The micro-service configuration system based on the container cloud platform comprises the following components:
the management service module is used for acquiring configuration information of a target environment;
and the configuration agent service module is in communication connection with the management service module to acquire the configuration information of the target environment and automatically inject the configuration information into a start script command to complete micro-service target environment configuration.
According to some embodiments of the present invention, the management service module is further configured to sense whether the configuration information of the target environment changes, and update the acquired configuration information when the configuration information changes.
In some embodiments of the present invention, when the configuration information of the target environment changes, the configuration agent service module is further configured to synchronize the configuration information updated by the management service module.
According to some embodiments of the invention, the configuration agent service module is provided in a microservice container of any developer.
According to the micro-service configuration method based on the container cloud platform, the method adopts the micro-service configuration system based on the container cloud platform to carry out target environment configuration, and the method comprises the following steps:
acquiring configuration information of a target environment through the management service module;
and automatically injecting the configuration information into a start script command through the configuration proxy service module to complete micro-service target environment configuration.
According to some embodiments of the invention, the method further comprises:
and when the configuration parameters of the target environment change, sensing the change of the parameters through the management service module.
In some embodiments of the invention, the method further comprises:
and informing a developer of the parameter change sensed by the management service module, and determining whether to update the configuration information of the target environment by the developer.
According to some embodiments of the invention, the method further comprises:
and after the management service module senses the change of the parameters, the configuration parameters are automatically and synchronously updated through the interaction of the configuration agent service module and the management service module.
According to the computer storage medium of the embodiment of the invention, the computer storage medium stores a computer program, and the computer program is executed by a processor to realize the steps of the micro-service configuration method based on the container cloud platform.
The micro-service configuration system and method based on the container cloud platform provided by the invention have the following beneficial effects:
by adding the configuration agent and the configuration management service, the automatic injection of the micro-service configuration under the container cloud environment can be safely and quickly completed, the starting command of the micro-service is automatically regenerated through the automatic injection of the related configuration, and the difficulty of repeatability test comparison and the possibility of misoperation caused by repackaging and deployment are avoided. The system is simple and easy to use, safe, rapid and easy to manage, convenient to deploy and suitable for the requirement of automatic injection configuration of various micro-service services of the container cloud cluster.
Drawings
FIG. 1 is a schematic diagram illustrating a configuration system of a container cloud platform-based micro service according to an embodiment of the present invention;
fig. 2 is a flowchart of a micro-service configuration method based on a container cloud platform according to an embodiment of the present invention.
Detailed Description
To further explain the technical means and effects of the present invention adopted to achieve the intended purpose, the present invention will be described in detail with reference to the accompanying drawings and preferred embodiments.
The description of the method flow in the present specification and the steps of the flow chart in the drawings of the present specification are not necessarily strictly performed by the step numbers, and the execution order of the method steps may be changed. Moreover, certain steps may be omitted, multiple steps may be combined into one step execution, and/or a step may be broken down into multiple step executions.
Aiming at the defects and shortcomings of the prior art in the background art, the invention provides a brand-new system and method for automatically injecting micro-service configuration based on a container cloud platform.
As shown in fig. 1, a micro-service configuration system based on a container cloud platform according to an embodiment of the present invention includes: a management service module (i.e., the Config management service shown in fig. 1) and a configuration Agent service module (i.e., (Config Agent) shown in fig. 1).
The management service module is used for acquiring configuration information of a target environment, and the configuration agent service module is in communication connection with the management service module to acquire the configuration information of the target environment and automatically inject the configuration information into a start script command to complete configuration of the micro-service target environment.
According to some embodiments of the present invention, the management service module is further configured to sense whether configuration information of the target environment changes, and update the acquired configuration information when the configuration information changes. Therefore, the change of the configuration information of the target environment can be sensed in time, and the configuration information can be updated in time.
In some embodiments of the present invention, the configuration agent service module is further configured to synchronize the updated configuration information of the management service module when the configuration information of the target environment changes. Therefore, the configuration information error can be avoided, and unnecessary loss of service can be avoided.
According to some embodiments of the invention, as shown in FIG. 1, the configuration proxy service module is provided in a microservice container of any developer.
As shown in fig. 2, according to the micro-service configuration method based on the container cloud platform in the embodiment of the present invention, the method performs target environment configuration by using the micro-service configuration system based on the container cloud platform, and includes:
s100, acquiring configuration information of a target environment through a management service module;
s200, automatically injecting the configuration information into the start script command through the configuration proxy service module to complete the configuration of the micro-service target environment.
According to some embodiments of the invention, the method further comprises:
s300, when the configuration parameters of the target environment change, the change of the parameters is sensed through the management service module. Therefore, the change of the configuration information of the target environment can be sensed in time, and the configuration information can be updated in time.
In some embodiments of the invention, the method further comprises:
s310, the parameter change sensed by the management service module is notified to a developer, and the developer determines whether to update the configuration information of the target environment. Therefore, the configuration information error can be avoided, and unnecessary loss of service can be avoided.
According to some embodiments of the invention, the method further comprises:
and S320, after the management service module senses the change of the parameters, automatically and synchronously updating the configuration parameters through the interaction of the configuration agent service module and the management service module. Therefore, the configuration information error can be avoided, and unnecessary loss of service can be avoided.
According to the computer storage medium of the embodiment of the invention, a computer program is stored on the computer storage medium, and when the computer program is executed by a processor, the steps of the micro-service configuration method based on the container cloud platform are realized.
The micro-service configuration system and method based on the container cloud platform provided by the invention have the following beneficial effects:
according to the invention, by adding the configuration agent and the configuration management service, the automatic injection of the micro-service configuration under the container cloud environment can be safely and quickly completed, and the start command of the micro-service is automatically regenerated through the automatic injection of the related configuration, so that the difficulty of repeatability test comparison brought by repackaging and deployment and the possibility of misoperation brought by the repeatability test comparison are avoided. The system is simple and easy to use, safe, rapid and easy to manage, convenient to deploy and suitable for the requirement of automatic injection configuration of various micro-service services of the container cloud cluster.
The container cloud platform-based micro-service configuration system and method according to the present invention will be described in detail with reference to the accompanying drawings. It is to be understood that the following description is only exemplary in nature and should not be taken as a specific limitation on the invention.
The invention develops a system for automatically injecting micro-service configuration, and the simple and easy-to-use automatic injection configuration system can be directly applied to a software system of an enterprise without extra work or secondary development, thereby further improving the productivity and refreshing the operation and maintenance development level of the enterprise.
According to the method and the device, a starting prepositive item is added in a micro-service container of a developer, and the configuration information of the micro-service environment in the cluster is automatically pulled and injected into a starting command applied by the developer through the starting prepositive item.
As shown in fig. 1, the system is generally divided into two blocks, a configuration Agent service (Config Agent) and a configuration management service (Config management service).
The related configuration information in the micro service of a developer is automatically injected into a start script command through a configuration agent service and takes effect in the actual starting process, the related configuration of the micro service in the system is automatically obtained and updated through a configuration management service, the configuration agent in the application Pod keeps synchronous with the related configuration in the configuration management and automatically senses the change of the configuration, and after the configuration is changed, a user is informed whether to update the configuration of the application micro service, and the user determines whether to automatically load a new configuration or automatically senses the change of the configuration and updates the configuration by the configuration system.
After the system cluster is created, the Config management service automatically generates a file service, which can automatically collect information of relevant environments and generate corresponding configuration files.
In conclusion, the invention realizes safe, fast and easy-to-use automatic injection and update perception of configuration of an environment on a container cloud on which micro-services depend, can safely and quickly complete automatic injection of micro-service configuration under the container cloud environment by adding configuration agents and configuration management services, automatically regenerates a start command of the micro-services through automatic injection related configuration, and avoids the difficulty of repetitive test comparison brought by repackaging and deployment and the possibility of operation errors brought by the difficulty. The system is simple and easy to use, safe, rapid and easy to manage, convenient to deploy and suitable for the requirement of automatic injection configuration of various micro-service services of the container cloud cluster.
While the invention has been described in connection with specific embodiments thereof, it is to be understood that it is intended by the appended drawings and description that the invention may be embodied in other specific forms without departing from the spirit or scope of the invention.

Claims (8)

1. A micro-service configuration system based on a container cloud platform is characterized by comprising:
the management service module is used for automatically generating a file service after the system cluster is established, and automatically acquiring the configuration information of the target environment;
the configuration agent service module is in communication connection with the management service module to acquire the configuration information of the target environment, automatically injects the configuration information into a start script command, automatically regenerates a start command of micro-services to complete micro-service target environment configuration, is arranged in a micro-service container of any developer, automatically pulls the configuration information of the micro-service environment in the cluster by adding a start prefix item in the micro-service container of the developer, and injects the configuration information into a start command applied by the developer;
the related configuration information in the micro service of a developer is automatically injected into a start script command through a configuration agent service and takes effect in the actual starting process, the related configuration of the micro service in the system is automatically obtained and updated through a configuration management service, the configuration agent in the application Pod keeps synchronous with the related configuration in the configuration management and automatically senses the change of the configuration, and after the configuration is changed, a user is informed whether to update the configuration of the application micro service, and the user determines whether to automatically load a new configuration or automatically senses the change of the configuration and updates the configuration by the configuration system.
2. The micro-service configuration system based on the container cloud platform as claimed in claim 1, wherein the management service module is further configured to sense whether the configuration information of the target environment changes, and update the acquired configuration information when the configuration information changes.
3. The micro-service configuration system based on the container cloud platform as claimed in claim 2, wherein when the configuration information of the target environment changes, the configuration agent service module is further configured to synchronize the configuration information updated by the management service module.
4. A micro-service configuration method based on a container cloud platform, which is characterized in that the method adopts the micro-service configuration system based on the container cloud platform as claimed in any one of claims 1 to 3 to configure a target environment, and the method comprises the following steps:
after the system cluster is established, automatically generating a file service through the management service module, and automatically acquiring the configuration information of the target environment;
automatically injecting the configuration information into a start script command through the configuration proxy service module, automatically regenerating a start command of the micro service, and completing the configuration of the micro service target environment;
the configuration agent service module is arranged in a micro service container of any developer, and configuration information of the micro service environment in the cluster is automatically pulled and injected into a starting command applied by the developer by adding a starting preposition item in the micro service container of the developer.
5. The container cloud platform-based microservice configuration method of claim 4, further comprising:
and when the configuration information of the target environment changes, sensing the change of the configuration information through the management service module.
6. The container cloud platform-based microservice configuration method of claim 5, further comprising:
and informing a developer of the parameter change sensed by the management service module, and determining whether to update the configuration information of the target environment by the developer.
7. The container cloud platform-based microservice configuration method of claim 5, further comprising:
after the management service module senses the change of the parameters, the configuration parameters are automatically and synchronously updated through the interaction of the configuration agent service module and the management service module.
8. A computer storage medium having stored thereon a computer program that, when executed by a processor, implements the steps of the container cloud platform based microservice configuration system or method of any of claims 1-7.
CN202111535354.2A 2021-12-16 2021-12-16 Micro-service configuration system and method based on container cloud platform Active CN113934446B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111535354.2A CN113934446B (en) 2021-12-16 2021-12-16 Micro-service configuration system and method based on container cloud platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111535354.2A CN113934446B (en) 2021-12-16 2021-12-16 Micro-service configuration system and method based on container cloud platform

Publications (2)

Publication Number Publication Date
CN113934446A CN113934446A (en) 2022-01-14
CN113934446B true CN113934446B (en) 2022-04-22

Family

ID=79289095

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111535354.2A Active CN113934446B (en) 2021-12-16 2021-12-16 Micro-service configuration system and method based on container cloud platform

Country Status (1)

Country Link
CN (1) CN113934446B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111752641A (en) * 2020-06-29 2020-10-09 深圳壹账通智能科技有限公司 Method, device, equipment and storage medium for starting service between micro-service containers
CN112463168A (en) * 2020-12-01 2021-03-09 苏州浪潮智能科技有限公司 vPP service containerization deployment method, device, terminal and storage medium
CN112822272A (en) * 2021-01-08 2021-05-18 上海理想信息产业(集团)有限公司 Micro-service gray scale publishing method and device, computer equipment and storage medium
CN113301116A (en) * 2021-04-15 2021-08-24 阿里巴巴新加坡控股有限公司 Cross-network communication method, device, system and equipment for microservice application
CN113392029A (en) * 2021-07-27 2021-09-14 西安电子科技大学 Comprehensive performance testing device and method for different levels of container cloud platform

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3912035A1 (en) * 2019-01-15 2021-11-24 Microsoft Technology Licensing, LLC Dynamic auto-configuration of multi-tenant paas components
CN110083350B (en) * 2019-03-20 2023-02-28 浙江工业大学 Micro-service self-adaptive evolution method based on RMAE (remote Markov experience) in cloud computing environment
US11593084B2 (en) * 2019-10-31 2023-02-28 Dell Products L.P. Code development for deployment on a cloud platform
CN111552644A (en) * 2020-04-28 2020-08-18 成都库珀区块链科技有限公司 Micro-service architecture-based software continuous integration method
CN111708571B (en) * 2020-06-17 2023-06-30 宏桥高科技集团有限公司 Micro-service deployment method and device, electronic equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111752641A (en) * 2020-06-29 2020-10-09 深圳壹账通智能科技有限公司 Method, device, equipment and storage medium for starting service between micro-service containers
CN112463168A (en) * 2020-12-01 2021-03-09 苏州浪潮智能科技有限公司 vPP service containerization deployment method, device, terminal and storage medium
CN112822272A (en) * 2021-01-08 2021-05-18 上海理想信息产业(集团)有限公司 Micro-service gray scale publishing method and device, computer equipment and storage medium
CN113301116A (en) * 2021-04-15 2021-08-24 阿里巴巴新加坡控股有限公司 Cross-network communication method, device, system and equipment for microservice application
CN113392029A (en) * 2021-07-27 2021-09-14 西安电子科技大学 Comprehensive performance testing device and method for different levels of container cloud platform

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
springBoot 配置项外提结合容器化;任庆;《https://blog.csdn.net/nickDaDa/article/details/109021788》;20201012;全文 *
应用配置管理;80民工;《https://blog.51cto.com/u_10272167/2730167》;20210425;全文 *

Also Published As

Publication number Publication date
CN113934446A (en) 2022-01-14

Similar Documents

Publication Publication Date Title
US10268570B2 (en) Methods, systems, and computer readable media for automated generation of test files and testing network equipment using same
CN108399083B (en) System deployment method, device, electronic equipment and storage medium
CN110096424B (en) Test processing method and device, electronic equipment and storage medium
CN107241315B (en) Access method and device of bank gateway interface and computer readable storage medium
CN110765018B (en) Automatic interface testing method and equipment
CN108964993B (en) Fault simulation method, device and equipment based on dynamic proxy and readable storage medium
CN103678354A (en) Local relation type database node scheduling method and device based on cloud computing platform
CN113687918B (en) Expandable chaotic engineering experimental device compatible with cloud native and traditional environments
CN110543427B (en) Test case storage method and device, electronic equipment and storage medium
CN111475390A (en) Log collection system deployment method, device, equipment and storage medium
CN107179982A (en) A kind of striding course adjustment method and device
CN113934446B (en) Micro-service configuration system and method based on container cloud platform
KR20150133902A (en) System and method for developing of service based on software product line
CN113254045A (en) Software initialization method, system and computer readable storage medium
CN116400987A (en) Continuous integration method, device, electronic equipment and storage medium
CN113792026B (en) Method and device for deploying database script and computer-readable storage medium
Lovrek et al. Improving software maintenance by using agent-based remote maintenance shell
CN113341767A (en) Method, system and computer readable storage medium for automated testing
CN114240265B (en) Product deployment method and device based on mixed environment
CN111459492A (en) Method, device, storage medium and equipment for detecting compatibility of Dubbo service interface
CN110471681A (en) Automatic variation, system, device and the storage medium of application program
CN117235107B (en) Data access processing method and device, electronic equipment and storage medium
CN113626007B (en) Application method and device of connector model and server
CN111125149B (en) Hive-based data acquisition method, hive-based data acquisition device and storage medium
CN111221551B (en) Database upgrading method and device

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
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 430058 No. n3013, 3rd floor, R & D building, building n, Artificial Intelligence Science Park, economic and Technological Development Zone, Caidian District, Wuhan City, Hubei Province

Patentee after: Zhongdian Cloud Computing Technology Co.,Ltd.

Address before: 430100 No. n3013, 3rd floor, R & D building, building n, Artificial Intelligence Science Park, Wuhan Economic and Technological Development Zone, Hubei Province

Patentee before: CLP cloud Digital Intelligence Technology Co.,Ltd.