A method and system for automatically and uniformly managing the operation and maintenance of each node of a bastion host

By setting up the bastion machine architecture and the Central master control machine in the bastion machine system, unified management of each node of the bastion machine is achieved, which solves the problems of high cost and difficulty of bastion machine management in the existing technology, and achieves efficient and safe multi-tasking. Node operation and maintenance management.

CN116192600BActive Publication Date: 2024-08-27HANGZHOU PINGPONG INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310192294.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-02
Publication Date
2024-08-27
Estimated Expiration
2043-03-02

AI Technical Summary

Technical Problem

With a large number of hosts and users, the existing bastion host system has high operation and maintenance management costs and is difficult to unify, making management difficult and unable to achieve effective unified management.

Method used

Adopt an operation and maintenance method and system that automatically and uniformly manages each node of the bastion machine. By setting up the bastion machine architecture, divide the independent network area into independent nodes, plan the Login machine and Master machine, and set up the Central master control machine for task distribution and data synchronization, using The sentinel program monitors and executes tasks to achieve unified management of user permissions, machine monitoring and daily operation and maintenance.

Benefits of technology

It achieves unified control and automatic monitoring of multiple network environments, reduces management costs, and improves management efficiency and security. Whether it is a few or thousands of machines, the management cost and difficulty are not high, and the system is highly safe and reliable.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116192600B
    Figure CN116192600B
Patent Text Reader

Abstract

A method and system for automatically and uniformly managing the operation and maintenance of each node of the bastion host. Whether it is the allocation of user permissions, the daily deployment of machine monitoring and network monitoring, or the batch management of daily operation and maintenance, this application can be abstracted as the master of a regional node dispatching a task to execute, which naturally achieves unified management; this design concept can be continued in the future. The Master machine in this node serves as the master control of the node. It pre-sets the tool script library, crontab tasks, and configuration files in the Redis database of this node. When a new machine is connected to a node, it is configured to perform the Salt-Master access management of the node. The corresponding machine is controlled by the takeover program to complete the corresponding task, so as to achieve unified and automatic management.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an operation and maintenance management method, and in particular to an operation and maintenance method and system for automatically and uniformly managing nodes of a bastion machine. Background Art

[0002] Shanghai Shangxun Information Technology Co., Ltd. disclosed a method for upgrading an operation and maintenance management system based on a bastion host in 202010956472X, wherein the method includes: 1) uploading the upgrade file package to the system background through the system foreground, and sending an upgrade command to the system background, wherein the upgrade file package includes files to be upgraded and tool files; 2) the system background obtains the number information of the files to be upgraded by statistics, as the denominator numerical information of the upgrade progress value information; 3) executing the tool file, copying the files to be upgraded to the corresponding target locations respectively, and recording the status information of each file to be upgraded in real time, 4) when the tool file is executed each time, the numerator numerical information of the upgrade progress value information is added by 1, wherein the numerator numerical information of the upgrade progress value information is initially 1; 5) according to the denominator numerical information and numerator numerical information of the upgrade progress value information, the upgrade progress value information is calculated in real time, and the upgrade progress value information is returned to the system foreground; 6) the upgrade progress value information is displayed in real time through the system foreground. Applying this application to the operation and maintenance management system can not only accurately display the upgrade process and progress, but also provide a tracking basis when an abnormality occurs in the upgrade.

[0003] Chengdu Hi-Tech Vision Digital Technology Co., Ltd. 202111093307.7 A method for free hosting of host account operation and maintenance through a bastion host, including: S1, the user logs in to the bastion host, and the bastion host verifies whether the user name and password or key of the user login credentials are correct. If correct, the user logs in to the bastion host through authentication; S2, after successfully logging in to the bastion host, the operation and maintenance selects the host operation and maintenance login that needs to be accessed from the list of hosts that can be queried according to the user's permissions; S3, determine whether the server password is hosted to the bastion host. If it is not hosted to the bastion host, the operation and maintenance manually enters the account password. If it is hosted to the bastion host, the password stored in the database is filled in to the server for authentication to achieve password-free login. This solution can effectively solve the inconvenient operation of users operating and maintaining servers through the bastion host, has a higher degree of automation, can reduce the time for user operation and maintenance login, does not host the server login credentials to the bastion host, and reduces the risk of credential leakage.

