An Ambari service deployment method and an Ambari certificate permission method based on port detection

By adding the license-core certificate licensing module to Ambari-server, the problem of Ambari's inability to manage certificate licensing was solved, enabling compliance and security management of the Ambari cluster.

CN115730275BActive Publication Date: 2025-11-25FUJIAN MEIYA GUOYUN INTELLIGENT EQUIP CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211522683.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-30
Publication Date
2025-11-25
Estimated Expiration
2042-11-30

AI Technical Summary

Technical Problem

Ambari's inability to effectively manage certificate permissions leads to inconvenience in cluster management.

Method used

By modifying the underlying Java code of Ambari-server and adding the license-core certificate licensing module, certificate verification and detection are implemented, including information collection, encryption/decryption, certificate generation and verification modules, to ensure cluster creation and node control.

Benefits of technology

It implements effective certificate and permission control for Ambari clusters, ensuring the compliance and security of cluster status and preventing unauthorized access.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115730275B_ABST
    Figure CN115730275B_ABST
Patent Text Reader

Abstract

The application relates to an Ambari service deployment method and an Ambari certificate permission method based on port detection, wherein the Ambari service deployment method comprises the following steps: S101, a license-core certificate permission module is written by using JAVA language; S102, the underlying java code of Ambari-server is modified, the license-core certificate permission module is added to the Ambari-server controller layer, the modified Ambari-Server source code is recompiled, and a modified Ambari-server service installation package is obtained; and S103, a new Ambari-server service is deployed and run, a certificate checking program in the license-core certificate permission module is triggered when a cluster is created and updated, if the certificate checking is passed, access is allowed, otherwise, all component services are forcibly closed. After the application carries out closed-source development on ambari, the license checking and detecting method is carried out in the mode of modifying the cluster method class triggered by the interface, the application carries out closed-source independent development based on ambari, the certificate permission method is detected by adding the license interface method class, and the defects that ambari cannot be subjected to certificate permission control are solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application relates to the technical field of software certificate permission, and in particular to an Ambari service deployment method and an Ambari certificate permission method based on port detection. BACKGROUND

[0002] With the growth of data, big data technology is also becoming more and more mature, and the demand for corresponding big data component clusters is also increasing. How to quickly deploy, maintain and monitor large big data clusters has become a technical pain point at present. Ambari emerges as the times require and becomes a top open source project of Apache. At present, Ambari is one of the most popular big data cluster tools.

[0003] Ambari itself is a distributed architecture software composed of Ambari-Server and Ambari Agent. Users can install corresponding software through Ambari-Server to notify Ambari Agent. Ambari Agent will send the status of each software module of each machine to Ambari-Server at regular intervals. Finally, the status information will be presented on the GUI of Ambari, so that users can understand the various states of the cluster and perform corresponding maintenance. However, Ambari cannot effectively control the certificate permission at present. SUMMARY

[0004] In view of the above technical problems, the application provides an Ambari service deployment method and an Ambari certificate permission method based on port detection.

[0005] In a first aspect, the application provides an Ambari certificate permission method based on port detection, comprising the following steps:

[0006] S101: using JAVA language to write a license-core certificate permission module;

[0007] S102: modifying the underlying java code of Ambari-server, adding the license-core certificate permission module to the Ambari-server controller layer, and recompiling the modified Ambari-Server source code to obtain a modified Ambari-server service installation package;

[0008] S103: deploying a new Ambari-server service, triggering a certificate verification program in the license-core certificate permission module when creating a cluster and updating a cluster, allowing access if the certificate verification is passed, and otherwise forcibly closing all component services.

[0009] By adopting the technical scheme, the application controls the creation and node control of the ambari cluster through the license certificate detection mechanism, and improves the deficiency of ambari in this aspect.

[0010] Preferably, the license-core certificate permission module comprises:

[0011] An information collection module is configured to collect basic attributes of the server, wherein the basic attributes of the server include IP address information, MAC address information, CPU information and motherboard information.

[0012] An encryption / decryption algorithm module is configured to encrypt and decrypt the basic attributes of the server collected by the information collection module by using the MD5 information digest algorithm, and generate a special application code.

[0013] A certificate generation module is configured to obtain the unencrypted basic attributes of the server by reversely decrypting the application code generated by the encryption / decryption algorithm module, combine the effective time and expiration time, and generate an authorized certificate by using the MD5 encryption algorithm.

