WO2021072861A1 - 应用服务处理方法、装置、终端及存储介质 - Google Patents

应用服务处理方法、装置、终端及存储介质 Download PDF

Info

Publication number
WO2021072861A1
WO2021072861A1 PCT/CN2019/117653 CN2019117653W WO2021072861A1 WO 2021072861 A1 WO2021072861 A1 WO 2021072861A1 CN 2019117653 W CN2019117653 W CN 2019117653W WO 2021072861 A1 WO2021072861 A1 WO 2021072861A1
Authority
WO
WIPO (PCT)
Prior art keywords
application service
unified
rpm package
daemon
monitoring
Prior art date
Application number
PCT/CN2019/117653
Other languages
English (en)
French (fr)
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 WO2021072861A1 publication Critical patent/WO2021072861A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3089Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents
    • G06F11/3096Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents wherein the means or processing minimize the use of computing system or of computing system component resources, e.g. non-intrusive monitoring which minimizes the probe effect: sniffing, intercepting, indirectly deriving the monitored data from other directly available data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3089Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents
    • G06F11/3093Configuration details thereof, e.g. installation, enabling, spatial arrangement of the probes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/80Database-specific techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/865Monitoring of software
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • This application relates to the field of cloud deployment technologies, and in particular to an application service processing method, application service processing device, terminal, and storage medium.
  • RPM is the abbreviation of Red-Hat Package Manager (RPM package manager). Although the name of this file format is marked with RedHat (an operating system of the LINUX core architecture), its original design concept is open. It is a packaging and installation tool for Internet download packages, and it is included in some Linux distributions. It generates files with a .RPM extension. RPM files are the easiest to install in Linux systems.
  • the first aspect of the embodiments of the present application provides an application service processing method, and the application service processing method includes:
  • the daemon process applies for sudo permission to the independent user group
  • the monitoring process returns the monitoring data obtained by monitoring to the daemon process.
  • the second aspect of the embodiments of the present application also provides an apparatus for deploying a multi-genre group application service based on a unified RPM package.
  • the apparatus for deploying a multi-genre group application service based on a unified RPM package includes:
  • the script analysis and acquisition module is used to start a custom script, and in the process of script analysis, the database type of the corresponding application service on the server side is obtained;
  • the RPM package deployment module is used to deploy a unified RPM package for the database type of the application service, and upload the unified RPM package to a designated database;
  • the file acquisition module is used to start the daemon and obtain the application service configuration file
  • An information receiving module configured to receive drive information when the unified RPM package is deployed through the daemon
  • the service extraction module is configured to parse the driving information through the daemon process, and extract the application service consistent with the application service configuration file as a target application service;
  • a belonging group creation module configured to create an independent user belonging group through the daemon process, and store the target application service in the independent user belonging group;
  • the permission application module is used for applying sudo permission to the independent user group by the daemon process
  • the heartbeat establishment module is used to start a monitoring process according to the sudo authority, and the monitoring process establishes a heartbeat connection with the daemon process;
  • the data return module is used for the monitoring process to return the monitoring data obtained by monitoring to the daemon process.
  • a third aspect of the embodiments of the present application further provides a terminal, the terminal includes a processor, and the processor is configured to implement any one of the application service processing methods described above when executing computer-readable instructions stored in a memory.
  • the fourth aspect of the embodiments of the present application also provides a computer-readable storage medium having computer-readable instructions stored on the computer-readable storage medium, and when the computer-readable instructions are executed by a processor, any one of the foregoing Application service processing method.
  • Fig. 1 is a flowchart of an application service processing method provided by the first embodiment of the present application.
  • Fig. 2 is a schematic structural diagram of a terminal provided by an embodiment of the present application.
  • Fig. 3 is an exemplary functional block diagram of the terminal shown in Fig. 2.
  • Fig. 1 is a flowchart of the application service processing method of the first embodiment of the present application.
  • the application service processing method can be applied to a terminal, and the terminal can be, for example, a smart phone, a notebook computer, a desktop/tablet computer, a smart watch, etc. equipment.
  • the application service processing method may include the following steps:
  • a custom script is started.
  • the type of server-side application service is obtained, and RPM packages (Red-Hat Package Manager, RPM) are uniformly deployed for the type of application service.
  • Software package manager to upload the RPM package to a designated database, where the designated database is preset by the user.
  • the application services are classified according to groups (in this embodiment, the groups are database types), and one application service can belong to one or more groups.
  • the database type of the application service corresponding to the server side may include: MySQL database, Oracle database, MongoDB database, and ElasticSearch database, and there is no limitation here.
  • the step of deploying a unified RPM package through the custom script includes: obtaining the database type of the server-side application service; traversing a preset historical database according to the database type of the application service, and determining Different database types correspond to the configuration parameters of the private part of the RPM package to form a configuration parameter list; filter the configuration parameters in the configuration parameter list to remove duplicates to obtain the target configuration parameters; obtain the initial configuration file template, and configure the target
  • the parameters and the public part of the RPM package are reloaded into the initial configuration file template to obtain a target configuration file; the target configuration file and the description file corresponding to the RPM package are packaged and packaged to generate a unified RPM package.
  • the description file is a manual for making a unified RPM package, and the description file includes: a macro definition part, a preface part, a description part, and an installation process part.
  • the preset history database includes RPM packages deployed corresponding to application services of different belonging groups, wherein the belonging groups are divided according to the types of the server-side application services.
  • the preset history database may be connected to the Internet to download RPM packages deployed corresponding to application services of different groups on the Internet. If the server is not connected to the Internet, the RPM packages deployed corresponding to the application services of different groups can be determined through the database address specified by the script.
  • the deployment information of the RPM packages corresponding to the application services of different groups includes a public part and a private part.
  • the public part of the deployment information of the RPM package is formed by abstracting the RPM package at the general architecture or functional level. It is understandable that the essence of abstracting the RPM package is a concrete embodiment of the reusability design of the RPM package, which improves the deployment efficiency and accuracy of the RPM package, and shortens the development cycle.
  • the private part includes configuration parameters, and the configuration parameters in the RPM packages deployed corresponding to application services of different groups may be different. Therefore, the preset history database is traversed according to the type of the application service, the configuration parameters in the RPM packages corresponding to different types of application services are determined, and the configuration parameters are saved in the form of a list. It is understandable that a large number of RPM package deployment information can be crawled from the preset history database through the web crawler technology, and the deployment information of a large number of RPM packages can be stored in a one-to-one correspondence with the type of application service, which is convenient for subsequent review. When obtaining configuration parameters for a certain type of application service, the deployment information of the corresponding RPM package can be directly obtained, which improves the deployment efficiency of the unified RPM package.
  • the configuration parameters in the RPM packages corresponding to application services of different database types may be consistent or inconsistent. Therefore, the configuration parameters in the configuration parameter list need to be filtered and deduplicated to obtain the target configuration parameters. Through deduplication processing, the data size of the RPM packet can be reduced, and the memory can be reduced.
  • the method further includes: performing an installation process test on the generated unified RPM package, and detecting whether the unified RPM package passes the Installation process test; if the test result is that the unified RPM package fails the installation process test, modify the description file until the generated unified RPM package passes the installation process test; if the test result is the unified If the RPM package passes the installation process test, a prompt message indicating that the unified RPM package has been automatically deployed is output.
  • the unified RPM package will be continuously updated and upgraded in practical applications, so that the network device or software manager needs to continuously obtain the update data of the unified RPM package to further search, call, and Management application.
  • the method for upgrading the unified RPM package includes: obtaining package change information of the unified RPM package based on a time monitoring component; and updating a database file in a directory corresponding to the unified RPM package according to the package change information, wherein ,
  • the change information includes: newly added file information, deleted file information, and modified file information; the updated database file is compressed in a multi-threaded manner to obtain the release file corresponding to the unified RPM package.
  • a daemon process (Daemon process) is started, wherein the daemon process is independent of the control terminal and periodically performs a certain task or waits for processing Some time when it happened.
  • the method further includes: compiling a drive implementation rule based on the daemon process, wherein the drive implementation rule based on the daemon process may include a file path started by the daemon process.
  • the file path started by the daemon is: the /etc/passwd file of the unified RPM package.
  • the application service configuration file is loaded by default, and the application service configuration file is added with a list of application service groups that need to be monitored.
  • the application service configuration file is a pre-defined descriptive file with a format of XML, which records a list of application service groups that need to be monitored according to specific needs. Specifically, it records the application services of the application service group that needs to be monitored. Name, application service identification number, group identification number and other information.
  • the daemon process when the daemon process is started, receives the driver information when the unified RPM package is deployed, and extracts the driver information from the application service configuration file by parsing the driver information
  • the consistent group application service is called the target application service.
  • the drive information can be obtained from the /etc/passwd file of the unified RPM package.
  • each application service in the /etc/passwd file has a corresponding record line, which records some basic attributes of the application service, including: application service name, application service identification number, group identification number, comment Sexual description, home directory, login Shell.
  • the step of parsing the driver information through the daemon process to extract application services consistent with the application service configuration file includes: obtaining the application service configuration file and /etc, respectively The identification number of the belonging group in the /passwd file; determine the identification number of the belonging group that exists in the two files, and obtain the application service identification number corresponding to the identification number of the belonging group; determine and extract the identification numbers that exist in both files The application service identification number in.
  • the type of database can be MySQL database, Oracle database, MongoDB database, and ElasticSearch database.
  • the RPM package can be called as the owner of the type of database. For example, for a type A database, the RPM package needs to be called as the owner of A; for a type B database, the RPM package needs to be called as the owner of B.
  • the RPM package For the unified RPM package, unless a user has root authority, other types of owners cannot be called. However, because the root user authority is too large, the security of application service monitoring cannot be guaranteed.
  • the method when the root user is not started, the method further includes: creating an independent user group through the daemon process, and storing the target application service in the Independent users belong to the group, so that owners of different database types can call the unified RPM package.
  • the name of the independent user group may be hidba, which is not limited here.
  • the step of creating an independent user belonging group through the daemon process and storing the target application service in the independent user belonging group includes: creating an independent user belonging group; and setting the target application service according to The belonging group classification is added to the independent user belonging group; the independent user belonging group containing the target application service is assigned the sudo authority of the corresponding belonging group.
  • the daemon process applies for sudo permission to the independent user group.
  • the daemon process applies for the sudo permission for the independent user group.
  • the sudo is a management command of the Linux system, and is a tool that allows the system administrator to allow ordinary users to execute some or all root commands.
  • the step of applying the sudo permission by the daemon process to the independent user group includes: determining a configuration file related to the sudo permission; and invoking the sudo permission configuration file through the daemon process.
  • the sudo permission configuration file is preset by the user, and the sudo permission configuration file includes the application service name and the corresponding root command.
  • the configuration file with the sudo authority is invoked by the daemon process to obtain the application service name and the corresponding root command, so that the application service corresponding to the application service name can execute the corresponding root command.
  • the monitoring process after the daemon process is started, the monitoring process will be started with respective permissions according to the list of application services that need to be monitored, and the heartbeat connection is saved between the daemon process and the respective monitoring process, and the The daemon process maintains a heartbeat connection with the respective monitoring process, and can verify the monitoring service status of each subordinate group.
  • the step of establishing a heartbeat connection between the monitoring process and the daemon process includes: determining the period of the heartbeat connection; receiving, through the daemon process, heartbeat packets sent by different monitoring processes and detecting whether the heartbeat packets conform to the The cycle of the heartbeat connection; if the detection result is that the heartbeat packet corresponding to the monitoring process does not meet the cycle of the heartbeat connection, restart the corresponding monitoring process.
  • the method further includes: setting a preset time interval; the daemon process obtains the application configuration file again at intervals of the preset time interval; and detects whether there is a newly-added application configuration file based on the application configuration file obtained again.
  • Application service if the detection result is that there is a newly added application service, obtain the type of the newly added application service; determine whether there is a corresponding group identification number in the independent user group according to the application service type; If there is the identification number of the corresponding belonging group, restart the monitoring process corresponding to the belonging group; if there is no corresponding identification number of the belonging group, then add the newly added application service to the independent user belonging group , And start the monitoring process corresponding to the group.
  • the monitoring process returns the monitoring data obtained by monitoring to the daemon process.
  • the monitoring process returns the collected monitoring data to the daemon process.
  • the embodiment of the application provides an application service processing method, starts a custom script, and obtains the database type of the application service corresponding to the server during the script analysis; deploys a unified RPM package for the database type of the application service, and The unified RPM package is uploaded to the designated database; the daemon process is started to obtain the application service configuration file; the driver information when the unified RPM package is deployed is received through the daemon process; the driver information is parsed through the daemon process to extract The application service consistent with the application service configuration file is used as the target application service; an independent user group is created through the daemon process, and the target application service is stored in the independent user group; the daemon process Applying sudo permission to the group of independent users; starting a monitoring process according to the sudo permission, the monitoring process establishes a heartbeat connection with the daemon process; the monitoring process returns the monitoring data to the daemon process.
  • the unified RPM package deployment method is adopted. Compared with the previous deployment of multiple RPM packages, it can avoid problems such as omissions or errors when there are more database services that need to be monitored; this application uses automated unified RPM package deployment, It can reduce labor and time costs, and improve the efficiency of application service monitoring; this application updates and stores application services through the daemon process, which effectively supports the efficiency of operation and maintenance work; and this application actively initiates the monitoring processes of their respective groups through multiple monitoring processes Monitoring services, reduce the complexity of monitoring methods caused by different monitoring requirements, and improve monitoring efficiency.
  • FIG. 2 is a schematic structural diagram of a terminal provided by an embodiment of the present application.
  • the terminal 1 includes a memory 10 in which an application service processing apparatus 100 is stored.
  • the application service processing device 100 can start a custom script, and in the process of script analysis, obtain the database type of the application service corresponding to the server; deploy a unified RPM package for the database type of the application service, and combine the unified RPM
  • the package is uploaded to the designated database; the daemon process is started to obtain the application service configuration file; the driver information during the deployment of the unified RPM package is received through the daemon process; the driver information is parsed through the daemon process to extract the information from the application
  • the application service with the same service configuration file is used as the target application service; an independent user belonging group is created through the daemon process, and the target application service is stored in the independent user belonging group; A user belonging to a group applies for sudo authority; a monitoring process is started according to the sudo authority, and the monitoring process establishes a heart
  • the unified RPM package deployment method is adopted. Compared with the previous deployment of multiple RPM packages, it can avoid problems such as omissions or errors when there are more database services that need to be monitored; this application uses automated unified RPM package deployment, It can reduce labor and time costs, and improve the efficiency of application service monitoring; this application updates and stores application services through the daemon process, which effectively supports the efficiency of operation and maintenance work; and this application actively initiates the monitoring processes of their respective groups through multiple monitoring processes Monitoring services, reduce the complexity of monitoring methods caused by different monitoring requirements, and improve monitoring efficiency.
  • the terminal 1 may further include a display screen 20 and a processor 30.
  • the memory 10 and the display screen 20 may be electrically connected to the processor 30 respectively.
  • the memory 10 may be different types of storage devices for storing various types of data.
  • it can be the memory or internal memory of the terminal 1, or it can be a memory card that can be externally connected to the terminal 1, such as flash memory, SM card (Smart Media Card), SD card (Secure Digital Card, secure digital card) Wait.
  • the memory 10 may include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a Secure Digital (SD) card, a flash memory card (Flash Card), At least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device.
  • the memory 10 is used to store various types of data, for example, various types of applications (Applications) installed in the terminal 1, and information such as data set and obtained by applying the above-mentioned application service processing method.
  • the display screen 20 is installed in the terminal 1 for displaying information.
  • the processor 30 is configured to execute the application service processing method and various software installed in the terminal 1, such as an operating system and application display software.
  • the processor 30 includes, but is not limited to, a processor (Central Processing Unit, CPU), a Micro Controller Unit (MCU), and other devices for interpreting computer instructions and processing data in computer software.
  • a processor Central Processing Unit, CPU
  • MCU Micro Controller Unit
  • the application service processing apparatus 100 may include one or more modules, and the one or more modules are stored in the memory 10 of the terminal 1 and configured to be operated by one or more processors (in this embodiment, one The processor 30) executes to complete the embodiment of the present application.
  • the application service processing apparatus 100 may include a script analysis module 101, an RPM package deployment module 102, a file acquisition module 103, an information receiving module 104, a service extraction module 105, a group creation module 106, and authority
  • the module referred to in the embodiment of the present application may be a program segment that completes a specific function, and is more suitable for describing the execution process of software in the processor 30 than a program.
  • the program is a series of computer-readable instructions.
  • the terminal 1 may include some or all of the functional modules shown in FIG. 3, and the functions of each module will be described in detail below. It should be noted that the same nouns, related nouns, and specific explanations in the above implementations of the application service processing method can also be applied to the following introduction to the functions of each module. In order to save space and avoid repetition, I won't repeat them here.
  • the script parsing module 101 can be used to start a custom script, and during the script parsing process, the type of the application service corresponding to the server side is obtained.
  • the RPM package deployment module 102 may be used to deploy a unified RPM package for the database type of the application service, and upload the unified RPM package to a designated database.
  • the file obtaining module 103 may be used to start a daemon process and obtain an application service configuration file.
  • the information receiving module 104 may be used to receive the driving information when the unified RPM package is deployed through the daemon.
  • the service extraction module 105 may be configured to analyze the driving information through the daemon process, and extract an application service consistent with the application service configuration file as a target application service.
  • the belonging group creation module 106 may be used to create an independent user belonging group through the daemon process, and store the target application service in the independent user belonging group.
  • the permission application module 107 may be used for the daemon process to apply for the sudo permission for the independent user group.
  • the heartbeat establishing module 108 may be used to start a monitoring process according to the sudo authority, and the monitoring process establishes a heartbeat connection with the daemon process.
  • the data return module 109 may be used for the monitoring process to return the monitoring data obtained by monitoring to the daemon process.
  • the embodiment of the present application also provides a non-volatile readable storage medium, on which computer readable instructions are stored, and the computer readable instructions are executed by the processor 30 to implement the application service processing method in any of the above embodiments A step of.
  • the application service processing device 100 can be stored in a non-volatile readable storage medium.
  • this application implements all or part of the processes in the above-mentioned implementation methods, and can also be completed by instructing relevant hardware through computer-readable instructions.
  • the computer-readable instructions can be stored in a non-volatile memory.
  • the computer-readable instruction includes computer-readable instruction code
  • the computer-readable instruction code may be in the form of source code, object code, executable file, or some intermediate form.
  • the non-volatile readable storage medium may include: any entity or device capable of carrying the computer readable instruction code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM , Read-Only Memory) etc.
  • the so-called processor 30 may be a central processing unit (Central Processing Unit, CPU), other general processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
  • the processor 30 is the control center of the application service processing device 100/terminal 1, and is connected to the whole by various interfaces and lines. Various parts of the application service processing apparatus 100/terminal 1.
  • the memory 10 is used to store the computer-readable instructions and/or modules, and the processor 30 executes or executes the computer-readable instructions and/or modules stored in the memory 10, and calls the computer-readable instructions and/or modules stored in the memory 10
  • the data inside realizes various functions of the application service processing apparatus 100/terminal 1.
  • the memory 10 may mainly include a program storage area and a data storage area, where the program storage area may store an operating system, an application program required by at least one function (such as a sound playback function, an image playback function, etc.), etc.; the storage data area may Store the data (such as audio data) created according to the use of the mobile phone, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Stored Programmes (AREA)