[0004] The existing bastion host system has the technical defect of being unable to achieve unified management. When there are a large number of hosts and users, the operation and maintenance management cost of the entire bastion host is very high and the security cannot be guaranteed. Taking a host as an example, it involves the user's machine permission management, machine monitoring management, and daily operation and maintenance management. If it is managed according to the above patent proposal, the cost is high and each policy is independent, making the entire management difficult. Summary of the invention

[0005] The present invention provides an operation and maintenance method and system for automatically and uniformly managing each node of a bastion host, so as to solve the problems in the prior art that the cost is high, each has its own policy, and the overall management is difficult.

[0006] A bastion host operation and maintenance method for realizing automatic unified management of each node further includes:

[0007] S1: Set up the bastion architecture:

[0008] Divide the network into independent areas according to the business sites, and treat each independent network environment in different regions as an independent node. Then plan a machine in each node as the node's security entrance login machine and a master machine as the node's operation and maintenance control. The master is responsible for managing all business hosts of the node.

[0009] Set up a Central master machine as the Login machine of each independent node and the superior Master machine of the Master machine; the Central master machine is deployed with the WEB system, which has the construction files and configuration information of the global system. The Central master machine regularly synchronizes the relevant data of each node with the Master machine of each node;

[0010] S2: The Central master control machine sends a task to the Master machine of the target regional node, where the task includes sending one of the following tasks: user authority management, machine monitoring, and daily operation and maintenance to the target machine of the node;

[0011] S3: The Master machine sets up a sentinel program, and when it detects the task, it parses and completes the corresponding task operation.

[0012] Whether it is the allocation of user permissions, the daily deployment of machine monitoring and network monitoring, or the batch management of daily operation and maintenance, this application can be abstracted as the master of a certain regional node dispatching a task by the general control, which naturally achieves unified management; in the future, we can continue to follow this design concept, integrate the management of container clusters, and continuously expand the management objects to make it more powerful and efficient. To some extent, there is no difference between a bastion host managing dozens of network areas and managing one network area; whether it is a few machines or dozens or thousands of machines, the management cost will not change much. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1 This is an example diagram of the operation and maintenance management system of the present invention;

[0014] Figure 2This is a schematic diagram of the operation and maintenance management method of the present invention. DETAILED DESCRIPTION

[0015] There are many solutions for the safe and efficient management of massive hosts in the industry, such as Ansible, Puppet, and SaltStack, which can solve the problem of efficient and safe management of massive hosts in enterprises to a certain extent. According to the time when these tool systems appeared, Puppet (full-featured and complex) came first, followed by Ansible (simple and convenient), and then SaltStack (efficient and simple). It can be understood that it has balanced the two and introduced many new ideas. SaltStack is a centralized management tool for server infrastructure based on C / S architecture. The management end is called Master and the client is called Minion. SaltStack has functions such as configuration management, remote execution, and monitoring. The open source version of SaltStack only provides basic solutions, but in actual work, it still requires a lot of maintenance skills, grouping and monitoring configuration, and faces challenges such as operation and maintenance management of multiple independent network nodes in enterprises. We hope to be able to unify the control and automatic monitoring of multiple network environments (not relying on cross-node network connection. Network connection can certainly solve some problems, but considering the more scientific collection of massive business host monitoring data in real time on their own intranets and the expansion of future ultra-large-scale IT systems, we should consider the node internal self-governance solution of divide and conquer in advance).

[0016] See also Figure 1 , which is a schematic diagram of a multi-operation and maintenance management system. The applicant will divide the independent network areas of our respective business sites, regard each independent VPC network environment in different regions as an independent node, and then plan two machines in this node, one as a secure entrance Login machine (similar in function to our current jumpserver), and the other as an operation and maintenance control Master machine. The Login and Master will each provide relevant basic services, and the Master will be responsible for managing all business hosts of the node. We can plan another central CentraI master control machine as the superior Master machine of the Login and Master of each independent node, so that the Central master control machine will manage the Login and Master machines of each independent node as a dispatching center, and then indirectly unify the management of each node host. We Central will deploy a WEB system, merge various daily necessary functions, and use the unified collected data as a data overview to show the IT resource status of all our nodes, as well as display real-time monitoring related data according to the application grouping dimension, etc., so that we can have a clear view of various IT resources.

[0017] The multi-operation and maintenance management system of the present invention further comprises:

[0018] Multiple independent nodes: Divide the network areas of each business site into independent networks, and treat each independent VPC network (Virtual Private Cloud) environment in different regions as an independent node. Each node includes at least one machine as the node's secure login machine and one machine as the node's operation and maintenance control Master machine. Among them:

[0019] A sentinel program is set up under each Master machine to monitor and record events including business host access and offline of the node, and to update the configuration files used for local monitoring or batch operation and maintenance in a linked manner. The configuration files used for batch operation and maintenance further include configuration files of application group dimensions. An initialization script for accessing new machines is set up on the Master machine of each node: once a node accesses a new business host, the Master machine of the node triggers a Salt-Minion access event. The Salt-Minion access event further includes: after the new machine executes the initialization script, the new machine is named according to the three-stage rule of application grouping-intranet IP-network area, and Salt-Minion is installed on the machine and the corresponding Master is configured.

[0020] A Central master control machine, serving as the Login machine and the superior Master machine of the Master machine of each independent node; the Central master control machine is deployed with the WEB system, which has the construction files and configuration information of the global system. The Central master control machine regularly synchronizes the relevant data of each node with the Master machine of each node, so that when an application group updates the operation and maintenance management data, it can determine the node where the application group is located, and obtain the names of all machines in the same application group through the Master machine of the corresponding node according to the application group field, and then write the batch operation and maintenance management configuration files to the machines respectively through Salt-Minion.

[0021] The core of the present invention lies in the separation of powers. The Login machine is only responsible for the secure login entrance; the Master machine is only responsible for executing the scheduling task; the Central machine is only responsible for the dispatching and scheduling of the task; in this way, the system is highly secure and reliable. For example, if there is a problem with the Central service, it will not affect the assigned permissions, and each node is independent of each other and does not affect each other; and Login and Master are in a sense a kind of "manager" role. Once an unrecoverable exception occurs in the Login or Master machine of a certain node, our master control Central machine can quickly regenerate a new Login or Master at the node, because the master control machine has the configuration data of each node Login and Master and the full amount of system permission allocation history data, which can be quickly generated, and the data of our master control machine is backed up every day and synchronized to the Master machine of each node every day, so that our master control data is very safe. This system expands and manages new nodes according to the actual project and enterprise development needs. That is, unify the configuration management of each node host: adopt the master control + distributed bastion machine architecture, the corresponding working mechanism of the supporting architecture, unify the configuration management of each node host, and realize the operation and maintenance of multiple nodes.

[0022] The following is a detailed description. The core of the present invention is:

[0023] User machine permissions: Essentially, the master controller dispatches a master to issue a task to a user to create his account on a certain machine;

[0024] Machine monitoring: In essence, it is a task in which the master controller dispatches a master to deploy a monitoring agent program to all business machines in the node.

[0025] Daily operation and maintenance is similar: we perform a task on a group of machines or global machines on a certain Master.

[0026] Therefore, whether it is the allocation of user permissions, the daily deployment of machine monitoring and network monitoring, or the batch management of daily operation and maintenance, this application can be abstracted as the master of a certain regional node dispatching a task by the general control, which naturally achieves unified management; in the future, we can continue to follow this design concept, integrate the management of container clusters, and continuously expand the management objects to make it more powerful and efficient. To some extent, there is no difference between a bastion host managing dozens of network areas and managing one network area; whether it is a few machines or dozens or thousands of machines, the management cost will not change much.

[0027] The present invention sets the operation of each machine / user in the node as executing a task on a certain machine or a group of machines or a global machine. Authority management, daily operation and maintenance, security management, etc. are uniformly set as task control based on a certain node and a certain machine.

[0028] In addition, the Master machine in this node serves as the master control of the node. It pre-sets the tool script library, crontab tasks, and configuration files in the Redis database of this node. When a new machine is connected to a node, it is configured to perform the Salt-Master access management of the node: by running the access machine initialization script of the Master machine of the node, the initialization operation of the machine is completed, the machine is standardizedly named and Salt-Minion is installed, and the Master machine to which it belongs is configured. After execution, it is immediately accessed and managed by the Master machine of the node, and the Redis database of this node and the Redis database of the remote Central master control machine are recorded. The more important part of access management is to obtain the tool script library, complete the crontab tasks, and automatically configure the configuration files. When these information need to be customized, updated, or modified, they are also sent to the Master machine in the form of tasks through the Central master control machine. After the Master machine is updated to the corresponding position, the corresponding machine is controlled by the takeover program to complete the corresponding task.

