Service deployment method and device, equipment and storage medium

By creating the directory and target file of the Presto service in Ambari, and using Python scripts to deploy the Presto service, the problem of tedious configuration and deployment of the Presto service is solved, and efficient Presto service deployment and management are achieved.

CN118626336APending Publication Date: 2024-09-10SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410783525.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-18
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

In the context of big data, the configuration and deployment process of Presto services are cumbersome, affecting the actual user experience, and there is a lack of efficient deployment methods.

Method used

Obtain the deployment package of the Presto service, create the directory path and target file of the Presto service in the Ambari file directory, use Python scripts to write the metainfo.xml file, build the installation, start and stop functions of the presto_coordinator and presto_work components, and manage the Presto service based on Ambari deployment operations.

Benefits of technology

It achieves efficient deployment of Presto services and simplifies the configuration and deployment process. Through Ambari's friendly access protocol and automated configuration deployment interface, all deployment configuration items of Presto are managed, and an integrated deployment process is realized.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118626336A
    Figure CN118626336A
Patent Text Reader

Abstract

The invention discloses a service deployment method and device, equipment and a storage medium, and relates to the technical field of service deployment, and the method comprises the steps: obtaining a deployment package of a Presto service; creating a directory path and a target file of the Presto service under the Ambari file directory to obtain a target file directory of the Ambari integrated Presto service; the target file is an identification file of an Ambari integrated third-party service and contains label item information of a Presto service; and performing a deployment operation of the Presto service based on the target file directory and the deployment package so as to manage and deploy the Presto service through Ambari. Therefore, according to the method and the device, the presto service can be deployed based on the Ambari configuration, and according to the deployment configuration item of the presto and the third-party service access protocol, the deployment configuration item of the presto is managed, so that efficient deployment of the presto service can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of service deployment, and in particular to a service deployment method, device, equipment and storage medium. Background Art

[0002] In the context of big data, there are many types of data, complex and huge content, and the processing speed is relatively fast, which are characteristics that traditional information data do not have. Especially with the development of information technology such as the Internet, big data has been widely used in all walks of life and has given full play to its advantages. Presto (distributed data query tool) can connect to multiple databases, but the configuration and deployment process in actual applications is relatively cumbersome; the complicated configuration and deployment process of this service will affect the user experience in actual scenarios.

[0003] It can be seen that how to efficiently configure and deploy services is a problem to be solved in this field. Summary of the invention

[0004] In view of this, the purpose of the present invention is to provide a service deployment method, apparatus, device and storage medium, which can deploy Presto service based on Ambari configuration, manage Presto deployment configuration items according to Presto deployment configuration items and third-party service access protocols, and realize efficient deployment of Presto service. The specific scheme is as follows:

[0005] In a first aspect, the present application provides a service deployment method, comprising:

[0006] Get the deployment package of the Presto service;

[0007] Create a directory path and target file of the Presto service in the Ambari file directory to obtain a target file directory for Ambari to integrate the Presto service; the target file is an identification file for Ambari to integrate a third-party service and contains label item information of the Presto service;

[0008] A deployment operation of the Presto service is performed based on the target file directory and the deployment package, so as to manage and deploy the Presto service through the Ambari.

[0009] Optionally, obtaining the deployment package of the presto service includes:

[0010] Obtain a deployment package of the Presto service according to the uniform resource identifier of the Presto service.

[0011] Optionally, the method further includes:

[0012] The metainfo.xml file written based on Python script is the target file.

[0013] Optionally, the tag item information includes a components tag item in the target file; wherein the method further includes:

[0014] The components tag item is constructed based on the presto_coordinator component and the presto_work component.

[0015] Optionally, the method further includes:

[0016] The python script code of the presto_coordinator component and the presto_work component is constructed based on the installation function, the start function and the stop function of the presto_coordinator component.

[0017] Optionally, the deployment operation of the Presto service includes:

[0018] The installation function in the python script code is used to execute the shell command through the execute method to complete the deployment operation of the Presto service.

[0019] Optionally, the deployment operation of the Presto service includes:

[0020] The startup function in the python script code is used to execute the startup script in the target file directory to start the presto_coordinator, and the deployment process of the Presto service is monitored in real time through a process identifier.

[0021] In a second aspect, the present application provides a service deployment device, including:

[0022] The deployment package acquisition module is used to obtain the deployment package of the Presto service;

[0023] A directory creation module is used to create a directory path and a target file of the Presto service in the Ambari file directory to obtain a target file directory of the Presto service integrated with Ambari; the target file is an identification file of the third-party service integrated with Ambari and contains label item information of the Presto service;

[0024] A service deployment module is used to perform a deployment operation of the Presto service based on the target file directory and the deployment package, so as to manage and deploy the Presto service through the Ambari.

[0025] In a third aspect, the present application provides an electronic device, including:

[0026] Memory, used to store computer programs;

[0027] A processor is used to execute the computer program to implement the service deployment method as described above.

[0028] In a fourth aspect, the present application provides a computer-readable storage medium for storing a computer program, which, when executed by a processor, implements the service deployment method as described above.

[0029] It can be seen that this application can obtain the deployment package of the Presto service; create the directory path and target file of the Presto service under the Ambari file directory to obtain the target file directory of the Ambari integrated Presto service; the target file is the identification file of the third-party service integrated by Ambari, and contains the label item information of the Presto service; then perform the deployment operation of the Presto service based on the target file directory and the deployment package to manage and deploy the Presto service through Ambari. In this way, this application can deploy the Presto service based on the Ambari configuration. Ambari provides a friendly third-party service access protocol and an extended interface for automated configuration and deployment, which simplifies the complicated configuration and deployment process of many services. According to the deployment configuration items of Presto and the third-party service access protocol, the extended interface of Ambari is adapted so that Ambari can manage all deployment configuration items of Presto and manage the integrated deployment process of Presto, thereby realizing the efficient deployment of Presto services. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0031] Figure 1 A flow chart of a service deployment method disclosed in this application;

[0032] Figure 2 A flow chart of a specific service deployment method disclosed in this application;

[0033] Figure 3 A schematic diagram of the structure of a service deployment device disclosed in this application;

[0034] Figure 4 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION

[0035] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0036] See also Figure 1 As shown, an embodiment of the present invention discloses a service deployment method, including:

[0037] Step S11: Get the deployment package of the Presto service.

[0038] This application can manage the integrated deployment of Presto through Ambari (cluster management tool); the said obtaining the deployment package of the presto service can include: obtaining the deployment package of the Presto service according to the uniform resource identifier of the Presto service. Specifically, the deployment package can be obtained from the uri (Uniform Resource Locator) of presto to the specified path, or based on the pre-made offline deployment package placed on the ftp (File Transfer Protocol) server, the deployment package can be uniformly obtained to the specified path through the wget (tool for downloading files) command.

[0039] Step S12: Create a directory path and a target file for the Presto service in the Ambari file directory to obtain a target file directory for Ambari-integrated Presto service; the target file is an identification file for Ambari-integrated third-party services and contains label item information for the Presto service.

[0040] Furthermore, in a specific embodiment, the directory path and target file of the presto service can be created in the ambari file directory (the default path is / var / lib / ambari-server / resources / stacks / HDP) to form a file directory of the ambari integrated presto service. In addition, a metainfo.xml file can be written as the target file of the presto service. Metainfo.xml is an identification file for ambari integrated third-party services, and the label item information of the presto service is supplemented in a standard format. In a specific embodiment, it can also include: a metainfo.xml file written based on a python (a programming language) script as the target file.