[0014] A certificate verification module is configured to send the authorized certificate generated by the certificate generation module to the Ambari-server service, reversely decrypt the authorized certificate, obtain the authorized effective time, expiration time, MAC information, motherboard information, CPU information and IP information, and compare the information with the information of the current server, so that the authorization authentication is passed only when all the information is verified.

[0015] Preferably, the certificate generation service module is independently operated and is not added to the Ambari-server service.

[0016] Preferably, the modification of the Ambari-server underlying java code in S102 comprises:

[0017] By modifying the method class createCluster of the Ambari-server cluster creation, the trigger method class of the certificate verification module of the license-core certificate permission module is added to the outer layer of the cluster creation method, so that the license-core certificate permission module certificate verification program is called once through the interface cluster every time the cluster is created, and the try / catch method is added to the outermost layer. If an exception occurs in the verification or cluster creation process, the method class will stop running and throw an exception. If there is no exception and the verification is passed, the cluster can be successfully created.

[0018] Preferably, the modification of the underlying Java code of Ambari-server in S102 further includes:

[0019] By modifying the `updateCluster` method class for creating the Ambari-server cluster, a certificate verification module for the `license-core` certificate authorization module is nested within an `if` method. This ensures that every time the cluster status is updated or other operations on the cluster or big data component services are performed, the `cluster` interface must be used to call the certificate verification program of the `license-core` certificate authorization module. Only when the `if` method returns `true` and successfully returns the updated status and the verification passes can the cluster status be updated or the cluster or big data component operations be performed.

[0020] Preferably, the information acquisition module obtains server IP address and MAC address information by calling java.InetAddress object class functions, obtains server information and disk information by calling java.system object class functions, and obtains server CPU information and motherboard information by calling java.system object class functions.

[0021] Preferably, the steps of the certificate generation service module in generating the authorization certificate include:

[0022] The lic parameters are initialized based on the externally passed parameters for creating the lic;

[0023] Initialize the lic content based on the attribute information for creating the lic passed in from the outside;

[0024] Build a License Manager;

[0025] Create an empty file based on the path generated by the lic passed in param;

[0026] Write the content to the LIC file using the LIC manager.

[0027] Secondly, this application also proposes an Ambari certificate licensing method based on port detection, including the following steps:

[0028] S201: Deploy Ambari services using the method described in the first aspect;

[0029] S202: When Ambari creates and updates a cluster, it uses a port to trigger the cluster method class to check whether there is a license S20e authorization and whether the authorization is compliant. If the license S20e authorization is valid, then S203 is executed; otherwise, S204 is executed.

[0030] S203: detecting whether the license is expired, if not, executing S205, otherwise forcibly closing all services, executing S204;

[0031] S204: reapplying for the license, returning to step S202;

[0032] S205: allowing access to Ambari.

[0033] In a third aspect, the application further provides an Ambari service deployment device, comprising:

[0034] A license-core certificate license module generation module configured to generate a license-core certificate license module using JAVA language;

[0035] An Ambari-server service modification module configured to modify the underlying java code of Ambari-server, add the license-core certificate license module to the Ambari-server controller layer, and recompile the modified Ambari-Server source code to obtain a modified Ambari-server service installation package;

[0036] An Ambari-server service deployment module configured to deploy a new Ambari-server service, trigger the certificate verification program in the license-core certificate license module when creating a cluster and updating a cluster, and allow access if the certificate verification is passed, otherwise forcibly close all component services.

[0037] In a fourth aspect, the application further provides an Ambari certificate license device based on port detection, comprising:

[0038] A service deployment module, which is the Ambari service deployment device in claim 9;

[0039] A license authorization detection module configured to detect whether there is a license authorization and whether the authorization is compliant when Ambari creates a cluster and updates a cluster using a port triggered cluster method class;

[0040] An authorization expiration detection module configured to allow access to Ambari if the authorization is not expired, otherwise forcibly close all services; and

[0041] A reapply for authorization module.

[0042] In summary, the application has at least the following beneficial technical effects:

[0043] 1. The application carries out license verification and detection by modifying the interface triggered cluster method class of ambari after closed source development.

[0044] 2. The application is based on ambari for closed source independent development, and the license interface method class detection certificate permission method is added to solve the problem that ambari cannot control the certificate permission.