[0029] This type of operation and maintenance management achieves unified management and has strong scalability.

[0030] See also Figure 2 , a bastion host operation and maintenance method for realizing automatic unified management of each node, further comprising:

[0031] S110: Set up the fortress structure:

[0032] Divide the network into independent areas according to the business sites, and treat each independent network environment in different regions as an independent node. Then plan a machine in each node as the node's security entrance login machine and a master machine as the node's operation and maintenance control. The master is responsible for managing all business hosts of the node.

[0033] Set up a Central master machine as the Login machine of each independent node and the superior Master machine of the Master machine; the Central master machine is deployed with the WEB system, which has the construction files and configuration information of the global system. The Central master machine regularly synchronizes the relevant data of each node with the Master machine of each node;

[0034] S120: The Central master control machine sends a task to the Master machine of the target regional node for execution, wherein the task includes sending one of the tasks including user authority management, machine monitoring, and daily operation and maintenance to the target machine of the node;

[0035] S130: The Master machine sets a sentinel program, and when detecting the task, analyzes and completes the corresponding task operation.

[0036] After the new machine executes the access script, it completes the management of the Master in the region. According to the default SaltStack execution template rules we set, a series of template actions will be performed on the new machine, mainly including 7 general templates (the 7 general templates are only examples and are not used to limit the present invention)

[0037] 1. Synchronize a series of tool scripts in the / opt / sys / directory of the new machine, including the init.sh initialization script, the name.sh renaming script, the src.sh basic software installation script we wrote, etc. These scripts can be continuously expanded according to our daily work. That is to say, after the new machine is taken over, we agree that some of the tool scripts required by default are all in the / opt / sys / directory, which is convenient for every technician to use. And when a script needs to be updated, all scripts in the system can be updated to the same version through the above method.

[0038] 2. Write the default crontab tasks, including disk cleaning tasks and salt-minion automatic pull-up tasks (placed in salt-minion due to various abnormal disconnection problems). Of course, these basic tasks can also be continuously expanded according to the needs of daily work

[0039] 3. Execute the default basic configuration, such as the default public key information to be entered. This information can be customized and extended in / srv / pillar / master.sls of our respective nodes. For example, once a new machine is connected, the public key of the publishing machine is entered immediately, thus completing the channel problem of the publishing machine public key. At the same time, it can automatically synchronize some basic environment variables, the business operation account that needs to be created by the system by default, etc., and the machine connection number configuration has been adjusted, etc.

[0040] 4. Install defined basic tools, such as vim, wget, etc.

[0041] 5. Automatically configure a custom secure sshd configuration file. By default, password authentication, full private key authentication, and the node's trusted intranet IP and whitelist users are prohibited.

[0042] 6. Automatically synchronize salt-minion configuration

[0043] 7. Automatically set the network parameters of the new machine

[0044] 8. A custom template, each node can customize related management tasks according to the needs of the node

[0045] Because the template configuration files of each Master are sent and synchronized by the master control machine, the extension changes of these template files are also updated by the master control and then synchronized to the Master of each node. The master control will be responsible for updating and synchronizing the above 7 common initialization templates. It can also be agreed that some templates or files are node-customized, and the master control will not update them. In order to ensure the consistency of some global templates, tools, and files of the entire network, they will not be maliciously adjusted or modified. The above 7 common templates and the 8th custom template are only examples, and only some of the common templates can be used. In addition, the 8th custom template is set by each node. Only after the Master machine of this node takes over, it will take over the corresponding machine according to the custom template to complete the corresponding task.

[0046] Corresponding to the above template settings, the following basic components are generally deployed on the Master machine of each node:

[0047] 1. Salt-Master is the Salt control machine, which receives the business Salt-Minion machine in the management node network

[0048] 2. Salt-API / Salt-Minion receives the scheduling tasks of the master control Central machine

[0049] 3.Nginx local network area Salt source, ensure that the business machine in the network area downloads and updates Salt-Minion in the intranet

[0050] 4. Influxdata time series database, accessing all business host monitoring data managed by the Master

[0051] 5. Ansible is also deployed on the control machine to facilitate management by operation and maintenance personnel familiar with Ansible

[0052] 6. Prometheus is also deployed on the control machine, responsible for monitoring and alerting the node resources; it has peer-monitored the related services of the Central machine

[0053] 7. Some commonly used management tools are generated by default under / opt / sys. You can read them and use them as needed.