[0041] In a specific embodiment, the tag item information includes the components tag item in the target file; wherein, it may also include: constructing the components tag item based on the presto_coordinator component and the presto_work component. Specifically, it should be noted that the target file of the presto service includes the service tag item, the name tag item corresponding to the service, the components tag item, the name tag item corresponding to the components, the commandScript tag item, the script tag item, and the scriptType tag item; wherein, the integrated service is accessed as a third-party service of ambari, and the configuration items of the service are configured in the service tag item; the name tag item corresponding to the service is used to indicate the name of the service and the customized configuration; the components tag item is used to indicate the components included in the integrated service; the name tag item corresponding to the components is used to indicate the component name and the customized configuration; the commandScript tag item is used to indicate the Python script; the script tag item is used to specify the script scanning path; and the scriptType tag item is used to indicate the script language type. The components tag item in the presto service includes the presto_coordinator component and / or the presto_work component. Furthermore, it may also include: constructing the python script code of the presto_coordinator component and the presto_work component based on the installation function, start function and stop function of the presto_coordinator component. Specifically, the script code of the presto_coordinator component includes the installation, start and stop functions of the presto_coordinator component, which are used for the scheduling and allocation of distributed sql (Structured Query Language) commands and work registration; the script code of the presto_work component includes the installation, start and stop functions of the presto_coordinator component, which are used for the distributed execution of sql commands.

[0042] Step S13: Perform a deployment operation of the Presto service based on the target file directory and the deployment package, so as to manage and deploy the Presto service through the Ambari.

[0043] In this embodiment, the deployment operation process of the Presto service may include: using the installation function in the python script code and executing the shell command through the execute method to complete the deployment operation of the Presto service. Specifically, the installation function def install of the presto_coordinator component is used to execute the shell command through the Execute method, including creating a data storage directory, creating a log storage directory, obtaining the presto-coordinator.tar.gz deployment installation package, and decompressing the deployment installation package to complete the installation. Correspondingly, the deployment operation process of the Presto service may include: using the startup function in the python script code to execute the startup script in the target file directory to start the presto_coordinator, and monitoring the deployment process of the Presto service in real time through the process identifier. Specifically, the startup function def start of the presto_coordinator component is used to execute the launcher start script in the bin of the installation directory, start presto_coordinator, query and save pid (Process Identification) to monitor the real-time status.

[0044] In a specific embodiment, the metainfo.xml of the presot service is as follows:

[0045] <?xml version="1.0"?>

[0046] <metainfo>

[0047] <schemaversion> 2.0< / schemaversion>

[0048] <services>

[0049] <service>

[0050] <name> PRESTO< / name>

[0051] <displayname> Presto< / displayname>

[0052] <comment> Presto Service< / comment>

[0053] <version> 3.1.5< / version>

[0054] <components>

[0055] <component>

[0056] <name> PRESTO_COORDINATOR< / name>

[0057] <displayname> PRESTO Coordinator< / displayname>

[0058] <category> MASTER< / category>

[0059] <cardinality> 1< / cardinality>

[0060] <commandscript>

[0061] <script>scripts / coordinator.py< / script>

[0062] <scripttype> PYTHON< / scripttype>

[0063] <timeout> 1800< / timeout>

[0064] < / commandscript>

[0065] < / component>

[0066] <component>

[0067] <name> PRESTO_WORKER< / name>

[0068] <displayname> PRESTO WORKER< / displayname>

[0069] <category> MASTER< / category>

[0070] <cardinality> 3+< / cardinality>

[0071] <commandscript>

[0072] <script>scripts / worker.py< / script>

[0073] <scripttype> PYTHON< / scripttype>

[0074] <timeout> 1800< / timeout>

[0075] < / commandscript>

[0076] < / component>

[0077] < / components>

[0078] <osspecifics>

[0079] <osspecific>

[0080] <osfamily> any< / osfamily>

[0081] < / osspecific>

[0082] < / osspecifics>

[0083] <configuration-dependencies>

[0084] <config-type> presto-config< / config-type>

[0085] < / configuration-dependencies>

[0086] <quicklinksconfigurations>

[0087] <quicklinksconfiguration>

[0088] <filename> quicklinks.json< / filename>

[0089] <default> true< / default>

[0090] < / quicklinksconfiguration>

[0091] < / quicklinksconfigurations>

[0092] < / service>

[0093] < / services>

[0094] < / metainfo>

[0095] The python script of the presto_cooridator component is as follows:

[0096] class Master(Script):

[0097] def install(self, env):

[0098] import params

[0099] # create install path and storage path