[0045] 3. The application controls the creation and node control of ambari cluster through the license certificate detection mechanism, and improves the deficiency of ambari in this aspect. BRIEF DESCRIPTION OF DRAWINGS

[0046] The accompanying drawings provide further understanding of the embodiments and are incorporated in and constitute a part of the specification. The drawings illustrate embodiments and, together with the description, serve to explain the principles of the present application. It will be readily appreciated that other embodiments and many of the intended advantages of the embodiments will become better understood because they become better understood by reference to the following detailed description. The elements of the drawings are not necessarily to scale. Like reference numerals refer to corresponding similar parts.

[0047] Figure 1 is a flow chart of an Ambari service deployment method of the application.

[0048] Figure 2 is a schematic diagram of one specific embodiment of the Ambari service deployment method which can be applied to the application.

[0049] Figure 3 is a flow chart of an Ambari certificate permission method based on port detection of the application.

[0050] Figure 4 is a schematic diagram of one specific embodiment of the Ambari certificate permission method based on port detection which can be applied to the application.

[0051] Figure 5 is a module schematic diagram of an Ambari service deployment device in an embodiment of the application.

[0052] Figure 6 is a module schematic diagram of an Ambari certificate permission device based on port detection in an embodiment of the application.

[0053] Figure 7 is a structural schematic diagram of a computer system of an electronic device suitable for implementing the embodiments of the application. DETAILED DESCRIPTION

[0054] The application will be described in further detail below with reference to the drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the related application, and are not a limitation on the application. In addition, it should be noted that, for the sake of description, only the parts related to the application are shown in the drawings.

[0055] It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict. The present application will be described in detail below with reference to the drawings and embodiments.

[0056] In a first aspect, the present application discloses an Ambari service deployment method, referring to Figure 1 The method specifically comprises the following steps:

[0057] S101: Write a license-core certificate license module using JAVA language;

[0058] The license-core certificate license module comprises:

[0059] An information collection module is configured to collect basic attributes of a server, wherein the basic attributes of the server include IP address information, MAC address information, CPU information, and motherboard information.

[0060] The information collection module acquires the server IP address and MAC address information by calling a java.InetAddress object class function, acquires the server information and disk information by calling a java.system object class function, and acquires the server CPU information and motherboard information by calling a java.system object class function.

[0061] An encryption / decryption algorithm module is configured to encrypt and decrypt the basic attributes of the server collected by the information collection module using an MD5 information digest algorithm, and generate a special application code.

[0062] A certificate generation module is configured to obtain the unencrypted basic attributes of the server by reversely decrypting the application code generated by the encryption / decryption algorithm module, combine a set of effective time and expiration time, and generate an authorization certificate using an MD5 encryption algorithm; the certificate generation service module is independently operated and is not added to the Ambari-server service.

[0063] The certificate generation service module generates the authorization certificate by:

[0064] Initializing the lic parameter according to the parameter information of the created Lic transmitted from outside;

[0065] Initializing the lic content according to the attribute information of the created Lic transmitted from outside;

[0066] Building a Lic manager;

[0067] Create an empty file according to the path generated by the lic imported according to the param;

[0068] Write content into the Lic file through the Lic manager

[0069] The certificate verification module is used to send the authorization certificate generated by the certificate generation module to the Ambari-server service, and after the authorization certificate is reverse decrypted, the effective time, expiration time, MAC information, mainboard information, CPU information and ip information after authorization are obtained, and these information is compared with the information of the current server one by one, and when all the information is verified, the authorization authentication is passed.

[0070] S102: Modify the Ambari-server underlying java code, add the license-core certificate license module to the Ambari-server controller layer, and recompile the modified Ambari-Server source code to obtain the modified Ambari-server service installation package;

[0071] Among them, the modification of the Ambari-server underlying java code in S102 includes:

[0072] By modifying the method class createCluster of the Ambari-server cluster creation, the trigger method class of the certificate verification module of the license-core certificate license module is added outside the createCluster method, so that it needs to pass through the interface cluster once license-core certificate license module certificate verification program every time the cluster is created, and the try / catch method is added outside, if an exception occurs in the process of verification or cluster creation, the method class will stop running and throw an exception, if there is no exception and the verification is passed, the cluster can be successfully created; By modifying the method class updateCluster of the Ambari-server cluster creation, the certificate verification module of the license-core certificate license module is nested in the if method package outside the method class of the update state, so that it needs to pass through the interface cluster once license-core certificate license module certificate verification program every time the cluster state is updated or other operations on the cluster or big data components service, and if the method returns true and successfully returns the update state and the verification is passed, the cluster state can be updated or the cluster or big data components can be operated.