[0054] Similarly, the basic components deployed on the CentraI master control machine can be:

[0055] 1. OpenResty Web Server

[0056] 2. The Redis database records the full amount of user permissions for each node - machine corresponding data

[0057] 3.PostgreSQL records the information of registered users of the system

[0058] 4.Matrix scheduling controller, responsible for scheduling Login and Master to perform related tasks

[0059] 5. Prometheus monitoring system, responsible for monitoring the Login of each node and related services of the Master machine

[0060] In view of the above settings, the user authority management task issued to the target machine of the node further includes:

[0061] The Central master control machine generates Local-Login RSA Keypairs for each user who applies and is authorized, and gives the user account on the Login machine that creates the corresponding node, so that each user has his or her own independent account, and records the user's permissions in the master control Redis database. The permissions further include the relevant node information, Master machine, permission type, and permission validity period that are adapted to the permissions;

[0062] The Central master control machine sends the Central corresponding task to the Login or Master machine of the relevant node with the corresponding authority;

[0063] The Master machine receives the task, creates the user's account information, and records the user-machine information including the permission validity period in the Redis database on the node Login corresponding to the node;

[0064] Each node periodically starts the permission recovery program to recover the user-machine information whose permissions have expired on that day and pass the user-machine information whose permissions are about to expire at the agreed time;

[0065] When the Central master control machine receives an emergency user permission management request including employee resignation, it deletes the corresponding record in the master control Redis database and sends a user permission management task to the Master machine of the corresponding node to reclaim the user's machine permission.

[0066] In the present invention, the system expands and upgrades SaltStack's simple first-level management structure Master-Minion to a multi-level management structure Master-Master-Minion (this is the basis of distribution). In addition, the traditional password authentication is abandoned during user management, and Local-Login RSA key pairs are generated for each user, and a user account for creating the corresponding node Login is given according to the administrator's authorization, so that each user has his own independent account. In addition, pure SaltStack is a stateless task execution; the system adds a database to store related tasks and performs stateful task execution management, so that we can clearly record which user has which Login or Master permissions, etc. At the same time, a "Sentinel" program has been developed for each Master control machine, which is responsible for monitoring and recording the machine access and offline events of the node, linking to update the configuration files used for local monitoring or batch operation and maintenance, and synchronizing data to the Central master control machine for summary display, such as the total number of regional nodes in the system, the number of applications distributed on each node, the number of machines for each application, etc. The Sentinel program is also responsible for bidirectionally writing the monitoring data collected in real time on the local network, one copy is written to the local time series database record, and the other copy is written to the remote Central master control cache data as a real-time monitoring data display.

[0067] When a new machine is connected to a node, it is configured to access and manage the Salt-Master of the node: by running the access machine initialization script of the Master machine of the node, the machine is initialized, a standardized name is given to the machine, Salt-Minion is installed, and the Master machine to which it belongs is configured. After execution, it is immediately accessed and managed by the Master machine of the node, and the Redis database of this node and the Redis database of the remote Central master control machine are recorded.

[0068] When a new machine is connected to a node, the Salt-Master access management configured to perform the node further includes executing a preset publishing machine public key acquisition program to obtain the public key information corresponding to the machine from the public key extension file at a preset location of the Redis database of the node;

[0069] When the Central master control machine generates Local-Login RSA Keypairs or public key updates for each user who applies and is authorized, it sends the public key update task to the Master machine where the relevant node that matches the user's authority is located.

[0070] The Master machine receives the task of updating the public key and updates the new public key information in the public key extension file at the corresponding position of the Redis database of the node;

[0071] At the same time, the corresponding machine obtains the updated public key information corresponding to the machine from the public key extension file in the preset location of the Redis database of this node.

[0072] The execution machine completes daily operation and maintenance tasks, including: when a new machine is connected to a node, the Salt-Master access management configured for the node further includes: obtaining the tool script library at the determined location of the Redis database of this node to facilitate the synchronization of a series of tool scripts for users; writing crontab tasks at pre-set locations, including disk cleaning tasks and salt-minion automatic pull-up tasks; automatically configuring the configuration files at the specified location;

[0073] The CentraI master control machine sends update and / or extension tasks including tool script library, crontab tasks, and configuration files to the Master machine of the corresponding node;

[0074] The Master machine of the corresponding node updates the tool script library, crontab tasks, and configuration files corresponding to the specified location;

[0075] The master machine takes over the corresponding machine to process the content related to the corresponding location.