Abstract

一种应用服务处理方法、装置、终端及存储介质,所述方法包括:启动自定义脚本,在脚本解析过程中,获取服务器端对应的应用服务的数据库类型(S11);针对所述应用服务的数据库类型,部署统一RPM包,并将所述统一RPM包上传至指定数据库中(S12);启动守护进程,获取应用服务配置文件(S13);通过所述守护进程接收所述统一RPM包部署时的驱动信息(S14);通过所述守护进程解析所述驱动信息,提取与所述应用服务配置文件一致的应用服务,作为目标应用服务(S15);通过所述守护进程创建独立用户属组,并将所述目标应用服务存储至所述独立用户属组中(S16);由所述守护进程给所述独立用户属组申请sudo权限(S17);根据所述sudo权限启动监控进程,所述监控进程与所述守护进程建立心跳连接(S18);所述监控进程将监控得到的监控数据返回至所述守护进程(S19)。该方法通过自动化部署统一RPM包的方式对多属组应用服务进行处理,提高应用服务监控效率。

Description

应用服务处理方法、装置、终端及存储介质
本申请要求于2019年10月17日提交中国专利局,申请号为201910989788.6发明名称为“应用服务处理方法、装置、终端及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及云部署技术领域,尤其涉及一种应用服务处理方法、应用服务处理装置、终端及存储介质。
背景技术
RPM是Red-Hat Package Manager(RPM软件包管理器)的缩写,这一文件格式名称虽然打上了RedHat(是LINUX核心架构的一个操作系统)的标志,但是其原始设计理念是开放式的。它是一种用于互联网下载包的打包及安装工具,它包含在某些Linux分发版中。它生成具有.RPM扩展名的文件。RPM文件在Linux系统中的安装最为简便。
现有技术中,由于需要监控的应用服务众多,每个不同的应用服务,都具有各自相关独立的属组,为了更新不同的应用服务,根据不同的属组产生了不同的RPM包,用来针对不同的应用服务做出各自相关的操作。由于公有云的规划比较统一,一台服务器上面只会存在一种数据库服务,所以只安装相应的RPM包即可。但是在内部云产品架构中,同一台服务器上面会同时存在多种数据库服务,这样会给部署人员带来很大的困扰,操作不便捷,容易产生错误的情况。
发明内容
鉴于以上内容,有必要提出一种应用服务处理方法、应用服务处理装置、终端以及存储介质,其可以采用自动化部署所述统一RPM包的方式对多属组应用服务进行处理,能够避免在需要监控的数据库服务较多时,出现遗漏或错误等问题,且减少了人力成本与时间成本,提高了应用服务监控效率。
本申请实施例第一方面提供一种应用服务处理方法,所述应用服务处理方法包括:
启动自定义脚本,在脚本解析过程中,获取服务器端对应的应用服务的数据库类型;
针对所述应用服务的数据库类型,部署统一RPM包,并将所述统一RPM包上传至指定数据库中;
启动守护进程,获取应用服务配置文件;
通过所述守护进程接收所述统一RPM包部署时的驱动信息;
通过所述守护进程解析所述驱动信息,提取与所述应用服务配置文件一致的应用服务,作为目标应用服务;
通过所述守护进程创建独立用户属组,并将所述目标应用服务存储至所述独立用户属组中;
由所述守护进程给所述独立用户属组申请sudo权限;
根据所述sudo权限启动监控进程,所述监控进程与所述守护进程建立心跳连接;
所述监控进程将监控得到的监控数据返回至所述守护进程。
本申请实施例第二方面还提供一种基于统一RPM包部署多属组应用服务装置,所述基于统一RPM包部署多属组应用服务装置包括:
脚本解析获取模块,用于启动自定义脚本,在脚本解析过程中,获取服务器端对应的应用服务的数据库类型;
RPM包部署模块,用于针对所述应用服务的数据库类型,部署统一RPM包,并将所述统一RPM包上传至指定数据库中;
文件获取模块,用于启动守护进程,获取应用服务配置文件;
信息接收模块,用于通过所述守护进程接收所述统一RPM包部署时的驱动信息;
服务提取模块,用于通过所述守护进程解析所述驱动信息,提取与所述应用服务配置文件一致的应用服务,作为目标应用服务;
属组创建模块,用于通过所述守护进程创建独立用户属组,并将所述目标应用服务存储至所述独立用户属组中;
权限申请模块,用于由所述守护进程给所述独立用户属组申请sudo权限;
心跳建立模块,用于根据所述sudo权限启动监控进程,所述监控进程与所述守护进程建立心跳连接;
数据返回模块,用于所述监控进程将监控得到的监控数据返回至所述守护进程。
本申请实施例第三方面还提供一种终端,所述终端包括处理器,所述处理器用于执行存储器中存储的计算机可读指令时实现上述任意一项所述应用服务处理方法。
本申请实施例第四方面还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机可读指令,所述计算机可读指令被处理器执行时实现上述任意一项所述应用服务处理方法。
附图说明
图1是本申请第一实施方式提供的应用服务处理方法的流程图。
图2是本申请实施例提供的终端的结构示意图。
图3是图2所示的终端的示例性的功能模块图。
如下具体实施方式将结合上述附图进一步说明本申请。
具体实施方式
为了能够更清楚地理解本申请的上述目的、特征和优点,下面结合附图和具体实施例对本申请进行详细描述。需要说明的是,在不冲突的情况下,本申请的实施例及实施例中的特征可以相互组合。
在下面的描述中阐述了很多具体细节以便于充分理解本申请,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。本文中在本申请的说明书中所使用的术语只是为了描述具体的实施例的目的,不是旨在于限制本申请。
图1是本申请第一实施方式的应用服务处理方法的流程图,所述应用服务处理方法可以应用于终端,所述终端可以是例如智能手机、笔记本电脑、 台式/平板电脑、智能手表等智能设备。如图1所示,所述应用服务处理方法可以包括如下步骤:
S11、启动自定义脚本,在脚本解析过程中,获取服务器端对应的应用服务的数据库类型。
在本申请的至少一实施例中,启动自定义脚本,脚本解析过程中,会获取服务器端应用服务的类型,并针对所述应用服务的类型,统一部署RPM包(Red-Hat Package Manager,RPM软件包管理器),将所述RPM包上传至指定数据库中,其中,所述指定数据库为用户预先设置的。
所述应用服务是按照组(在本实施例中,组为数据库类型)进行分类的,一个应用服务可以属于一个或多个组。具体地,所述服务器端对应的应用服务的数据库类型可以包括:MySQL数据库、Oracle数据库、MongoDB数据库以及ElasticSearch数据库,此处不做限制。
S12、针对所述应用服务的数据库类型,部署统一RPM包,并将所述统一RPM包上传至指定数据库中。
在本申请的至少一实施例中,通过所述自定义脚本部署统一RPM包的步骤包括:获取所述服务器端的应用服务的数据库类型;根据所述应用服务的数据库类型遍历预设历史数据库,确定不同数据库类型对应RPM包中的私有部分的配置参数,形成配置参数列表;对所述配置参数列表中的配置参数进行筛选去重,得到目标配置参数;获取初始配置文件模板,将所述目标配置参数、RPM包的公有部分重新载入至所述初始配置文件模板中,得到目标配置文件;将所述目标配置文件以及所述RPM包对应的说明文件进行打包封装,生成统一RPM包。其中,所述说明文件是制作统一RPM包的说明书,所述说明文件中包含:宏定义部分、前言部分、描述部分以及安装流程部分。
具体地,所述预设历史数据库中包括不同属组的应用服务对应部署的RPM包,其中,所述属组为根据所述服务器端应用服务的类型进行划分的。所述预设历史数据库可以通过与互联网连通,在互联网中下载不同属组的应用服务对应部署的RPM包。若所述服务器端没有连接互联网,则可通过脚本指定的数据库地址确定不同属组的应用服务对应部署的RPM包。
所述不同属组的应用服务对应的RPM包的部署信息中包括公有部分与私有部分。对于所述RPM包的部署信息的公有部分,是通过对所述RPM包在通用 架构或功能层次上进行抽象而形成的。可以理解的是,对于所述RPM包进行抽象,其实质是RPM包可复用性设计的一个具体体现,提高了RPM包的部署效率和正确率,缩短了开发的周期。
对于所述RPM包的部署信息的私有部分,所述私有部分包括配置参数,不同属组的应用服务对应部署的RPM包中的配置参数可能不同。因而,根据所述应用服务的类型遍历预设历史数据库,确定不同类型的应用服务对应的RPM包中配置参数,将所述配置参数以列表的形式保存。可以理解的是,可以通过网络爬虫技术从预设历史数据库中爬取大量的RPM包的部署信息,并将大量的RPM包的部署信息与应用服务的类型一一对应的进行存储,便于后续对某个类型的应用服务进行配置参数获取时,可以直接获取对应的RPM包的部署信息,提高了统一RPM包的部署效率。
可以理解的是,对于不同数据库类型的应用服务对应的RPM包中的配置参数可能一致,也可能不一致,因而需要对所述配置参数列表中的配置参数进行筛选去重,得到目标配置参数。通过去重处理,能够减少所述RPM包的数据大小,减少内存。
在本申请的至少一实施例中,在所述生成统一RPM包的步骤之后,所述方法还包括:对生成的所述统一RPM包进行安装流程测试,检测所述统一RPM包是否通过所述安装流程测试;若检测结果为所述统一RPM包未通过所述安装流程测试,则修改所述说明文件,直至生成的所述统一RPM包通过所述安装流程测试;若检测结果为所述统一RPM包通过所述安装流程测试,则输出所述统一RPM包已自动部署完成的提示信息。
在本申请的至少一实施例中,所述统一RPM包在实际应用中会进行不断的更新、升级,使得网络设备或软件管理器需要不断获取所述统一RPM包的更新数据来进一步搜索调用和管理应用。
具体地,对所述统一RPM包的升级方法包括:基于时间监控组件获取所述统一RPM包的包变更信息;根据所述包变更信息更新所述统一RPM包对应的目录下的数据库文件,其中,所述变更信息包括:新增文件信息、删除文件信息以及修改文件信息;以多线程方式压缩更新后的所述数据库文件以获得所述统一RPM包对应的发布文件。通过有针对性地对产生变更的所述统一RPM包中的数据库文件进行更新操作,并且以多线程压缩的方式获得发布文件大大减少了压缩 文件消耗的时间。
可以理解的是,无论服务器端上有多少数据库服务要部署,通过部署所述统一RPM包,能够避免在需要监控的数据库服务较多时,出现遗漏或错误等问题,且通过自动化部署所述统一RPM包,能够减少人力成本与时间成本,提高应用服务的监控效率。
S13、启动守护进程,获取应用服务配置文件。
在本申请的至少一实施例中,在所述统一RPM包部署成功后,启动一个守护进程(Daemon进程),其中,所述守护进程独立于控制终端并且周期性地执行某种任务或等待处理某些发生的时间。在所述启动守护进程之前,所述方法还包括:编制基于所述守护进程的驱动实现规则,其中,所述基于守护进程的驱动实现规则可以包括所述守护进程启动的文件路径。在本实施例中,所述守护进程启动的文件路径为:所述统一RPM包的/etc/passwd文件。
当所述守护进程在启动时,会默认加载所述应用服务配置文件,所述应用服务配置文件中添加有需要进行监控的应用服务属组列表。其中,所述应用服务配置文件是预先定义的描述性文件,格式为XML,记录了根据具体需求需要进行监控的应用服务属组列表,具体的,记录了需要监控的应用服务属组的应用服务名、应用服务标识号、组标识号等信息。
S14、通过所述守护进程接收所述统一RPM包部署时的驱动信息。
在本申请的至少一实施例中,当所述守护进程在启动时,所述守护进程接收所述统一RPM包部署时的驱动信息,通过解析所述驱动信息,提取与所述应用服务配置文件一致的属组应用服务,称为目标应用服务。其中,所述驱动信息可以从所述统一RPM包的/etc/passwd文件中得到。其中,所述/etc/passwd文件中每个应用服务都有一个对应的记录行,它记录了所述应用服务的一些基本属性,包括:应用服务名、应用服务标识号、组标识号、注释性描述、主目录、登录Shell。通过查询所述/etc/passwd文件中的信息,可以提取与所述应用服务配置文件一致的属组应用服务。
S15、通过所述守护进程解析所述驱动信息,提取与所述应用服务配置文件一致的应用服务,作为目标应用服务。
在本申请的至少一实施例中,所述通过所述守护进程解析所述驱动信息, 提取与所述应用服务配置文件一致的应用服务的步骤包括:分别获取所述应用服务配置文件与/etc/passwd文件中属组标识号;确定均存在于两份文件中的所述属组标识号,并获取对应所述属组标识号下的应用服务标识号;确定并提取均存在于两份文件中的所述应用服务标识号。
S16、通过所述守护进程创建独立用户属组,并将所述目标应用服务存储至所述独立用户属组中。
可以理解的是,数据库的类型可以为MySQL数据库、Oracle数据库、MongoDB数据库以及ElasticSearch数据库,对于不同类型的数据库,分别需要以该类型数据库属主的身份才能调用RPM包。例如,对于A类型的数据库,需要以A属主的身份才能调用RPM包;对于B类型的数据库,需要以B属主的身份才能调用RPM包。对于所述统一RPM包,除非具有root权限的用户,否则其他类型的属主均无法调用,然而,由于root用户权限过大,无法保证应用服务监控安全。
因此,在本申请的至少一实施例中,在不以root用户启动的情况下,所述方法还包括:通过所述守护进程创建独立用户属组,并将所述目标应用服务存储至所述独立用户属组中,从而使得不同数据库类型的属主均能够调用所述统一RPM包。所述独立用户属组的名称可以为hidba,在此不做限制。具体地,所述通过所述守护进程创建独立用户属组,并将所述目标应用服务存储至所述独立用户属组中的步骤包括:创建一独立用户属组;将所述目标应用服务按照属组分类加入至所述独立用户属组中;对包含所述目标应用服务的所述独立用户属组分配对应属组的sudo权限。
S17、由所述守护进程给所述独立用户属组申请sudo权限。
在本申请的至少一实施例中,由所述守护进程给所述独立用户属组申请sudo权限。其中,所述sudo是Linux系统的管理指令,是允许系统管理员让普通用户执行一些或者全部root命令的一个工具。具体地,所述由所述守护进程给所述独立用户属组申请sudo权限的步骤包括:确定关于所述sudo权限的配置文件;通过所述守护进程调用所述sudo权限的配置文件。其中,所述sudo权限的配置文件为用户预先设置的,所述sudo权限的配置文件包括应用服务名及对应的root命令。通过所述守护进程调用所述sudo权限的配置文件,得到应用服务名及对应的root命令,从而使得所述应用服务名对应 的应用服务能够执行相应的root命令。
S18、根据所述sudo权限启动监控进程,所述监控进程与所述守护进程建立心跳连接。
在本申请的至少一实施例中,所述守护进程启动后,会根据需要监控的应用服务列表分别以各自权限启动监控进程,所述守护进程与各自监控进程之间保存心跳连接,通过所述守护进程与各自监控进程之间保持心跳连接,能够对各个属组的监控服务状态进行校验。
所述监控进程与所述守护进程建立心跳连接的步骤包括:确定所述心跳连接的周期;通过所述守护进程接收不同的所述监控进程发送的心跳包并检测所述心跳包是否符合所述心跳连接的周期;若检测结果为存在所述监控进程对应的心跳包不符合所述心跳连接的周期,则重启对应的所述监控进程。
优选地,所述方法还包括:设置预设时间间隔;所述守护进程每隔所述预设时间间隔再次获取所述应用配置文件;根据再次获取的所述应用配置文件检测是否存在新增的应用服务;若检测结果为存在新增的应用服务,则获取新增的所述应用服务的类型;根据所述应用服务类型确定所述独立用户属组中是否存在对应的属组的标识号;若存在对应的属组的标识号,则重启所述属组对应的监控进程;若不存在对应的属组的标识号,则将新增的所述应用服务加入至所述独立用户属组中,并启动对应该属组的监控进程。
S19、所述监控进程将监控得到的监控数据返回至所述守护进程。
在本申请的至少一实施例中,所述监控进程将采集的所述监控数据返回给所述守护进程。
本申请实施例提供一种应用服务处理方法,启动自定义脚本,在脚本解析过程中,获取服务器端对应的应用服务的数据库类型;针对所述应用服务的数据库类型,部署统一RPM包,并将所述统一RPM包上传至指定数据库中;启动守护进程,获取应用服务配置文件;通过所述守护进程接收所述统一RPM包部署时的驱动信息;通过所述守护进程解析所述驱动信息,提取与所述应用服务配置文件一致的应用服务,作为目标应用服务;通过所述守护进程创建独立用户属组,并将所述目标应用服务存储至所述独立用户属组中;由所述守护进程给所述独立用户属组申请sudo权限;根据所述sudo权限启动监控进程,所述监控进程与所述守护进程建立心跳连接;所述监控进程将所述监控数据返回至所述守护进程。 通过本申请实施例,采用统一RPM包的部署方式,较之以前多RPM包的部署,能够避免在需要监控的数据库服务较多时,出现遗漏或错误等问题;本申请通过自动化统一RPM包部署,能够减少人力成本与时间成本,提高应用服务监控效率;本申请通过守护进程进行应用服务的更新与存储,有效支撑运维工作的高效;且本申请通过多个监控进程主动启动各自属组下的监控服务,降低因不同监控需求而带来的监控方式复杂度,提高监控效率。
以上是对本申请实施例所提供的方法进行的详细描述。根据不同的需求,所示流程图中方块的执行顺序可以改变,某些方块可以省略。下面对本申请实施例所提供的终端1进行描述。
图2是本申请实施例提供的终端的结构示意图,如图2所示,终端1包括存储器10,存储器10中存储有应用服务处理装置100。所述应用服务处理装置100可以启动自定义脚本,在脚本解析过程中,获取服务器端对应的应用服务的数据库类型;针对所述应用服务的数据库类型,部署统一RPM包,并将所述统一RPM包上传至指定数据库中;启动守护进程,获取应用服务配置文件;通过所述守护进程接收所述统一RPM包部署时的驱动信息;通过所述守护进程解析所述驱动信息,提取与所述应用服务配置文件一致的应用服务,作为目标应用服务;通过所述守护进程创建独立用户属组,并将所述目标应用服务存储至所述独立用户属组中;由所述守护进程给所述独立用户属组申请sudo权限;根据所述sudo权限启动监控进程,所述监控进程与所述守护进程建立心跳连接;所述监控进程将监控得到的监控数据返回至所述守护进程。通过本申请实施例,采用统一RPM包的部署方式,较之以前多RPM包的部署,能够避免在需要监控的数据库服务较多时,出现遗漏或错误等问题;本申请通过自动化统一RPM包部署,能够减少人力成本与时间成本,提高应用服务监控效率;本申请通过守护进程进行应用服务的更新与存储,有效支撑运维工作的高效;且本申请通过多个监控进程主动启动各自属组下的监控服务,降低因不同监控需求而带来的监控方式复杂度,提高监控效率。
本实施方式中,终端1还可以包括显示屏20及处理器30。存储器10、显示屏20可以分别与处理器30电连接。
所述的存储器10可以是不同类型存储设备,用于存储各类数据。例如,可以是终端1的存储器、内存,还可以是可外接于该终端1的存储卡,如闪存、SM 卡(Smart Media Card,智能媒体卡)、SD卡(Secure Digital Card,安全数字卡)等。此外,存储器10可以包括非易失性存储器,例如硬盘、内存、插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)、至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。存储器10用于存储各类数据,例如,所述终端1中安装的各类应用程序(Applications)、应用上述应用服务处理方法而设置、获取的数据等信息。
显示屏20安装于终端1,用于显示信息。
处理器30用于执行所述应用服务处理方法以及所述终端1内安装的各类软件,例如操作系统及应用显示软件等。处理器30包含但不限于处理器(Central Processing Unit,CPU)、微控制单元(Micro Controller Unit,MCU)等用于解释计算机指令以及处理计算机软件中的数据的装置。
所述的应用服务处理装置100可以包括一个或多个的模块,所述一个或多个模块被存储在终端1的存储器10中并被配置成由一个或多个处理器(本实施方式为一个处理器30)执行,以完成本申请实施例。例如,参阅图3所示,所述应用服务处理装置100可以包括脚本解析模块101、RPM包部署模块102、文件获取模块103、信息接收模块104、服务提取模块105、属组创建模块106、权限申请模块107、心跳建立模块108以及数据返回模块109。本申请实施例所称的模块可以是完成一特定功能的程序段,比程序更适合于描述软件在处理器30中的执行过程,所述程序是一系列的计算机可读指令。
可以理解的是,对应上述应用服务处理方法中的各实施方式,终端1可以包括图3中所示的各功能模块中的一部分或全部,各模块的功能将在以下具体介绍。需要说明的是,以上应用服务处理方法的各实施方式中相同的名词、相关名词及其具体的解释说明也可以适用于以下对各模块的功能介绍。为节省篇幅及避免重复起见,在此就不再赘述。
脚本解析模块101可以用于启动自定义脚本,在脚本解析过程中,获取服务器端对应的应用服务的类型。
RPM包部署模块102可以用于针对所述应用服务的数据库类型,部署统一RPM包,并将所述统一RPM包上传至指定数据库中。
文件获取模块103可以用于启动守护进程,获取应用服务配置文件。
信息接收模块104可以用于通过所述守护进程接收所述统一RPM包部署时 的驱动信息。
服务提取模块105可以用于通过所述守护进程解析所述驱动信息,提取与所述应用服务配置文件一致的应用服务,作为目标应用服务。
属组创建模块106可以用于通过所述守护进程创建独立用户属组,并将所述目标应用服务存储至所述独立用户属组中。
权限申请模块107可以用于由所述守护进程给所述独立用户属组申请sudo权限。
心跳建立模块108可以用于根据所述sudo权限启动监控进程,所述监控进程与所述守护进程建立心跳连接。
数据返回模块109可以用于所述监控进程将监控得到的监控数据返回至所述守护进程。
本申请实施例还提供一种非易失性可读存储介质,其上存储有计算机可读指令,所述计算机可读指令被处理器30执行时实现上述任一实施方式中的应用服务处理方法的步骤。
所述应用服务处理装置100如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个非易失性可读取存储介质中。基于这样的理解,本申请实现上述实施方式方法中的全部或部分流程,也可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一非易失性可读存储介质中,该计算机可读指令在被处理器30执行时,可实现上述各个方法实施例的步骤。其中,所述计算机可读指令包括计算机可读指令代码,所述计算机可读指令代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述非易失性可读存储介质可以包括:能够携带所述计算机可读指令代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)等。
所称处理器30可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等,所述处理器30是所述应用服务处理装置100/终端1的控 制中心,利用各种接口和线路连接整个应用服务处理装置100/终端1的各个部分。
所述存储器10用于存储所述计算机可读指令和/或模块,所述处理器30通过运行或执行存储在所述存储器10内的计算机可读指令和/或模块,以及调用存储在存储器10内的数据,实现所述应用服务处理装置100/终端1的各种功能。所述存储器10可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据)等。
在本申请所提供的几个具体实施方式中,应该理解到,所揭露的终端和方法,可以通过其它的方式实现。例如,以上所描述的系统实施方式仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
对于本领域技术人员而言,显然本申请实施例不限于上述示范性实施例的细节,而且在不背离本申请实施例的精神或基本特征的情况下,能够以其他的具体形式实现本申请实施例。因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本申请实施例的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化涵括在本申请实施例内。不应将权利要求中的任何附图标记视为限制所涉及的权利要求。系统、装置或终端权利要求中陈述的多个单元、模块或装置也可以由同一个单元、模块或装置通过软件或者硬件来实现。
以上实施方式仅用以说明本申请实施例的技术方案而非限制,尽管参照以上较佳实施方式对本申请实施例进行了详细说明,本领域的普通技术人员应当理解,可以对本申请实施例的技术方案进行修改或等同替换都不应脱离本申请实施例的技术方案的精神和范围。

Claims (20)

  1. 一种应用服务处理方法,其特征在于,所述应用服务处理方法包括:
    启动自定义脚本,在脚本解析过程中,获取服务器端对应的应用服务的数据库类型;
    针对所述应用服务的数据库类型,部署统一RPM包,并将所述统一RPM包上传至指定数据库中;
    启动守护进程,获取应用服务配置文件;
    通过所述守护进程接收所述统一RPM包部署时的驱动信息;
    通过所述守护进程解析所述驱动信息,提取与所述应用服务配置文件一致的应用服务,作为目标应用服务;
    通过所述守护进程创建独立用户属组,并将所述目标应用服务存储至所述独立用户属组中;
    由所述守护进程给所述独立用户属组申请sudo权限;
    根据所述sudo权限启动监控进程,所述监控进程与所述守护进程建立心跳连接;
    所述监控进程将监控得到的监控数据返回至所述守护进程。
  2. 根据权利要求1所述的应用服务处理方法,其特征在于,通过所述自定义脚本部署统一RPM包的步骤包括:
    获取所述服务器端的应用服务的数据库类型;
    根据所述应用服务的数据库类型遍历预设历史数据库,确定不同数据库类型对应RPM包中的私有部分的配置参数,形成配置参数列表;
    对所述配置参数列表中的配置参数进行筛选去重,得到目标配置参数;
    获取初始配置文件模板,将所述目标配置参数、RPM包的公有部分重新载入至所述初始配置文件模板中,得到目标配置文件;
    将所述目标配置文件以及所述RPM包对应的说明文件进行打包封装并生成统一RPM包。
  3. 根据权利要求2所述的应用服务处理方法,其特征在于,在所述生成统一RPM包的步骤之后,所述方法还包括:
    对生成的所述统一RPM包进行安装流程测试,检测所述统一RPM包是否通过所述安装流程测试;
    若检测结果为所述统一RPM包未通过所述安装流程测试,则修改所述说明文件,直至生成的所述统一RPM包通过所述安装流程测试;
    若检测结果为所述统一RPM包通过所述安装流程测试,则输出所述统一RPM包已自动部署完成的提示信息。
  4. 根据权利要求1所述的应用服务处理方法,其特征在于,所述通过所述守护进程解析所述驱动信息,提取与所述应用服务配置文件一致的应用服务的步骤包括:
    分别获取所述应用服务配置文件与/etc/passwd文件中属组标识号;
    确定均存在于两份文件中的所述属组标识号,并获取对应所述属组标识号下对应的应用服务标识号;
    确定并提取均存在于两份文件中的所述应用服务标识号。
  5. 根据权利要求1所述的应用服务处理方法,其特征在于,所述通过所述守护进程创建独立用户属组,并将所述目标应用服务存储至所述独立用户属组中的步骤包括:
    创建一独立用户属组;
    将所述目标应用服务按照属组分类加入至所述独立用户属组中;
    对包含所述目标应用服务的所述独立用户属组分配对应属组的sudo权限。
  6. 根据权利要求1所述的应用服务处理方法,其特征在于,所述监控进程与所述守护进行建立心跳连接的步骤包括:
    确定所述心跳连接的周期;
    通过所述守护进程接收不同的所述监控进程发送的心跳包;
    检测所述心跳包是否符合所述心跳连接的周期;
    若检测结果为存在所述监控进程对应的心跳包不符合所述心跳连接的周期,则重启对应的所述监控进程。
  7. 根据权利要求1所述的应用服务处理方法,其特征在于,所述方法还包括:
    设置预设时间间隔;
    所述守护进程每隔所述预设时间间隔再次获取所述应用配置文件;
    根据再次获取的所述应用配置文件检测是否存在新增的应用服务;
    若检测结果为存在新增的应用服务,则获取新增的所述应用服务的类型;
    根据所述应用服务类型确定所述独立用户属组中是否存在对应的属组的标识号;
    若存在对应的属组的标识号,则重启所述属组对应的监控进程;
    若不存在对应的属组的标识号,则将新增的所述应用服务加入至所述独立用户属组中,并启动对应该属组的监控进程。
  8. 一种基于统一RPM包部署多属组应用服务装置,其特征在于,所述基于统一RPM包部署多属组应用服务装置包括:
    脚本解析模块,用于启动自定义脚本,在脚本解析过程中,获取服务器端对应的应用服务的数据库类型;
    RPM包部署模块,用于针对所述应用服务的数据库类型,部署统一RPM包,并将所述统一RPM包上传至指定数据库中;
    文件获取模块,用于启动守护进程,获取应用服务配置文件;
    信息接收模块,用于通过所述守护进程接收所述统一RPM包部署时的驱动信息;
    服务提取模块,用于通过所述守护进程解析所述驱动信息,提取与所述应用服务配置文件一致的应用服务,作为目标应用服务;
    属组创建模块,用于通过所述守护进程创建独立用户属组,并将所述目标应用服务存储至所述独立用户属组中;
    权限申请模块,用于由所述守护进程给所述独立用户属组申请sudo权限;
    心跳建立模块,用于根据所述sudo权限启动监控进程,所述监控进程与所述守护进程建立心跳连接;
    数据返回模块,用于所述监控进程将监控得到的监控数据返回至所述守护进程。
  9. 一种终端,其特征在于,所述终端包括处理器,所述处理器用于执行存储器中存储的计算机可读指令以实现以下步骤:
    启动自定义脚本,在脚本解析过程中,获取服务器端对应的应用服务的数据库类型;
    针对所述应用服务的数据库类型,部署统一RPM包,并将所述统一RPM包上传至指定数据库中;
    启动守护进程,获取应用服务配置文件;
    通过所述守护进程接收所述统一RPM包部署时的驱动信息;
    通过所述守护进程解析所述驱动信息,提取与所述应用服务配置文件一致的应用服务,作为目标应用服务;
    通过所述守护进程创建独立用户属组,并将所述目标应用服务存储至所述独立用户属组中;
    由所述守护进程给所述独立用户属组申请sudo权限;
    根据所述sudo权限启动监控进程,所述监控进程与所述守护进程建立心跳连接;
    所述监控进程将监控得到的监控数据返回至所述守护进程。
  10. 根据权利要求9所述的终端,其特征在于,所述处理器执行所述计算机可读指令以实现通过所述自定义脚本部署统一RPM包时,包括以下步骤:
    获取所述服务器端的应用服务的数据库类型;
    根据所述应用服务的数据库类型遍历预设历史数据库,确定不同数据库类型对应RPM包中的私有部分的配置参数,形成配置参数列表;
    对所述配置参数列表中的配置参数进行筛选去重,得到目标配置参数;
    获取初始配置文件模板,将所述目标配置参数、RPM包的公有部分重新载入至所述初始配置文件模板中,得到目标配置文件;
    将所述目标配置文件以及所述RPM包对应的说明文件进行打包封装并生成统一RPM包。
  11. 根据权利要求10所述的终端,其特征在于,在所述生成统一RPM包之后,所述处理器执行所述计算机可读指令还用以实现以下步骤:
    对生成的所述统一RPM包进行安装流程测试,检测所述统一RPM包是否通过所述安装流程测试;
    若检测结果为所述统一RPM包未通过所述安装流程测试,则修改所述说明文件,直至生成的所述统一RPM包通过所述安装流程测试;
    若检测结果为所述统一RPM包通过所述安装流程测试,则输出所述统一RPM包已自动部署完成的提示信息。
  12. 根据权利要求9所述的终端,其特征在于,所述处理器执行所述计算机可读指令以实现所述通过所述守护进程解析所述驱动信息,提取与所述应用服务配置文件一致的应用服务时,包括以下步骤:
    分别获取所述应用服务配置文件与/etc/passwd文件中属组标识号;
    确定均存在于两份文件中的所述属组标识号,并获取对应所述属组标识号下对应的应用服务标识号;
    确定并提取均存在于两份文件中的所述应用服务标识号。
  13. 根据权利要求9所述的终端,其特征在于,所述处理器执行所述计算机可读指令以实现所述通过所述守护进程创建独立用户属组,并将所述目标应用服务存储至所述独立用户属组中时,包括以下步骤:
    创建一独立用户属组;
    将所述目标应用服务按照属组分类加入至所述独立用户属组中;
    对包含所述目标应用服务的所述独立用户属组分配对应属组的sudo权限。
  14. 根据权利要求9所述的终端,其特征在于,所述处理器执行所述计算机可读指令以实现所述监控进程与所述守护进行建立心跳连接时,包括以下步骤:
    确定所述心跳连接的周期;
    通过所述守护进程接收不同的所述监控进程发送的心跳包;
    检测所述心跳包是否符合所述心跳连接的周期;
    若检测结果为存在所述监控进程对应的心跳包不符合所述心跳连接的周期,则重启对应的所述监控进程。
  15. 一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机可读指令,其特征在于,所述计算机可读指令被处理器执行时实现以下步骤:
    启动自定义脚本,在脚本解析过程中,获取服务器端对应的应用服务的数据库类型;
    针对所述应用服务的数据库类型,部署统一RPM包,并将所述统一RPM包上传至指定数据库中;
    启动守护进程,获取应用服务配置文件;
    通过所述守护进程接收所述统一RPM包部署时的驱动信息;
    通过所述守护进程解析所述驱动信息,提取与所述应用服务配置文件一致的应用服务,作为目标应用服务;
    通过所述守护进程创建独立用户属组,并将所述目标应用服务存储至所述独立用户属组中;
    由所述守护进程给所述独立用户属组申请sudo权限;
    根据所述sudo权限启动监控进程,所述监控进程与所述守护进程建立心跳连接;
    所述监控进程将监控得到的监控数据返回至所述守护进程。
  16. 根据权利要求15所述的计算机可读存储介质,其特征在于,所述计算机可读指令被处理器执行以实现通过所述自定义脚本部署统一RPM包时,包括以下步骤:
    获取所述服务器端的应用服务的数据库类型;
    根据所述应用服务的数据库类型遍历预设历史数据库,确定不同数据库类型对应RPM包中的私有部分的配置参数,形成配置参数列表;
    对所述配置参数列表中的配置参数进行筛选去重,得到目标配置参数;
    获取初始配置文件模板,将所述目标配置参数、RPM包的公有部分重新载入至所述初始配置文件模板中,得到目标配置文件;
    将所述目标配置文件以及所述RPM包对应的说明文件进行打包封装并生成统一RPM包。
  17. 根据权利要求16所述的计算机可读存储介质,其特征在于,在所述生成统一RPM包之后,所述计算机可读指令被处理器执行还用以实现以下步骤:
    对生成的所述统一RPM包进行安装流程测试,检测所述统一RPM包是否通过所述安装流程测试;
    若检测结果为所述统一RPM包未通过所述安装流程测试,则修改所述说明文件,直至生成的所述统一RPM包通过所述安装流程测试;
    若检测结果为所述统一RPM包通过所述安装流程测试,则输出所述统一RPM包已自动部署完成的提示信息。
  18. 根据权利要求15所述的计算机可读存储介质,其特征在于,所述计算机可读指令被处理器执行以实现所述通过所述守护进程解析所述驱动信息,提取与所述应用服务配置文件一致的应用服务时,包括以下步骤:
    分别获取所述应用服务配置文件与/etc/passwd文件中属组标识号;
    确定均存在于两份文件中的所述属组标识号,并获取对应所述属组标识号下对应的应用服务标识号;
    确定并提取均存在于两份文件中的所述应用服务标识号。
  19. 根据权利要求15所述的计算机可读存储介质,其特征在于,所述计算 机可读指令被处理器执行以实现所述通过所述守护进程创建独立用户属组,并将所述目标应用服务存储至所述独立用户属组中时,包括以下步骤:
    创建一独立用户属组;
    将所述目标应用服务按照属组分类加入至所述独立用户属组中;
    对包含所述目标应用服务的所述独立用户属组分配对应属组的sudo权限。
  20. 根据权利要求15所述的计算机可读存储介质,其特征在于,所述计算机可读指令被处理器执行以实现所述监控进程与所述守护进行建立心跳连接时,包括以下步骤:
    确定所述心跳连接的周期;
    通过所述守护进程接收不同的所述监控进程发送的心跳包;
    检测所述心跳包是否符合所述心跳连接的周期;
    若检测结果为存在所述监控进程对应的心跳包不符合所述心跳连接的周期,则重启对应的所述监控进程。