[0073] S103: Deploy a new Ambari-server service, trigger the certificate verification procedure in the license-core certificate license module when creating a cluster and updating a cluster, if the certificate verification is passed, access is allowed, otherwise all component services are forcibly closed.

[0074] The following embodiments will specifically describe an Ambari service deployment method of the application:

[0075] With reference to Figure 2 , the application is written in JAVA language, the independently developed license-core module is added to the Ambari-server controller layer, the independently developed license-core module is a self-defined certificate license module independently developed based on a multi-dimensional information combination verification method, and the modified Ambari-Server source code is recompiled to obtain a modified Ambari-server service installation package, which will make the Ambari-server service unable to change the cluster state or newly create a cluster without authorized license.

[0076] The independently developed license-core module is deeply combined with the Ambari-server service, because the Ambari-server module code is modified, the license-core module cannot act on other software or services.

[0077] The application mainly acts on the method class of the cluster interface of the Ambari-server controller layer, mainly adds a certificate verification service before the method class of creating a cluster or updating a cluster state, and realizes authorized control from the whole cluster management level, and the specific implementation method is as follows:

[0078] 1) Modify the rewritten Ambari-server module code:

[0079] Modify the Ambari-server code, add the certificate verification module service of the license-core module in the corresponding method class, trigger the cluster authorized control verification function.

[0080] By modifying the method class createCluster of creating a cluster, the license-

[0081] The trigger method class of the certificate verification submodule of the core module, so that it needs to pass the license-core module certificate verification submodule through the interface cluster every time a cluster is created, and a try / catch method is added in the outermost layer, if an exception occurs during the verification or cluster creation process, the method class will stop running and throw an exception, if no exception is thrown and the verification is passed, the cluster can be successfully created;

[0082] The following is a code example:

[0083]

[0084]

[0085]

[0086] By modifying the updateCluster method class of the cluster creation, the license-core module certificate verification submodule is nested in the if method package outside the method class that returns the update status, so that every time the cluster status is updated or other operations on the cluster or big data component services are performed, the license-core module certificate verification submodule needs to be passed through the interface cluster to call the license-core module certificate verification submodule, and the if method returns true and successfully returns the update status and passes the verification before the cluster status can be updated or the cluster or big data component services can be operated;

[0087] The following is a code example:

[0088]

[0089]

[0090] If the certificate authentication cannot be normally authorized at the beginning of the deployment stage, Ambari management page cannot be normally accessed and a big data cluster cannot be successfully created

[0091] If the cluster has been successfully created and deployed during use, and the certificate expires without renewal, Ambari will forcibly close all component services and require re-authorization.

[0092] 2) Self-developed license-core module:

[0093] The license-core module is divided into four submodules, which are:

[0094] 1. Information collection module.

[0095] 2. Encryption / decryption algorithm module.

[0096] 3. Certificate generation module (This module runs alone, not added to Ambari-server)

[0097] 4. Certificate verification module

[0098] 1. Information collection module (Ambari-server / src / main / java / listener / core / service / *)

[0099] Collect the basic attributes of the server (IP address information, MAC address information, CPU information, motherboard information) through the information collection module

[0100] Get the server IP address and MAC address information by calling the java.InetAddress object class function

[0101]

[0102]

[0103] Get server information and disk information by calling the java.system object class function

[0104] Get server CPU information and motherboard information by calling the java.system object class function

[0105]

[0106]

[0107] 2. Encryption / decryption algorithm module (Ambari-server / src / main / java / listener / core / utils / Base64Utils)

[0108] Collect the basic attributes of the server (IP address information, MAC address information, CPU information, motherboard information) through the MD5 information digest algorithm (password hash function, which can generate a 128-bit hash value, algorithm principle: process the input information in 512-bit groups, and each group is divided into 16 32-bit subgroups, after a series of processing, the output of the algorithm is composed of four 32-bit groups, and the four 32-bit groups are concatenated to generate a 128-bit hash value)