[0076] The Central master control machine sets the build files and configuration information of the global system, regularly synchronizes and backs up the core data to the Master machines of each node, and synchronizes the build files and configuration information of the global system to the enterprise git repository; when a problem occurs on the Central master control machine, the build files and configuration information of the global system are updated to the enterprise git repository; when a problem occurs on a Login machine or Master machine, a new Login and Master are generated through a template from the Central master control machine.

[0077] The default machine naming rule is "application group-intranet IP-network area". Application group-intranet IP-network area describes the application group to which the machine belongs, the network area to which the machine belongs (i.e. node information) and the intranet IP information of the machine in the network area. The new machine is located by the network area to which the machine belongs (i.e. node information) and the intranet IP information of the machine in the network area. For example:

[0078] gateway-192.168.104.214-Hangzhou

[0079] This machine name can be resolved as a gateway machine in the entire multi-operation and maintenance management system. Its intranet IP is 192.168.104.214. This machine is in the Hangzhou network area.

[0080] When the user submits the permission application for the above machines, the Central master control machine can find the scheduling Master to which it belongs to execute the task based on the network area field, so the local IP in each network area can be repeated without affecting the global management of the system.

[0081] For the "sentinel" program of each node, when a new machine is connected to the node, it can naturally split by field, such as obtaining the names of all machines in the same application group according to the application group field, and then write them into the configuration file of batch operation and maintenance management.

[0082] Such as / etc / salt / master.d / nodegroup.conf and / etc / ansible / hosts

[0083] At the same time, the prometheus monitoring configuration file can be automatically generated, for example:

[0084] ```

[0085] -targets:

[0086] -192.168.104.214∶9100

[0087] labels:

[0088] group:gateway

[0089] IP: 192.168.104.214

[0090] region:Hangzhou

[0091] instance: gateway-192.168.104.214-Hangzhou

[0092] ```

[0093] In this way, once an alarm is triggered, the system can clearly see which network area the alarm comes from and what business machine it belongs to. These capabilities are derived from the system's very concise three-part naming structure.

[0094] A bastion host operation and maintenance system for realizing automatic and unified management of each node, characterized in that it further comprises:

[0095] Bastion structure:

[0096] Divide the network into independent areas according to the business sites, and treat each independent network environment in different regions as an independent node. Then plan a machine in each node as the node's security entrance login machine and a master machine as the node's operation and maintenance control. The master is responsible for managing all business hosts of the node.

[0097] A Central master control machine, which serves as the Login machine and the superior master machine of the Master machine of each independent node; the Central master control machine is deployed with a WEB system, which has the construction files and configuration information of the global system. The Central master control machine regularly synchronizes the relevant data of each node with the Master machine of each node. The Central master control machine is used to send a task to the Master machine of the target regional node, and the task includes sending one of the tasks including user authority management and control, machine monitoring, and daily operation and maintenance to the target machine of the node;

[0098] The Master machine is used to set up the Sentinel program, and when the task is detected, it analyzes and completes the corresponding task operation.

[0099] Set up a Redis database on each node, and store the tool script library, crontab tasks, and configuration files in a specific location. The tool script library is used to facilitate the synchronization of a series of tool scripts for users; crontab tasks include disk cleanup tasks and salt-minion automatic startup tasks;

[0100] The Master machine is also configured to receive the Central control machine to send update and / or extension tasks including tool script library, crontab tasks, and configuration files to the Master machine of the corresponding node; and update the corresponding tool script library, crontab tasks, and configuration files at the specified location; and then take over the corresponding machine to process the content related to the corresponding location.

[0101] A system proposed by the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. According to the following description, the advantages and features of the present invention will become clearer. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the accompanying drawings can be arranged and designed in various different configurations.

[0102] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0103] It should be noted that similar reference numerals represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined or explained in the subsequent drawings. The embodiments of the present invention are described in detail above in conjunction with the drawings, but the present invention is not limited to the above embodiments. Even if various changes are made to the present invention, if these changes fall within the scope of the claims of the present invention and their equivalents, they still fall within the protection scope of the present invention.

Claims

1. A bastion host operation and maintenance method for realizing automatic and unified management of each node, characterized in that: include: S1: Set up the fortress architecture: Divide the network into independent areas according to the business sites, and treat each independent network environment in different regions as an independent node. Then plan a machine in each node as the node's security entrance login machine and a master machine as the node's operation and maintenance control. The master machine is responsible for managing all business hosts of the node. Set up a Central master machine as the Login machine of each independent node and the superior Master machine of the Master machine; the Web system is deployed on the Central master machine, which has the construction files and configuration information of the global system. The Central master machine regularly synchronizes the relevant data of each node with the Master machine of each node; S2: The Central master control machine sends a task to the Master machine of the target regional node, where the task includes sending one of the tasks including user authority management, machine monitoring, and daily operation and maintenance to the target machine of the node; S3: The Master machine sets up a sentinel program, and when it detects the task, it parses and completes the corresponding task operation, including: When the new machine executes the access script, it completes the management of the Master machine in the area, and performs a series of template actions on the new machine according to the default SaltStack execution template rules. The template configuration file of each Master machine is sent and synchronized by the master control machine. The extension changes of the template configuration file are all updated from the master control machine and synchronized to the Master machines of each node. The general initialization template is updated and synchronized by the master control machine. The master control machine will not update the agreed template or custom file node to ensure the consistency of the global templates, tools, and files of the entire network, and will not be maliciously adjusted or modified. Corresponding to the above template actions, the following basic components are deployed on the Master machine of each node: lt-Master is the Salt control machine, which receives the business Salt-Minion machines in the management node network; Salt-API / Salt-Minion receives the scheduling tasks of the Central master control machine; Nginx local network area Salt source ensures that the business machines in the network area download and update Salt-Minion in the intranet; Influxdata time series database accesses the monitoring data of all business hosts managed by the Master machine; Ansible is convenient for operation and maintenance personnel familiar with Ansible to manage; Prometheus is responsible for the monitoring and alarm of the node resources; / opt / sys instructions are used to generate common management tools by default; The basic components deployed on the Central master control machine are: OpenResty Web server; Redis database, which records the full amount of user permissions-machine correspondence data for each node; PostgreSQL, which records the information of registered users of the system; Matrix scheduling controller, which is responsible for scheduling the Login machine and the Master machine to perform related tasks; Prometheus monitoring system, which is responsible for monitoring the related services of the Login machine and the Master machine of each node.

2. The method according to claim 1, characterized in that The user authority management task for the target machine of the node further includes: The Central master control machine generates Local-Login RSA Key pairs for each user who applies and is authorized, and gives the user account on the Login machine that creates the corresponding node, so that each user has his or her own independent account, and records the user's permissions in the master control Redis database. The permissions further include the relevant node information, Master machine, permission type, and permission validity period that are adapted to the permissions; The Central master control machine sends the task corresponding to the Central master control machine to the Login machine or Master machine of the relevant node with the corresponding authority; The Master machine receives the task, creates the user's account information, and records the user-machine information including the permission validity period into the Redis database on the Login machine of the node corresponding to the node; Each node periodically starts the permission recovery program to recover the user-machine information whose permissions have expired on that day; When the Central master control machine receives an emergency user permission management request including employee resignation, it deletes the corresponding record in the master control Redis database and sends a user permission management task to the Master machine of the corresponding node to reclaim the user's machine permission.

3. The method according to claim 1 or 2, characterized in that Also includes: When a new machine is connected to a node, it is configured to access and manage the Salt-Master of the node: by running the access machine initialization script of the Master machine of the node, the machine initialization operation is completed, the machine is standardizedly named and Salt-Minion is installed, and the Master machine to which it belongs is configured. After execution, it is immediately accessed and managed by the Master machine of the node, and the Redis database of this node and the Redis database of the remote Central master control machine are recorded.

4. The method according to claim 3, characterized in that When a new machine is connected to a node, the Salt-Master access management configured to perform the node further includes executing a preset publishing machine public key acquisition procedure to obtain the public key information corresponding to the machine from the public key extension file at a preset location of the Redis database of the node; When the Central master control machine generates Local-Login RSA Keypairs or public key updates for each user who applies and is authorized, it sends the public key update task to the Master machine where the relevant node that matches the user's authority is located. The Master machine receives the task of updating the public key and updates the new public key information in the public key extension file at the corresponding position of the Redis database of the node; At the same time, the corresponding machine obtains the updated public key information corresponding to the machine from the public key extension file in the preset location of the Redis database of this node.