[0100] Execute('mkdir -p / export / software')

[0101] Execute('mkdir -p / export / servers')

[0102] # create data dir to save log and other files

[0103] Execute('mkdir -p / file / data / presto')

[0104] # get prosto-coordinator package

[0105] Execute('wget -P / export / software / {0} '.format(params.presto_coordinator_download))

[0106] # tar presto-server package

[0107] Execute('tar -zvxf / export / software / presto-coordinator.tar.gz-C / export / servers / ')

[0108] # create etc path

[0109] Execute('mkdir -p / export / servers / presto-server-315 / etc / ')

[0110] Logger.info('Presto Install Complete')

[0111] def configure(self, env):

[0112] import params

[0113] env.set_params(params)

[0114] # delete pid directory

[0115] Directory([params.presto_pid_dir],

[0116] action="delete")

[0117] # create pid directory

[0118] Directory([params.presto_pid_dir],

[0119] mode=0755,

[0120] cd_access='a',

[0121] create_parents=True )

[0123] Logger.info("Presto Configuration Complete")

[0124] def start(self,env):

[0125] import params

[0126] env.set_params(params)

[0127] self.configure(env)

[0128] Execute(' / export / servers / presto-server-315 / bin / launcherstart')

[0129] # get presto pid and write file

[0130] Execute(

[0131] 'ps -ef | grep presto | grep -v grep | awk \'{print $2}\'> ' + params.presto_pid_file)

[0132] Logger.info('Presto Start Complete')

[0133] def stop(self, env):

[0134] import params

[0135] env.set_params(params)

[0136] # Stop Elasticsearch

[0137] Execute('ps -ef | grep presto | grep -v grep | awk \'{print $2}\' | xargs kill -9',

[0138] ignore_failures=True)

[0139] # delete pid file

[0140] File([params.presto_pid_file],

[0141] action="delete")

[0142] Logger.info("Presto Stop complete!")

[0143] It can be seen that the script code of the presto_coordinator component covers the installation, start, stop and other functions of the presto_coordinator component. Specifically, presto_coordinator is responsible for the scheduling and allocation of distributed SQL commands and the work registration center. def install: installation function. Execute some shell commands through the Execute method, including creating a data storage directory, creating a log storage directory, obtaining the presto-coordinator.tar.gz deployment installation package, and decompressing the deployment installation package to complete the installation. def start: startup function. Execute the launcher start script in the bin in the installation directory to start presto_coordinator, and query and save the pid to monitor the real-time status. def stop: stop function. Execute the shell command to kill the process and delete the process file. def status: status monitoring function.

[0144] Correspondingly, the script code of the presto_work component can be as follows:

[0145] class Master(Script):

[0146] def install(self, env):

[0147] import params

[0148] # create install path and storage path

[0149] Execute('mkdir -p / export / software')

[0150] Execute('mkdir -p / export / servers')

[0151] # create data dir to save log and other files

[0152] Execute('mkdir -p / file / data / presto')

[0153] # get prosto-coordinator package

[0154] Execute('wget -P / export / software / {0} '.format(params.presto_worker_download))

[0155] # tar presto-server package

[0156] Execute('tar -zvxf / export / software / presto-worker.tar.gz -C / export / servers / ')

[0157] # create etc path

[0158] Execute('mkdir -p / export / servers / presto-server-315 / etc / ')

[0159] Logger.info('Presto Install Complete')

[0160] def configure(self, env):

[0161] import params

[0162] env.set_params(params)

[0163] # delete pid directory

[0164] Directory([params.presto_pid_dir],

[0165] action="delete")

[0166] # create pid directory

[0167] Directory([params.presto_pid_dir],

[0168] mode=0755,

[0169] cd_access='a',

[0170] create_parents=True )

[0172] Logger.info("Presto Configuration Complete")

[0173] def start(self,env):

[0174] import params

[0175] env.set_params(params)

[0176] self.configure(env)

[0177] Execute(' / export / servers / presto-server-315 / bin / launcherstart')

[0178] # get presto pid and write file