[0109] Encrypt / decrypt and generate a special application code

[0110]

[0111]

[0112] Call MD5 message digest algorithm (cryptographic hash function)

[0113]

[0114] 3. Certificate generation module (license-master / license-creater / src / main / com / license / creator / model / licenseCreator)

[0115] The certificate generation service module runs independently and is not added to the Ambari-server service, so the encrypted information (special application code) in the Ambari-server needs to be collected by the acquisition module to the server basic attributes (IP address information, MAC address information, CPU information, motherboard information)

[0116] Send to the certificate generation service, and after reverse decryption, obtain the unencrypted server basic attributes, combine the effective time and expiration time set, and generate an authorized certificate by the same MD5 algorithm encryption method.

[0117]

[0118]

[0119] 4. Certificate verification module (Ambari-server / src / main / java / listener / core / model / *)

[0120] Send the authorized certificate generated by the certificate generation module to the Ambari-server service, and after reverse decryption of the authorized certificate, obtain the effective time, expiration time, MAC information, motherboard information, CPU information and ip information, and rely on these information to compare with the current server information one by one. When all information is verified, the authorization authentication passes

[0121] The information to be verified is as follows:

[0122] a. Whether the ip information provided by the certificate is consistent with the server where the Ambari-server is located

[0123] b. Whether the cpu information provided by the certificate is consistent with the server where the Ambari-server is located

[0124] c. Whether the motherboard information provided by the certificate is consistent with the server where the Ambari-server is located

[0125] d. whether the MAC information provided by the certificate is consistent with the server where the Ambari-server is located

[0126] e. whether the expiration time provided by the certificate has exceeded the current time or has expired

[0127]

[0128]

[0129]

[0130] In a second aspect, the application further discloses an embodiment of an Ambari certificate licensing method based on port detection, in combination with reference to Figure 3 and Figure 4 , Figure 3 a flowchart of an Ambari certificate licensing method based on port detection is shown, Figure 4 a schematic diagram of a specific embodiment of the Ambari certificate licensing method based on port detection that can be applied to the application is shown, and the method specifically comprises the following steps:

[0131] S201: service deployment is performed on Ambari by using the Ambari service deployment method in the first aspect;

[0132] S202: Ambari uses the port to trigger the cluster method class to detect whether there is licenS20e authorization and whether the authorization is compliant when creating a cluster and updating a cluster, if licenS20e has been authorized and the authorization is compliant, S203 is executed, otherwise S204 is executed;

[0133] S203: it is detected whether the authorization is expired, if not, S205 is executed, otherwise all services are forcibly closed, and S204 is executed;

[0134] S204: reapply for authorization, and return to step S202;

[0135] wherein the reapplication for authorization comprises re-collection of information and re-generation of a certificate;

[0136] S205: access to Ambari is allowed.

[0137] The application is based on Ambari 2.7.5 version for closed-source independent development, the certificate licensing method is added through the license interface method class detection, the disadvantages that Ambari cannot be licensed and controlled are solved, the creation and node control of the Ambari cluster are controlled through the license certificate detection mechanism, and the deficiencies of Ambari in this respect are improved.

[0138] In a third aspect, an embodiment of an Ambari service deployment apparatus is disclosed, which corresponds to the method embodiment shown in Figure 1 The apparatus can be applied in various electronic devices.

[0139] With reference to Figure 5 An Ambari service deployment apparatus includes:

[0140] A license-core certificate license module generation module 301 is configured to write a license-core certificate license module by using JAVA language

[0141] An Ambari-server service modification module 302 is configured to modify Ambari-server underlying java code, add the license-core certificate license module to the Ambari-server controller layer, and recompile the modified Ambari-Server source code to obtain a modified Ambari-server service installation package.

[0142] An Ambari-server service deployment module 303 is configured to deploy a new Ambari-server service, trigger a certificate verification program in the license-core certificate license module when creating a cluster and updating a cluster, allow access if the certificate verification passes, and forcibly close all component services otherwise.

[0143] In a fourth aspect, an embodiment of an Ambari certificate license apparatus based on port detection is disclosed, which corresponds to the method embodiment shown in Figure 3 The apparatus can be applied in various electronic devices.

[0144] With reference to Figure 6 An Ambari certificate license apparatus based on port detection includes:

[0145] A service deployment module 401 is the Ambari service deployment apparatus in claim 9.

