CN113419743A - Comprehensive application script deployment method, device, equipment and storage medium - Google Patents

Comprehensive application script deployment method, device, equipment and storage medium Download PDF

Info

Publication number
CN113419743A
CN113419743A CN202110691304.7A CN202110691304A CN113419743A CN 113419743 A CN113419743 A CN 113419743A CN 202110691304 A CN202110691304 A CN 202110691304A CN 113419743 A CN113419743 A CN 113419743A
Authority
CN
China
Prior art keywords
script
host
information
script information
layer
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110691304.7A
Other languages
Chinese (zh)
Other versions
CN113419743B (en
Inventor
陈亿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kangjian Information Technology Shenzhen Co Ltd
Original Assignee
Kangjian Information Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kangjian Information Technology Shenzhen Co Ltd filed Critical Kangjian Information Technology Shenzhen Co Ltd
Priority to CN202110691304.7A priority Critical patent/CN113419743B/en
Publication of CN113419743A publication Critical patent/CN113419743A/en
Application granted granted Critical
Publication of CN113419743B publication Critical patent/CN113419743B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention relates to the field of pedestal operation and maintenance, and discloses a method, a device, equipment and a storage medium for deploying a comprehensive application script. The method comprises the following steps: collecting script information in a preset storage range, and storing each script information into a corresponding preset storage layer according to the execution type of each script information; when a script calling request sent by a target host is received, selecting first script information from a host layer, and configuring a script configuration file corresponding to the target host; selecting second script information from the intermediate cluster layer, and distributing preset execution actions in the intermediate cluster layer to script configuration files; selecting third script information from the application layer, and combining the script configuration file and the third script information to obtain host script information corresponding to the target host; and deploying the host script information on the target host. The invention improves the convenient management degree of the script and the automation degree of the operation and maintenance of the script.

Description

Comprehensive application script deployment method, device, equipment and storage medium
Technical Field
The invention relates to the field of pedestal operation and maintenance, in particular to a method, a device, equipment and a storage medium for deploying a comprehensive application script.
Background
Along with the increase of company machines, the types of application programs running on the machines are increased, each application program has an independent running script, a maintenance script, a starting script and the like, along with the continuous increase of various types of scripts, the storage position of the script is more and more disordered, a database manager in charge of the script is required to manually record the storage position, the execution function and the use method of the script, and meanwhile, the storage mode which is easy to generate disorder is low in automation degree in the operation and maintenance process; the script storage mode has no unified management mode, the script needs to be checked on a specified host computer every time, and debugging is carried out, so that the debugging efficiency of the script is low; once the script is modified, the operation and maintenance environment cannot be distinguished for automatic replacement, only each robot needs to modify the script repeatedly, and the script modification operation is repeated, redundant and easy to forget. In summary, the existing script management method has low automation degree.
Disclosure of Invention
The invention mainly aims to solve the technical problem that the existing script management method is low in automation operation and maintenance degree.
The invention provides a first aspect of a comprehensive application script deployment method, which comprises the following steps: when a script calling request sent by a target host is received, selecting first script information corresponding to the script calling request from a host layer of a preset memory, and configuring a script configuration file corresponding to the target host according to the first script information; selecting second script information associated with the first script information from an intermediate cluster layer of the memory, and distributing preset execution actions in the intermediate cluster layer to the script configuration file according to the second script information; selecting third script information associated with the second script information from an application layer of the memory, and combining the script configuration file and the third script information to obtain host script information corresponding to the target host; and deploying the host script information on the target host.
Optionally, in a first implementation manner of the first aspect of the present invention, the configuring, according to the first script information, a script configuration file corresponding to the target host includes: analyzing the first script information to obtain a plurality of script parameters and obtain a host configuration file on the target host; generating an editing area in each script parameter according to the host configuration file, and performing parameter entering operation on the editing area according to the script parameters; and generating a script configuration file corresponding to the target host according to the editing area after the script parameters are entered.
Optionally, in a second implementation manner of the first aspect of the present invention, the allocating, according to the second script information, a preset execution action in the intermediate cluster layer to the script configuration file includes: copying a plurality of copies of the second script information, and configuring script templates corresponding to the copied second script information; distributing preset execution actions to corresponding script templates based on the preset cluster life cycle corresponding to the intermediate cluster layer; and injecting the script template which is distributed with the execution action into the script configuration file.
Optionally, in a third implementation manner of the first aspect of the present invention, the combining the script configuration file and the third script information to obtain the host script information corresponding to the target host includes: according to the life cycle of the cluster, inheriting a corresponding script template in the script configuration file by using the third script information to obtain a plurality of pieces of segmented host script information; and combining the script information of each segmented host to obtain the host script information corresponding to the target host.
Optionally, in a fourth implementation manner of the first aspect of the present invention, the deploying the host script information on the target host includes: acquiring a target application on the target host, and compiling the target application; compressing the compiled target application to obtain an application compression package, and injecting the host script information into the application compression package; and sending the application compression packet injected with the host script information to the target host for deployment.
Optionally, in a fifth implementation manner of the first aspect of the present invention, after the deploying the host script information on the target host, the method further includes: adding execution authority information of the host script information according to a target execution role corresponding to the host script information; and determining a calling mode of the host script information according to the authority information, and storing the host script information in a preset database or a preset local folder corresponding to the target host according to the calling mode.
Optionally, in a sixth implementation manner of the first aspect of the present invention, before the selecting, when receiving a script call request sent by a target host, first script information corresponding to the script call request from a host layer of a preset memory, the method further includes: collecting script information of a cluster where the target host is located, and determining the execution type of each script information according to the script structure of each script information; and storing each script information into a storage layer corresponding to the storage according to each script information execution type, wherein the storage layer comprises a host layer, an intermediate cluster layer and an application layer.
The invention provides a comprehensive application script deployment device in a second aspect, which comprises: the configuration module is used for selecting first script information corresponding to a script calling request from a host layer of a preset memory when the script calling request sent by a target host is received, and configuring a script configuration file corresponding to the target host according to the first script information; the distribution module is used for selecting second script information associated with the first script information from an intermediate cluster layer of the memory and distributing preset execution actions in the intermediate cluster layer to the script configuration file according to the second script information; the combination module is used for selecting third script information associated with the second script information from an application layer of the memory and combining the script configuration file and the third script information to obtain host script information corresponding to the target host; and the deployment module is used for deploying the host script information on the target host.
Optionally, in a first implementation manner of the second aspect of the present invention, the configuration module includes: the analysis unit is used for analyzing the first script information to obtain a plurality of script parameters and acquiring a host configuration file on the target host; the parameter entering unit is used for generating an editing area in each script parameter according to the host configuration file and performing parameter entering operation on the editing area according to the script parameters; and the generating unit is used for generating the script configuration file corresponding to the target host according to the editing area after the script parameters are entered.
Optionally, in a second implementation manner of the second aspect of the present invention, the allocating module includes:
the copying unit is used for copying a plurality of copies of the second script information and configuring script templates corresponding to the copied second script information; the distribution unit is used for distributing preset execution actions to corresponding script templates based on the preset cluster life cycle corresponding to the middle cluster layer; and the injection unit is used for injecting the script template which is distributed with the execution action into the script configuration file.
Optionally, in a third implementation manner of the second aspect of the present invention, the combining module includes: the inheritance unit is used for adopting the third script information to inherit the corresponding script template in the script configuration file according to the life cycle of the cluster to obtain a plurality of pieces of host script information; and the combination unit is used for combining the script information of each segmented host to obtain the host script information corresponding to the target host.
Optionally, in a fourth implementation manner of the second aspect of the present invention, the deployment module includes: the compiling unit is used for acquiring the target application on the target host and compiling the target application; the compression unit is used for compressing the compiled target application to obtain an application compression package and injecting the host script information into the application compression package; and the sending unit is used for sending the application compression packet injected with the host script information to the target host for deployment.
Optionally, in a fifth implementation manner of the second aspect of the present invention, the generalized application script deploying apparatus further includes: the adding module is used for adding the execution authority information of the host script information according to the target execution role corresponding to the host script information; and the calling module is used for determining the calling mode of the host script information according to the permission information and storing the host script information in a preset database or a preset local folder corresponding to the target host according to the calling mode.
Optionally, in a sixth implementation manner of the second aspect of the present invention, the generalized application script deploying apparatus further includes: the storage module is used for collecting script information of a cluster where the target host is located and determining the execution type of each script information according to the script structure of each script information; and storing each script information into a storage layer corresponding to the storage according to each script information execution type, wherein the storage layer comprises a host layer, an intermediate cluster layer and an application layer.
A third aspect of the present invention provides a generalized application script deployment apparatus, comprising: a memory and at least one processor, the memory having instructions stored therein; the at least one processor invokes the instructions in the memory to cause the generalized application script deployment device to perform the generalized application script deployment method described above.
A fourth aspect of the present invention provides a computer-readable storage medium having stored therein instructions which, when run on a computer, cause the computer to perform the above-described generalized application script deployment method.
According to the technical scheme provided by the invention, all the collected script information is stored in a layered mode according to the execution type, and the host layer stores the first script information and is used for configuring basic script configuration files; the intermediate cluster layer stores second script information used for distributing and executing actions for the script configuration file; the application layer is used for storing third script information and adding a customized script file configured by a developer into a basic script configuration file, and the basic script configuration, the execution action and the script customization configuration of the script are packaged through three layers of classified stored script information so as to be used for the script deployment of the host and improve the automation degree of the script deployment.
Drawings
FIG. 1 is a schematic diagram of a first embodiment of a generalized application script deployment method in an embodiment of the present invention;
FIG. 2 is a schematic diagram of a second embodiment of the generalized application script deployment method in the embodiment of the present invention;
FIG. 3 is a schematic diagram of three embodiments of a generalized application script deployment method in an embodiment of the present invention;
FIG. 4 is a schematic diagram of an embodiment of a generalized application script deployment apparatus in an embodiment of the present invention;
FIG. 5 is a schematic diagram of another embodiment of the generalized application script deployment apparatus in an embodiment of the present invention;
FIG. 6 is a diagram of an embodiment of a generalized application script deployment apparatus in an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a comprehensive application script deployment method, a comprehensive application script deployment device, comprehensive application script deployment equipment and a comprehensive application script deployment storage medium, wherein script information in a preset storage range is collected, and each script information is stored into a corresponding preset storage layer according to the execution type of each script information; when a script calling request sent by a target host is received, selecting first script information from a host layer, and configuring a script configuration file corresponding to the target host; selecting second script information from the intermediate cluster layer, and distributing preset execution actions in the intermediate cluster layer to script configuration files; selecting third script information from the application layer, and combining the script configuration file and the third script information to obtain host script information corresponding to the target host; and deploying the host script information on the target host. The invention improves the convenient management degree of the script and the automation degree of the operation and maintenance of the script.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprises," "comprising," or "having," and any variations thereof, are intended to cover non-exclusive inclusions, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
For understanding, a specific flow of the embodiment of the present invention is described below, and referring to fig. 1, a first embodiment of the integrated application script deployment method in the embodiment of the present invention includes:
101. when a script calling request sent by a target host is received, selecting first script information corresponding to the script calling request from a host layer of a preset memory, and configuring a script configuration file corresponding to the target host according to the first script information;
it is to be understood that the execution subject of the present invention may be a comprehensive application script deployment apparatus, and may also be a terminal or a server, which is not limited herein. The embodiment of the present invention is described by taking a server as an execution subject.
In this embodiment, the target host may initiate a script call request at regular time, for example, check and update an application program of the host at a fixed time; a script calling request can be initiated according to a preset triggering condition, for example, when a host computer is down, corresponding files are automatically stored, or all application programs are restarted; and a script calling request can also be initiated manually by a user, for example, the user starts an application program, edits a picture, and adds a corresponding application program starting script, a corresponding picture editing script, and the like.
In this embodiment, after receiving a script call request sent by one of the target hosts of the company, the script call request includes an identifier of script information requested to be called, and the corresponding script information can be called from the storage layer. The calling sequence of the script information is as follows from top to bottom: the script management mainly aims at the DiOrba calling of the composite application, and corresponding script information needs to be called from three storage layers respectively. The method comprises the steps of calling a script identifier according to a request, taking the identifier as an index from a host layer, and retrieving corresponding first script information for downloading and executing a configuration file rc.loacl of an application program configured to a target host of the script information.
102. Selecting second script information associated with the first script information from an intermediate cluster layer of the memory, and distributing preset execution actions in the intermediate cluster layer to a script configuration file according to the second script information;
in this embodiment, different script information in the host layer and the intermediate cluster layer is preset with a binding relationship, and after the first script information is selected, the second script information associated with the first script information can be found through the binding relationship. The first script message is used to download and execute the configuration of the script information to the configuration file rc.loacl of the application program of the target host, and the second script message is used to deploy each execution action in the execution flow of the script. For example, if kubernets are adopted in the intermediate cluster layer, the second script information may mount pre _ start.sh and pre _ stop.sh through a declarative update in kubernets, srvdress.sh is a configmap, allocate a preset execution action to a script in the host script file, and set up a script execution flow corresponding to the host script file.
103. Selecting third script information associated with the second script information from an application layer of the memory, and combining the script configuration file and the third script information to obtain host script information corresponding to the target host;
in this embodiment, the script information in the intermediate cluster layer is set in advance in a binding relationship with the script information in the application layer, so that after the second script information selected by the intermediate cluster layer is determined, the third script information associated with the second script information can be determined. The third script information is a script self-defined by a certain system, a certain host or a certain program, inherits the script information of the intermediate cluster layer, is used for defining scripts of some special applications and provides customized scripts. After the execution action is injected into the host script file, in the application layer, the customized third script information is combined with the host script file, and then the generation of the composite host script can be completed.
104. And deploying the host script information on the target host.
In this embodiment, after the host script information is generated, the host script information is sent to the target host for storage, and after the application is started, the script corresponding to the host script information is executed according to the execution flow deployed by the intermediate cluster layer. The specific deployment process is as follows:
(1) acquiring a target application on the target host, and compiling the target application;
(2) compressing the compiled target application to obtain an application compression package, and injecting the host script information into the application compression package;
(3) and sending the application compression packet into which the host script information is injected to the target host.
In the embodiment of the invention, all the collected script information is stored in a layered mode according to the execution type, and the host layer stores the first script information and is used for configuring basic script configuration files; the intermediate cluster layer stores second script information used for distributing and executing actions for the script configuration file; the application layer is used for storing third script information and adding a customized script file configured by a developer into a basic script configuration file, and the basic script configuration, the execution action and the script customization configuration of the script are packaged through three layers of classified stored script information so as to be used for the script deployment of the host and improve the automation degree of the script deployment.
Referring to fig. 2, a second embodiment of the generalized application script deployment method according to the embodiment of the present invention includes:
201. collecting script information of a cluster where the target host is located, and determining the execution type of each script information according to the script structure of each script information;
202. storing each script information into a storage layer corresponding to the storage according to each script information execution type, wherein the storage layer comprises a host layer, an intermediate cluster layer and an application layer;
in this embodiment, all the script information may be collected in a centralized manner according to scripts stored in each server and host in an existing company system, and since a developer labels each script information on an interactive interface according to an execution type of each script information after all the script information is collected, the script information includes label information of script confidence after a script call request sent by a target host is received, the type of the script information can be determined according to the label information, and the script information is stored in a corresponding storage layer according to the execution types of different script information.
For example, script information corresponding to a fixed and unchangeable execution method of different hosts or different servers, script information of a fixed execution flow, and customized script information of a certain program, host or server, etc., each script information is stored in a corresponding preset storage layer, and different storage layers store different types of script information.
The host layer can store script information of a fixed execution method, the intermediate cluster layer can store script information of a fixed execution process, and the application layer can store customized script information. Specifically, the intermediate cluster layer may be a container cluster management system such as kubernets, Swarm, messs, and Yarn.
203. When a script calling request sent by a target host is received, selecting first script information corresponding to the script calling request from a host layer of a preset memory, analyzing the first script information to obtain a plurality of script parameters, and acquiring a host configuration file on the target host;
204. generating an editing area in each script parameter according to the host configuration file, and performing entry operation on the editing area according to the script parameters;
205. generating a script configuration file corresponding to the target host according to the editing area after the parameter of the script is entered;
in this embodiment, the first script information includes a plurality of script parameters, where the script parameters may include an execution parameter, a domain name parameter, a proxy address parameter, and the like, and the execution parameter is, for example, a text extraction command, a program start command, and the like; the domain name parameters are for example: www. aaaa.com, i.e. "aaaa" represents a parameter that is a domain name parameter; the proxy address parameter is, for example, 220.bbb. ccc.74, i.e., "bbb", "ccc" represents a proxy address parameter.
Specifically, for example, when the first script information of the proxy type is analyzed, the first script information may be analyzed according to the format used by the domain name parameter and the proxy address parameter in the first script information, so as to obtain the domain name parameter and the proxy address parameter of the first script information, for example, for the domain name parameter, the format of the first four characters is "www.
In this embodiment, the host configuration file describes the items and assignment contents of the script parameters included in the target host, that is, the editing region may include an execution parameter editing region, a domain name parameter editing region, an agent address parameter editing region, and the like related to the target host. And according to the project and assignment content of the script parameter contained in the target host, the range of a plurality of script parameters is defined, and then the corresponding editing area can be obtained, for example, in the domain name parameter editing area, according to one or more domain name parameters and assignments recorded in the host configuration file, at the display position corresponding to the domain name parameter, "delete" or "modify" or "add". In addition, the edited script parameters are extracted and assembled, and the script configuration file of the target host can be obtained.
206. Selecting second script information associated with the first script information from an intermediate cluster layer of the memory, and distributing preset execution actions in the intermediate cluster layer to a script configuration file according to the second script information;
207. selecting third script information associated with the second script information from an application layer of the memory, and inheriting a corresponding script template in the script configuration file by using the third script information according to the life cycle of the cluster to obtain a plurality of pieces of host script information;
208. combining the script information of each segmented host to obtain host script information corresponding to a target host;
in this embodiment, the deployment of the third script information in the application layer in the host script file specifically inherits the script template configured by the intermediate cluster layer in the host script file. And covering the customized execution method, the execution command, the execution parameters and the assignment content in the third script information on the corresponding script template to generate a plurality of customized scripts with normalization, uniformity and low isomerism. And the script information of each segmented host is a plurality of customized scripts.
209. And deploying the host script information on the target host.
In the embodiment of the invention, the process of generating the host script information by the first script information, the second script information and the third script information is introduced in detail, the basic configuration file of the host script information is configured through the first script information, then the execution action of the host script information is distributed through the second script information, and finally the customized segmented host script information is added into the host script information through the third script information so as to realize the system generation of the host script information, and the full-automatic generation of the script is realized through the host layer, the middle cluster layer and the application layer.
Referring to fig. 3, a third embodiment of the generalized application script deployment method according to the embodiment of the present invention includes:
301. when a script calling request sent by a target host is received, selecting first script information corresponding to the script calling request from a host layer of a preset memory, and configuring a script configuration file corresponding to the target host according to the first script information;
302. selecting second script information associated with the first script information from an intermediate cluster layer of the memory, copying a plurality of pieces of second script information, and configuring script templates corresponding to the copied second script information;
303. distributing preset execution actions to corresponding script templates based on the preset cluster life cycle corresponding to the middle cluster layer;
304. injecting the script template distributed with the execution action into a script configuration file;
in this embodiment, multiple pieces of second script information may be created at the intermediate cluster layer, so as to run on multiple computers, execute corresponding scripts on multiple applications, or simultaneously execute corresponding scripts on multiple versions of applications. And then configuring a corresponding number of script templates according to the number of the executed actions related to the second script information. And determining the execution action contained in the second script information according to a preset cluster life cycle in the intermediate cluster layer, such as a cycle formed by a plurality of execution actions related to script starting, executing, terminating and the like, distributing the execution action contained in the cluster life cycle to each script template, and then injecting the script mother solution with the execution action into the host script file, so that the deployment of the script execution flow can be completed. The intermediate cluster layer carries out standardized management on a subsequent customized script (third script information) through a unified script template, so that the uniformity is increased, and the script heterogeneity is reduced;
305. selecting third script information associated with the second script information from an application layer of the memory, and combining the script configuration file and the third script information to obtain host script information corresponding to the target host;
306. adding execution authority information of the host script information according to a target execution role corresponding to the host script information;
307. and determining a calling mode of the host script information according to the authority information, and storing the host script information in a preset database or a preset local folder corresponding to the target host according to the calling mode.
In this embodiment, because the use modes of the host script information are different, the locations of the application program use the host script information are different, and some application programs need to store scripts (for example, kubernets use through configmaps), the host script information copy can be pushed to a place where the temporary storage or copy creation needs to be used by using pampas floor host script information as metadata. The data is actually stored in the database without using local files, so that the migration and the system distribution are facilitated.
The execution authority of the host script information needs to be defined in advance, the execution authority is injected into the host script information and falls to the ground and is transmitted along with the host script information, and finally the host script information is executed according to the application program in the defined authority when executed, so that the application program executing the host script information is prevented from being wrong, and files or program handles which cannot be managed correctly are generated.
In the embodiment of the invention, the deployment process of the host script information on the target host and the script permission deployment are described in detail, the target application on the target host is compiled, and is compressed into the application compression packet together with the host script information, and the application compression packet is sent to the target host for analysis, so that the deployment of the script on the target host can be realized, and the script deployment process is simplified; and by adding the execution authority information of the host script, a target host and an application program which can execute the script are limited, and the pertinence of script deployment is improved.
In the above description of the deployment method of the generalized application script in the embodiment of the present invention, the following description of the deployment apparatus of the generalized application script in the embodiment of the present invention refers to fig. 4, and an embodiment of the deployment apparatus of the generalized application script in the embodiment of the present invention includes:
the configuration module 401 is configured to, when receiving a script call request sent by a target host, select first script information corresponding to the script call request from a host layer of a preset memory, and configure a script configuration file corresponding to the target host according to the first script information;
an allocating module 402, configured to select second script information associated with the first script information from an intermediate cluster layer of the memory, and allocate a preset execution action in the intermediate cluster layer to the script configuration file according to the second script information;
a combining module 403, configured to select third script information associated with the second script information from an application layer of the memory, and combine the script configuration file and the third script information to obtain host script information corresponding to the target host;
a deployment module 404, configured to deploy the host script information on the target host.
In the embodiment of the invention, all the collected script information is stored in a layered mode according to the execution type, and the host layer stores the first script information and is used for configuring basic script configuration files; the intermediate cluster layer stores second script information used for distributing and executing actions for the script configuration file; the application layer is used for storing third script information and adding a customized script file configured by a developer into a basic script configuration file, and the basic script configuration, the execution action and the script customization configuration of the script are packaged through three layers of classified stored script information so as to be used for the script deployment of the host and improve the automation degree of the script deployment.
Referring to fig. 5, another embodiment of the integrated application script deployment apparatus according to the embodiment of the present invention includes:
the configuration module 401 is configured to, when receiving a script call request sent by a target host, select first script information corresponding to the script call request from a host layer of a preset memory, and configure a script configuration file corresponding to the target host according to the first script information;
an allocating module 402, configured to select second script information associated with the first script information from an intermediate cluster layer of the memory, and allocate a preset execution action in the intermediate cluster layer to the script configuration file according to the second script information;
a combining module 403, configured to select third script information associated with the second script information from an application layer of the memory, and combine the script configuration file and the third script information to obtain host script information corresponding to the target host;
a deployment module 404, configured to deploy the host script information on the target host.
Specifically, the configuration module 401 includes:
the analysis unit 4011 is configured to analyze the first script information to obtain a plurality of script parameters, and obtain a host configuration file on the target host;
a parameter entering unit 4012, configured to generate an editing area in each script parameter according to the host configuration file, and perform a parameter entering operation on the editing area according to the script parameter;
and the generating unit 4013 is configured to generate a script configuration file corresponding to the target host according to the editing region after entering the script parameter.
Specifically, the allocating module 402 includes:
a copying unit 4021, configured to copy a plurality of copies of the second script information, and configure a script template corresponding to each copied second script information;
the distribution unit 4022 is configured to distribute a preset execution action to the corresponding script template based on the preset cluster life cycle corresponding to the intermediate cluster layer;
an injecting unit 4023, configured to inject the script template to which the execution action has been assigned into the script configuration file.
Specifically, the combining module 403 includes:
the inheriting unit 4031 is configured to inherit the corresponding script template in the script configuration file by using the third script information according to the cluster life cycle to obtain a plurality of pieces of host script information;
a combining unit 4032, configured to combine the script information of each segment host to obtain host script information corresponding to the target host.
Specifically, the deployment module 404 includes:
a compiling unit 4041, configured to obtain a target application on the target host, and compile the target application;
the compression unit 4042 is configured to compress the compiled target application to obtain an application compression packet, and inject the host script information into the application compression packet;
a sending unit 4043, configured to send the application compression packet into which the host script information is injected to the target host for deployment.
Specifically, the generalized application script deploying apparatus further includes:
an adding module 405, configured to add execution permission information of the host script information according to a target execution role corresponding to the host script information;
and the calling module 406 is configured to determine a calling mode of the host script information according to the permission information, and store the host script information in a preset database or a preset local folder corresponding to the target host according to the calling mode.
The integrated application script deployment device further comprises: the storage module 407 is configured to collect script information of a cluster where the target host is located, and determine an execution type of each script information according to a script structure of each script information; and storing each script information into a storage layer corresponding to the storage according to each script information execution type, wherein the storage layer comprises a host layer, an intermediate cluster layer and an application layer.
In the embodiment of the invention, the process of generating the host script information by the first script information, the second script information and the third script information, the deployment process of the host script information on the target host and the deployment of the script authority are introduced in detail: firstly, configuring a basic configuration file of host script information through first script information, then, distributing an execution action of the host script information through second script information, finally, adding customized segmented host script information into the host script information through third script information, and realizing full-automatic generation of a script through a host layer, an intermediate cluster layer and an application layer; the target application on the target host is compiled, and is compressed into an application compression packet together with the host script information, and the application compression packet is sent to the target host for analysis, so that the deployment of the script on the target host can be realized, and the deployment flow of the script is simplified; and by adding the execution authority information of the host script, a target host and an application program which can execute the script are limited, and the pertinence of script deployment is improved.
Fig. 4 and 5 describe the generalized application script deploying apparatus in the embodiment of the present invention in detail from the perspective of the modular functional entity, and the generalized application script deploying device in the embodiment of the present invention is described in detail from the perspective of hardware processing.
Fig. 6 is a schematic structural diagram of an integrated application script deployment apparatus 600 according to an embodiment of the present invention, which may generate relatively large differences due to different configurations or performances, and may include one or more processors (CPUs) 610 (e.g., one or more processors) and a memory 620, and one or more storage media 630 (e.g., one or more mass storage devices) for storing applications 633 or data 632. Memory 620 and storage medium 630 may be, among other things, transient or persistent storage. The program stored on the storage medium 630 may include one or more modules (not shown), each of which may include a sequence of instructions operating on the generalized application script deployment apparatus 600. Still further, the processor 610 may be configured to communicate with the storage medium 630 to execute a series of instruction operations in the storage medium 630 on the integrated application script deployment device 600.
The generalized application script deployment apparatus 600 may also include one or more power supplies 640, one or more wired or wireless network interfaces 650, one or more input-output interfaces 660, and/or one or more operating systems 631, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, and the like. Those skilled in the art will appreciate that the generalized application script deployment device architecture illustrated in FIG. 6 does not constitute a limitation of generalized application script deployment devices, and may include more or fewer components than illustrated, or combine certain components, or a different arrangement of components.
The invention also provides an integrated application script deployment device, which comprises a memory and a processor, wherein the memory stores computer readable instructions, and the computer readable instructions, when executed by the processor, cause the processor to execute the steps of the integrated application script deployment method in the above embodiments.
The present invention also provides a computer readable storage medium, which may be a non-volatile computer readable storage medium, and which may also be a volatile computer readable storage medium, having stored therein instructions, which, when run on a computer, cause the computer to perform the steps of the integrated application script deployment method.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for deploying an integrated application script, the method comprising:
when a script calling request sent by a target host is received, selecting first script information corresponding to the script calling request from a host layer of a preset memory, and configuring a script configuration file corresponding to the target host according to the first script information;
selecting second script information associated with the first script information from an intermediate cluster layer of the memory, and distributing preset execution actions in the intermediate cluster layer to the script configuration file according to the second script information;
selecting third script information associated with the second script information from an application layer of the memory, and combining the script configuration file and the third script information to obtain host script information corresponding to the target host;
and deploying the host script information on the target host.
2. The method for deploying the comprehensive application script according to claim 1, wherein the configuring the script configuration file corresponding to the target host according to the first script information comprises:
analyzing the first script information to obtain a plurality of script parameters and obtain a host configuration file on the target host;
generating an editing area in each script parameter according to the host configuration file, and performing parameter entering operation on the editing area according to the script parameters;
and generating a script configuration file corresponding to the target host according to the editing area after the script parameters are entered.
3. The integrated application script deployment method of claim 2, wherein the assigning preset execution actions in the intermediate cluster layer to the script configuration file according to the second script information comprises:
copying a plurality of copies of the second script information, and configuring script templates corresponding to the copied second script information;
distributing preset execution actions to corresponding script templates based on the preset cluster life cycle corresponding to the intermediate cluster layer;
and injecting the script template which is distributed with the execution action into the script configuration file.
4. The integrated application script deployment method of any one of claims 1 to 3, wherein the combining the script configuration file and the third script information to obtain the host script information corresponding to the target host comprises:
according to the life cycle of the cluster, inheriting a corresponding script template in the script configuration file by using the third script information to obtain a plurality of pieces of segmented host script information;
and combining the script information of each segmented host to obtain the host script information corresponding to the target host.
5. The integrated application script deployment method of claim 4, wherein the deploying the host script information on the target host comprises:
acquiring a target application on the target host, and compiling the target application;
compressing the compiled target application to obtain an application compression package, and injecting the host script information into the application compression package;
and sending the application compression packet injected with the host script information to the target host for deployment.
6. The integrated application script deployment method of claim 5, further comprising, after the deploying the host script information on the target host:
adding execution authority information of the host script information according to a target execution role corresponding to the host script information;
and determining a calling mode of the host script information according to the authority information, and storing the host script information in a preset database or a preset local folder corresponding to the target host according to the calling mode.
7. The integrated application script deployment method according to claim 1, further comprising, before the step of selecting the first script information corresponding to the script call request from a host layer of a preset memory when receiving the script call request sent by the target host, the step of:
collecting script information of a cluster where the target host is located, and determining the execution type of each script information according to the script structure of each script information;
and storing each script information into a storage layer corresponding to the storage according to each script information execution type, wherein the storage layer comprises a host layer, an intermediate cluster layer and an application layer.
8. An integrated application script deployment apparatus, comprising:
the configuration module is used for selecting first script information corresponding to a script calling request from a host layer of a preset memory when the script calling request sent by a target host is received, and configuring a script configuration file corresponding to the target host according to the first script information;
the distribution module is used for selecting second script information associated with the first script information from an intermediate cluster layer of the memory and distributing preset execution actions in the intermediate cluster layer to the script configuration file according to the second script information;
the combination module is used for selecting third script information associated with the second script information from an application layer of the memory and combining the script configuration file and the third script information to obtain host script information corresponding to the target host;
and the deployment module is used for deploying the host script information on the target host.
9. An integrated application script deployment device, comprising: a memory and at least one processor, the memory having instructions stored therein;
the at least one processor invoking the instructions in the memory to cause the integrated application script deployment apparatus to perform the integrated application script deployment method of any of claims 1-7.
10. A computer readable storage medium having instructions stored thereon, wherein the instructions, when executed by a processor, implement the integrated application script deployment method of any of claims 1-7.
CN202110691304.7A 2021-06-22 2021-06-22 Comprehensive application script deployment method, device, equipment and storage medium Active CN113419743B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110691304.7A CN113419743B (en) 2021-06-22 2021-06-22 Comprehensive application script deployment method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110691304.7A CN113419743B (en) 2021-06-22 2021-06-22 Comprehensive application script deployment method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113419743A true CN113419743A (en) 2021-09-21
CN113419743B CN113419743B (en) 2023-10-20

Family

ID=77789792

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110691304.7A Active CN113419743B (en) 2021-06-22 2021-06-22 Comprehensive application script deployment method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113419743B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111782232A (en) * 2020-07-31 2020-10-16 平安银行股份有限公司 Cluster deployment method and device, terminal equipment and storage medium
US20210034398A1 (en) * 2019-07-31 2021-02-04 Rubrik, Inc. Streaming database cloning using cluster live mounts
CN112579108A (en) * 2020-12-28 2021-03-30 上海欣方智能系统有限公司 Automatic deployment method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210034398A1 (en) * 2019-07-31 2021-02-04 Rubrik, Inc. Streaming database cloning using cluster live mounts
CN111782232A (en) * 2020-07-31 2020-10-16 平安银行股份有限公司 Cluster deployment method and device, terminal equipment and storage medium
CN112579108A (en) * 2020-12-28 2021-03-30 上海欣方智能系统有限公司 Automatic deployment method and device

Also Published As

Publication number Publication date
CN113419743B (en) 2023-10-20

Similar Documents

Publication Publication Date Title
Burns et al. Kubernetes: up and running
JP7011737B2 (en) Systems and methods for connector development and integrated channel deployment
CN111324571B (en) Container cluster management method, device and system
Dearle Software deployment, past, present and future
US8171141B1 (en) Provisioning system including stack manager
US8347263B1 (en) Repository including installation metadata for executable applications
US7774762B2 (en) System including run-time software to enable a software application to execute on an incompatible computer platform
CN111966305A (en) Persistent volume allocation method and device, computer equipment and storage medium
US8214809B2 (en) Grid-enabled ANT compatible with both stand-alone and grid-based computing systems
CN105490860A (en) Method, device and system for deploying application program operation environment
US20110004564A1 (en) Model Based Deployment Of Computer Based Business Process On Dedicated Hardware
WO2017069864A1 (en) System and method for multitenant execution of os programs invoked from a multitenant middleware application
EP2223282A1 (en) Automated model generation for computer based business process
CN1549965A (en) System and method for the automatic installation and configuration of an operating system
US9612803B2 (en) System and method for use of a virtual assembly builder
KR101751515B1 (en) Apparatus, method, and computer program for testing
Van Nieuwpoort et al. User-friendly and reliable grid computing based on imperfect middleware
US20230092214A1 (en) Container-oriented linux kernel virtualizing system and method thereof
US20190034464A1 (en) Methods and systems that collect data from computing facilities and export a specified portion of the collected data for remote processing and analysis
CN114064213B (en) Quick arranging service method and system based on Kubernets container environment
CN112256359A (en) Micro-service merging method and device, electronic equipment and readable storage medium
JP2021039393A (en) Packaging support system and packaging support method
CN111596928A (en) Application control method and device and electronic equipment
CN115344273B (en) Method and system for running application software based on shelf system
CN113419743A (en) Comprehensive application script deployment method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant