CN107919987B - Method for realizing micro-service cloud deployment - Google Patents
Method for realizing micro-service cloud deployment Download PDFInfo
- Publication number
- CN107919987B CN107919987B CN201711136622.7A CN201711136622A CN107919987B CN 107919987 B CN107919987 B CN 107919987B CN 201711136622 A CN201711136622 A CN 201711136622A CN 107919987 B CN107919987 B CN 107919987B
- Authority
- CN
- China
- Prior art keywords
- module
- log
- command
- data
- deployment
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
- H04L67/025—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/52—Program synchronisation; Mutual exclusion, e.g. by means of semaphores
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/06—Management of faults, events, alarms or notifications
- H04L41/069—Management of faults, events, alarms or notifications using logs of notifications; Post-processing of notifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
- H04L67/1004—Server selection for load balancing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/16—Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
- H04L69/161—Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
- H04L69/162—Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention relates to the technical field of computer application, in particular to a method for realizing micro-service cloud deployment. The method comprises a client side consisting of a resource display module and a deployment module; the server is realized by a receiving module, a writing module, a command executing module, a monitoring module, a thread pool and a log module; one client corresponds to a plurality of servers; and the client uploads the program to be deployed according to the information input by the user and executes the command of the user. The server side can deploy the program and execute the instruction of the client side, monitor the program in real time and feed back monitoring information to the client side, and record various executing and monitoring logs so that the client side can check the logs conveniently. The invention can conveniently carry out deployment monitoring and maintenance management on each micro-service.
Description
Technical Field
The invention relates to the technical field of computer application, in particular to a method for realizing micro-service cloud deployment.
Background
With the continuous development of internet and computer application technologies, various application systems are popularized and the systems are more and more complex, so that the system is developed into the current micro-service architecture. The micro-service architecture solves the problems of centralization and over complexity of the system; but also brings new problems that the over-servicing of the micro-services causes difficult management; each deployment requires the server to be operated, which brings about a lot of extra work. If automatic deployment is carried out through the deployment system, the operation of interfacing, this efficiency that must can be very big is improved, convenient fortune dimension and management, can also monitor the program of operation simultaneously and observe, conveniently gets rid of the problem in the aspect of the operation.
Disclosure of Invention
The invention aims to provide a method for realizing micro-service cloud deployment, which provides application for a system needing the service scene, simplifies the deployment process and improves the efficiency.
The technical scheme for solving the technical problems is as follows:
the method comprises a client side consisting of a resource display module and a deployment module; the server is realized by a receiving module, a writing module, a command executing module, a monitoring module, a thread pool and a log module; one client corresponds to a plurality of servers; the deployment steps are as follows:
(1) the deployment module of the client communicates with the server through a socket according to the designated IP;
(2) the receiving module monitors the request, receives the program if finding that a client requests the service, and writes the program into a receiving log;
(3) when the program is received, the writing module is reminded to persist the data in the cache and write the record into the log;
(4) after the data persistence is finished, if the specified command statement exists, the specified command statement is executed, otherwise, the default starting command statement is executed, and the thread is added into the thread pool; each program is started and maintained by a thread, and a log is written in the maintenance process;
(5) and the monitoring module reads the log in real time and forms monitoring data to be provided to the monitoring interface for providing information to the outside.
The deployment module can upload programs simultaneously in a multithreading mode according to the configuration specified by a user in a single mode or in batches and feed back the deployment process.
And the resource display module displays the occupied resources of each thread.
The command execution module executes commands sent by the client, if the executed commands are not specified, default starting or stopping commands are executed, the execution of each program is maintained by one thread, and the threads are added into the thread pool.
The log module records any server side action in a log; the types of logs can be divided into: command class, write file class, and monitor data class; the data of the command log comprises time, a command line and an exception; the write file class comprises time, file name, file size and exception; the monitoring data classes include: CPU, memory, address, and thread of which it belongs to.
The thread pool stores and maintains all threads and provides the resource information of the threads at any time.
The invention can conveniently carry out deployment monitoring and maintenance management on each micro-service, greatly reduce the maintenance cost and improve the efficiency of maintenance management.
Drawings
The invention is further described below with reference to the accompanying drawings:
FIG. 1 is an architectural diagram of the present invention;
fig. 2 is a flow chart of the business process of the present invention.
Detailed Description
As shown in fig. 1, the present invention is composed of a client and a server. And respectively installing server programs on a plurality of servers by adopting a C/S (client/server) architecture mode, starting a daemon process, and requesting a service by one client.
The system mainly comprises a client and a server; the client comprises a resource display module and a deployment module; the server comprises a receiving module, a writing module, a command executing module, a monitoring module, a thread pool and a log module. The number of the service terminals is several, but only one client terminal is provided, and the client terminal uploads the program to be deployed according to the information input by the user and executes the command of the user. The information of each server can be seen in detail at the client, including the command log that the program executed once. The server side can deploy the program and execute the instruction of the client side, monitor the program in real time and feed back monitoring information to the client side, and record various executing and monitoring logs so that the client side can check the logs conveniently.
As shown in fig. 2, the service processing flow chart shows the following detailed flow of the whole work:
1. the deployment module of the client communicates with the server through a socket according to the designated IP;
2. the receiving module monitors the request, receives the program if finding that a client requests the service, and writes the program into a receiving log;
3. when receiving the program, reminding the writing module to persist the data in the cache and writing the record into the log;
4. and after the data persistence is finished, if the specified command statement exists, executing the specified command statement, otherwise, executing a default starting command statement, and adding the thread into the thread pool. Each program is started and maintained by a thread, and a log is written in the maintenance process;
5. the monitoring module reads the log in real time and forms monitoring data to be provided to the monitoring interface for providing information to the outside.
The log module adopts the design mode of an observer, when information is written into the log module, the log module wakes up the monitoring module, and the monitoring module reads the data of the log, so that the data can be monitored efficiently in real time, and the condition of a server program can be known.
Claims (10)
1. A method for realizing micro-service cloud deployment is characterized by comprising the following steps: the method comprises a client side consisting of a resource display module and a deployment module; the server is realized by a receiving module, a writing module, a command executing module, a monitoring module, a thread pool and a log module; one client corresponds to a plurality of servers; the deployment steps are as follows:
(1) the deployment module of the client communicates with the server through a socket according to the designated IP;
(2) the receiving module monitors the request, receives the program to be deployed if finding that a client requests the deployment service, and writes a receiving log into the log module;
(3) when the program to be deployed is received, the receiving module reminds the writing module to persist the data in the cache and controls the persisted record to write in the log;
(4) after the data persistence is finished, if the specified command statement exists, the command execution module executes the specified command statement, otherwise, the default starting command statement is executed, and the thread is added into the thread pool; each program is started and maintained by a thread, and a log is written in the maintenance process;
(5) and the monitoring module reads the log in real time and forms monitoring data to be provided to the monitoring interface for providing information to the outside.
2. The method of claim 1, wherein: the deployment module can upload programs simultaneously in a multithreading mode according to the configuration specified by a user in a single mode or in batches and feed back the deployment process.
3. The method of claim 1, wherein: and the resource display module displays the occupied resources of each thread.
4. The method of claim 2, wherein: and the resource display module displays the occupied resources of each thread.
5. The method according to any one of claims 1 to 4, characterized in that: the command execution module executes commands sent by the client, if the executed commands are not specified, default starting or stopping commands are executed, the execution of each program is maintained by one thread, and the threads are added into the thread pool.
6. The method according to any one of claims 1 to 4, characterized in that: the log module records any server side action in a log; the types of logs can be divided into: command class, write file class, and monitor data class; the data of the command log comprises time, a command line and an exception; the data for writing the file log comprises time, file name, file size and exception; monitoring data of the data class log includes: CPU, memory, address, and thread of which it belongs to.
7. The method of claim 5, wherein: the log module records any server side action in a log; the types of logs can be divided into: command class, write file class, and monitor data class; the data of the command log comprises time, a command line and an exception; the data for writing the file log comprises time, file name, file size and exception; monitoring data of the data class log includes: CPU, memory, address, and thread of which it belongs to.
8. The method according to any one of claims 1 to 4, characterized in that: the thread pool stores and maintains all threads and provides the resource information of the threads at any time.
9. The method of claim 6, wherein: the thread pool stores and maintains all threads and provides the resource information of the threads at any time.
10. The method of claim 7, wherein: the thread pool stores and maintains all threads and provides the resource information of the threads at any time.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711136622.7A CN107919987B (en) | 2017-11-16 | 2017-11-16 | Method for realizing micro-service cloud deployment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711136622.7A CN107919987B (en) | 2017-11-16 | 2017-11-16 | Method for realizing micro-service cloud deployment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107919987A CN107919987A (en) | 2018-04-17 |
CN107919987B true CN107919987B (en) | 2021-06-22 |
Family
ID=61895591
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711136622.7A Active CN107919987B (en) | 2017-11-16 | 2017-11-16 | Method for realizing micro-service cloud deployment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107919987B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109358912B (en) * | 2018-09-30 | 2019-09-13 | 安徽智恒信科技股份有限公司 | A kind of visualization system and method for batch starting micro services |
CN109582472B (en) * | 2018-10-19 | 2021-05-18 | 华为技术有限公司 | Micro-service processing method and device |
CN111431735B (en) * | 2020-02-28 | 2023-04-07 | 平安科技(深圳)有限公司 | Method, device and apparatus for managing connection pool and storage medium |
CN112306811A (en) * | 2020-11-09 | 2021-02-02 | 重庆易宠科技有限公司 | PHP micro-service control method, system, terminal and medium |
CN112685261B (en) * | 2021-01-05 | 2022-10-04 | 武汉长江通信智联技术有限公司 | Micro-service operation state monitoring method based on observer mode |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103812704A (en) * | 2014-02-25 | 2014-05-21 | 国云科技股份有限公司 | Public network IP (Internet Protocol) dynamic management method for virtual machine |
CN106612188A (en) * | 2015-10-21 | 2017-05-03 | 中兴通讯股份有限公司 | Method and device for extending software function based on micro service architecture |
CN107025256A (en) * | 2015-11-06 | 2017-08-08 | 国际商业机器公司 | The method and system for reactivating the time for reducing the service based on cloud |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9363301B2 (en) * | 2014-10-21 | 2016-06-07 | Twilio, Inc. | System and method for providing a micro-services communication platform |
-
2017
- 2017-11-16 CN CN201711136622.7A patent/CN107919987B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103812704A (en) * | 2014-02-25 | 2014-05-21 | 国云科技股份有限公司 | Public network IP (Internet Protocol) dynamic management method for virtual machine |
CN106612188A (en) * | 2015-10-21 | 2017-05-03 | 中兴通讯股份有限公司 | Method and device for extending software function based on micro service architecture |
CN107025256A (en) * | 2015-11-06 | 2017-08-08 | 国际商业机器公司 | The method and system for reactivating the time for reducing the service based on cloud |
Non-Patent Citations (2)
Title |
---|
《Emulation-Based Study of Dynamic Service Placement in Mobile Micro-Clouds》;Shiqiang Wang 等1;《IEEE》;20151028;全文 * |
《微服务架构在容器云中的应用实践》;杨鸥 等;《电脑与电信》;20170710;全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN107919987A (en) | 2018-04-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107919987B (en) | Method for realizing micro-service cloud deployment | |
KR102493449B1 (en) | Edge computing test methods, devices, electronic devices and computer-readable media | |
US20180285053A1 (en) | Screenshot method and apparatus | |
US20160275123A1 (en) | Pipeline execution of multiple map-reduce jobs | |
CN111897638B (en) | Distributed task scheduling method and system | |
CN111737127A (en) | Method and apparatus for testing map service | |
CN113742031B (en) | Node state information acquisition method and device, electronic equipment and readable storage medium | |
US9535754B1 (en) | Dynamic provisioning of computing resources | |
CN109542595B (en) | Data acquisition method, device and system | |
CN105765534A (en) | Virtual computing systems and methods | |
WO2019242455A1 (en) | Method and apparatus for user request forwarding, reverse proxy and computer readable storage medium | |
CN111679911B (en) | Management method, device, equipment and medium of GPU card in cloud environment | |
CN112948212A (en) | RPA task state monitoring method, device and computer storage medium | |
CN112269655B (en) | Memory mapping file cleaning method and device, electronic equipment and storage medium | |
CN113238851B (en) | Script automatic execution method, system, equipment and medium based on cloud platform | |
US8977752B2 (en) | Event-based dynamic resource provisioning | |
CN111756778A (en) | Server disk cleaning script pushing method and device and storage medium | |
CN102521339A (en) | System and method for dynamic access of data sources | |
CN117724803A (en) | Cloud service deployment method, device and platform | |
US10521272B1 (en) | Testing in grid computing systems | |
CN111431951B (en) | Data processing method, node equipment, system and storage medium | |
US11720476B2 (en) | Automated end-to-end testing platform with dynamic container configuration | |
CN110046319B (en) | Social media information acquisition method, device, system, equipment and storage medium | |
CN108270803B (en) | Method and system for realizing transmission of network file and desktop application through webpage technology | |
CN114697334A (en) | Execution method and device for scheduling tasks |
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 | ||
CB02 | Change of applicant information |
Address after: 523808 19th Floor, Cloud Computing Center, Chinese Academy of Sciences, No. 1 Kehui Road, Songshan Lake Hi-tech Industrial Development Zone, Dongguan City, Guangdong Province Applicant after: G-CLOUD TECHNOLOGY Co.,Ltd. Address before: 523808 Guangdong province Dongguan City Songshan Lake Science and Technology Industrial Park Building No. 14 Keyuan pine Applicant before: G-CLOUD TECHNOLOGY Co.,Ltd. |
|
CB02 | Change of applicant information | ||
GR01 | Patent grant | ||
GR01 | Patent grant |