[0146] A license authorization detection module 402 is configured to detect whether there is license authorization and whether the authorization is compliant by using a port to trigger a cluster method class when Ambari creates a cluster and updates a cluster.

[0147] An authorization expiration detection module 403 is configured to allow access to Ambari if the authorization has not expired, and forcibly close all services otherwise.

[0148] Module re-authorization failed (404).

[0149] Fifthly, refer to Figure 7 It shows a schematic diagram of the structure of a computer system 500 suitable for implementing electronic devices according to embodiments of the present application. Figure 7 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0150] like Figure 7 As shown, the computer system 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 502 or programs loaded from storage section 508 into random access memory (RAM) 503. The RAM 503 also stores various programs and data required for the operation of the system 500. The CPU 501, ROM 502, and RAM 503 are interconnected via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0151] The following components are connected to I / O interface 505: an input section 506 including a keyboard, mouse, etc.; an output section 507 including a liquid crystal display (LCD) and speakers, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card and a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. Drive 250 is also connected to I / O interface 505 as needed. Removable media 211, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 250 as needed so that computer programs read from them can be installed into storage section 508 as needed.

[0152] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 509, and / or installed from removable medium 211. When the computer program is executed by central processing unit (CPU) 501, it performs the functions defined in the methods of this application.

[0153] As another aspect, the present application also provides a computer readable storage medium, which can be included in the electronic device described in the above embodiments, or can exist separately without being assembled into the electronic device. The computer readable storage medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the method as shown in Figure 1

[0154] It should be noted that the computer readable storage medium described in the present application can be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium may, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any combination of the above. More specific examples of the computer readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, the computer readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device or apparatus. In the present application, the computer readable signal medium can include a data signal carried in a baseband or as a part of a carrier wave, which carries computer readable program code. Such a propagated data signal can take various forms, including but not limited to an electromagnetic signal, an optical signal or any suitable combination of the above. The computer readable signal medium can also be any computer readable storage medium other than the computer readable storage medium, which can send, propagate or transmit a program for use by or in conjunction with an instruction execution system, device or apparatus. The program code contained in the computer readable storage medium can be transmitted by any suitable medium, including but not limited to wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0155] ​Computer program code for carrying out operations of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).

[0156] The computer program instructions can also be loaded onto a computer or other programmable information processing apparatus to cause a series of operations to be performed on the computer or other programmable information processing apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable information processing apparatus implement the functions / acts specified in the flowchart and / or block diagram block or blocks.

[0157] The specific embodiments described above are examples for implementing the application and the scope of the application is not limited to the described embodiments. Any changes and modifications that one can make to the described embodiments should be understood as falling within the scope of the application. Accordingly, the scope of the application should be determined by the appended claims and their legal equivalents rather than by the examples described.

[0158] In the description of the application, it needs to be understood that the terms "upper", "lower", "inner", "outer" and the like indicate the orientation or positional relationship shown in the drawings based on the orientation or positional relationship shown in the drawings, and are only for the purpose of facilitating the description of the application and simplifying the description, and do not indicate or imply that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation on the application. The word 'comprising' does not exclude the existence of elements or steps not listed in the claims. The word 'a' or 'an' in front of an element does not exclude the existence of multiple such elements. The mere fact that certain measures are recited in mutually different dependent claims does not indicate that the combination of these measures cannot be used to improve. Any reference signs in the claims should not be interpreted as limiting the scope.

Claims

1. An Ambari service deployment method, characterized in that: The method comprises the following steps: S101: writing a license-core certificate permission module by using JAVA language; S102: modifying the underlying java code of Ambari-server, adding the license-core certificate permission module to the Ambari-server controller layer, recompiling the modified Ambari-Server source code, and obtaining a modified Ambari-server service installation package; S103: deploying a new Ambari-server service, triggering a certificate verification program in the license-core certificate permission module when creating a cluster and updating the cluster, allowing access if the certificate verification is passed, and otherwise forcibly closing all component services.

2. The Ambari service deployment method of claim 1, wherein: The license-core certificate permission module comprises: An information collection module for collecting basic attributes of a server, wherein the basic attributes of the server comprise IP address information, MAC address information, CPU information and mainboard information; An encryption / decryption algorithm module for encrypting / decrypting the basic attributes of the server collected by the information collection module by using an MD5 information digest algorithm and generating a special application code; A certificate generation module for obtaining the unencrypted basic attributes of the server by reversely decrypting the application code generated by the encryption / decryption algorithm module, combining a set of effective time and expiration time, and generating an authorized certificate by using an MD5 encryption algorithm; A certificate verification module for sending the authorized certificate generated by the certificate generation module to the Ambari-server service, reversely decrypting the authorized certificate, obtaining the authorized effective time, expiration time, MAC information, mainboard information, CPU information and IP information, and comparing the information with the information of the current server, so that the authorization authentication is passed when all the information is verified.

3. The Ambari service deployment method of claim 2, wherein: The certificate generation service module is independently run and is not added to the Ambari-server service.

4. The Ambari service deployment method of claim 2, wherein: The modification of the underlying java code of Ambari-server in S102 comprises: A trigger method class of the certificate verification module of the license-core certificate permission module is added to the createCluster method class of the Ambari-server cluster creation, so that the license-core certificate permission module certificate verification program is transmitted and called once through the interface cluster every time the cluster is created, and a try / catch method is added to the outermost layer, so that if an exception occurs in the verification or cluster creation process, the method class stops running and throws an exception, and if no exception is thrown and the verification is passed, the cluster can be successfully created.

5. The Ambari service deployment method of claim 2, wherein: The modification of the underlying java code of Ambari-server in S102 further comprises: The license-core certificate permission module is wrapped by the certificate verification module in the outer layer of the method class for returning the update state, so that the certificate verification procedure of the license-core certificate permission module needs to be called through the interface cluster every time the cluster state is updated or other operations on the cluster or big data component services are performed, and the if method returns true and successfully returns the returned update state and the verification passes, so that the cluster state can be updated or the cluster or big data component can be operated.

6. The Ambari service deployment method of claim 2, wherein: The information collection module obtains the server IP address and MAC address information by calling a java.InetAddress object class function, obtains the server information and disk information by calling a java.system object class function, and obtains the server CPU information and motherboard information by calling a java.system object class function.

7. The Ambari service deployment method of claim 2, wherein: The steps for generating the authorization certificate by the certificate generation service module include: Initializing the lic parameter according to the parameter information for creating the Lic transmitted from outside; Initializing the lic content according to the attribute information for creating the Lic transmitted from outside; Building the Lic manager; Creating an empty file according to the path of the lic generated by the param; Writing the content into the Lic file through the Lic manager.

8. A port-based detection based Ambari certificate permission method, characterized in that: The method comprises the following steps: S201: deploying Ambari services by using the method in any one of claims 1-7; S202: when creating a cluster and updating the cluster, Ambari uses a port to trigger a cluster method class to detect whether the license is authorized and whether the authorization is compliant, if the license is authorized and the authorization is compliant, performing S203, otherwise performing S204; S203: detecting whether the authorization is expired, if not, performing S205, otherwise forcibly closing all services and performing S204; S204: reapplying for authorization and returning to step S202; S205: allowing access to Ambari.

9. An Ambari service deployment apparatus, characterized by, The method comprises the following steps: The license-core certificate permission module generation module is configured to write the license-core certificate permission module by using JAVA language; The Ambari-server service modification module is configured to modify the underlying java code of Ambari-server, add the license-core certificate permission module to the Ambari-server controller layer, recompile the modified Ambari-Server source code, and obtain a modified Ambari-server service installation package; The Ambari-server service deployment module is configured to deploy a new Ambari-server service, trigger the certificate verification procedure in the license-core certificate permission module when creating a cluster and updating the cluster, allow access if the certificate verification is passed, and otherwise forcibly close all component services.

10. An Ambari certificate licensing device based on port detection, characterized in that, The method comprises the following steps: a service deployment module configured to deploy the Ambari service in claim 9; a license authorization detection module configured to detect whether there is a license authorization and whether the authorization is compliant by using a port triggered cluster method class when Ambari creates a cluster and updates the cluster; an authorization expiration detection module configured to allow access to Ambari if the authorization is not expired, and otherwise force all services to be closed; and a re-authorization module.

Citation Information

Patent Citations

  • Method for realizing license detection function based on ambari heartbeat mechanism

    CN111209539A

  • Ambari-based front-end and rear-end separation system and Ambari-based front-end and rear-end separation method

    CN111381921A