WO2019090993A1 - Deployment method and apparatus for monitoring system, computer device and storage medium - Google Patents

Deployment method and apparatus for monitoring system, computer device and storage medium Download PDF

Info

Publication number
WO2019090993A1
WO2019090993A1 PCT/CN2018/074934 CN2018074934W WO2019090993A1 WO 2019090993 A1 WO2019090993 A1 WO 2019090993A1 CN 2018074934 W CN2018074934 W CN 2018074934W WO 2019090993 A1 WO2019090993 A1 WO 2019090993A1
Authority
WO
WIPO (PCT)
Prior art keywords
component
information
file
monitoring system
difference information
Prior art date
Application number
PCT/CN2018/074934
Other languages
French (fr)
Chinese (zh)
Inventor
高泗俊
李渊
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2019090993A1 publication Critical patent/WO2019090993A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks

Definitions

  • the present application relates to the field of Internet technologies, and in particular, to a method, an apparatus, a computer device, and a storage medium for deploying a monitoring system.
  • monitoring systems for operation and maintenance on the market, such as Argus monitoring system, Zabbix monitoring system and Open-falcon monitoring system.
  • These monitoring systems have a large number of component modules and generally include nearly 30 component modules.
  • each component module must ensure high availability, as well as management, monitoring, upgrade, and deployment. More component modules make the deployment method very complicated. If traditional deployment methods are adopted, This workload and operation and maintenance costs will be relatively high, and deployment is not flexible enough, which in turn increases the operation and maintenance costs of the monitoring system.
  • the application provides a method, a device, a computer device and a storage medium for deploying a monitoring system to improve the deployment efficiency of the monitoring system.
  • the application provides a method for deploying a monitoring system, including:
  • the deployment profile is invoked to deploy the monitoring system.
  • the present application provides a deployment apparatus for a monitoring system, including:
  • a first acquiring unit configured to acquire component information corresponding to each component module in the monitoring system
  • a division generating unit configured to divide the component module according to the component information to generate a category component group
  • a second obtaining unit configured to acquire difference information and common information between the multiple component modules in the same group of component groups
  • Generating a storage unit configured to generate a container file template based on the difference information and the common information, and store the difference information in a configuration file;
  • a file generating unit configured to generate a deployment orchestration file according to the preset file generation rule according to the container file template and the configuration file;
  • the deployment unit is invoked to invoke the deployment orchestration file to deploy the monitoring system.
  • the present application further provides a computer device including a memory, a processor, and a computer program stored on the memory and operable on the processor, the processor implementing the program A method of deploying any of the monitoring systems provided by the application.
  • the present application also provides a storage medium, wherein the storage medium stores a computer program, the computer program comprising program instructions, the program instructions, when executed by a processor, causing the processor to execute the application A method of deploying any of the monitoring systems provided.
  • the embodiment of the present application classifies component modules of the monitoring system, and obtains difference information and common information between the component modules of the same category; generates a container file template based on the difference information and the common information, and stores the difference information.
  • the deployment orchestration file is generated by using the configuration file and the container file template; and the monitoring system is deployed by the container cluster management system according to the deployment orchestration file.
  • FIG. 1 is a schematic flowchart of a method for deploying a monitoring system according to an embodiment of the present application
  • FIG. 2 is a schematic flow chart of a sub-step of the deployment method shown in FIG. 1;
  • FIG. 3 is a schematic flow chart of another sub-step of the deployment method shown in FIG. 1;
  • FIG. 4 is a schematic flowchart of a method for deploying a monitoring system according to another embodiment of the present application.
  • FIG. 5 is a schematic block diagram of a device for deploying a monitoring system according to an embodiment of the present application
  • FIG. 6 is a schematic block diagram of a device for deploying a monitoring system according to another embodiment of the present application.
  • FIG. 7 is a schematic block diagram of a computer device according to an embodiment of the present application.
  • FIG. 1 is a schematic flowchart of a method for deploying a monitoring system according to an embodiment of the present application. As shown in FIG. 1, the deployment method of the monitoring system includes steps S101 to S106.
  • the monitoring system is mainly used for the operation and maintenance of Internet products, providing timely warning and fault location analysis and problem location analysis, such as Open-falcon monitoring system, Zabbix monitoring system or Argus monitoring system.
  • These monitoring systems include multiple component modules, such as component modules such as agent, gateway, proxy, transfer, and query, each with different functions. When deploying a monitoring system, each component module needs to be considered, thus affecting the efficiency of the deployment.
  • component information corresponding to each component module in the monitoring system is obtained.
  • the component information includes programming language information of the component module.
  • the programming language information such as the Golang language and the Python language
  • the component modules of the monitoring system are basically written in the Golang language and the Python language.
  • the component information may further include status information of the component module, such as data status information and no data status information.
  • the data status information refers to status information corresponding to the component module associated with the local data; the no data status information refers to status information corresponding to the component module not associated with the local data.
  • all component modules of the monitoring system are divided according to the programming language information to generate a category component group.
  • the Argus monitoring system As an example, taking the Argus monitoring system as an example, if the Argus monitoring system includes 30 component modules, 14 of the 30 component modules are written in the Golang language, and the other 16 component modules are written in the Python language.
  • the 30 component modules of the Argus monitoring system are divided into Golang component group and Python component group.
  • the Golang component group includes 14 component modules written in Golang language.
  • the Python component group includes 16 component modules written in Python language.
  • all component modules of the monitoring system may also be divided according to state information to generate a category component group.
  • the specific division method is similarly divided according to the programming language information, and will not be described in detail here.
  • each analog component group includes a plurality of component modules, and there are difference information between the plurality of component modules, and common information exists.
  • the gob component group hbs, transfer, judge, graph, query, alarm and other component modules.
  • the common information of these component modules includes: common installation package, startup service, startup instructions, the same docker base image and the same service naming information; the difference information of these component modules includes: boot port, mount storage volume and number of copies, etc. information.
  • the name corresponding to the common information and the difference information is obtained by calling the name corresponding to the common information and the difference information by the program code.
  • S104 Generate a container file template based on the difference information and the common information, and store the difference information in a configuration file.
  • a corresponding file module needs to be created.
  • the container cluster management system (Kubernetes, referred to as K8s) can be used to deploy the monitoring system
  • the corresponding container file template includes the Dockerfile template.
  • K8s deployment template and k8s orchestration template can be used to deploy the monitoring system.
  • step S104 includes sub-steps S104a to S104c.
  • S104a Perform variable setting on the difference information of each of the component modules.
  • variable settings are made for the difference information of each component module.
  • different difference parts of the difference information of each of the component modules are set with different variables.
  • the variable setting is to set the corresponding variable for the difference part.
  • the difference information of the transfer component module is set to correspond to the variable x.
  • the difference information specifically includes a difference portion such as a storage volume and a copy number, and the corresponding storage variables and the number of copies are set to corresponding variables x1 and x2.
  • the difference information of each of the component modules is set, the difference information is subjected to variable replacement, and a container file template is generated according to the variable and the common information, specifically, the commonality is invoked by a container generation command.
  • the variable corresponding to the information and the difference information of each of the component modules further generates a container file template, that is, the container template includes common information and variables corresponding to the difference information.
  • the difference information of the component module and its corresponding variable are stored in the configuration file.
  • the container file template is generated based on the difference information and the common information, and the difference information is stored in the configuration file. Compared with the existing deployment method, the deployment efficiency can be improved, and the container file template and the configuration file need only be stored in two Different locations are therefore beneficial for subsequent file management.
  • the preset file generation rule refers to filling the difference information of the configuration file in a container file template according to a preset variable manner, such as a transfer component module, and the variable corresponding to the difference information of the container file template is X1 and x2, when generating the layout file corresponding to the transfer component module, x1 and x2 are preset variables, and corresponding difference information in the configuration file is filled in the container file template according to the preset variables x1 and x2.
  • Deployment orchestration files in different environments can be dynamically generated based on container file templates and configuration files. Different environments include environments such as development, testing, or production.
  • step S105 includes sub-steps S105a and S105b.
  • S105a Calling a preset read script to read the configuration file.
  • the preset read script can be called by typing a command character to read the configuration file, and the preset read script is used to read the configuration file.
  • S105b Fill the difference information in the configuration file into the container file template according to the variable to generate the deployment orchestration file.
  • the profile difference information is correspondingly filled in the variable included in the container file template according to the variable correspondence relationship, thereby generating a complete deployment orchestration file.
  • the deployment orchestration file may be invoked to deploy the monitoring system by using a calling command and a name of the deployment orchestration file.
  • the Kubernetes is a container cluster management system, which can automatically coordinate the component modules of the monitoring system, and deploy the monitoring system by using the deployment orchestration file generated by the above method, regardless of the resource occupation of each component module. This saves manual operations and increases the efficiency of deployment.
  • the embodiment of the present application classifies component modules of the monitoring system, and obtains difference information and common information between the component modules of the same category; generates a container file template based on the difference information and the common information, and stores the difference information.
  • the deployment profile file is generated by using the configuration file and the container file template; the container cluster management system completes the deployment of the monitoring system according to the deployment orchestration file, thereby improving the deployment efficiency.
  • the difference information is stored in the configuration file, which also facilitates the management of the component modules of the monitoring system in the future.
  • FIG. 4 is a schematic flowchart of a method for deploying a monitoring system according to another embodiment of the present application.
  • the deployment method of the monitoring system can be run in a server, where the server can be a stand-alone server or a server cluster composed of multiple servers.
  • the deployment method of the monitoring system includes steps S201 to S208.
  • component information corresponding to each component module in the monitoring system is obtained, specifically: classifying the component modules according to the programming language information to generate a Golang component group and a Python component group.
  • component modules of hbs, transfer, judge, graph, query, alarm, etc. in Argus component module are written by Golang language, and component modules such as portal, dashboard, links are used.
  • component modules such as portal, dashboard, links are used.
  • component modules written in two languages are deployed in different ways, specifically the component modules written in Golang have no dependencies and can be started directly.
  • the component module written in Python needs to start the python virtual environment to load the related dependencies in order to start the operation normally. Therefore, by analyzing the deployment characteristics of the component modules, it is convenient to make corresponding container file templates, and at the same time, the deployment efficiency can be improved.
  • the component modules are classified according to the programming language information to generate a Golang component group and a Python component group.
  • the Golang component group includes component modules such as hbs, transfer, judge, graph, query, and alarm;
  • the Python component group includes component modules such as portal, dashboard, and links.
  • variable information is set for the difference information of each of the component modules; the container file template is generated according to the variable corresponding to the difference information of each component module and the common information; and the difference information set by the variable is Stored in the configuration file.
  • the configuration file can also be saved in a preset database and managed by a configmap.
  • the configuration file of the monitoring system is centrally managed by the configmap in Kubernetes, thereby improving management efficiency.
  • the preset read script is invoked to read the configuration file; and the difference information in the configuration file is filled into the container file template according to the variable to generate the deployment orchestration file.
  • the operation performed by the preset script is to read the configuration file, and describe and fill variables in the container file template according to the difference information corresponding to the variables of the configuration file, thereby generating a completed deployment orchestration file.
  • the monitoring system is specifically deployed by using a container cluster management system (Kubernetes, K8s for short).
  • the deployment orchestration file includes a Dockerfile deployment orchestration file and a K8s deployment orchestration file.
  • the host required to deploy the monitoring system may also be obtained, and the host may be a physical machine or a virtual machine.
  • These hosts are added to the host resource pool, and these hosts are also managed and scheduled by K8s, so that when the host fails, the component modules are migrated by K8s, and the component modules are automatically migrated to the available hosts, which greatly reduces the operation. Dimensional complexity.
  • client software such as docker, flannel, and Kubernetes
  • the host in the host resource pool is marked to generate a host tag number. Specifically, after the host is added to the resource pool, the hosts in the resource pool are marked, for example, as hosts #1, #2, #3, and the like. These #1, #2, and #3 are the host labels.
  • S207 Perform scheduling management on the host in the host resource pool according to the host tag number.
  • the hosts in the host resource pool are scheduled and managed according to the host tag number, so that the K8s can select different hosts to deploy according to the resource occupancy of the component modules.
  • the monitoring system is deployed in a host in the host resource pool.
  • the deployment system may be invoked to deploy the monitoring system in a host in the host resource pool by using a calling command and a name of the deployment orchestration file.
  • the foregoing embodiment classifies the component modules of the monitoring system according to the programming language information, and obtains difference information and common information between the component modules of the same category; generates a container file template based on the difference information and the common information, and the difference is
  • the information is stored in the configuration file; the deployment orchestration file is generated by using the configuration file and the container file template; and the monitoring system is deployed by the container cluster management system according to the deployment orchestration file, thereby improving the deployment efficiency.
  • the difference information is stored in the configuration file, which also facilitates the management of the component modules of the monitoring system in the future.
  • hosts that deploy the monitoring system are added to the resource pool for centralized management, thereby reducing the complexity of deployment and operation.
  • FIG. 5 is a schematic block diagram of a device for deploying a monitoring system according to an embodiment of the present application.
  • the deployment device 300 is installed in a server or a terminal, wherein the server may be a stand-alone server or a server cluster composed of multiple servers; the terminal includes a desktop computer, a laptop, a tablet, a personal digital assistant (PDA), or Smartphones, etc.
  • the server may be a stand-alone server or a server cluster composed of multiple servers
  • the terminal includes a desktop computer, a laptop, a tablet, a personal digital assistant (PDA), or Smartphones, etc.
  • PDA personal digital assistant
  • the deployment apparatus 300 includes a first acquisition unit 301, a division generation unit 302, a second acquisition unit 303, a generation storage unit 304, a file generation unit 305, and a call deployment unit 306.
  • the first obtaining unit 301 is configured to acquire component information corresponding to each component module in the monitoring system.
  • the component information corresponding to each component module in the monitoring system is obtained.
  • the component information includes programming language information of the component module.
  • the programming language information such as the Golang language and the Python language
  • the component modules of the monitoring system are basically written in the Golang language and the Python language.
  • the component information may further include status information of the component module, such as data status information and no data status information.
  • the data status information refers to status information corresponding to the component module associated with the local data; the no data status information refers to status information corresponding to the component module not associated with the local data.
  • the partition generation module 302 is configured to divide the component module according to the component information to generate a category component group.
  • all component modules of the monitoring system are divided according to the programming language information to generate a category component group.
  • the Argus monitoring system As an example, taking the Argus monitoring system as an example, if the Argus monitoring system includes 30 component modules, 14 of the 30 component modules are written in the Golang language, and the other 16 component modules are written in the Python language.
  • the 30 component modules of the Argus monitoring system are divided into Golang component group and Python component group.
  • the Golang component group includes 14 component modules written in Golang language.
  • the Python component group includes 16 component modules written in Python language.
  • all component modules of the monitoring system may also be divided according to state information to generate a category component group.
  • the second obtaining unit 303 is configured to acquire difference information and common information between the multiple component modules in the same group of category components.
  • the gob component group hbs, transfer, judge, graph, query, alarm and other component modules.
  • the common information of these component modules includes: common installation package, startup service, startup instructions, the same docker base image and the same service naming information; the difference information of these component modules includes: boot port, mount storage volume and number of copies, etc. information.
  • the generating storage unit 304 is configured to generate a container file template based on the difference information and the common information, and store the difference information in a configuration file.
  • the container cluster management system (Kubernetes, K8s for short) can be used to deploy the monitoring system.
  • the corresponding container file template includes the Dockerfile template, K8s deployment template and k8s. Orchestration templates, etc.
  • the generation storage unit 304 includes a variable setting sub-unit 3041, a template generation sub-unit 3042, and an information storage sub-unit 3043.
  • the variable setting subunit 3041 is configured to perform variable setting on the difference information of each of the component modules.
  • variable settings are made for the difference information of each component module.
  • different difference parts of the difference information of each of the component modules are set with different variables.
  • the variable setting is to set the corresponding variable for the difference part.
  • the difference information of the transfer component module is set to correspond to the variable x.
  • the difference information specifically includes a difference portion such as a storage volume and a copy number, and the corresponding storage variables and the number of copies are set to corresponding variables x1 and x2.
  • the template generation subunit 3042 is configured to generate a container file template according to the variable corresponding to the difference information of each of the component modules and the common information.
  • the difference information of each of the component modules is set, the difference information is subjected to variable replacement, and a container file template is generated according to the variable and the common information, that is, the container template includes common information and difference information. Corresponding variables.
  • the information storage subunit 3043 is configured to store the difference information set by the variable in a configuration file.
  • the difference information of the component module and its corresponding variable are stored in the configuration file.
  • the container file template is generated based on the difference information and the common information, and the difference information is stored in the configuration file. Compared with the existing deployment method, the deployment efficiency can be improved, and the container file template and the configuration file need only be stored in two Different locations are therefore beneficial for subsequent file management.
  • the file generating unit 305 is configured to generate a deployment orchestration file according to the preset file generation rule according to the container file template and the configuration file.
  • the preset file generation rule is to fill the difference information of the configuration file in the container file template according to the preset variable manner, thereby dynamically generating the deployment orchestration file in different environments according to the container file template and the configuration file.
  • Different environments include environments such as development, testing, or production.
  • the file generating unit 305 includes a call reading subunit 3051 and an information filling subunit 3052.
  • the read subunit 3051 is called to call a preset read script to read the configuration file.
  • the preset read script can be called by typing a command character to read the configuration file, and the preset read script is used to read the configuration file.
  • the information populating sub-unit 3052 is configured to fill the difference information in the configuration file into the container file template according to the variable to generate the deployment orchestration file.
  • the profile difference information is correspondingly filled in the variable included in the container file template according to the variable correspondence relationship, thereby generating a complete deployment orchestration file.
  • the deployment unit 306 is configured to invoke the deployment orchestration file to deploy the monitoring system.
  • the deployment orchestration file may be invoked to deploy the monitoring system by using a calling command and a name of the deployment orchestration file.
  • the specific deployment of the deployment orchestration file by Kubernetes has completed the deployment of the monitoring system.
  • the Kubernetes is a container cluster management system, which can automatically coordinate the component modules of the monitoring system, and deploy the monitoring system by using the above deployment programming files, regardless of the resource occupation of each component module. This saves manual operations and increases the efficiency of deployment.
  • FIG. 6 is a schematic block diagram of a device for deploying a monitoring system according to an embodiment of the present application.
  • the deployment apparatus 400 includes a first acquisition unit 401, a division generation unit 402, a second acquisition unit 403, a generation storage unit 404, a file generation unit 405, a join marker unit 406, a schedule management unit 407, and a call deployment unit. 408.
  • the first obtaining unit 401 is configured to acquire component information corresponding to each component module in the monitoring system, where the component information includes programming language information, where the programming language information includes a Golang language and a Python language.
  • the first obtaining unit 401 is specifically configured to: classify the component modules according to the programming language information to generate a Golang component group and a Python component group.
  • component modules of hbs, transfer, judge, graph, query, alarm, etc. in Argus component modules are written in Golang language, and component modules such as portal, dashboard, links, etc. are written in Python language.
  • the division generating unit 402 is configured to divide the component module according to the component information to generate a category component group.
  • the component modules are classified according to the programming language information to generate a Golang component group and a Python component group.
  • the Golang component group includes component modules such as hbs, transfer, judge, graph, query, and alarm;
  • the Python component group includes component modules such as portal, dashboard, and links.
  • the second obtaining unit 403 is configured to acquire difference information and common information between the multiple component modules in the same group of category component groups.
  • the method is specifically configured to obtain common information and difference information between the plurality of component modules in the Golang component group, and obtain common information and difference information between the plurality of component modules in the Python component group.
  • the generating storage unit 404 is configured to generate a container file template based on the difference information and the common information, and store the difference information in the configuration file.
  • variable information is set for each difference component of the component module; the container file template is generated according to the variable corresponding to the difference information of each component module and the common information; and the difference that is set by the variable is The information is stored in a configuration file.
  • a saving management unit is further included, wherein the saving management unit is further configured to save the configuration file in a preset database and manage the configuration file through a configmap.
  • the configuration file of the monitoring system is centrally managed by the configmap in Kubernetes, thereby improving management efficiency.
  • the file generating unit 405 is configured to generate a deployment orchestration file according to the preset file generation rule according to the container file template and the configuration file.
  • the method is: calling a preset read script to read the configuration file; and filling the difference information in the configuration file into the container file template according to the variable to generate the deployment orchestration file.
  • the operation performed by the preset script is to read the configuration file, and describe and fill variables in the container file template according to the difference information corresponding to the variables of the configuration file, thereby generating a completed deployment orchestration file.
  • the monitoring system is specifically deployed by using a container cluster management system (Kubernetes, K8s for short).
  • the deployment orchestration file includes a Dockerfile deployment orchestration file and a K8s deployment orchestration file.
  • the tagging unit 406 is configured to join the host required to deploy the monitoring system to the host resource pool and mark the host in the host resource pool to generate a host tag number.
  • client software such as docker, flannel, and Kubernetes
  • the host in the host resource pool is marked to generate a host tag number. Specifically, after the host is added to the resource pool, the hosts in the resource pool are marked, for example, as hosts #1, #2, #3, and the like. These #1, #2, and #3 are the host labels.
  • the scheduling management unit 407 is configured to perform scheduling management on the hosts in the host resource pool according to the host tag number.
  • the hosts in the host resource pool are scheduled and managed according to the host tag number, so that the K8s can select different hosts to deploy according to the resource occupancy of the component modules.
  • the deployment unit 408 is configured to invoke the deployment orchestration file to deploy the monitoring system in a host in the host resource pool.
  • the deployment system may be invoked to deploy the monitoring system in a host in the host resource pool by using a calling command and a name of the deployment orchestration file.
  • the above apparatus may be embodied in the form of a computer program that can be run on a computer device as shown in FIG.
  • FIG. 7 is a schematic block diagram of a computer device according to an embodiment of the present application.
  • the computer device 500 device can be a terminal or a server.
  • the computer device 500 includes a processor 520, a memory, and a network interface 550 connected by a system bus 510, wherein the memory can include a non-volatile storage medium 530 and an internal memory 540.
  • the non-volatile storage medium 530 can store an operating system 531 and a computer program 532.
  • the processor 520 can be caused to perform a deployment method of the monitoring system.
  • the processor 520 is used to provide computing and control capabilities to support the operation of the entire computer device 500.
  • the internal memory 540 provides a cached operating environment for the operating system 531 and the computer program 532 in the non-volatile storage medium 530.
  • the network interface 550 is used for network communication, such as sending assigned tasks and the like. It will be understood by those skilled in the art that the structure shown in FIG. 7 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation of the computer device 500 to which the solution of the present application is applied, and a specific computer device. 500 may include more or fewer components than shown, or some components may be combined, or have different component arrangements.
  • the processor 520 is configured to run program code stored in the memory to implement the following program:
  • the processor 520 when the processor 520 generates the container file template based on the difference information and the common information, and stores the difference information in the configuration file, the processor 520 specifically executes the following procedure:
  • variable setting on the difference information of each of the component modules Performing variable setting on the difference information of each of the component modules; generating a container file template according to the variable corresponding to the difference information of each component module and the common information; and storing the difference information set by the variable in the configuration In the file.
  • the processor 520 when the processor 520 generates the deployment orchestration file according to the preset file generation rule according to the container file template and the configuration file, the processor 520 executes the following procedure:
  • the processor 520 is configured to execute program code stored in the memory to implement the following program:
  • the monitoring is to be deployed
  • the host required by the system joins the host resource pool and marks the host in the host resource pool to generate a host tag number; and performs scheduling management on the host in the host resource pool according to the host tag number;
  • the deployment orchestration file deploys the monitoring system in a host in the host resource pool.
  • the processor 520 may be a central processing unit (CPU), and the processor 520 may also be other general-purpose processors, a digital signal processor (DSP), Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, etc.
  • the general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • computer device 500 architecture illustrated in FIG. 7 does not constitute a limitation to computer device 500, may include more or fewer components than illustrated, or may combine certain components, or different components. Arrangement.
  • a storage medium is provided, the storage medium being a computer readable storage medium storing a computer program, wherein the computer program includes program instructions.
  • This program instruction is implemented when executed by the processor:
  • the specific implementation is:
  • variable setting on the difference information of each of the component modules Performing variable setting on the difference information of each of the component modules; generating a container file template according to the variable corresponding to the difference information of each component module and the common information; and storing the difference information set by the variable in the configuration In the file.
  • the program instruction is executed by the processor, and when the deployment file is generated according to the preset file generation rule according to the container file template and the configuration file, the specific implementation is:
  • program instructions are executed by the processor and further implement:
  • the monitoring is to be deployed
  • the host required by the system joins the host resource pool and marks the host in the host resource pool to generate a host tag number; and performs scheduling management on the host in the host resource pool according to the host tag number;
  • the deployment orchestration file deploys the monitoring system in a host in the host resource pool.
  • the computer readable storage medium may be any medium that can store program code, such as a USB flash drive, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disk.
  • program code such as a USB flash drive, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disk.
  • the disclosed apparatus and method can be implemented in other ways.
  • the device embodiments described above are merely illustrative.
  • the division of each unit is only a logical function division, and there may be another division manner in actual implementation.
  • multiple units or components may be combined or integrated into another system, or some features may be omitted or not implemented.
  • the steps in the method of the embodiment of the present application may be sequentially adjusted, merged, and deleted according to actual needs.
  • the units in the apparatus of the embodiment of the present application may be combined, divided, and deleted according to actual needs.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, can be stored in a computer readable storage medium.
  • the technical solution of the present application may be in essence or part of the contribution to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium.
  • There are a number of instructions for causing a computer device (which may be a personal computer, terminal, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present application.

Abstract

Disclosed are a deployment method and apparatus for a monitoring system, a computer device and a storage medium. The method comprises: dividing component modules according to component information to generate category component groups; obtaining difference information and similarity information between a plurality of component modules in the same category component group; generating a container file template and storing the difference information in a configuration file; and generating a deployment arrangement file according to the container file template and the configuration file to deploy the monitoring system.

Description

监控系统的部署方法、装置、计算机设备及存储介质Monitoring system deployment method, device, computer device and storage medium
本申请要求于2017年11月8日提交中国专利局、申请号为201711091445.5、发明名称为“监控系统的部署方法、装置、计算机设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed on November 8, 2017, the Chinese Patent Office, the application number is 201711091445.5, and the invention name is "the deployment method, device, computer equipment and storage medium of the monitoring system". The citations are incorporated herein by reference.
技术领域Technical field
本申请涉及互联网技术领域,尤其涉及一种监控系统的部署方法、装置、计算机设备及存储介质。The present application relates to the field of Internet technologies, and in particular, to a method, an apparatus, a computer device, and a storage medium for deploying a monitoring system.
背景技术Background technique
目前,市场上存在很多运维用的监控系统,比如Argus监控系统、Zabbix监控系统和Open-falcon监控系统。这些监控系统的组件模块数量较多,一般包括将近30个组件模块。在部署这些监控系统时,每个组件模块都要保证高可用性,以及需要进行管理、监控、升级和部署等,较多的组件模块使得部署方式变得非常复杂,如果还采用传统的部署方式,这个工作量和运维成本将会比较高,同时部署也不够灵活,进而增加了监控系统的运维成本。At present, there are many monitoring systems for operation and maintenance on the market, such as Argus monitoring system, Zabbix monitoring system and Open-falcon monitoring system. These monitoring systems have a large number of component modules and generally include nearly 30 component modules. When deploying these monitoring systems, each component module must ensure high availability, as well as management, monitoring, upgrade, and deployment. More component modules make the deployment method very complicated. If traditional deployment methods are adopted, This workload and operation and maintenance costs will be relatively high, and deployment is not flexible enough, which in turn increases the operation and maintenance costs of the monitoring system.
发明内容Summary of the invention
本申请提供了一种监控系统的部署方法、装置、计算机设备及存储介质,以提高监控系统的部署效率。The application provides a method, a device, a computer device and a storage medium for deploying a monitoring system to improve the deployment efficiency of the monitoring system.
第一方面,本申请提供了一种监控系统的部署方法,其包括:In a first aspect, the application provides a method for deploying a monitoring system, including:
获取监控系统中每个组件模块对应的组件信息;Obtain component information corresponding to each component module in the monitoring system;
根据所述组件信息对所述组件模块进行划分以生成类别组件组;And dividing the component module according to the component information to generate a category component group;
获取同一组类别组件组中多个组件模块之间的差异信息和共性信息;Obtaining difference information and common information between multiple component modules in the same group of component groups;
基于所述差异信息和共性信息生成容器文件模板,并将所述差异信息存储在配置文件中;Generating a container file template based on the difference information and the common information, and storing the difference information in a configuration file;
根据所述容器文件模板和配置文件按预设文件生成规则生成部署编排文 件;以及Generating a deployment orchestration file according to the preset file generation rule according to the container file template and the configuration file;
调用所述部署编排文件对所述监控系统进行部署。The deployment profile is invoked to deploy the monitoring system.
第二方面,本申请提供了一种监控系统的部署装置,其包括:In a second aspect, the present application provides a deployment apparatus for a monitoring system, including:
第一获取单元,用于获取监控系统中每个组件模块对应的组件信息;a first acquiring unit, configured to acquire component information corresponding to each component module in the monitoring system;
划分生成单元,用于根据所述组件信息对所述组件模块进行划分以生成类别组件组;a division generating unit, configured to divide the component module according to the component information to generate a category component group;
第二获取单元,用于获取同一组类别组件组中多个组件模块之间的差异信息和共性信息;a second obtaining unit, configured to acquire difference information and common information between the multiple component modules in the same group of component groups;
生成存储单元,用于基于所述差异信息和共性信息生成容器文件模板,并将所述差异信息存储在配置文件中;Generating a storage unit, configured to generate a container file template based on the difference information and the common information, and store the difference information in a configuration file;
文件生成单元,用于根据所述容器文件模板和配置文件按预设文件生成规则生成部署编排文件;以及a file generating unit, configured to generate a deployment orchestration file according to the preset file generation rule according to the container file template and the configuration file;
调用部署单元,用于调用所述部署编排文件对所述监控系统进行部署。The deployment unit is invoked to invoke the deployment orchestration file to deploy the monitoring system.
第三方面,本申请又提供了一种计算机设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述程序时实现本申请提供的任一项所述监控系统的部署方法。In a third aspect, the present application further provides a computer device including a memory, a processor, and a computer program stored on the memory and operable on the processor, the processor implementing the program A method of deploying any of the monitoring systems provided by the application.
第四方面,本申请还提供了一种存储介质,其中所述存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令当被处理器执行时使所述处理器执行本申请提供的任一项所述监控系统的部署方法。In a fourth aspect, the present application also provides a storage medium, wherein the storage medium stores a computer program, the computer program comprising program instructions, the program instructions, when executed by a processor, causing the processor to execute the application A method of deploying any of the monitoring systems provided.
本申请实施例通过对监控系统的组件模块进行分类,并获取同类别的组件模块之间的差异信息和共性信息;基于所述差异信息和共性信息生成容器文件模板,以及将所述差异信息存储在配置文件中;利用配置文件和容器文件模板生成部署编排文件;由容器集群管理系统根据所述部署编排文件完成对所述监控系统进行部署。通过对组件模块的处理,由此提高了监控系统的部署效率,同时方便日后对该监控系统的进行管理。The embodiment of the present application classifies component modules of the monitoring system, and obtains difference information and common information between the component modules of the same category; generates a container file template based on the difference information and the common information, and stores the difference information. In the configuration file, the deployment orchestration file is generated by using the configuration file and the container file template; and the monitoring system is deployed by the container cluster management system according to the deployment orchestration file. Through the processing of the component modules, the deployment efficiency of the monitoring system is improved, and the monitoring system is conveniently managed in the future.
附图说明DRAWINGS
为了更清楚地说明本申请实施例技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以 根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings used in the description of the embodiments will be briefly described below. Obviously, the drawings in the following description are some embodiments of the present application, For the ordinary technicians, other drawings can be obtained based on these drawings without any creative work.
图1是本申请一实施例提供的一种监控系统的部署方法的示意流程图;1 is a schematic flowchart of a method for deploying a monitoring system according to an embodiment of the present application;
图2是图1所示部署方法的一子步骤示意流程图;2 is a schematic flow chart of a sub-step of the deployment method shown in FIG. 1;
图3是图1所示部署方法的另一子步骤示意流程图;3 is a schematic flow chart of another sub-step of the deployment method shown in FIG. 1;
图4是本申请另一实施例提供的一种监控系统的部署方法的示意流程图;4 is a schematic flowchart of a method for deploying a monitoring system according to another embodiment of the present application;
图5为本申请一实施例提供的一种监控系统的部署装置的示意性框图;FIG. 5 is a schematic block diagram of a device for deploying a monitoring system according to an embodiment of the present application;
图6为本申请另一实施例提供的一种监控系统的部署装置的示意性框图;FIG. 6 is a schematic block diagram of a device for deploying a monitoring system according to another embodiment of the present application;
图7为本申请一实施例提供的一种计算机设备的一示意性框图。FIG. 7 is a schematic block diagram of a computer device according to an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application are clearly and completely described in the following with reference to the drawings in the embodiments of the present application. It is obvious that the described embodiments are a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without departing from the inventive scope are the scope of the present application.
应当理解,当在本说明书和所附权利要求书中使用时,术语“包括”和“包含”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。The use of the terms "comprising", "comprising", "","," The presence or addition of a plurality of other features, integers, steps, operations, elements, components, and/or collections thereof.
请参阅图1,图1是本申请一实施例提供的一种监控系统的部署方法的示意流程图。如图1所示,该监控系统的部署方法包括步骤S101~S106。Please refer to FIG. 1. FIG. 1 is a schematic flowchart of a method for deploying a monitoring system according to an embodiment of the present application. As shown in FIG. 1, the deployment method of the monitoring system includes steps S101 to S106.
S101、获取监控系统中每个组件模块对应的组件信息。S101. Obtain component information corresponding to each component module in the monitoring system.
监控系统主要用于互联网产品的运维,提供事前及时预警发现故障以及问题定位分析,比如市场存在的Open-falcon监控系统、Zabbix监控系统或Argus监控系统。这些监控系统均包括多个组件模块,比如agent、gateway、proxy、transfer和query等组件模块,每个组件都有不同的功能。在部署监控系统时,需要考虑到每个组件模块,因此会影响了部署的效率。The monitoring system is mainly used for the operation and maintenance of Internet products, providing timely warning and fault location analysis and problem location analysis, such as Open-falcon monitoring system, Zabbix monitoring system or Argus monitoring system. These monitoring systems include multiple component modules, such as component modules such as agent, gateway, proxy, transfer, and query, each with different functions. When deploying a monitoring system, each component module needs to be considered, thus affecting the efficiency of the deployment.
在本实施中,获取该监控系统中每个组件模块对应的组件信息。该组件信息包括组件模块的编程语言信息。具体地,该编程语言信息比如Golang语言和Python语言,该监控系统的组件模块基本均是采用Golang语言和Python语言编写的。In this implementation, component information corresponding to each component module in the monitoring system is obtained. The component information includes programming language information of the component module. Specifically, the programming language information such as the Golang language and the Python language, the component modules of the monitoring system are basically written in the Golang language and the Python language.
在一实施例中,该组件信息还可包括组件模块的状态信息等,该状态信息比如有数据状态信息和无数据状态信息。其中,有数据状态信息是指与本地数据有关联的组件模块对应的状态信息;无数据状态信息是指与本地数据没有关联的组件模块对应的状态信息。In an embodiment, the component information may further include status information of the component module, such as data status information and no data status information. The data status information refers to status information corresponding to the component module associated with the local data; the no data status information refers to status information corresponding to the component module not associated with the local data.
因为具有不同组件信息的组件模块对应的部署方式和安装环境可能均不相同,因此需要对监控系统的多个组件模块进行区分处理。Because the deployment mode and installation environment of component modules with different component information may be different, it is necessary to distinguish between multiple component modules of the monitoring system.
S102、根据所述组件信息对所述组件模块进行划分以生成类别组件组。S102. Divide the component module according to the component information to generate a category component group.
在本实施例中,具体是根据所述编程语言信息对监控系统的所有组件模块进行划分以生成类别组件组。In this embodiment, specifically, all component modules of the monitoring system are divided according to the programming language information to generate a category component group.
譬如,以Argus监控系统为例,假如该Argus监控系统包括30个组件模块,30个组件模块中有14个组件模块采用Golang语言编写的,另外16个组件模块采用Python语言编写的,则可将该Argus监控系统的30个组件模块划分为Golang组件组和Python组件组,即Golang组件组包括14个采用Golang语言编写的组件模块,Python组件组包括16个采用Python语言编写的组件模块。For example, taking the Argus monitoring system as an example, if the Argus monitoring system includes 30 component modules, 14 of the 30 component modules are written in the Golang language, and the other 16 component modules are written in the Python language. The 30 component modules of the Argus monitoring system are divided into Golang component group and Python component group. The Golang component group includes 14 component modules written in Golang language. The Python component group includes 16 component modules written in Python language.
在一实施例中,也可以根据状态信息对监控系统的所有组件模块进行划分以生成类别组件组。具体划分方法类似根据编程语言信息进行划分,在此不做详细介绍。In an embodiment, all component modules of the monitoring system may also be divided according to state information to generate a category component group. The specific division method is similarly divided according to the programming language information, and will not be described in detail here.
S103、获取同一组类别组件组中多个组件模块之间的差异信息和共性信息。S103. Obtain difference information and common information between multiple component modules in the same group of component groups.
在本实施例中,按照上述分类划分方法,每个类比组件组均包括多个组件模块,多个所述组件模块之间存在差异信息,同时也存在共性信息。In this embodiment, according to the above classification method, each analog component group includes a plurality of component modules, and there are difference information between the plurality of component modules, and common information exists.
比如、golang组件组的hbs、transfer、judge、graph、query和alarm等组件模块。这些组件模块的共性信息包括:共用安装包、启动服务、启动指令、相同的docker基础镜像和相同的服务命名等信息;这些组件模块的差异信息包括:启动端口、挂载存储卷和副本数等信息。For example, the gob component group hbs, transfer, judge, graph, query, alarm and other component modules. The common information of these component modules includes: common installation package, startup service, startup instructions, the same docker base image and the same service naming information; the difference information of these component modules includes: boot port, mount storage volume and number of copies, etc. information.
具体地,是通过程序代码引用所述共性信息和差异信息对应的名称进行调用而获取到的。比如共用安装包的名称、启动指令对应的名称或不同的启动端口对应的不同名称等。Specifically, it is obtained by calling the name corresponding to the common information and the difference information by the program code. For example, the name of the shared installation package, the name corresponding to the startup command, or a different name corresponding to a different startup port.
S104、基于所述差异信息和共性信息生成容器文件模板并将所述差异信息存储在配置文件中。S104. Generate a container file template based on the difference information and the common information, and store the difference information in a configuration file.
在本实施例中,为了将监控系统的组件模块容器化,需要制作相应的文件 模块,具体可采用容器集群管理系统(Kubernetes,简称K8s)对监控系统进行部署,相对应该容器文件模板包括Dockerfile模板、K8s deployment模板和k8s编排模板等。In this embodiment, in order to containerize the component modules of the monitoring system, a corresponding file module needs to be created. Specifically, the container cluster management system (Kubernetes, referred to as K8s) can be used to deploy the monitoring system, and the corresponding container file template includes the Dockerfile template. , K8s deployment template and k8s orchestration template.
在本实施例中,具体地,如图2所示,步骤S104包括子步骤S104a至S104c。In the present embodiment, specifically, as shown in FIG. 2, step S104 includes sub-steps S104a to S104c.
S104a、对每个所述组件模块的差异信息进行变量设置。S104a: Perform variable setting on the difference information of each of the component modules.
具体地,对每个组件模块的差异信息进行不同的变量设置。此外每个所述组件模块的差异信息中不同的差异部分进行不同变量设置。该变量设置是为差异部分设置对应的变量。Specifically, different variable settings are made for the difference information of each component module. In addition, different difference parts of the difference information of each of the component modules are set with different variables. The variable setting is to set the corresponding variable for the difference part.
比如,将transfer组件模块的差异信息设置对应变量x。该差异信息具体包括挂载存储卷和副本数等差异部分,进而将挂载存储卷和副本数设置对应变量x1和x2等。For example, the difference information of the transfer component module is set to correspond to the variable x. The difference information specifically includes a difference portion such as a storage volume and a copy number, and the corresponding storage variables and the number of copies are set to corresponding variables x1 and x2.
S104b、根据每个所述组件模块的差异信息对应的变量和所述共性信息生成容器文件模板。S104b. Generate a container file template according to the variable corresponding to the difference information of each component module and the common information.
具体地,在将每个所述组件模块的差异信息进行变量设置后,将所述差异信息进行变量替换,根据所述变量和共性信息生成容器文件模板,具体地是通过容器生成命令调用该共性信息和每个所述组件模块的差异信息对应的变量进而生成容器文件模板,即该容器模板包括共性信息和差异信息对应的变量。Specifically, after the difference information of each of the component modules is set, the difference information is subjected to variable replacement, and a container file template is generated according to the variable and the common information, specifically, the commonality is invoked by a container generation command. The variable corresponding to the information and the difference information of each of the component modules further generates a container file template, that is, the container template includes common information and variables corresponding to the difference information.
S104c、将经过所述变量设置的差异信息存储在配置文件中。S104c. Store difference information set by the variable in a configuration file.
具体地,是将所述组件模块的差异信息及其相对应的变量存储在配置文件中。Specifically, the difference information of the component module and its corresponding variable are stored in the configuration file.
该基于所述差异信息和共性信息生成容器文件模板并将所述差异信息存储在配置文件中,相对现有的部署方法不仅可以提高部署效率,同时容器文件模板和配置文件只需存储在两个不同的位置,因此有利于后续的文件管理。The container file template is generated based on the difference information and the common information, and the difference information is stored in the configuration file. Compared with the existing deployment method, the deployment efficiency can be improved, and the container file template and the configuration file need only be stored in two Different locations are therefore beneficial for subsequent file management.
S105、根据所述容器文件模板和配置文件按预设文件生成规则生成部署编排文件。S105. Generate a deployment orchestration file according to the preset file generation rule according to the container file template and the configuration file.
在本实施例中,该预设文件生成规则是指将配置文件的中差异信息按照预设变量方式填充在容器文件模板中,比如transfer组件模块,其相对容器文件模板的差异信息对应的变量为x1和x2,在生成transfer组件模块对应的编排文件时,x1和x2为预设变量,根据该预设变量x1和x2将在配置文件中对应差异信息填充在该容器文件模板中。可以根据容器文件模板和配置文件动态地生成不 同环境下的部署编排文件。其中不同环境包括开发、测试或生产等环境。In this embodiment, the preset file generation rule refers to filling the difference information of the configuration file in a container file template according to a preset variable manner, such as a transfer component module, and the variable corresponding to the difference information of the container file template is X1 and x2, when generating the layout file corresponding to the transfer component module, x1 and x2 are preset variables, and corresponding difference information in the configuration file is filled in the container file template according to the preset variables x1 and x2. Deployment orchestration files in different environments can be dynamically generated based on container file templates and configuration files. Different environments include environments such as development, testing, or production.
具体地,生成部署编排文件的方式,如图3所示,步骤S105包括子步骤S105a和S105b。Specifically, a manner of generating a layout file is generated, as shown in FIG. 3, and step S105 includes sub-steps S105a and S105b.
S105a、调用预设读取脚本读取所述配置文件。S105a: Calling a preset read script to read the configuration file.
具体可以通过键入命令符的方式来调用预设读取脚本以读取所述配置文件,该预设读取脚本用于读取配置文件。Specifically, the preset read script can be called by typing a command character to read the configuration file, and the preset read script is used to read the configuration file.
S105b、根据所述变量将所述配置文件中的差异信息填充至所述容器文件模板中以生成所述部署编排文件。S105b. Fill the difference information in the configuration file into the container file template according to the variable to generate the deployment orchestration file.
具体地根据所述变量对应关系将配置文件差异信息对应填充在容器文件模板的包含的变量,从而生成一个完整的部署编排文件。Specifically, the profile difference information is correspondingly filled in the variable included in the container file template according to the variable correspondence relationship, thereby generating a complete deployment orchestration file.
S106、调用所述部署编排文件对所述监控系统进行部署。S106. Call the deployment orchestration file to deploy the monitoring system.
具体可以使用调用命令加所述部署编排文件的名称的方式,调用所述部署编排文件以对所述监控系统进行部署。Specifically, the deployment orchestration file may be invoked to deploy the monitoring system by using a calling command and a name of the deployment orchestration file.
在本实施例中,具体使用Kubernetes调用该部署编排文件已完成对所述监控系统进行部署。该Kubernetes为容器集群管理系统,可以自动协调该监控系统的组件模块,利用上述方法生成的部署编排文件对该监控系统进行部署,完全不用考虑每个组件模块的资源占用情况。由此节省了人工操作,提高了部署的效率。In this embodiment, specifically, using Kubernetes to invoke the deployment orchestration file has completed deployment of the monitoring system. The Kubernetes is a container cluster management system, which can automatically coordinate the component modules of the monitoring system, and deploy the monitoring system by using the deployment orchestration file generated by the above method, regardless of the resource occupation of each component module. This saves manual operations and increases the efficiency of deployment.
本申请实施例通过对监控系统的组件模块进行分类,并获取同类别的组件模块之间的差异信息和共性信息;基于所述差异信息和共性信息生成容器文件模板,以及将所述差异信息存储在配置文件中;利用配置文件和容器文件模板生成部署编排文件;由容器集群管理系统根据所述部署编排文件完成对所述监控系统进行部署,进而提高了部署效率。同时将所述差异信息存储在配置文件,也方便日后对该监控系统的组件模块的管理。The embodiment of the present application classifies component modules of the monitoring system, and obtains difference information and common information between the component modules of the same category; generates a container file template based on the difference information and the common information, and stores the difference information. In the configuration file, the deployment profile file is generated by using the configuration file and the container file template; the container cluster management system completes the deployment of the monitoring system according to the deployment orchestration file, thereby improving the deployment efficiency. At the same time, the difference information is stored in the configuration file, which also facilitates the management of the component modules of the monitoring system in the future.
请参阅图4,图4是本申请另一实施例提供的一种监控系统的部署方法的示意流程图。该监控系统的部署方法可运行在服务器中,其中该服务器可以是独立的服务器,也可以是多个服务器组成的服务器集群。如图4所示,该监控系统的部署方法包括步骤S201~S208。Referring to FIG. 4, FIG. 4 is a schematic flowchart of a method for deploying a monitoring system according to another embodiment of the present application. The deployment method of the monitoring system can be run in a server, where the server can be a stand-alone server or a server cluster composed of multiple servers. As shown in FIG. 4, the deployment method of the monitoring system includes steps S201 to S208.
S201、获取所述监控系统中每个组件模块对应的组件信息,其中所述组件 信息包括编程语言信息,所述编程语言信息包括Golang语言和Python语言。S201. Obtain component information corresponding to each component module in the monitoring system, where the component information includes programming language information, where the programming language information includes a Golang language and a Python language.
在本实施例中,获取所述监控系统中每个组件模块对应的组件信息,具体为:根据所述编程语言信息对所述组件模块进行分类以生成Golang组件组和Python组件组。In this embodiment, component information corresponding to each component module in the monitoring system is obtained, specifically: classifying the component modules according to the programming language information to generate a Golang component group and a Python component group.
其中,根据组件模块的编程语言进行分类,比如Argus的组件模块中hbs,transfer,judge,graph,query,alarm等组件模块是由Golang语言编写的,而像portal,dashboard,links等组件模块是用Python语言写的。Among them, according to the programming language of the component module, for example, component modules of hbs, transfer, judge, graph, query, alarm, etc. in Argus component module are written by Golang language, and component modules such as portal, dashboard, links are used. Written in the Python language.
因为两种语言编写的组件模块的部署方式不同,具体地Golang编写的组件模块没有依赖,可以直接启动运行。而Python编写的组件模块需要启动python虚拟环境加载相关的依赖包才能正常启动运行。因此通过对组件模块部署特点的分析,方便对应容器文件模板进行制作,同时还可以提高部署效率。Because component modules written in two languages are deployed in different ways, specifically the component modules written in Golang have no dependencies and can be started directly. The component module written in Python needs to start the python virtual environment to load the related dependencies in order to start the operation normally. Therefore, by analyzing the deployment characteristics of the component modules, it is convenient to make corresponding container file templates, and at the same time, the deployment efficiency can be improved.
S202、根据所述组件信息对所述组件模块进行划分以生成类别组件组。S202. Divide the component module according to the component information to generate a category component group.
具体地,根据所述编程语言信息对所述组件模块进行分类以生成Golang组件组和Python组件组。对于Argus监控系统,该Golang组件组包括hbs、transfer、judge、graph、query和alarm等组件模块;Python组件组包括portal、dashboard和links等组件模块。Specifically, the component modules are classified according to the programming language information to generate a Golang component group and a Python component group. For the Argus monitoring system, the Golang component group includes component modules such as hbs, transfer, judge, graph, query, and alarm; the Python component group includes component modules such as portal, dashboard, and links.
S203、获取同一组类别组件组中多个组件模块之间的差异信息和共性信息。S203. Obtain difference information and common information between multiple component modules in the same group of component groups.
具体为:获取所述Golang组件组中多个所述组件模块之间的共性信息和差异信息,以及获取所述Python组件组中多个所述组件模块之间的共性信息和差异信息。Specifically, acquiring common information and difference information between the plurality of component modules in the Golang component group, and acquiring common information and difference information between the plurality of component modules in the Python component group.
S204、基于所述差异信息和共性信息生成容器文件模板并将所述差异信息存储在配置文件中。S204. Generate a container file template based on the difference information and the common information, and store the difference information in a configuration file.
具体为:对每个所述组件模块的差异信息进行变量设置;根据每个所述组件模块的差异信息对应的变量和所述共性信息生成容器文件模板;以及将经过所述变量设置的差异信息存储在配置文件中。Specifically, the variable information is set for the difference information of each of the component modules; the container file template is generated according to the variable corresponding to the difference information of each component module and the common information; and the difference information set by the variable is Stored in the configuration file.
此外,还可将所述配置文件保存在预设数据库中以及通过configmap管理所述配置文件。具体是通过Kubernetes中的configmap来集中管理该监控系统的配置文件,由此提高了管理效率。In addition, the configuration file can also be saved in a preset database and managed by a configmap. Specifically, the configuration file of the monitoring system is centrally managed by the configmap in Kubernetes, thereby improving management efficiency.
S205、根据所述容器文件模板和配置文件按预设文件生成规则生成部署编排文件。S205. Generate a deployment orchestration file according to the preset file generation rule according to the container file template and the configuration file.
具体地,调用预设读取脚本读取所述配置文件;以及根据所述变量将所述配置文件中的差异信息填充至所述容器文件模板中以生成所述部署编排文件。该预设脚本执行的操作是读取所述配置文件,根据配置文件的变量对应的差异信息对容器文件模板中的变量进行描述填充,从而生成一个完成的部署编排文件。Specifically, the preset read script is invoked to read the configuration file; and the difference information in the configuration file is filled into the container file template according to the variable to generate the deployment orchestration file. The operation performed by the preset script is to read the configuration file, and describe and fill variables in the container file template according to the difference information corresponding to the variables of the configuration file, thereby generating a completed deployment orchestration file.
在本实施例中,具体是使用容器集群管理系统(Kubernetes,简称K8s)对该监控系统进行部署。相对应地,所述部署编排文件包括Dockerfile部署编排文件和K8s部署编排文件。In this embodiment, the monitoring system is specifically deployed by using a container cluster management system (Kubernetes, K8s for short). Correspondingly, the deployment orchestration file includes a Dockerfile deployment orchestration file and a K8s deployment orchestration file.
S206、将部署所述监控系统所需的主机加入主机资源池并对所述主机资源池中的主机进行标记以生成主机标记号。S206. Add a host required to deploy the monitoring system to a host resource pool and mark a host in the host resource pool to generate a host tag number.
在利用K8s调用所述部署编排文件对所述监控系统进行部署时,还可获取部署所述监控系统所需的主机,该主机可以为物理机或虚拟机。将这些主机加入主机资源池中,将也通过K8s对这些主机进行管理和调度,以便在主机出现故障时,借助K8s进行组件模块迁移,自动将组件模块迁移到可用的主机上,大大降低了运维复杂度。When the monitoring system is deployed by using the K8s to invoke the deployment orchestration file, the host required to deploy the monitoring system may also be obtained, and the host may be a physical machine or a virtual machine. These hosts are added to the host resource pool, and these hosts are also managed and scheduled by K8s, so that when the host fails, the component modules are migrated by K8s, and the component modules are automatically migrated to the available hosts, which greatly reduces the operation. Dimensional complexity.
将这些主机加入主机资源池中,具体是将这些主机中安装docker、flannel和Kubernetes等客户端软件,启动时指定Kubernetes的master的IP,这样主机就会注册到K8s集群里,被Kubernetes的master接管,进而为将这些主机加入主机资源池中。Add these hosts to the host resource pool. Specifically, install client software such as docker, flannel, and Kubernetes on these hosts. Specify the administrator's IP of Kubernetes at startup, so that the host will be registered in the K8s cluster and taken over by the Kubernetes master. In order to join these hosts into the host resource pool.
对所述主机资源池中的主机进行标记以生成主机标记号,具体为将主机加入资源池后,对资源池中的主机进行打标,比如标记为主机#1、#2、#3等。这些#1、#2、#3即为主机标号。The host in the host resource pool is marked to generate a host tag number. Specifically, after the host is added to the resource pool, the hosts in the resource pool are marked, for example, as hosts #1, #2, #3, and the like. These #1, #2, and #3 are the host labels.
S207、根据所述主机标记号对所述主机资源池中的主机进行调度管理。S207. Perform scheduling management on the host in the host resource pool according to the host tag number.
在本实施例中,根据所述主机标记号对所述主机资源池中的主机进行调度管理,方便K8s根据组件模块的资源占用情况选择不同的主机进行部署。In this embodiment, the hosts in the host resource pool are scheduled and managed according to the host tag number, so that the K8s can select different hosts to deploy according to the resource occupancy of the component modules.
S208、调用所述部署编排文件将所述监控系统部署在所述主机资源池中的主机中。S208. Invoking the deployment orchestration file, the monitoring system is deployed in a host in the host resource pool.
具体可以使用调用命令加所述部署编排文件的名称的方式,调用所述部署编排文件将所述监控系统部署在所述主机资源池中的主机中。Specifically, the deployment system may be invoked to deploy the monitoring system in a host in the host resource pool by using a calling command and a name of the deployment orchestration file.
上述实施例根据编程语言信息对监控系统的组件模块进行分类,并获取同 类别的组件模块之间的差异信息和共性信息;基于所述差异信息和共性信息生成容器文件模板,以及将所述差异信息存储在配置文件中;利用配置文件和容器文件模板生成部署编排文件;由容器集群管理系统根据所述部署编排文件完成对所述监控系统进行部署,进而提高了部署效率。同时将所述差异信息存储在配置文件,也方便日后对该监控系统的组件模块的管理。此外,还将部署该监控系统的主机加入到资源池中进行集中管理,由此还降低了部署运维的复杂度。The foregoing embodiment classifies the component modules of the monitoring system according to the programming language information, and obtains difference information and common information between the component modules of the same category; generates a container file template based on the difference information and the common information, and the difference is The information is stored in the configuration file; the deployment orchestration file is generated by using the configuration file and the container file template; and the monitoring system is deployed by the container cluster management system according to the deployment orchestration file, thereby improving the deployment efficiency. At the same time, the difference information is stored in the configuration file, which also facilitates the management of the component modules of the monitoring system in the future. In addition, hosts that deploy the monitoring system are added to the resource pool for centralized management, thereby reducing the complexity of deployment and operation.
请参阅图5,图5是本申请实施例提供的一种监控系统的部署装置的示意性框图。该部署装置300安装在服务器或终端中,其中该服务器可以是独立的服务器,也可以是多个服务器组成的服务器集群;该终端包括台式电脑、手提电脑、平板电脑、个人数字助理(PDA)或智能手机等。Referring to FIG. 5, FIG. 5 is a schematic block diagram of a device for deploying a monitoring system according to an embodiment of the present application. The deployment device 300 is installed in a server or a terminal, wherein the server may be a stand-alone server or a server cluster composed of multiple servers; the terminal includes a desktop computer, a laptop, a tablet, a personal digital assistant (PDA), or Smartphones, etc.
如图5所示,部署装置300包括第一获取单元301、划分生成单元302、第二获取单元303、生成存储单元304、文件生成单元305和调用部署单元306。As shown in FIG. 5, the deployment apparatus 300 includes a first acquisition unit 301, a division generation unit 302, a second acquisition unit 303, a generation storage unit 304, a file generation unit 305, and a call deployment unit 306.
第一获取单元301,用于获取监控系统中每个组件模块对应的组件信息。The first obtaining unit 301 is configured to acquire component information corresponding to each component module in the monitoring system.
其中,获取该监控系统中每个组件模块对应的组件信息。该组件信息包括组件模块的编程语言信息。具体地,该编程语言信息比如Golang语言和Python语言,该监控系统的组件模块基本均是采用Golang语言和Python语言编写的。The component information corresponding to each component module in the monitoring system is obtained. The component information includes programming language information of the component module. Specifically, the programming language information such as the Golang language and the Python language, the component modules of the monitoring system are basically written in the Golang language and the Python language.
在一实施例中,该组件信息还可包括组件模块的状态信息等,该状态信息比如有数据状态信息和无数据状态信息。其中,有数据状态信息是指与本地数据有关联的组件模块对应的状态信息;无数据状态信息是指与本地数据没有关联的组件模块对应的状态信息。In an embodiment, the component information may further include status information of the component module, such as data status information and no data status information. The data status information refers to status information corresponding to the component module associated with the local data; the no data status information refers to status information corresponding to the component module not associated with the local data.
划分生成模块302,用于根据所述组件信息对所述组件模块进行划分以生成类别组件组。The partition generation module 302 is configured to divide the component module according to the component information to generate a category component group.
具体地,根据所述编程语言信息对监控系统的所有组件模块进行划分以生成类别组件组。Specifically, all component modules of the monitoring system are divided according to the programming language information to generate a category component group.
譬如,以Argus监控系统为例,假如该Argus监控系统包括30个组件模块,30个组件模块中有14个组件模块采用Golang语言编写的,另外16个组件模块采用Python语言编写的,则可将该Argus监控系统的30个组件模块划分为Golang组件组和Python组件组,即Golang组件组包括14个采用Golang语言编 写的组件模块,Python组件组包括16个采用Python语言编写的组件模块。For example, taking the Argus monitoring system as an example, if the Argus monitoring system includes 30 component modules, 14 of the 30 component modules are written in the Golang language, and the other 16 component modules are written in the Python language. The 30 component modules of the Argus monitoring system are divided into Golang component group and Python component group. The Golang component group includes 14 component modules written in Golang language. The Python component group includes 16 component modules written in Python language.
在一实施例中,也可以根据状态信息对监控系统的所有组件模块进行划分以生成类别组件组。In an embodiment, all component modules of the monitoring system may also be divided according to state information to generate a category component group.
第二获取单元303,用于获取同一组类别组件组中多个组件模块之间的差异信息和共性信息。The second obtaining unit 303 is configured to acquire difference information and common information between the multiple component modules in the same group of category components.
比如、golang组件组的hbs、transfer、judge、graph、query和alarm等组件模块。这些组件模块的共性信息包括:共用安装包、启动服务、启动指令、相同的docker基础镜像和相同的服务命名等信息;这些组件模块的差异信息包括:启动端口、挂载存储卷和副本数等信息。For example, the gob component group hbs, transfer, judge, graph, query, alarm and other component modules. The common information of these component modules includes: common installation package, startup service, startup instructions, the same docker base image and the same service naming information; the difference information of these component modules includes: boot port, mount storage volume and number of copies, etc. information.
生成存储单元304,用于基于所述差异信息和共性信息生成容器文件模板并将所述差异信息存储在配置文件中。The generating storage unit 304 is configured to generate a container file template based on the difference information and the common information, and store the difference information in a configuration file.
为了将监控系统的组件模块容器化,需要制作相应的文件模块,具体可采用容器集群管理系统(Kubernetes,简称K8s)对监控系统进行部署,相对应该容器文件模板包括Dockerfile模板、K8s deployment模板和k8s编排模板等。In order to containerize the component modules of the monitoring system, the corresponding file modules need to be created. The container cluster management system (Kubernetes, K8s for short) can be used to deploy the monitoring system. The corresponding container file template includes the Dockerfile template, K8s deployment template and k8s. Orchestration templates, etc.
具体地,生成存储单元304包括变量设置子单元3041、模板生成子单元3042和信息存储子单元3043。Specifically, the generation storage unit 304 includes a variable setting sub-unit 3041, a template generation sub-unit 3042, and an information storage sub-unit 3043.
变量设置子单元3041,用于对每个所述组件模块的差异信息进行变量设置。The variable setting subunit 3041 is configured to perform variable setting on the difference information of each of the component modules.
具体地,对每个组件模块的差异信息进行不同的变量设置。此外每个所述组件模块的差异信息中不同的差异部分进行不同变量设置。该变量设置是为差异部分设置对应的变量。Specifically, different variable settings are made for the difference information of each component module. In addition, different difference parts of the difference information of each of the component modules are set with different variables. The variable setting is to set the corresponding variable for the difference part.
比如,将transfer组件模块的差异信息设置对应变量x。该差异信息具体包括挂载存储卷和副本数等差异部分,进而将挂载存储卷和副本数设置对应变量x1和x2等。For example, the difference information of the transfer component module is set to correspond to the variable x. The difference information specifically includes a difference portion such as a storage volume and a copy number, and the corresponding storage variables and the number of copies are set to corresponding variables x1 and x2.
模板生成子单元3042,用于根据每个所述组件模块的差异信息对应的变量和所述共性信息生成容器文件模板。The template generation subunit 3042 is configured to generate a container file template according to the variable corresponding to the difference information of each of the component modules and the common information.
具体地,在将每个所述组件模块的差异信息进行变量设置后,将所述差异信息进行变量替换,根据所述变量和共性信息生成容器文件模板,即该容器模板包括共性信息和差异信息对应的变量。Specifically, after the difference information of each of the component modules is set, the difference information is subjected to variable replacement, and a container file template is generated according to the variable and the common information, that is, the container template includes common information and difference information. Corresponding variables.
信息存储子单元3043,用于将经过所述变量设置的差异信息存储在配置文件中。The information storage subunit 3043 is configured to store the difference information set by the variable in a configuration file.
具体地,是将所述组件模块的差异信息及其相对应的变量存储在配置文件中。Specifically, the difference information of the component module and its corresponding variable are stored in the configuration file.
该基于所述差异信息和共性信息生成容器文件模板并将所述差异信息存储在配置文件中,相对现有的部署方法不仅可以提高部署效率,同时容器文件模板和配置文件只需存储在两个不同的位置,因此有利于后续的文件管理。The container file template is generated based on the difference information and the common information, and the difference information is stored in the configuration file. Compared with the existing deployment method, the deployment efficiency can be improved, and the container file template and the configuration file need only be stored in two Different locations are therefore beneficial for subsequent file management.
文件生成单元305,用于根据所述容器文件模板和配置文件按预设文件生成规则生成部署编排文件。The file generating unit 305 is configured to generate a deployment orchestration file according to the preset file generation rule according to the container file template and the configuration file.
其中,该预设文件生成规则是指将配置文件的中差异信息按照预设变量方式填充在容器文件模板中,由此可以根据容器文件模板和配置文件动态地生成不同环境下的部署编排文件。其中不同环境包括开发、测试或生产等环境。The preset file generation rule is to fill the difference information of the configuration file in the container file template according to the preset variable manner, thereby dynamically generating the deployment orchestration file in different environments according to the container file template and the configuration file. Different environments include environments such as development, testing, or production.
具体地,文件生成单元305包括调用读取子单元3051和信息填充子单元3052。Specifically, the file generating unit 305 includes a call reading subunit 3051 and an information filling subunit 3052.
调用读取子单元3051,用于调用预设读取脚本读取所述配置文件。The read subunit 3051 is called to call a preset read script to read the configuration file.
具体可以通过键入命令符的方式来调用预设读取脚本以读取所述配置文件,该预设读取脚本用于读取配置文件。Specifically, the preset read script can be called by typing a command character to read the configuration file, and the preset read script is used to read the configuration file.
信息填充子单元3052,用于根据所述变量将所述配置文件中的差异信息填充至所述容器文件模板中以生成所述部署编排文件。The information populating sub-unit 3052 is configured to fill the difference information in the configuration file into the container file template according to the variable to generate the deployment orchestration file.
具体地根据所述变量对应关系将配置文件差异信息对应填充在容器文件模板的包含的变量,从而生成一个完整的部署编排文件。Specifically, the profile difference information is correspondingly filled in the variable included in the container file template according to the variable correspondence relationship, thereby generating a complete deployment orchestration file.
调用部署单元306,用于调用所述部署编排文件对所述监控系统进行部署。The deployment unit 306 is configured to invoke the deployment orchestration file to deploy the monitoring system.
具体可以使用调用命令加所述部署编排文件的名称的方式,调用所述部署编排文件以对所述监控系统进行部署。Specifically, the deployment orchestration file may be invoked to deploy the monitoring system by using a calling command and a name of the deployment orchestration file.
其中,具体使用Kubernetes调用该部署编排文件已完成对所述监控系统进行部署。该Kubernetes为容器集群管理系统,可以自动协调该监控系统的组件模块,利用上述部署编排文件对该监控系统进行部署,完全不用考虑每个组件模块的资源占用情况。由此节省了人工操作,提高了部署的效率。The specific deployment of the deployment orchestration file by Kubernetes has completed the deployment of the monitoring system. The Kubernetes is a container cluster management system, which can automatically coordinate the component modules of the monitoring system, and deploy the monitoring system by using the above deployment programming files, regardless of the resource occupation of each component module. This saves manual operations and increases the efficiency of deployment.
请参阅图6,图6是本申请实施例提供的一种监控系统的部署装置的示意性框图。如图6所示,部署装置400包括第一获取单元401、划分生成单元402、第二获取单元403、生成存储单元404、文件生成单元405、加入标记单元406、 调度管理单元407和调用部署单元408。Please refer to FIG. 6. FIG. 6 is a schematic block diagram of a device for deploying a monitoring system according to an embodiment of the present application. As shown in FIG. 6, the deployment apparatus 400 includes a first acquisition unit 401, a division generation unit 402, a second acquisition unit 403, a generation storage unit 404, a file generation unit 405, a join marker unit 406, a schedule management unit 407, and a call deployment unit. 408.
第一获取单元401,用于获取所述监控系统中每个组件模块对应的组件信息,其中所述组件信息包括编程语言信息,所述编程语言信息包括Golang语言和Python语言。The first obtaining unit 401 is configured to acquire component information corresponding to each component module in the monitoring system, where the component information includes programming language information, where the programming language information includes a Golang language and a Python language.
在本实施例中,第一获取单元401具体用于:根据所述编程语言信息对所述组件模块进行分类以生成Golang组件组和Python组件组。In this embodiment, the first obtaining unit 401 is specifically configured to: classify the component modules according to the programming language information to generate a Golang component group and a Python component group.
比如,Argus的组件模块中hbs,transfer,judge,graph,query,alarm等组件模块是由Golang语言编写的,而像portal,dashboard,links等组件模块是用Python语言写的。For example, component modules of hbs, transfer, judge, graph, query, alarm, etc. in Argus component modules are written in Golang language, and component modules such as portal, dashboard, links, etc. are written in Python language.
划分生成单元402,用于根据所述组件信息对所述组件模块进行划分以生成类别组件组。The division generating unit 402 is configured to divide the component module according to the component information to generate a category component group.
具体地,根据所述编程语言信息对所述组件模块进行分类以生成Golang组件组和Python组件组。对于Argus监控系统,该Golang组件组包括hbs、transfer、judge、graph、query和alarm等组件模块;Python组件组包括portal、dashboard和links等组件模块。Specifically, the component modules are classified according to the programming language information to generate a Golang component group and a Python component group. For the Argus monitoring system, the Golang component group includes component modules such as hbs, transfer, judge, graph, query, and alarm; the Python component group includes component modules such as portal, dashboard, and links.
第二获取单元403,用于获取同一组类别组件组中多个组件模块之间的差异信息和共性信息。The second obtaining unit 403 is configured to acquire difference information and common information between the multiple component modules in the same group of category component groups.
具体用于获取所述Golang组件组中多个所述组件模块之间的共性信息和差异信息,以及获取所述Python组件组中多个所述组件模块之间的共性信息和差异信息。The method is specifically configured to obtain common information and difference information between the plurality of component modules in the Golang component group, and obtain common information and difference information between the plurality of component modules in the Python component group.
生成存储单元404,用于基于所述差异信息和共性信息生成容器文件模板,并将所述差异信息存储在配置文件中。The generating storage unit 404 is configured to generate a container file template based on the difference information and the common information, and store the difference information in the configuration file.
具体用于:对每个所述组件模块的差异信息进行变量设置;根据每个所述组件模块的差异信息对应的变量和所述共性信息生成容器文件模板;以及将经过所述变量设置的差异信息存储在配置文件中。Specifically, the variable information is set for each difference component of the component module; the container file template is generated according to the variable corresponding to the difference information of each component module and the common information; and the difference that is set by the variable is The information is stored in a configuration file.
此外,还包括保存管理单元,该保存管理单元用于还可将所述配置文件保存在预设数据库中以及通过configmap管理所述配置文件。具体是通过Kubernetes中的configmap来集中管理该监控系统的配置文件,由此提高了管理效率。In addition, a saving management unit is further included, wherein the saving management unit is further configured to save the configuration file in a preset database and manage the configuration file through a configmap. Specifically, the configuration file of the monitoring system is centrally managed by the configmap in Kubernetes, thereby improving management efficiency.
文件生成单元405,用于根据所述容器文件模板和配置文件按预设文件生成 规则生成部署编排文件。The file generating unit 405 is configured to generate a deployment orchestration file according to the preset file generation rule according to the container file template and the configuration file.
具体用于:调用预设读取脚本读取所述配置文件;以及根据所述变量将所述配置文件中的差异信息填充至所述容器文件模板中以生成所述部署编排文件。该预设脚本执行的操作是读取所述配置文件,根据配置文件的变量对应的差异信息对容器文件模板中的变量进行描述填充,从而生成一个完成的部署编排文件。Specifically, the method is: calling a preset read script to read the configuration file; and filling the difference information in the configuration file into the container file template according to the variable to generate the deployment orchestration file. The operation performed by the preset script is to read the configuration file, and describe and fill variables in the container file template according to the difference information corresponding to the variables of the configuration file, thereby generating a completed deployment orchestration file.
在本实施例中,具体是使用容器集群管理系统(Kubernetes,简称K8s)对该监控系统进行部署。相对应地,所述部署编排文件包括Dockerfile部署编排文件和K8s部署编排文件。In this embodiment, the monitoring system is specifically deployed by using a container cluster management system (Kubernetes, K8s for short). Correspondingly, the deployment orchestration file includes a Dockerfile deployment orchestration file and a K8s deployment orchestration file.
加入标记单元406,用于将部署所述监控系统所需的主机加入主机资源池并对所述主机资源池中的主机进行标记以生成主机标记号。The tagging unit 406 is configured to join the host required to deploy the monitoring system to the host resource pool and mark the host in the host resource pool to generate a host tag number.
将这些主机加入主机资源池中,具体是将这些主机中安装docker、flannel和Kubernetes等客户端软件,启动时指定Kubernetes的master的IP,这样主机就会注册到K8s集群里,被Kubernetes的master接管,进而为将这些主机加入主机资源池中。Add these hosts to the host resource pool. Specifically, install client software such as docker, flannel, and Kubernetes on these hosts. Specify the administrator's IP of Kubernetes at startup, so that the host will be registered in the K8s cluster and taken over by the Kubernetes master. In order to join these hosts into the host resource pool.
对所述主机资源池中的主机进行标记以生成主机标记号,具体为将主机加入资源池后,对资源池中的主机进行打标,比如标记为主机#1、#2、#3等。这些#1、#2、#3即为主机标号。The host in the host resource pool is marked to generate a host tag number. Specifically, after the host is added to the resource pool, the hosts in the resource pool are marked, for example, as hosts #1, #2, #3, and the like. These #1, #2, and #3 are the host labels.
调度管理单元407,用于根据所述主机标记号对所述主机资源池中的主机进行调度管理。The scheduling management unit 407 is configured to perform scheduling management on the hosts in the host resource pool according to the host tag number.
在本实施例中,根据所述主机标记号对所述主机资源池中的主机进行调度管理,方便K8s根据组件模块的资源占用情况选择不同的主机进行部署。In this embodiment, the hosts in the host resource pool are scheduled and managed according to the host tag number, so that the K8s can select different hosts to deploy according to the resource occupancy of the component modules.
调用部署单元408,用于调用所述部署编排文件将所述监控系统部署在所述主机资源池中的主机中。The deployment unit 408 is configured to invoke the deployment orchestration file to deploy the monitoring system in a host in the host resource pool.
具体可以使用调用命令加所述部署编排文件的名称的方式,调用所述部署编排文件将所述监控系统部署在所述主机资源池中的主机中。Specifically, the deployment system may be invoked to deploy the monitoring system in a host in the host resource pool by using a calling command and a name of the deployment orchestration file.
上述装置可以实现为一种计算机程序的形式,计算机程序可以在如图7所示的计算机设备上运行。The above apparatus may be embodied in the form of a computer program that can be run on a computer device as shown in FIG.
请参阅图7,图7是本申请实施例提供的一种计算机设备的示意性框图。该 计算机设备500设备可以是终端或服务器。Please refer to FIG. 7. FIG. 7 is a schematic block diagram of a computer device according to an embodiment of the present application. The computer device 500 device can be a terminal or a server.
参照图7,该计算机设备500包括通过系统总线510连接的处理器520、存储器和网络接口550,其中,存储器可以包括非易失性存储介质530和内存储器540。Referring to FIG. 7, the computer device 500 includes a processor 520, a memory, and a network interface 550 connected by a system bus 510, wherein the memory can include a non-volatile storage medium 530 and an internal memory 540.
该非易失性存储介质530可存储操作系统531和计算机程序532。该计算机程序532被执行时,可使得处理器520执行一种监控系统的部署方法。The non-volatile storage medium 530 can store an operating system 531 and a computer program 532. When the computer program 532 is executed, the processor 520 can be caused to perform a deployment method of the monitoring system.
该处理器520用于提供计算和控制能力,支撑整个计算机设备500的运行。The processor 520 is used to provide computing and control capabilities to support the operation of the entire computer device 500.
该内存储器540为非易失性存储介质530中的操作系统531及计算机程序532提供高速缓存的运行环境。The internal memory 540 provides a cached operating environment for the operating system 531 and the computer program 532 in the non-volatile storage medium 530.
该网络接口550用于进行网络通信,如发送分配的任务等。本领域技术人员可以理解,图7中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备500的限定,具体的计算机设备500可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。The network interface 550 is used for network communication, such as sending assigned tasks and the like. It will be understood by those skilled in the art that the structure shown in FIG. 7 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation of the computer device 500 to which the solution of the present application is applied, and a specific computer device. 500 may include more or fewer components than shown, or some components may be combined, or have different component arrangements.
其中,所述处理器520用于运行存储在存储器中的程序代码,以实现如下程序:The processor 520 is configured to run program code stored in the memory to implement the following program:
获取监控系统中每个组件模块对应的组件信息;根据所述组件信息对所述组件模块进行划分以生成类别组件组;获取同一组类别组件组中多个组件模块之间的差异信息和共性信息;基于所述差异信息和共性信息生成容器文件模板并将所述差异信息存储在配置文件中;根据所述容器文件模板和配置文件按预设文件生成规则生成部署编排文件;以及调用所述部署编排文件对所述监控系统进行部署。Obtaining component information corresponding to each component module in the monitoring system; dividing the component module according to the component information to generate a category component group; acquiring difference information and common information between multiple component modules in the same group component group Generating a container file template based on the difference information and the common information and storing the difference information in a configuration file; generating a deployment orchestration file according to the preset file generation rule according to the container file template and the configuration file; and invoking the deployment The orchestration file deploys the monitoring system.
在一实施例中,处理器520在执行所述基于所述差异信息和共性信息生成容器文件模板并将所述差异信息存储在配置文件中时,具体执行如下程序:In an embodiment, when the processor 520 generates the container file template based on the difference information and the common information, and stores the difference information in the configuration file, the processor 520 specifically executes the following procedure:
对每个所述组件模块的差异信息进行变量设置;根据每个所述组件模块的差异信息对应的变量和所述共性信息生成容器文件模板;以及将经过所述变量设置的差异信息存储在配置文件中。Performing variable setting on the difference information of each of the component modules; generating a container file template according to the variable corresponding to the difference information of each component module and the common information; and storing the difference information set by the variable in the configuration In the file.
在一实施例中,处理器520在执行所述根据所述容器文件模板和配置文件按预设文件生成规则生成部署编排文件时,具体执行如下程序:In an embodiment, when the processor 520 generates the deployment orchestration file according to the preset file generation rule according to the container file template and the configuration file, the processor 520 executes the following procedure:
调用预设读取脚本读取所述配置文件;根据所述变量将所述配置文件中的 差异信息填充至所述容器文件模板中以生成所述部署编排文件。Calling a preset read script to read the configuration file; populating the difference information in the configuration file into the container file template according to the variable to generate the deployment orchestration file.
在一实施例中,处理器520在用于运行存储在存储器中的程序代码,以实现如下程序:In an embodiment, the processor 520 is configured to execute program code stored in the memory to implement the following program:
获取监控系统中每个组件模块对应的组件信息;根据所述组件信息对所述组件模块进行划分以生成类别组件组;获取同一组类别组件组中多个组件模块之间的差异信息和共性信息;基于所述差异信息和共性信息生成容器文件模板并将所述差异信息存储在配置文件中;根据所述容器文件模板和配置文件按预设文件生成规则生成部署编排文件;将部署所述监控系统所需的主机加入主机资源池并对所述主机资源池中的主机进行标记以生成主机标记号;以及根据所述主机标记号对所述主机资源池中的主机进行调度管理;调用所述部署编排文件将所述监控系统部署在所述主机资源池中的主机中。Obtaining component information corresponding to each component module in the monitoring system; dividing the component module according to the component information to generate a category component group; acquiring difference information and common information between multiple component modules in the same group component group Generating a container file template based on the difference information and the common information and storing the difference information in a configuration file; generating a deployment orchestration file according to the preset file generation rule according to the container file template and the configuration file; the monitoring is to be deployed The host required by the system joins the host resource pool and marks the host in the host resource pool to generate a host tag number; and performs scheduling management on the host in the host resource pool according to the host tag number; The deployment orchestration file deploys the monitoring system in a host in the host resource pool.
应当理解,在本申请实施例中,处理器520可以是中央处理单元(Central Processing Unit,CPU),该处理器520还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。其中,通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。It should be understood that, in the embodiment of the present application, the processor 520 may be a central processing unit (CPU), and the processor 520 may also be other general-purpose processors, a digital signal processor (DSP), Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, etc. The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
本领域技术人员可以理解,图7中示出的计算机设备500结构并不构成对计算机设备500的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Those skilled in the art will appreciate that the computer device 500 architecture illustrated in FIG. 7 does not constitute a limitation to computer device 500, may include more or fewer components than illustrated, or may combine certain components, or different components. Arrangement.
在本申请的另一实施例中提供一种存储介质,该存储介质为计算机可读存储介质,该计算机可读存储介质存储有计算机程序,其中计算机程序包括程序指令。该程序指令被处理器执行时实现:In another embodiment of the present application, a storage medium is provided, the storage medium being a computer readable storage medium storing a computer program, wherein the computer program includes program instructions. This program instruction is implemented when executed by the processor:
获取监控系统中每个组件模块对应的组件信息;根据所述组件信息对所述组件模块进行划分以生成类别组件组;获取同一组类别组件组中多个组件模块之间的差异信息和共性信息;基于所述差异信息和共性信息生成容器文件模板并将所述差异信息存储在配置文件中;根据所述容器文件模板和配置文件按预设文件生成规则生成部署编排文件;以及调用所述部署编排文件对所述监控系统进行部署。Obtaining component information corresponding to each component module in the monitoring system; dividing the component module according to the component information to generate a category component group; acquiring difference information and common information between multiple component modules in the same group component group Generating a container file template based on the difference information and the common information and storing the difference information in a configuration file; generating a deployment orchestration file according to the preset file generation rule according to the container file template and the configuration file; and invoking the deployment The orchestration file deploys the monitoring system.
在一实施例中,该程序指令被处理器执行所述基于所述差异信息和共性信 息生成容器文件模板并将所述差异信息存储在配置文件中时,具体实现:In an embodiment, when the program instruction is executed by the processor to generate the container file template based on the difference information and the common information, and the difference information is stored in the configuration file, the specific implementation is:
对每个所述组件模块的差异信息进行变量设置;根据每个所述组件模块的差异信息对应的变量和所述共性信息生成容器文件模板;以及将经过所述变量设置的差异信息存储在配置文件中。Performing variable setting on the difference information of each of the component modules; generating a container file template according to the variable corresponding to the difference information of each component module and the common information; and storing the difference information set by the variable in the configuration In the file.
在一实施例中,该程序指令被处理器执行所述根据所述容器文件模板和配置文件按预设文件生成规则生成部署编排文件时,具体实现:In an embodiment, the program instruction is executed by the processor, and when the deployment file is generated according to the preset file generation rule according to the container file template and the configuration file, the specific implementation is:
调用预设读取脚本读取所述配置文件;根据所述变量将所述配置文件中的差异信息填充至所述容器文件模板中以生成所述部署编排文件。Calling a preset read script to read the configuration file; populating the difference information in the configuration file into the container file template according to the variable to generate the deployment orchestration file.
在一实施例中,该程序指令被处理器执行,还实现:In an embodiment, the program instructions are executed by the processor and further implement:
获取监控系统中每个组件模块对应的组件信息;根据所述组件信息对所述组件模块进行划分以生成类别组件组;获取同一组类别组件组中多个组件模块之间的差异信息和共性信息;基于所述差异信息和共性信息生成容器文件模板并将所述差异信息存储在配置文件中;根据所述容器文件模板和配置文件按预设文件生成规则生成部署编排文件;将部署所述监控系统所需的主机加入主机资源池并对所述主机资源池中的主机进行标记以生成主机标记号;以及根据所述主机标记号对所述主机资源池中的主机进行调度管理;调用所述部署编排文件将所述监控系统部署在所述主机资源池中的主机中。Obtaining component information corresponding to each component module in the monitoring system; dividing the component module according to the component information to generate a category component group; acquiring difference information and common information between multiple component modules in the same group component group Generating a container file template based on the difference information and the common information and storing the difference information in a configuration file; generating a deployment orchestration file according to the preset file generation rule according to the container file template and the configuration file; the monitoring is to be deployed The host required by the system joins the host resource pool and marks the host in the host resource pool to generate a host tag number; and performs scheduling management on the host in the host resource pool according to the host tag number; The deployment orchestration file deploys the monitoring system in a host in the host resource pool.
该计算机可读存储介质可以是U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、磁碟或者光盘等各种可以存储程序代码的介质。The computer readable storage medium may be any medium that can store program code, such as a USB flash drive, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disk.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the various examples described in connection with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both, for clarity of hardware and software. Interchangeability, the composition and steps of the various examples have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods to implement the described functions for each particular application, but such implementation should not be considered to be beyond the scope of the present application.
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的监控系统的部署装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。A person skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working process of the deployment apparatus and the unit of the above-mentioned monitoring system can be referred to the corresponding process in the foregoing method embodiments, and details are not described herein again.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可 以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的。例如,各个单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。In the several embodiments provided herein, it should be understood that the disclosed apparatus and method can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of each unit is only a logical function division, and there may be another division manner in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be omitted or not implemented.
本申请实施例方法中的步骤可以根据实际需要进行顺序调整、合并和删减。本申请实施例装置中的单元可以根据实际需要进行合并、划分和删减。The steps in the method of the embodiment of the present application may be sequentially adjusted, merged, and deleted according to actual needs. The units in the apparatus of the embodiment of the present application may be combined, divided, and deleted according to actual needs.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以是两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
该集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分,或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,终端,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。The integrated unit, if implemented in the form of a software functional unit and sold or used as a standalone product, can be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be in essence or part of the contribution to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium. There are a number of instructions for causing a computer device (which may be a personal computer, terminal, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present application.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。The foregoing is only a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto, and any equivalents can be easily conceived by those skilled in the art within the technical scope disclosed in the present application. Modifications or substitutions are intended to be included within the scope of the present application. Therefore, the scope of protection of this application should be determined by the scope of protection of the claims.

Claims (20)

  1. 一种监控系统的部署方法,包括:A method of deploying a monitoring system, comprising:
    获取监控系统中每个组件模块对应的组件信息;Obtain component information corresponding to each component module in the monitoring system;
    根据所述组件信息对所述组件模块进行划分以生成类别组件组;And dividing the component module according to the component information to generate a category component group;
    获取同一组类别组件组中多个组件模块之间的差异信息和共性信息;Obtaining difference information and common information between multiple component modules in the same group of component groups;
    基于所述差异信息和共性信息生成容器文件模板并将所述差异信息存储在配置文件中;Generating a container file template based on the difference information and the common information, and storing the difference information in a configuration file;
    根据所述容器文件模板和配置文件按预设文件生成规则生成部署编排文件;以及Generating a deployment orchestration file according to the preset file generation rule according to the container file template and the configuration file;
    调用所述部署编排文件对所述监控系统进行部署。The deployment profile is invoked to deploy the monitoring system.
  2. 根据权利要求1所述的监控系统的部署方法,其中,所述基于所述差异信息和共性信息生成容器文件模板并将所述差异信息存储在配置文件中,包括:The method for deploying a monitoring system according to claim 1, wherein the generating a container file template based on the difference information and the common information and storing the difference information in a configuration file includes:
    对每个所述组件模块的差异信息进行变量设置;Performing variable setting on the difference information of each of the component modules;
    根据每个所述组件模块的差异信息对应的变量和所述共性信息生成容器文件模板;以及Generating a container file template according to the variable corresponding to the difference information of each of the component modules and the common information;
    将经过所述变量设置的差异信息存储在配置文件中。The difference information set by the variable is stored in the configuration file.
  3. 根据权利要求2所述的监控系统的部署方法,其中,所述根据所述容器文件模板和配置文件按预设文件生成规则生成部署编排文件,包括:The method for deploying a monitoring system according to claim 2, wherein the generating the deployment orchestration file according to the preset file generation rule according to the container file template and the configuration file comprises:
    调用预设读取脚本读取所述配置文件;Calling a preset read script to read the configuration file;
    根据所述变量将所述配置文件中的差异信息填充至所述容器文件模板中以生成所述部署编排文件。The difference information in the configuration file is populated into the container file template according to the variable to generate the deployment orchestration file.
  4. 根据权利要求1所述的监控系统的部署方法,其中,所述组件信息包括编程语言信息,所述编程语言信息包括Golang语言和Python语言;The method of deploying a monitoring system according to claim 1, wherein the component information comprises programming language information, the programming language information comprising a Golang language and a Python language;
    所述根据所述组件信息对所述组件模块进行分类以生成类别组件组,包括:The classifying the component modules according to the component information to generate a category component group includes:
    根据所述编程语言信息对所述组件模块进行分类以生成Golang组件组和Python组件组;Classifying the component modules according to the programming language information to generate a Golang component group and a Python component group;
    所述获取同一组类别组件组中多个组件模块之间的共性信息和差异信息,包括:获取所述Golang组件组中多个所述组件模块之间的共性信息和差异信息,以及获取所述Python组件组中多个所述组件模块之间的共性信息和差异信息。And obtaining the common information and the difference information between the multiple component modules in the same group of component groups, including: acquiring common information and difference information between the multiple component modules in the Golang component group, and acquiring the Common information and difference information between multiple of the component modules in a Python component group.
  5. 根据权利要求1所述的监控系统的部署方法,其中,在所述调用所述部署编排文件对所述监控系统进行部署之前,还包括:The method for deploying a monitoring system according to claim 1, wherein before the invoking the deployment orchestration file to deploy the monitoring system, the method further includes:
    将部署所述监控系统所需的主机加入主机资源池并对所述主机资源池中的主机进行标记以生成主机标记号;以及Adding hosts required to deploy the monitoring system to a host resource pool and marking hosts in the host resource pool to generate host tag numbers;
    根据所述主机标记号对所述主机资源池中的主机进行调度管理;Scheduling management of hosts in the host resource pool according to the host tag number;
    所述调用所述部署编排文件对所述监控系统进行部署,包括:The invoking the deployment orchestration file to deploy the monitoring system includes:
    调用所述部署编排文件将所述监控系统部署在所述主机资源池中的主机中。The deployment orchestration file is invoked to deploy the monitoring system in a host in the host resource pool.
  6. 根据权利要求1所述的监控系统的部署方法,其中,所述根据所述变量将所述配置文件中的差异信息填充至所述容器文件模板中以生成所述部署编排文件,包括:The method for deploying a monitoring system according to claim 1, wherein the filling the difference information in the configuration file into the container file template according to the variable to generate the deployment orchestration file comprises:
    根据所述变量对应关系将配置文件差异信息对应填充在容器文件模板中包含的变量以生成所述部署编排文件。The profile difference information is correspondingly filled with variables included in the container file template according to the variable correspondence to generate the deployment orchestration file.
  7. 根据权利要求1所述的监控系统的部署方法,其中,所述基于所述差异信息和共性信息生成容器文件模板并将所述差异信息存储在配置文件中之后,还包括:The method for deploying a monitoring system according to claim 1, wherein the generating a container file template based on the difference information and the common information and storing the difference information in the configuration file further includes:
    将所述配置文件保存在预设数据库中以及通过configmap管理所述配置文件。The configuration file is saved in a preset database and managed by a configmap.
  8. 根据权利要求1所述的监控系统的部署方法,其中,所述组件信息还可包括组件模块的状态信息;所述根据所述组件信息对所述组件模块进行划分以生成类别组件组,包括:The method of deploying a monitoring system according to claim 1, wherein the component information may further include status information of the component module; and the dividing the component module according to the component information to generate a category component group comprises:
    根据所述状态信息对监控系统的所有组件模块进行划分以生成类别组件组。All component modules of the monitoring system are divided according to the status information to generate a category component group.
  9. 一种监控系统的部署装置,包括:A deployment device for a monitoring system, comprising:
    第一获取单元,用于获取监控系统中每个组件模块对应的组件信息;a first acquiring unit, configured to acquire component information corresponding to each component module in the monitoring system;
    划分生成单元,用于根据所述组件信息对所述组件模块进行划分以生成类别组件组;a division generating unit, configured to divide the component module according to the component information to generate a category component group;
    第二获取单元,用于获取同一组类别组件组中多个组件模块之间的差异信息和共性信息;a second obtaining unit, configured to acquire difference information and common information between the multiple component modules in the same group of component groups;
    生成存储单元,用于基于所述差异信息和共性信息生成容器文件模板,并 将所述差异信息存储在配置文件中;Generating a storage unit, configured to generate a container file template based on the difference information and the common information, and store the difference information in a configuration file;
    文件生成单元,用于根据所述容器文件模板和配置文件按预设文件生成规则生成部署编排文件;以及a file generating unit, configured to generate a deployment orchestration file according to the preset file generation rule according to the container file template and the configuration file;
    调用部署单元,用于调用所述部署编排文件对所述监控系统进行部署。The deployment unit is invoked to invoke the deployment orchestration file to deploy the monitoring system.
  10. 根据权利要求9所述监控系统的部署装置,其中,所述生成存储单元,包括:The apparatus for deploying a monitoring system according to claim 9, wherein the generating the storage unit comprises:
    变量设置子单元,用于对每个所述组件模块的差异信息进行变量设置;a variable setting subunit, configured to perform variable setting on difference information of each of the component modules;
    模板生成子单元,用于根据每个所述组件模块的差异信息对应的变量和所述共性信息生成容器文件模板;a template generating subunit, configured to generate a container file template according to the variable corresponding to the difference information of each of the component modules and the common information;
    信息存储子单元,用于将经过所述变量设置的差异信息存储在配置文件中。An information storage subunit for storing difference information set by the variable in a configuration file.
  11. 一种计算机设备,包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现以下步骤:A computer apparatus comprising: a memory, a processor, and a computer program stored on the memory and operative on the processor, the processor executing the computer program to implement the following steps:
    获取监控系统中每个组件模块对应的组件信息;Obtain component information corresponding to each component module in the monitoring system;
    根据所述组件信息对所述组件模块进行划分以生成类别组件组;And dividing the component module according to the component information to generate a category component group;
    获取同一组类别组件组中多个组件模块之间的差异信息和共性信息;Obtaining difference information and common information between multiple component modules in the same group of component groups;
    基于所述差异信息和共性信息生成容器文件模板并将所述差异信息存储在配置文件中;Generating a container file template based on the difference information and the common information, and storing the difference information in a configuration file;
    根据所述容器文件模板和配置文件按预设文件生成规则生成部署编排文件;以及Generating a deployment orchestration file according to the preset file generation rule according to the container file template and the configuration file;
    调用所述部署编排文件对所述监控系统进行部署。The deployment profile is invoked to deploy the monitoring system.
  12. 根据权利要求11所述的计算机设备,其中,所述处理器执行所述计算机程序时,具体实现以下步骤:The computer apparatus according to claim 11, wherein when said processor executes said computer program, the following steps are specifically implemented:
    对每个所述组件模块的差异信息进行变量设置;Performing variable setting on the difference information of each of the component modules;
    根据每个所述组件模块的差异信息对应的变量和所述共性信息生成容器文件模板;以及Generating a container file template according to the variable corresponding to the difference information of each of the component modules and the common information;
    将经过所述变量设置的差异信息存储在配置文件中。The difference information set by the variable is stored in the configuration file.
  13. 根据权利要求12所述的计算机设备,其中,所述处理器执行所述计算机程序时,还具体实现以下步骤:The computer apparatus according to claim 12, wherein when said processor executes said computer program, the following steps are further embodied:
    调用预设读取脚本读取所述配置文件;Calling a preset read script to read the configuration file;
    根据所述变量将所述配置文件中的差异信息填充至所述容器文件模板中以生成所述部署编排文件。The difference information in the configuration file is populated into the container file template according to the variable to generate the deployment orchestration file.
  14. 根据权利要求11所述的计算机设备,其中,所述组件信息包括编程语言信息,所述编程语言信息包括Golang语言和Python语言;所述处理器执行所述计算机程序时,具体实现以下步骤:The computer device according to claim 11, wherein the component information comprises programming language information, the programming language information comprising a Golang language and a Python language; and when the processor executes the computer program, the following steps are specifically implemented:
    根据所述编程语言信息对所述组件模块进行分类以生成Golang组件组和Python组件组;Classifying the component modules according to the programming language information to generate a Golang component group and a Python component group;
    所述获取同一组类别组件组中多个组件模块之间的共性信息和差异信息,包括:获取所述Golang组件组中多个所述组件模块之间的共性信息和差异信息,以及获取所述Python组件组中多个所述组件模块之间的共性信息和差异信息。And obtaining the common information and the difference information between the multiple component modules in the same group of component groups, including: acquiring common information and difference information between the multiple component modules in the Golang component group, and acquiring the Common information and difference information between multiple of the component modules in a Python component group.
  15. 根据权利要求11所述的计算机设备,其中,所述处理器执行所述计算机程序时,还实现以下步骤:The computer apparatus according to claim 11, wherein when said processor executes said computer program, the following steps are further implemented:
    将部署所述监控系统所需的主机加入主机资源池并对所述主机资源池中的主机进行标记以生成主机标记号;以及Adding hosts required to deploy the monitoring system to a host resource pool and marking hosts in the host resource pool to generate host tag numbers;
    根据所述主机标记号对所述主机资源池中的主机进行调度管理;Scheduling management of hosts in the host resource pool according to the host tag number;
    调用所述部署编排文件将所述监控系统部署在所述主机资源池中的主机中。The deployment orchestration file is invoked to deploy the monitoring system in a host in the host resource pool.
  16. 一种存储介质,所述存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令当被处理器执行时使所述处理器执行以下步骤:A storage medium storing a computer program, the computer program comprising program instructions that, when executed by a processor, cause the processor to perform the following steps:
    获取监控系统中每个组件模块对应的组件信息;Obtain component information corresponding to each component module in the monitoring system;
    根据所述组件信息对所述组件模块进行划分以生成类别组件组;And dividing the component module according to the component information to generate a category component group;
    获取同一组类别组件组中多个组件模块之间的差异信息和共性信息;Obtaining difference information and common information between multiple component modules in the same group of component groups;
    基于所述差异信息和共性信息生成容器文件模板并将所述差异信息存储在配置文件中;Generating a container file template based on the difference information and the common information, and storing the difference information in a configuration file;
    根据所述容器文件模板和配置文件按预设文件生成规则生成部署编排文件;以及Generating a deployment orchestration file according to the preset file generation rule according to the container file template and the configuration file;
    调用所述部署编排文件对所述监控系统进行部署。The deployment profile is invoked to deploy the monitoring system.
  17. 根据权利要求16所述的存储介质,其中,所述程序指令当被处理器执行时使所述处理器执行以下步骤:The storage medium of claim 16 wherein said program instructions, when executed by a processor, cause said processor to perform the following steps:
    对每个所述组件模块的差异信息进行变量设置;Performing variable setting on the difference information of each of the component modules;
    根据每个所述组件模块的差异信息对应的变量和所述共性信息生成容器文件模板;以及Generating a container file template according to the variable corresponding to the difference information of each of the component modules and the common information;
    将经过所述变量设置的差异信息存储在配置文件中。The difference information set by the variable is stored in the configuration file.
  18. 根据权利要求17所述的存储介质,其中,所述程序指令当被处理器执行时使所述处理器执行以下步骤:The storage medium of claim 17 wherein said program instructions, when executed by a processor, cause said processor to perform the following steps:
    调用预设读取脚本读取所述配置文件;Calling a preset read script to read the configuration file;
    根据所述变量将所述配置文件中的差异信息填充至所述容器文件模板中以生成所述部署编排文件。The difference information in the configuration file is populated into the container file template according to the variable to generate the deployment orchestration file.
  19. 根据权利要求16所述的存储介质,其中,所述组件信息包括编程语言信息,所述编程语言信息包括Golang语言和Python语言;所述程序指令当被处理器执行时使所述处理器执行以下步骤:The storage medium of claim 16, wherein the component information comprises programming language information, the programming language information comprising a Golang language and a Python language; the program instructions, when executed by a processor, cause the processor to execute the following step:
    根据所述编程语言信息对所述组件模块进行分类以生成Golang组件组和Python组件组;Classifying the component modules according to the programming language information to generate a Golang component group and a Python component group;
    所述获取同一组类别组件组中多个组件模块之间的共性信息和差异信息,包括:获取所述Golang组件组中多个所述组件模块之间的共性信息和差异信息,以及获取所述Python组件组中多个所述组件模块之间的共性信息和差异信息。And obtaining the common information and the difference information between the multiple component modules in the same group of component groups, including: acquiring common information and difference information between the multiple component modules in the Golang component group, and acquiring the Common information and difference information between multiple of the component modules in a Python component group.
  20. 根据权利要求16所述的存储介质,其中,所述程序指令当被处理器执行时使所述处理器执行以下步骤:The storage medium of claim 16 wherein said program instructions, when executed by a processor, cause said processor to perform the following steps:
    将部署所述监控系统所需的主机加入主机资源池并对所述主机资源池中的主机进行标记以生成主机标记号;以及Adding hosts required to deploy the monitoring system to a host resource pool and marking hosts in the host resource pool to generate host tag numbers;
    根据所述主机标记号对所述主机资源池中的主机进行调度管理;Scheduling management of hosts in the host resource pool according to the host tag number;
    调用所述部署编排文件将所述监控系统部署在所述主机资源池中的主机中。The deployment orchestration file is invoked to deploy the monitoring system in a host in the host resource pool.
PCT/CN2018/074934 2017-11-08 2018-02-01 Deployment method and apparatus for monitoring system, computer device and storage medium WO2019090993A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711091445.5A CN107896162B (en) 2017-11-08 2017-11-08 Deployment method and device of monitoring system, computer equipment and storage medium
CN201711091445.5 2017-11-08

Publications (1)

Publication Number Publication Date
WO2019090993A1 true WO2019090993A1 (en) 2019-05-16

Family

ID=61804625

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/074934 WO2019090993A1 (en) 2017-11-08 2018-02-01 Deployment method and apparatus for monitoring system, computer device and storage medium

Country Status (2)

Country Link
CN (1) CN107896162B (en)
WO (1) WO2019090993A1 (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108809722B (en) * 2018-06-13 2022-03-22 郑州云海信息技术有限公司 Method, device and storage medium for deploying Kubernetes cluster
CN109062583A (en) * 2018-07-24 2018-12-21 郑州云海信息技术有限公司 A kind of calculator room equipment total management system and method
CN109298870A (en) * 2018-08-24 2019-02-01 山东中创软件商用中间件股份有限公司 A kind of application dispositions method and relevant apparatus
CN109271170B (en) * 2018-09-05 2020-04-28 杭州数梦工场科技有限公司 Distributed system deployment method, system, electronic device and storage medium
CN109451047B (en) * 2018-12-13 2021-05-18 深圳前海微众银行股份有限公司 Data transmission method, device, equipment and storage medium of monitoring alarm system
CN110543328B (en) * 2019-07-26 2022-10-18 苏州浪潮智能科技有限公司 Cross-platform component management method, system, terminal and storage medium based on Ambari
CN110990667B (en) * 2019-10-29 2023-06-23 内蒙古大学 Multi-end college student electronic file management system based on cooperative distance technology
CN111522627B (en) * 2020-04-26 2023-11-28 杭州威佩网络科技有限公司 Docker mirror image management method, device, equipment and medium
CN114500549B (en) * 2020-11-13 2023-08-08 天翼云科技有限公司 Method, device and medium for deploying k8s hosting clusters for users in public cloud
CN113435489B (en) * 2021-06-17 2023-08-01 北京深演智能科技股份有限公司 Method, device, computer readable storage medium and processor for deploying system
CN113805899B (en) * 2021-08-25 2024-01-26 浪潮卓数大数据产业发展有限公司 Automatic software deployment method
CN115834595A (en) * 2022-11-17 2023-03-21 浪潮云信息技术股份公司 Management method and system of Kubernetes control assembly

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106210124A (en) * 2016-08-03 2016-12-07 浪潮电子信息产业股份有限公司 A kind of unified cloud data center monitoring system
CN106357738A (en) * 2016-08-26 2017-01-25 北京奇虎科技有限公司 Automatic arrangement method for server cluster and device as well as system thereof
CN107329800A (en) * 2017-06-29 2017-11-07 北京北信源软件股份有限公司 A kind of middleware application management-control method and device based on Docker platforms

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102681825A (en) * 2011-03-09 2012-09-19 北京航空航天大学 System and method for managing service run container
CN106406980B (en) * 2016-09-06 2019-11-22 青岛海信传媒网络技术有限公司 A kind of dispositions method and device of virtual machine
CN107302464A (en) * 2017-08-16 2017-10-27 郑州云海信息技术有限公司 A kind of service orchestration method and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106210124A (en) * 2016-08-03 2016-12-07 浪潮电子信息产业股份有限公司 A kind of unified cloud data center monitoring system
CN106357738A (en) * 2016-08-26 2017-01-25 北京奇虎科技有限公司 Automatic arrangement method for server cluster and device as well as system thereof
CN107329800A (en) * 2017-06-29 2017-11-07 北京北信源软件股份有限公司 A kind of middleware application management-control method and device based on Docker platforms

Also Published As

Publication number Publication date
CN107896162A (en) 2018-04-10
CN107896162B (en) 2020-03-10

Similar Documents

Publication Publication Date Title
WO2019090993A1 (en) Deployment method and apparatus for monitoring system, computer device and storage medium
US11405274B2 (en) Managing virtual network functions
CN107967159B (en) Method for configuring file application and server
US9851989B2 (en) Methods and apparatus to manage virtual machines
US10324754B2 (en) Managing virtual machine patterns
US20190235990A1 (en) Computer-implemented methods and systems for determining application matching status
US20050262501A1 (en) Software distribution method and system supporting configuration management
CN111290828A (en) Dynamic routing using container orchestration services
US9223601B2 (en) Control device, control method, and non-transitory computer-readable storage medium for a virtual system deployment
US11032213B1 (en) Centralized management of computing resources across service provider networks
US10810220B2 (en) Platform and software framework for data intensive applications in the cloud
US11113186B1 (en) Testing and publishing of resource handlers in a cloud environment
US10338910B2 (en) Multi-tenant upgrading
US20140196031A1 (en) Preprovisioning using mutated templates
CN113127150A (en) Rapid deployment method and device of cloud native system, electronic equipment and storage medium
WO2022142035A1 (en) System language internationalization maintenance method, apparatus, and computer-readable storage medium
CN113204353A (en) Big data platform assembly deployment method and device
US9122511B2 (en) Using preprovisioned mutated templates
US11595493B2 (en) System and method for namespace masking in an integration flow
US20220129539A1 (en) Embedding security requirements in container images
CN110908644B (en) Configuration method and device of state node, computer equipment and storage medium
US9047158B2 (en) Using preprovisioned mutated templates
US8819494B2 (en) Automatically changing parts in response to tests
CN114860272A (en) Operating system installation method, computing device and storage medium
US10649743B2 (en) Application developing method and system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18877145

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 02/10/2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18877145

Country of ref document: EP

Kind code of ref document: A1