Ambari tool deployment method and device
By incorporating the source code package and installation configuration files of the target service components into the HDP source deployment file and generating the target Ambari deployment file, the automated deployment of Ambari tools is achieved, solving the problem of inefficient deployment in the existing technology, and improving operation and maintenance efficiency and flexibility.
Patent Information
- Application Number
- CN202510014338.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-03
- Publication Date
- 2025-04-11
AI Technical Summary
In the prior art, the deployment of Ambari tool with integrated Flink service components requires manual modification of the installation configuration file and writing customized scripts, resulting in low deployment efficiency.
By obtaining the source code package and installation configuration file of the target service component, integrating it into the HDP source deployment file, and adjusting and packaging the Ambari source code according to the installation configuration file, generating the target Ambari deployment file and the target HDP deployment file, realizing the automated deployment of Ambari tools with integrated target service components in the HDP cluster.
This avoids tedious configuration and potential errors in traditional manual deployment of Flink services, and improves the operation and maintenance efficiency and flexibility of big data clusters.
Smart Images

Figure CN119806553A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer software technology, and in particular to an Ambari tool deployment method and device. Background Art
[0002] Apache Ambari is an open management platform that allows users to quickly build and manage Hadoop clusters. When using Ambari to build and manage Hadoop clusters, users usually need to perform secondary development on Ambari based on their business needs, such as modifying Ambari's client interface, adding or deleting Ambari's functional modules, etc. Apache Flink, as a distributed processing engine, executes arbitrary programs in a data parallel and pipeline manner, and is widely used in business scenarios in the field of big data for state calculation of unbounded and bounded data streams. At present, the installation and deployment of Flink service components requires manual modification of a large number of configuration files and customized script compilation. Therefore, how to efficiently and automatically deploy Ambari with Flink service components has become an urgent problem to be solved.
[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0004] The embodiments of the present application provide an Ambari tool deployment method and device to at least solve the technical problem that when deploying the Ambari tool integrated with the Flink service component, it is necessary to manually modify the installation configuration file and write a customized script, resulting in low deployment efficiency.
[0005] According to one aspect of an embodiment of the present application, an Ambari tool deployment method is provided, including: obtaining a target source code package and a target installation configuration file of a target service component; incorporating the target source code package into an HDP source deployment file to obtain a target HDP deployment file, and adjusting and packaging the Ambari source code according to the target installation configuration file to obtain a target Ambari deployment file; and deploying a target Ambari tool integrated with a target service component in an HDP cluster according to the target Ambari deployment file and the target HDP deployment file.
[0006] Optionally, merging the target source code package into the HDP source deployment file to obtain the target HDP deployment file includes: packaging the target source code package into an installable unit, wherein the type of the installable unit includes at least one of the following: a Red Hat package management system RPM package, a Debian package; creating a new file node in the file directory of the HDP source deployment file, and storing the installable unit in the new file node to obtain the target HDP deployment file.
[0007] Optionally, the Ambari source code is adjusted and packaged according to the target installation configuration file to obtain the target Ambari deployment file, including: creating a new Stack node in the Stack directory of the Ambari source code, and writing the target installation configuration file into the new Stack node to obtain the adjusted Ambari source code; packaging the adjusted Ambari source code into the target format to obtain the target Ambari deployment file.
[0008] Optionally, the Stack directory of the Ambari source code also includes: at least one historical Stack node, and the historical Stack node includes an installation configuration file corresponding to at least one service component integrated by the historical Ambari tool, wherein the service component includes at least one of the following: Zookeeper, HDFS, YARN.
[0009] Optionally, the target installation configuration file also includes: a sub-file describing the inheritance relationship between the historical Stack node and the new Stack node.
[0010] Optionally, a target Ambari tool integrated with a target service component is deployed in the HDP cluster according to the target HDP deployment file and the target Ambari deployment file, including: receiving a compilation instruction for the target service component sent by the target object; compiling the target source code package stored in the target HDP deployment file according to the compilation instruction to obtain a corresponding executable file; and deploying the target Ambari tool integrated with the target service component in the HDP cluster according to the executable file and the target Ambari deployment file.
[0011] Optionally, a target Ambari tool integrated with a target service component is deployed in the HDP cluster based on the executable file and the target Ambari deployment file, including: determining a target historical Stack node that has an inheritance relationship with the new Stack node based on a descriptor file in the target Ambari deployment file, and obtaining installation configuration files of all service components stored in the target historical Stack node; and deploying a target Ambari tool integrated with a target service component in the HDP cluster based on the executable file, the target installation configuration file in the target Ambari deployment file, and the installation configuration files of all service components stored in the target historical Stack node.
[0012] According to another aspect of an embodiment of the present application, an Ambari tool deployment device is also provided, including: a receiving module, used to obtain a target source code package and a target installation configuration file of a target service component; a determination module, used to incorporate the target source code package into the HDP source deployment file to obtain a target HDP deployment file, and adjust and package the Ambari source code according to the target installation configuration file to obtain a target Ambari deployment file; a deployment module, used to deploy a target Ambari tool integrated with a target service component in an HDP cluster according to the target Ambari deployment file and the target HDP deployment file.
[0013] According to another aspect of an embodiment of the present application, a non-volatile storage medium is also provided, which includes a stored computer program, wherein the device where the non-volatile storage medium is located executes the above-mentioned Ambari tool deployment method by running the computer program.
[0014] According to another aspect of an embodiment of the present application, a computer program product is also provided, the computer program product comprising: a computer program, wherein when the computer program is executed by a processor, the above-mentioned Ambari tool deployment method is implemented.
[0015] In an embodiment of the present application, the Ambari server generates a target Ambari deployment file and a target HDP deployment file based on the source code package and installation configuration file of the target service component, and uses the target Ambari deployment file and the target HDP deployment file to automatically deploy the target service component on each Ambari tool in the HDP cluster, thereby obtaining a target Ambari tool integrated with the target service component. This not only avoids the cumbersome configuration and potential errors in the traditional manual deployment of Flink services, but also improves the operation and maintenance efficiency and flexibility of the big data cluster. This solves the technical problem that when deploying the Ambari tool integrated with the Flink service component, it is necessary to manually modify the installation configuration file and write a customized script, resulting in low deployment efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0017] Figure 1 is a hardware structure block diagram of an optional computer terminal (or mobile device) according to an embodiment of the present application;
[0018] Figure 2 It is a flowchart of an optional Ambari tool deployment method according to an embodiment of the present application;
[0019] Figure 3 It is a structural diagram of an optional Ambari tool deployment device according to an embodiment of the present application. DETAILED DESCRIPTION
[0020] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0021] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0022] In addition, the relevant information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for display, data for analysis, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. For example, an interface is set up between this system and the relevant user or organization. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or organization through the interface, and obtain relevant information after receiving the consent information fed back by the aforementioned user or organization.
[0023] In order to better understand the embodiments of the present application, the technical terms involved in the embodiments of the present application are explained as follows:
[0024] Ambari is a top open source project of the Apache Software Foundation. It is a tool for centralized deployment, management, and monitoring of Hadoop distributed clusters. Deployment refers to automating Hadoop software and automatically handling dependencies between services and components; management refers to starting, stopping, restarting, and managing multiple versions of configuration files for Hadoop service components; monitoring refers to monitoring the current status of Hadoop services (survival of component nodes, YARN task execution, etc.) and the status of the current host (memory, hard disk, CPU, network, etc.). The Ambari framework uses the Serveer / Client model and is mainly composed of two parts: Ambari Server and Ambari Agent. In simple terms, users notify Ambari Agent to install the corresponding software through AmbariServer; Ambari Agent will periodically send the status of each cluster to Ambari Server according to the software; and finally, these status information will be presented in the Ambari GUI, which is convenient for users to understand the various states of the cluster and perform corresponding maintenance.
[0025] Apache Flink is a framework and distributed processing engine for stateful computation on unbounded and bounded data streams. Flink can run in all common cluster environments and can perform computations at memory speed and at any scale. Apache Flink is powerful and supports the development and operation of many different types of applications. Its main features include: batch-stream integration, sophisticated state management, event time support, and exactly-once state consistency guarantee.
[0026] Hortonworks Data Platform (HDP for short) is a 100% open source data management platform based on Apache Hadoop provided by Hortonworks. It allows users to load, store, process and manage data of almost any format and any size. Therefore, HDP, as the foundation of the next generation of enterprise data architecture, includes all the necessary components, allowing enterprises to quickly process big data.
[0027] Example 1
[0028] Currently, the installation and deployment of Flink service components requires a lot of manual configuration file modifications and customized script compilation, resulting in low deployment efficiency. In order to solve this problem, the present application provides a relevant solution in the embodiments, which will be described in detail below.
[0029] According to an embodiment of the present application, an embodiment of an Ambari tool deployment method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0030] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 FIG. 1 shows a hardware structure block diagram of a computer terminal (or mobile device) for implementing the Ambari tool deployment method. Figure 1 As shown, the computer terminal 10 (or mobile device 10) may include one or more (102a, 102b, ..., 102n are used to illustrate) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0031] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10 (or mobile device). As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0032] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the Ambari tool deployment method in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, the Ambari tool deployment method of the above-mentioned application is implemented. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0033] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0034] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 (or mobile device).
[0035] In the above operating environment, Figure 2 is a flow chart of an optional Ambari tool deployment method according to an embodiment of the present application, such as Figure 2 As shown, the method at least includes steps S202-S206, wherein:
[0036] Step S202: Obtain a target source code package and a target installation configuration file of a target service component.
[0037] In the technical solution provided in step S202, the above-mentioned target service components include but are not limited to: Apache Flink, Hadoop Distributed File System (HDFS), Yet Another Resource Negotiator (YARN), Apache ZooKeeper, etc. These service components are key components in the big data cluster. In addition, the target source code package of the target service component contains the original code of the target service component; the target installation configuration file defines the specific parameters for the installation and configuration of the target service component in the cluster. In addition, the Ambari server can also obtain the full life cycle script, which is an important part of the Ambari tool to realize automated deployment, configuration, start, stop, monitoring and maintenance services. The script may include but is not limited to: installation scripts, configuration scripts, start and stop scripts, monitoring scripts, upgrade scripts, etc.
[0038] Step S204: Incorporate the target source code package into the HDP source deployment file to obtain the target HDP deployment file, and adjust and package the Ambari source code according to the target installation configuration file to obtain the target Ambari deployment file.
[0039] In the technical solution provided in step S204, the Ambari server merges the target source code package of the target service component into the HDP source deployment file to provide support for the installation and deployment of the target service component; at the same time, the Ambari source code is secondary developed with the pre-written target installation configuration file of the target service component to obtain the target Ambari deployment file. For ease of use, the Ambari server can store the generated target Ambari deployment file and the target HDP deployment file in a preset database.
[0040] Step S206: deploy the target Ambari tool integrated with the target service component in the HDP cluster according to the target Ambari deployment file and the target HDP deployment file.
[0041] In the technical solution provided in step S206, the Ambari server automatically deploys the target service component on each Ambari tool in the HDP cluster according to the target Ambari deployment file and the target HDP deployment file to obtain the target Ambari tool integrated with the target service component.
[0042] Based on the scheme defined in the above steps S202 to S206, it can be learned that in an embodiment, the Ambari server generates a target Ambari deployment file and a target HDP deployment file based on the source code package and installation configuration file of the target service component, and uses the target Ambari deployment file and the target HDP deployment file to automatically deploy the target service component on each Ambari tool in the HDP cluster to obtain a target Ambari tool integrated with the target service component. This not only avoids the cumbersome configuration and potential errors in the traditional manual deployment of Flink services, but also improves the operation and maintenance efficiency and flexibility of the big data cluster. This solves the technical problem that when deploying the Ambari tool integrated with the Flink service component, it is necessary to manually modify the installation configuration file and write a customized script, resulting in low deployment efficiency.
[0043] The above method of this embodiment is further introduced below.
[0044] As an optional implementation, the Ambari server can build the target HDP deployment file according to the following method, including: first, packaging the target source code package of the target service component into an installable unit, wherein the type of the installable unit includes at least one of the following: Red Hat Package Management System RPM package, Debian package; then, creating a new file node in the file directory of the HDP source deployment file, and storing the installable unit in the new file node to obtain the target HDP deployment file.
[0045] Specifically, taking the Flink component as an example, the construction process of the above HDP deployment file is briefly described: obtain the source code package of the Flink component and ensure that the source code package is complete and correct (including all necessary dependent libraries and resource files), and configure the packaging environment, including creating a PRM construction directory structure; then, write the RPM SPEC file, which is the blueprint of the RPM packaging, which not only describes the construction process, installation directory, file structure, dependencies, version information, license, etc. of the component service in detail, but also defines scripts for compilation, installation, uninstallation, inspection and upgrade to ensure the correct construction and deployment of the RPM package; then, put the Flink source code and SPEC file into the construction directory, and use the RPM packaging tool (such as the rpmbuild command), a special packaging tool for the big data ecosystem, to compile and build according to the instructions of the SPEC file to generate the final RPM package; after the construction is completed, the generated RPM package needs to be verified to ensure that it contains all necessary files and configurations without omissions or errors, and the verified RPM package is uploaded to the file directory of the HDP source deployment file to create a new file node to obtain the target HDP deployment file.
[0046] As an optional implementation, the Ambari server can build the target Ambari deployment file according to the following method, including: first, packaging the target source code package of the target service component into an installable unit, wherein the type of the installable unit includes at least one of the following: Red Hat Package Management System RPM package, Debian package; then, creating a new file node in the file directory of the HDP source deployment file, and storing the installable unit in the new file node to obtain the target HDP deployment file.
[0047] In addition, because the Ambari server may use Ambari tools that inherit different service components when managing the HDP cluster in different time periods, that is, there may be multiple versions of the Ambari tool in the Ambari server.
[0048] In order to distinguish the target Ambari tool integrated with the target service component from other versions of the Ambari tool, the embodiment of the present application can obtain the latest version of the template Ambari deployment file according to the following method: first, create a new Stack node in the Stack directory of the Ambari source code, and write the target installation configuration file into the new Stack node to obtain the adjusted Ambari source code; then package the adjusted Ambari source code into the target format to obtain the target Ambari deployment file, wherein the target format can be RPM format or Debian format.
[0049] The above-mentioned Stack node is a collection of a series of Services (i.e., service components). Generally speaking, the Ambari server open source defines multiple different versions of Stacks. For example, HDP3.1 is a Stack, which includes one or more Services.
[0050] Therefore, the Stack directory of the Ambari source code also includes: at least one historical Stack node, and the historical Stack node includes an installation configuration file corresponding to at least one service component integrated by the historical Ambari tool, wherein the service component includes other service components other than the target service component, such as Apache Flink, HDFS, YARN, Apache ZooKeeper, etc.
[0051] In addition, the target installation configuration file sent by the target object also includes: a descriptor file (metainfo.xml) used to store the inheritance relationship between the historical Stack node and the new Stack node, which stipulates that the Ambari tool to be built can continue to inherit all service components in any historical Ambari tool in the multiple historical Ambari tools already existing in the Ambari server.
[0052] For example, the Ambari client already supports service components in the Hadoop ecosystem, such as HDFS, YARN, HBase, and ZooKeeper. When integrating new Flink service components into the target Ambari client to be built, the Ambari server can obtain the management templates of these service components from the existing version of the Ambari client through inheritance, without having to rewrite the installation, configuration, and monitoring logic of the service components. In this way, the Flink service component can easily work with existing service components to share cluster resources and configurations.
[0053] Furthermore, since the target HDP deployment file generated in the Ambari server stores the source code package of the target service component, in order to ensure that the code of the target service component is adapted and optimized to the hardware architecture and operating system environment of the target HDP cluster, the source code package of the target service component needs to be compiled, as follows: first, receive the compilation instructions for the target service component sent by the target object; then, compile the target source code package stored in the target HDP deployment file according to the compilation instructions to obtain the corresponding executable file (Executable File), that is, a binary file; finally, deploy the target Ambari tool integrated with the target service component in the HDP cluster according to the executable file and the target Ambari deployment file.
[0054] The compilation process converts the source code into executable files or bytecodes, which are required to run the service components. The executable files run directly on the system without interpretation or further compilation, which can improve the startup speed and running efficiency of the service components. At the same time, during compilation, the dependencies between the target service components and other system components (such as HDFS, YARN, ZooKeeper, etc.) can be processed to ensure that all necessary libraries and resources are correctly linked and included, which helps the target service components work with other components on the HDP cluster and avoid runtime dependency issues.
[0055] When the Ambari server is significantly updated, changed in configuration, or integrated with a new service, it is usually restarted to ensure that all changes can be correctly applied. Therefore, after the Ambari server is restarted, the Ambari server needs to scan the file node after restarting. After the Ambari server scans the relevant information of the target service component stored under the new Stack node, it can receive the compilation command for the target service component initiated by the user through the Ambari client, wherein the "compilation command" actually refers to an instruction sent by the user to the Ambari server through the Ambari graphical interface or API interface, requiring the Ambari server to prepare and compile the target service component so that it can be integrated into the Ambari tool. It should be noted that restarting the Ambari server is not a mandatory operation step, but depends on the specific situation and needs. For example, if the Ambari server is configured with a sufficiently timely file system monitoring mechanism, or if the registration of changes and new service components can be automatically processed by other means (such as hot updates or dynamic configuration loading), then restarting may not be required to trigger the discovery and registration process of the service component.
[0056] To improve work efficiency, the existing service components in the Amabari server are no longer developed separately. The Ambari server can deploy the target Ambari tool with the target service components integrated in the HDP cluster as follows:
[0057] Step S2061, according to the description subfile in the target Ambari deployment file, determine any historical Stack node that has an inheritance relationship with the new Stack node storing the target installation configuration file of the target service component, and obtain the installation configuration file of at least one service component stored in the historical Stack node;
[0058] Step S2062, deploying a target Ambari tool integrated with a target service component in the HDP cluster according to the executable file, the target installation configuration file in the target Ambari deployment file, and the installation configuration file of at least one service component stored in the historical Stack node.
[0059] In this embodiment, the Ambari server determines which historical Stack nodes the new Stack node inherits from based on the inheritance relationship defined in the metainfo.xml (description subfile). For example, if the metainfo.xml file indicates that the target Stack inherits from HDP version 2.6, the Ambari server will identify the HDP 2.6 version Stack node as a historical node.
[0060] Next, the Ambari server will obtain the installation configuration files of the corresponding service components from the determined historical Stack node. These configuration files contain the installation, startup, configuration, and monitoring logic of the service.
[0061] Then, the Ambari server will integrate the target installation configuration file of the target service component with all the installation configuration files obtained from the historical Stack node to ensure the compatibility and consistency between the new service component and the existing service component. For example, the configuration information of service components such as Zookeeper, HDFS, and YARN that the Flink service depends on. After integrating the configuration information, the Ambari server will build service templates based on these configurations. These templates will be used to deploy services in the HDP cluster. The service template contains information such as the deployment script of the service, the installation path of the service component, and the location of the configuration file.
[0062] Finally, the Ambari server deploys the target Ambari tool that integrates the target service component in the HDP cluster based on the built service template. This deployment process is executed on each node of the cluster through Ambari's automated scripts and tools, including installing software packages, configuring services, and starting service components.
[0063] In addition, after the target Ambari tool is deployed, the Ambari server will continue to monitor the status of the target service components, such as resource usage, task execution status, etc., and provide maintenance and management functions, such as service restart, upgrade, and expansion, to ensure stable operation and efficient performance of the service.
[0064] Through the above steps, the Ambari server merges the service component source code package into the HDP source deployment file and generates the target HDP deployment file. In this way, when the HDP cluster is deployed, the binary files and dependent libraries of the service components will be synchronized with the cluster environment to ensure the compatibility and operability of the service components. At the same time, by performing secondary development on Ambari according to the installation configuration file of the service component, and using the target Ambari deployment file and the target HDP deployment file, the target Ambari tool integrated with the target service component is deployed in the HDP cluster to realize the automatic compilation, installation, configuration and startup of the service component, which greatly reduces the need for manual intervention and avoids deployment failures and performance problems caused by manual configuration errors. At the same time, the unified management and monitoring of the Ambari tool improves the operation and maintenance efficiency and reliability of the big data cluster. In addition, this method also promotes the standardized deployment of service components, which facilitates the scalability of the big data cluster and the update and upgrade of service components.
[0065] Example 2
[0066] Based on Embodiment 1 of the present application, an embodiment of an Ambari tool deployment device is also provided, and the Ambari tool deployment method of the above embodiment is executed when the device is running. Figure 3 is a schematic diagram of the structure of an optional Ambari server according to an embodiment of the present application, such as Figure 3 As shown, the Ambari server includes at least a receiving module 32, a determining module 34 and a deploying module 36, wherein:
[0067] A receiving module 32, used to obtain a target source code package and a target installation configuration file of a target service component;
[0068] The determination module 34 is used to merge the target source code package into the HDP source deployment file to obtain the target HDP deployment file, and adjust and package the Ambari source code according to the target installation configuration file to obtain the target Ambari deployment file;
[0069] The deployment module 36 is used to deploy the target Ambari tool integrated with the target service component in the HDP cluster according to the target Ambari deployment file and the target HDP deployment file.
[0070] It should be noted that the various modules in the above-mentioned Ambari server can be program modules (for example, a set of program instructions that implement a certain specific function) or hardware modules. For the latter, it can be expressed in the following forms, but is not limited to this: the expression form of each of the above-mentioned modules is a processor, or the functions of each of the above-mentioned modules are implemented by a processor.
[0071] Example 3
[0072] According to an embodiment of the present application, a non-volatile storage medium is further provided, in which a program is stored, wherein when the program is running, the device where the non-volatile storage medium is located is controlled to execute the method in Example 1.
[0073] According to an embodiment of the present application, a computer program product is also provided. The computer program product includes a stored computer program, wherein the method in Embodiment 1 is implemented when the computer program is executed by a processor.
[0074] According to an embodiment of the present application, a processor is also provided, which is used to run a program, wherein the method in Example 1 is executed when the program is running.
[0075] According to an embodiment of the present application, an electronic device is also provided, wherein the electronic device includes one or more processors; a memory for storing one or more programs, and when the one or more programs are executed by one or more processors, the one or more processors are implemented to run the programs, wherein the program is configured to execute the method in the above-mentioned embodiment 1 when running.
[0076] Optionally, when the program is running, the following steps are executed: obtaining the target source code package and the target installation configuration file of the target service component; merging the target source code package into the HDP source deployment file to obtain the target HDP deployment file, and adjusting and packaging the Ambari source code according to the target installation configuration file to obtain the target Ambari deployment file; deploying the target Ambari tool integrated with the target service component in the HDP cluster according to the target Ambari deployment file and the target HDP deployment file.
[0077] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0078] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0079] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0080] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed over multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0081] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0082] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the relevant technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, Ambari server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or CD-ROM and other media that can store program code.
[0083] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for deploying an Ambari tool, characterized in that: include: Obtain the target source code package and target installation configuration file of the target service component; Incorporating the target source code package into the HDP source deployment file to obtain a target HDP deployment file, and adjusting and packaging the Ambari source code according to the target installation configuration file to obtain a target Ambari deployment file; A target Ambari tool integrated with the target service component is deployed in the HDP cluster according to the target Ambari deployment file and the target HDP deployment file.
2. The method according to claim 1, characterized in that The target source code package is merged into the HDP source deployment file to obtain the target HDP deployment file, including: Packing the target source code package into an installable unit, wherein the type of the installable unit includes at least one of the following: a Red Hat package management system RPM package and a Debian package; A new file node is created in the file directory of the HDP source deployment file, and the installable unit is stored in the new file node to obtain the target HDP deployment file.
3. The method according to claim 1, characterized in that: The Ambari source code is adjusted and packaged according to the target installation configuration file to obtain the target Ambari deployment file, including: Creating a new Stack node in the Stack directory of the Ambari source code, and writing the target installation configuration file into the new Stack node to obtain the adjusted Ambari source code; The adjusted Ambari source code is packaged into a target format to obtain the target Ambari deployment file.
4. The method according to claim 3, characterized in that The Stack directory of the Ambari source code also includes: at least one historical Stack node, and the historical Stack node includes an installation configuration file corresponding to at least one service component integrated by the historical Ambari tool, wherein the service component includes at least one of the following: Zookeeper, HDFS, YARN.
5. The method according to claim 4, characterized in that The target installation configuration file also includes: a sub-file describing the inheritance relationship between the historical Stack node and the new Stack node.
6. The method according to claim 1, characterized in that Deploying a target Ambari tool integrated with the target service component in the HDP cluster according to the target HDP deployment file and the target Ambari deployment file includes: Receiving a compilation instruction for the target service component sent by the target object; Compile the target source code package stored in the target HDP deployment file according to the compilation instruction to obtain a corresponding executable file; A target Ambari tool integrated with the target service component is deployed in the HDP cluster according to the executable file and the target Ambari deployment file.
7. The method according to claim 6, characterized in that Deploying a target Ambari tool integrated with the target service component in the HDP cluster according to the executable file and the target Ambari deployment file includes: According to the descriptor file in the target Ambari deployment file, determine the target historical Stack node that has an inheritance relationship with the new Stack node, and obtain the installation configuration files of all service components stored in the target historical Stack node; According to the executable file, the target installation configuration file in the target Ambari deployment file, and the installation configuration files of all service components stored in the target historical Stack node, the target Ambari tool integrated with the target service component is deployed in the HDP cluster.
8. An Ambari tool deployment device, characterized in that: include: A receiving module, used to obtain a target source code package and a target installation configuration file of a target service component; A determination module, configured to merge the target source code package into the HDP source deployment file to obtain a target HDP deployment file, and adjust and package the Ambari source code according to the target installation configuration file to obtain a target Ambari deployment file; A deployment module is used to deploy a target Ambari tool integrated with the target service component in the HDP cluster according to the target Ambari deployment file and the target HDP deployment file.
9. A non-volatile storage medium, characterized in that: The non-volatile storage medium stores a computer program, wherein the device where the non-volatile storage medium is located executes the Ambari tool deployment method described in any one of claims 1 to 7 by running the computer program.
10. A computer program product, characterized in that include: A computer program, wherein when the computer program is executed by a processor, the Ambari tool deployment method according to any one of claims 1 to 7 is implemented.