[0179] Execute(

[0180] 'ps -ef | grep presto | grep -v grep | awk \'{print $2}\'> ' + params.presto_pid_file)

[0181] Logger.info('Presto Start Complete')

[0182] def stop(self, env):

[0183] import params

[0184] env.set_params(params)

[0185] # Stop Elasticsearch

[0186] Execute('ps -ef | grep presto | grep -v grep | awk \'{print $2}\' | xargs kill -9',

[0187] ignore_failures=True)

[0188] # delete pid file

[0189] File([params.presto_pid_file],

[0190] action="delete")

[0191] Logger.info("Presto Stop complete!")

[0192] def status(self, env):

[0193] import params

[0194] env.set_params(params)

[0195] check_process_status(params.presto_pid_file)

[0196] if __name__ == "__main__":

[0197] Master().execute()

[0198] It can be seen that the script code of the presto_work component covers the installation, start, stop and other functions of the presto_coordinator component. presto_work is responsible for the distributed execution of SQL commands. The implementation principle of the script code is consistent with that of presto_coordinator.

[0199] It can be seen that this application can deploy the Presto service based on Ambari configuration. Ambari provides a friendly third-party service access protocol and an extended interface for automated configuration and deployment, which simplifies the complicated configuration and deployment processes of many services. According to Presto's deployment configuration items and the third-party service access protocol, Ambari's extended interface is adapted, so that Ambari can manage all Presto's deployment configuration items and manage Presto's integrated deployment process, thereby achieving efficient deployment of Presto services.

[0200] like Figure 2 As shown, the embodiment of the present application discloses a service deployment method, which specifically includes:

[0201] S21, disassemble and analyze the source code of ambari;

[0202] S22, manages and monitors cluster services through Python scripts based on the Ambari framework;

[0203] S23, obtain the deployment package of the presto service;

[0204] S24, create a directory path and target file of the presto service under the ambari file directory to form a file directory of the ambari integrated presto service;

[0205] S25, write the metainfo.xml file as the target file of the presto service;

[0206] S26, restart ambari-server to receive the compilation instructions of presto service;

[0207] S27, build the ambari-agent-presto service according to the target file of the presto service and the deployment package of the presto service.

[0208] It can be seen that this implementation can realize the automatic configuration and deployment of presto services based on Ambari; based on the Python technology stack for development, by disassembling and analyzing the original code of Ambari, the ambari framework manages and monitors the cluster service through Python scripts, and the Python scripts cover the entire process of the service life cycle, including deployment, startup, status monitoring, stop, destruction, etc. Since Ambari is an open source service for visual management of the Hadoop ecosystem, it supports centralized management of HDFS, YARN, MAPREDUCE, ZOOKEEPER, HIVE, HBASE, SPARK, KAFKA and other components in the Hadoop system, which can be centrally managed by Ambari. At the same time, Ambari provides a friendly third-party service access protocol and an extended interface for automated configuration and deployment, which simplifies the complicated configuration and deployment process of many services. According to the deployment configuration items of Presto and the third-party service access protocol, the extended interface of Ambari is adapted, so that Ambari can manage all the deployment configuration items of Presto and manage the integrated deployment process of Presto, so that it can efficiently deploy the complicated configuration and deployment process of services.

[0209] like Figure 3 As shown, the embodiment of the present application discloses a service deployment device, including:

[0210] A deployment package acquisition module 11 is used to acquire a deployment package for the Presto service;

[0211] The directory creation module 12 is used to create the directory path and target file of the Presto service in the Ambari file directory to obtain the target file directory of the Ambari integrated Presto service; the target file is an identification file of the Ambari integrated third-party service and contains the label item information of the Presto service;

[0212] The service deployment module 13 is used to perform a deployment operation of the Presto service based on the target file directory and the deployment package, so as to manage and deploy the Presto service through the Ambari.

[0213] It can be seen that this application can deploy the Presto service based on Ambari configuration. Ambari provides a friendly third-party service access protocol and an extended interface for automated configuration and deployment, which simplifies the complicated configuration and deployment processes of many services. According to Presto's deployment configuration items and the third-party service access protocol, Ambari's extended interface is adapted, so that Ambari can manage all Presto's deployment configuration items and manage Presto's integrated deployment process, thereby achieving efficient deployment of Presto services.