PCT/CN2019/117653 2019-10-17 2019-11-12 应用服务处理方法、装置、终端及存储介质 WO2021072861A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910989788.6A CN110908859B (zh) 2019-10-17 2019-10-17 应用服务处理方法、装置、终端及存储介质
CN201910989788.6 2019-10-17

Publications (1)

Publication Number Publication Date
WO2021072861A1 true WO2021072861A1 (zh) 2021-04-22

Family

ID=69815539

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/117653 WO2021072861A1 (zh) 2019-10-17 2019-11-12 应用服务处理方法、装置、终端及存储介质

Country Status (2)

Country Link
CN (1) CN110908859B (zh)
WO (1) WO2021072861A1 (zh)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113392081A (zh) * 2021-06-10 2021-09-14 北京猿力未来科技有限公司 数据处理系统及方法
CN113485892A (zh) * 2021-06-30 2021-10-08 中国民航信息网络股份有限公司 一种数据分析方法、系统、电子设备及存储介质
CN113676548A (zh) * 2021-09-02 2021-11-19 上海浦东发展银行股份有限公司 基于配置分流部署的微服务流量切换方法、装置和介质
CN113778535A (zh) * 2021-08-10 2021-12-10 济南浪潮数据技术有限公司 一种云主机操作校验的方法、系统、设备和存储介质
CN114546521A (zh) * 2022-01-28 2022-05-27 中银金融科技有限公司 一种cics进程控制系统及方法
CN114697377A (zh) * 2022-04-07 2022-07-01 深信服科技股份有限公司 一种客户端产品的保活方法、系统、装置及可读存储介质
CN116661908A (zh) * 2023-07-26 2023-08-29 海看网络科技(山东)股份有限公司 一种epg系统输入方式注册方法
CN117319196A (zh) * 2023-10-26 2023-12-29 无锡芯光互连技术研究院有限公司 一种用户服务器集群环境部署管理系统及方法

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111880781A (zh) * 2020-07-29 2020-11-03 北京浪潮数据技术有限公司 一种rpm安装包的生成方法、装置、设备及存储介质
CN112328467B (zh) * 2020-09-17 2022-06-28 北京中数科技术有限公司 一种嵌入式系统程序测试方法及装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110029585A1 (en) * 2003-08-14 2011-02-03 Oracle International Corporation Automatic and dynamic provisioning of databases
CN102624919A (zh) * 2012-03-30 2012-08-01 电子科技大学 一种面向服务架构的分布式业务集成系统及其应用方法
CN103425511A (zh) * 2013-08-16 2013-12-04 北京华胜天成科技股份有限公司 云计算环境中应用软件安装部署的系统及方法
CN109947783A (zh) * 2018-09-07 2019-06-28 网联清算有限公司 数据库的自动部署方法、装置、存储介质及计算机设备
CN110231944A (zh) * 2018-03-05 2019-09-13 北京京东尚科信息技术有限公司 自动化部署方法、装置、系统以及计算机可读存储介质

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8296267B2 (en) * 2010-10-20 2012-10-23 Microsoft Corporation Upgrade of highly available farm server groups
US9449039B2 (en) * 2012-11-26 2016-09-20 Amazon Technologies, Inc. Automatic repair of corrupted blocks in a database

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110029585A1 (en) * 2003-08-14 2011-02-03 Oracle International Corporation Automatic and dynamic provisioning of databases
CN102624919A (zh) * 2012-03-30 2012-08-01 电子科技大学 一种面向服务架构的分布式业务集成系统及其应用方法
CN103425511A (zh) * 2013-08-16 2013-12-04 北京华胜天成科技股份有限公司 云计算环境中应用软件安装部署的系统及方法
CN110231944A (zh) * 2018-03-05 2019-09-13 北京京东尚科信息技术有限公司 自动化部署方法、装置、系统以及计算机可读存储介质
CN109947783A (zh) * 2018-09-07 2019-06-28 网联清算有限公司 数据库的自动部署方法、装置、存储介质及计算机设备

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113392081A (zh) * 2021-06-10 2021-09-14 北京猿力未来科技有限公司 数据处理系统及方法
CN113485892A (zh) * 2021-06-30 2021-10-08 中国民航信息网络股份有限公司 一种数据分析方法、系统、电子设备及存储介质
CN113778535B (zh) * 2021-08-10 2024-02-23 济南浪潮数据技术有限公司 一种云主机操作校验的方法、系统、设备和存储介质
CN113778535A (zh) * 2021-08-10 2021-12-10 济南浪潮数据技术有限公司 一种云主机操作校验的方法、系统、设备和存储介质
CN113676548A (zh) * 2021-09-02 2021-11-19 上海浦东发展银行股份有限公司 基于配置分流部署的微服务流量切换方法、装置和介质
CN113676548B (zh) * 2021-09-02 2024-05-03 上海浦东发展银行股份有限公司 基于配置分流部署的微服务流量切换方法、装置和介质
CN114546521A (zh) * 2022-01-28 2022-05-27 中银金融科技有限公司 一种cics进程控制系统及方法
CN114697377A (zh) * 2022-04-07 2022-07-01 深信服科技股份有限公司 一种客户端产品的保活方法、系统、装置及可读存储介质
CN114697377B (zh) * 2022-04-07 2023-09-05 深信服科技股份有限公司 一种客户端产品的保活方法、系统、装置及可读存储介质
CN116661908A (zh) * 2023-07-26 2023-08-29 海看网络科技(山东)股份有限公司 一种epg系统输入方式注册方法
CN116661908B (zh) * 2023-07-26 2023-10-20 海看网络科技(山东)股份有限公司 一种epg系统输入方式注册方法
CN117319196A (zh) * 2023-10-26 2023-12-29 无锡芯光互连技术研究院有限公司 一种用户服务器集群环境部署管理系统及方法
CN117319196B (zh) * 2023-10-26 2024-05-14 无锡芯光互连技术研究院有限公司 一种用户服务器集群环境部署管理系统及方法

Also Published As

Publication number Publication date
CN110908859B (zh) 2023-05-30
CN110908859A (zh) 2020-03-24

Similar Documents

Publication Publication Date Title
WO2021072861A1 (zh) 应用服务处理方法、装置、终端及存储介质
CN110597918B (zh) 一种账户管理方法、装置及计算机可读存储介质
CN107733985B (zh) 一种云计算系统功能组件部署方法及装置
US9473356B2 (en) Automatic configuration of applications based on host metadata using application-specific templates
CN110096424B (zh) 测试的处理方法、装置、电子设备及存储介质
WO2019051948A1 (zh) 监控数据的处理方法、设备、服务器及存储介质
US20150067671A1 (en) Information processing apparatus, control method, and storage medium
CN111596932B (zh) 一种镜像文件生成方法、装置和计算机可读存储介质
WO2021169124A1 (zh) 安装软件包至目标主机的方法、装置和计算机设备
CN111831567B (zh) 应用的测试环境配置方法、装置、系统和介质
CN110727575A (zh) 一种信息处理方法、系统、装置、以及存储介质
US9621596B2 (en) Mobile application deployment for distributed computing environments
US11726443B2 (en) Efficient controller data generation and extraction
WO2016029774A1 (zh) 基于虚拟化的应用存储方法、执行方法、装置及系统
TWI653578B (zh) 映像檔製作方法及其裝置
EP4130982A1 (en) Network-based solution module deployment platform
CN111651235A (zh) 一种虚拟机组任务管理方法及装置
WO2016131294A1 (zh) 版本升级处理方法及装置
CN113992739B (zh) 一种局域网ota固件升级装置、方法及系统
CN110045971A (zh) 系统升级恢复方法及装置
US11080123B2 (en) Information processing apparatus
CN114371866A (zh) 业务系统的版本重构测试方法、装置和设备
CN112148463B (zh) 一种业务流程控制方法及装置
CN117439884A (zh) 网络设备的脚本变更方法和装置、存储介质及电子设备
CN113961198A (zh) 一种微服务自动部署方法、装置及存储介质

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: 19949474

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19949474

Country of ref document: EP

Kind code of ref document: A1