5. The method according to claim 3, characterized in that When a new machine is connected to a node, the Salt-Master access management configured for the node is further executed, including: obtaining the tool script library at the determined location of the Redis database of this node to facilitate the synchronization of a series of tool scripts for users; writing crontab tasks at the preset location, including disk cleaning tasks and salt-minion automatic pull-up tasks; automatically configuring the configuration files at the specified location; The Central master control machine sends update and / or expansion tasks including tool script libraries, crontab tasks, and configuration files to the Master machine of the corresponding node; The Master machine of the corresponding node updates the tool script library, crontab tasks, and configuration files corresponding to the specified location; The master machine takes over the corresponding machine to process the content related to the corresponding location.

6. The method according to claim 1, characterized in that Also includes: The Central master control machine sets the build files and configuration information of the global system, regularly synchronizes and backs up the core data to the Master machine of each node, and synchronizes the build files and configuration information of the global system to the enterprise git repository; When a problem occurs on the Central control machine, the build files and configuration information of the global system are updated to the enterprise git repository; When a problem occurs on a Login machine or Master machine, a new Login machine and Master machine generated by a template are obtained from the Central control machine.

7. The method according to claim 1, characterized in that Also includes: The Central master control machine acts as a dispatch center to manage the Login machines and Master machines of each independent node, so as to indirectly manage the host of each node in a unified manner; The Central master control machine will deploy a Web system to integrate various daily necessary functions, unify the collected data, and display the IT resource status of all nodes as a data overview, as well as display real-time monitoring related data according to the application grouping dimension.

8. A bastion host operation and maintenance system that realizes automatic and unified management of each node, characterized in that: include: Bastion structure: Divide the network into independent areas according to the business sites, and treat each independent network environment in different regions as an independent node. Then plan a machine in each node as the node's security entrance login machine and a master machine as the node's operation and maintenance control. The master machine is responsible for managing all business hosts of the node. A Central master control machine, which serves as the Login machine and the superior master machine of the Master machine of each independent node; the Central master control machine is deployed with a Web system, which has the construction files and configuration information of the global system. The Central master control machine regularly synchronizes the relevant data of each node with the Master machine of each node. The Central master control machine is used to send a task to the Master machine of the target regional node, and the task includes sending one of the tasks including user authority management, machine monitoring, and daily operation and maintenance to the target machine of the node; The Master machine is used to set up the Sentinel program. When the task is detected, it analyzes and completes the corresponding task operation, including: When the new machine executes the access script, it completes the management of the Master machine in the area, and performs a series of template actions on the new machine according to the default SaltStack execution template rules. The template configuration file of each Master machine is sent and synchronized by the master control machine. The extension changes of the template configuration file are all updated from the master control machine and synchronized to the Master machines of each node. The general initialization template is updated and synchronized by the master control machine. The master control machine will not update the agreed template or custom file node to ensure the consistency of the global templates, tools, and files of the entire network, and will not be maliciously adjusted or modified. Corresponding to the above template actions, the following basic components are deployed on the Master machine of each node: lt-Master is the Salt control machine, which receives the business Salt-Minion machines in the management node network; Salt-API / Salt-Minion receives the scheduling tasks of the Central master control machine; Nginx local network area Salt source ensures that the business machines in the network area download and update Salt-Minion in the intranet; Influxdata time series database accesses the monitoring data of all business hosts managed by the Master machine; Ansible is convenient for operation and maintenance personnel familiar with Ansible to manage; Prometheus is responsible for the monitoring and alarm of the node resources; / opt / sys instructions are used to generate common management tools by default; The basic components deployed on the Central master control machine are: OpenResty Web server; Redis database, which records the full amount of user permissions-machine correspondence data for each node; PostgreSQL, which records the information of registered users of the system; Matrix scheduling controller, which is responsible for scheduling the Login machine and the Master machine to perform related tasks; Prometheus monitoring system, which is responsible for monitoring the related services of the Login machine and the Master machine of each node.

9. The system according to claim 8, characterized in that Set up a Redis database on each node, and store the tool script library, crontab tasks, and configuration files in a specific location. The tool script library is used to synchronize a series of tool scripts for users; crontab tasks include disk cleanup tasks and salt-minion automatic startup tasks; The Master machine is also configured to take over as the Central master control machine to send update and / or expansion tasks including tool script libraries, crontab tasks, and configuration files to the Master machine of the corresponding node; and update the corresponding tool script libraries, crontab tasks, and configuration files at the specified location; and then take over the corresponding machine to process the relevant content at the corresponding location.