[0214] In a specific embodiment, the deployment package acquisition module 11 may include:

[0215] A deployment package acquisition unit is used to acquire the deployment package of the Presto service according to the uniform resource identifier of the Presto service.

[0216] In a specific embodiment, the device may further include:

[0217] The file writing module is used to write the metainfo.xml file as the target file based on the python script.

[0218] In a specific embodiment, the device may further include:

[0219] The label item building module is used to build the components label item based on the presto_coordinator component and the presto_work component.

[0220] In another specific embodiment, the device may further include:

[0221] A component building module is used to build the Python script code of the presto_coordinator component and the presto_work component based on the installation function, the start function and the stop function of the presto_coordinator component.

[0222] In a specific embodiment, the service deployment module 13 may include:

[0223] The first deployment unit is used to utilize the installation function in the Python script code and execute a shell command through an execute method to complete the deployment operation of the Presto service.

[0224] In another specific embodiment, the service deployment module 13 may include:

[0225] The second deployment unit is used to use the startup function in the Python script code to execute the startup script in the target file directory to start the presto_coordinator, and monitor the deployment process of the Presto service in real time through a process identifier.

[0226] Furthermore, the present application also discloses an electronic device. Figure 4 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram cannot be regarded as any limitation on the scope of use of the present application.

[0227] Figure 4 A schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the service deployment method disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0228] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.

[0229] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.

[0230] The operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device 20, which can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the service deployment method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks.

[0231] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the aforementioned disclosed service deployment method. The specific steps of the method can refer to the corresponding contents disclosed in the aforementioned embodiments, and will not be repeated here.

[0232] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0233] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0234] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0235] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0236] The technical solution provided by the present application is introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technicians in this field, according to the idea of ​​the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A service deployment method, characterized in that: include: Get the deployment package of the Presto service; Create a directory path and target file of the Presto service in the Ambari file directory to obtain a target file directory for Ambari to integrate the Presto service; the target file is an identification file for Ambari to integrate a third-party service and contains label item information of the Presto service; A deployment operation of the Presto service is performed based on the target file directory and the deployment package, so as to manage and deploy the Presto service through the Ambari.

2. The service deployment method according to claim 1, characterized in that: The deployment package of the presto service is obtained, including: Obtain a deployment package of the Presto service according to the uniform resource identifier of the Presto service.

3. The service deployment method according to claim 1, characterized in that: Also includes: The metainfo.xml file written based on Python script is the target file.

4. The service deployment method according to any one of claims 1 to 3, characterized in that: The tag item information includes the components tag item in the target file; wherein the method further includes: The components tag item is constructed based on the presto_coordinator component and the presto_work component.

5. The service deployment method according to claim 4, characterized in that: Also includes: The python script code of the presto_coordinator component and the presto_work component is constructed based on the installation function, the start function and the stop function of the presto_coordinator component.

6. The service deployment method according to claim 5, characterized in that: The deployment process of the Presto service includes: The installation function in the python script code is used to execute the shell command through the execute method to complete the deployment operation of the Presto service.

7. The service deployment method according to claim 5, characterized in that: The deployment process of the Presto service includes: The startup function in the python script code is used to execute the startup script in the target file directory to start the presto_coordinator, and the deployment process of the Presto service is monitored in real time through a process identifier.

8. A service deployment device, characterized in that: include: The deployment package acquisition module is used to obtain the deployment package of the Presto service; A directory creation module is used to create a directory path and a target file of the Presto service in the Ambari file directory to obtain a target file directory of the Presto service integrated with Ambari; the target file is an identification file of the third-party service integrated with Ambari and contains label item information of the Presto service; A service deployment module is used to perform a deployment operation of the Presto service based on the target file directory and the deployment package, so as to manage and deploy the Presto service through the Ambari.

9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the service deployment method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: Used to store a computer program, which, when executed by a processor, implements the service deployment method according to any one of claims 1 to 7.