CN110233893B - Method and system for efficiently updating server file based on ansable - Google Patents

Method and system for efficiently updating server file based on ansable Download PDF

Info

Publication number
CN110233893B
CN110233893B CN201910505278.7A CN201910505278A CN110233893B CN 110233893 B CN110233893 B CN 110233893B CN 201910505278 A CN201910505278 A CN 201910505278A CN 110233893 B CN110233893 B CN 110233893B
Authority
CN
China
Prior art keywords
server
file
files
ansable
servers
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910505278.7A
Other languages
Chinese (zh)
Other versions
CN110233893A (en
Inventor
张庆鑫
邵非
潘冰
阚宝丽
孙贤雯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Software Co Ltd
Original Assignee
Inspur Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inspur Software Co Ltd filed Critical Inspur Software Co Ltd
Priority to CN201910505278.7A priority Critical patent/CN110233893B/en
Publication of CN110233893A publication Critical patent/CN110233893A/en
Application granted granted Critical
Publication of CN110233893B publication Critical patent/CN110233893B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network

Abstract

The invention discloses a method and a system for efficiently updating server files based on an infrastructure, belonging to the field of computer software deployment, aiming at solving the technical problem of ensuring quality and reducing manual participation in the scene of batch updating of a large number of files on a large-scale server cluster, and the technical scheme is as follows: the method is oriented to various static and dynamic files hosted by a server, records directory structures of the positions of the files, screens modification time as a condition, places the screened files at the appointed positions of target servers according to the directory structures, achieves one-key completion of automatically identifying the files modified in each path within the modification time range, and automatically sends the files to each target server, and improves the updating efficiency of the server files. The system comprises a file server, a server and a plurality of servers, wherein the file server packs modified files in a designated directory and each subdirectory in the server within a modification time range.

Description

Method and system for efficiently updating server file based on ansable
Technical Field
The invention relates to the field of computer software deployment, in particular to a method and a system for efficiently updating a server file based on an alias.
Background
With the fact that the service range of the current urban network APP covers many cities in the whole country, in order to support the huge number of users and the large amount of concurrency and bring good user experience to the users, a service distributed deployment scheme is adopted, the cluster mode is also adopted by components including monitoring and the like, and the scale of the server reaches hundreds. In this case, manual maintenance inevitably causes a great deal of manpower waste, and compared with programs and instructions, manual operation has great instability and is easy to miss, which brings about unnecessary time waste.
In the previous deployment and server maintenance process, it is found that the functions are more and more perfect and the number of files is increased day by day as time is accumulated. Batch updating of files and large-scale file deployment become time-consuming work, the transmission time of a file package is too long, most of files are repeatedly covered, if the files are respectively picked and transmitted to a specified position one by one, a large amount of manual operations are generated, manpower is wasted, and partial files needing to be updated or paths for wrongly writing the files can be omitted during the manual operations, so that a large amount of time is consumed for troubleshooting and solving, and the efficiency is definitely very low. For example, since a directory is generated, internal files including sub-directory files have reached more than 10G as time goes on, and only tens of M files may be needed to be updated at a time, while the number of files to be updated also reaches tens of hundreds, and is distributed to the sub-directories. At this time, the changed files need to be quickly and accurately screened out and updated to corresponding positions on each server in an incremental manner. Therefore, how to realize on a large-scale server cluster, under the scene of updating huge numbers of files in batches, the quality is ensured, the manual participation is reduced, the files which are changed in a certain path within a certain time range are automatically identified by one key and are automatically sent to each target server, so that the old files which are not changed are effectively prevented from being repeatedly covered, and the problem of improving the file updating efficiency of the server is urgently needed to be solved in the prior art at present.
Patent document CN105245371A discloses an ansable-based automatic deployment system and method, belonging to the field of automatic deployment; the creation module in the system is responsible for constructing a server module through an infrastructure and providing the server module for an application server; the monitoring module is responsible for constructing a functional plug-in on the monitored host through an infrastructure so as to control the controlled host; the interface module is responsible for providing a corresponding interface on the Web server for the user to use. However, the technical scheme cannot quickly and accurately screen the only changed files and update the files to corresponding positions on each server in an incremental manner.
Disclosure of Invention
The technical task of the invention is to provide a method and a system for efficiently updating server files based on an allowed, so as to solve the problem of how to realize the purpose of ensuring the quality, reducing the manual participation, automatically identifying the files which are changed in a certain path within a certain time range by one key and automatically sending the files to each target server under the scene of updating a large number of files in batches on a large-scale server cluster, so that the files which are not changed are effectively prevented from being repeatedly covered, and the file updating efficiency of the server is improved.
The technical task of the invention is realized according to the following mode, and the method is a server file efficient updating method based on the ansable, and the method is used for recording the directory structure of the position of a file for various static and dynamic files hosted by a server, screening the modification time as a condition, placing the screened files at the appointed position of a target server according to the directory structure, realizing one-key completion of automatically identifying the files modified in each path within the modification time range, automatically sending the files to each target server, and improving the file updating efficiency of the server.
Preferably, the method comprises the following steps:
s1, screening all files under various server directories and sub-directories under the condition of modification time, and updating files hosted by the same server in batch in an incremental manner;
s2, uploading the file screened by taking the modification time as a condition to a file server;
s3, recording the accurate position of the file before uploading after the file is uploaded to the file server;
s4, when the client service is called to obtain the update, all the class servers needing to be updated are called accurately;
s5, the file server reaches each client server and provides https communication for the internet server;
s6, when the internet is used for scheduling, each internet server should add a white list to prohibit illegal access;
s7, after the client service of each server is called, the Internet server transmits files by using an https mode;
and S8, the class server automatically updates the file to the accurate position after acquiring the updated file package.
Preferably, the file server in step S2 is configured to connect to each class server, and explicitly classify the usage of each class server through the configuration file, so that when updating the file, it can be accurately located to which class servers under the usage type should be updated, thereby avoiding missing and incorrect issuance.
Preferably, the file server adopts security measures for adding access white lists to the remote class servers accessed through the external network, and only the class servers with the white lists are allowed to access.
Preferably, the file server is used for storing the file compression package, transmitting the file compression package by adopting an scp type internally and providing https type downloading externally.
Preferably, the specific step of uploading the file filtered under the condition of the modification time to the file server in the step S2 is as follows:
s201, all files which are changed within a period of time in all files in any one directory, including a secondary directory, on a server are retrieved, and compressed files are generated according to the directory structure of the files;
s202, pushing the compressed file produced in the step S201 to a file server.
Preferably, when the client service is invoked to obtain the update in step S4, the specific steps of accurately invoking all servers that need to be updated are as follows:
s401, client services (agent for short, deployed on servers of each client and used for sending requests to file servers and acquiring files) are respectively pushed to each server by adopting an enterprise tool;
s402, calling client services on all servers in the corresponding category in batch through an ansable tool to acquire a file compression package required to be updated from a file server;
and S403, after the file compression package is obtained, decompressing the file compression package to a specified position on the server.
Preferably, after the client services of the servers are called in step S7, the same lan server transmits the client services using the scp mode.
A server file high-efficiency updating system based on the directory comprises a file server, a server and a plurality of servers, wherein the file server packs modified files in a designated directory and modification time ranges in all sub-directories in the server, and the server uploads the packed files to the file server; the file server respectively sends the client services to all the class servers by adopting an ansable tool, and the class servers call the client services on all the servers under the specified class in batches through the ansable tool to obtain the file compression packages required to be updated from the file server.
The method and the system for efficiently updating the server file based on the ansable have the following advantages:
the method has the main problems that on a large-scale server cluster, under the scene of updating a large number of files in batches, the quality is guaranteed, manual participation is reduced, the files which are changed in a certain path within a certain time range are automatically identified by one key and are automatically sent to each target server, so that the old files which are not changed are effectively prevented from being repeatedly covered, and the file updating efficiency of the server is improved;
(II) the batch processing is carried out through the ansable, so that the labor is saved, and the manual errors are effectively reduced;
the files in the directory structure are packed according to the directory structure, so that the accurate positions of the files can be accurately recorded, and the files are effectively prevented from being updated to invalid paths;
the files screened under the condition of modification time are packaged, so that the situation that a large number of unmodified files are repeatedly covered due to the fact that the files which are not modified for a long time are packaged is avoided, packaging time, transmission time and updating time of the server files are saved, and updating efficiency is improved;
the file server is used, so that the server can conveniently acquire files, and a backup can be reserved for each change of the files for quick recovery;
and (VI) the servers in the same local area network adopt an scp mode, so that the servers are quick and safe, the servers of the Internet need to be used, and the communication link adopts https encryption, so that high safety in the transmission process is ensured.
Drawings
The invention is further described below with reference to the accompanying drawings.
FIG. 1 is a flow chart of a method for efficiently updating a server file based on an anchor.
Detailed Description
The method and system for efficiently updating the server file based on the infrastructure of the present invention are described in detail below with reference to the drawings and the specific embodiments.
Example 1:
as shown in the attached figure 1, the method for efficiently updating the server file based on the ansable records the directory structure of the position of the file facing to various static and dynamic files hosted by the server, screens the modification time as a condition, places the screened file at the appointed position of a target server according to the directory structure, realizes one-key completion of automatically identifying the file modified in each path within the modification time range, and automatically sends the file to each target server, thereby improving the file updating efficiency of the server; the method comprises the following specific steps:
s1, screening all files under various server directories and sub-directories under the condition of modification time, and updating files hosted by the same server in batch in an incremental manner;
s2, uploading the file screened by taking the modification time as a condition to a file server; the file server is used for being connected to all the class servers, and the purposes of all the class servers are clearly classified through the configuration files, so that the class servers to which the purpose type is updated can be accurately positioned when the files are updated, and omission and mistaken issuing are avoided. The file server accesses the different place class server through the external network, and only allows the class server with the white list to access by adopting the safety measure of adding the access white list. The file server is used for storing the file compression package, transmitting the file compression package by adopting an scp type internally and providing https type downloading externally. The method comprises the following specific steps:
s201, all files which are changed within a period of time in all files in any one directory, including a secondary directory, on a server are retrieved, and compressed files are generated according to the directory structure of the files;
s202, pushing the compressed file produced in the step S201 to a file server.
S3, recording the accurate position of the file before uploading after the file is uploaded to the file server;
s4, when the client service is called to obtain the update, all the class servers needing to be updated are called accurately; the method comprises the following specific steps:
s401, client services (agent for short, deployed on servers of each client and used for sending requests to file servers and acquiring files) are respectively pushed to each server by adopting an enterprise tool;
s402, calling client services on all servers in the corresponding category in batch through an ansable tool to acquire a file compression package required to be updated from a file server;
and S403, after the file compression package is obtained, decompressing the file compression package to a specified position on the server.
S5, the file server reaches each client server and provides https communication for the internet server;
s6, when the internet is used for scheduling, each internet server should add a white list to prohibit illegal access;
s7, after the client service of each server is called, the Internet server transmits files by using an https mode; after the client services of each server are called, the same local area network server transmits by using the scp mode.
And S8, the class server automatically updates the file to the accurate position after acquiring the updated file package.
Example 2:
the system comprises a file server, a server and a plurality of servers, wherein the file server packs modified files in a designated directory and modification time ranges in all subdirectories in the server, and uploads the packed files to the file server; the file server respectively sends the client services to all the class servers by adopting an ansable tool, and the class servers call the client services on all the servers under the specified class in batches through the ansable tool to obtain the file compression packages required to be updated from the file server.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (8)

1. A server file efficient updating method based on ansable is characterized in that the method is oriented to various static and dynamic files hosted by a server, records directory structures of positions where the files are located, screens modification time as a condition, places the screened files at appointed positions of target servers according to the directory structures, achieves one-key completion of automatic identification of the files modified in each path within a modification time range, automatically sends the files to each target server, and improves the updating efficiency of the server files; the method comprises the following steps:
s1, screening all files under various server directories and sub-directories under the condition of modification time, and updating files hosted by the same server in batch in an incremental manner;
s2, uploading the file screened by taking the modification time as a condition to a file server;
s3, recording the accurate position of the file before uploading after the file is uploaded to the file server;
s4, when the client service is called to obtain the update, all the class servers needing to be updated are called accurately;
s5, the file server reaches each client server and provides https communication for the internet server;
s6, when the internet is used for scheduling by the ansable, adding a white list to each internet server to prohibit illegal access;
s7, after the client service of each server is called, the Internet server transmits files by using an https mode;
and S8, the class server automatically updates the file to the accurate position after acquiring the updated file package.
2. The method for efficiently updating server files based on the ansable according to claim 1, wherein the file server in the step S2 is used to connect to each class server, and has a definite classification on the usage of each class server through the configuration file, and when updating the file, it can accurately locate which class servers should be updated under the usage type, thereby avoiding missing and wrong issuance.
3. The method for efficiently updating the file of the server based on the ansable according to claim 1 or 2, wherein the file server is accessed through the foreign class server accessed by the external network, and only the class server with the white list is allowed to access by adopting a security measure for adding the access white list.
4. The method for efficiently updating the file of the server based on the ansable according to claim 3, wherein the file server is used for storing the file compression package, internally adopting scp type transmission and externally providing https type downloading.
5. The method for efficiently updating the server file based on the ansable of claim 1, wherein the specific steps of uploading the file filtered on the condition of the modification time to the file server in the step S2 are as follows:
s201, all files which are changed within a period of time in all files in any one directory, including a secondary directory, on a server are retrieved, and compressed files are generated according to the directory structure of the files;
s202, pushing the compressed file produced in the step S201 to a file server.
6. The method for efficiently updating the file of the server based on the ansable according to claim 1, wherein when the client service is invoked to obtain the update in step S4, the specific steps of accurately invoking all servers that need to be updated are as follows:
s401, pushing client services to each server by adopting an ansable tool;
s402, calling client services on all servers in the corresponding category in batch through an ansable tool to acquire a file compression package required to be updated from a file server;
and S403, after the file compression package is obtained, decompressing the file compression package to a specified position on the server.
7. The method for efficiently updating the file of the server based on the ansable according to claim 1, wherein the same lan server transmits the file in the scp mode after the client services of the servers in the step S7 are called.
8. A server file efficient updating system based on the directory is characterized by comprising a file server, a server and a plurality of servers, wherein the file server sends an instruction for packaging files modified within a modification time range in a specified directory and each subdirectory to the server, and the server packages the files and uploads the packaged files to the file server after receiving the instruction of the file server; the file server respectively sends the client services to all the class servers by adopting an ansable tool, and the class servers call the client services on all the servers under the specified class in batches through the ansable tool to obtain the file compression packages required to be updated from the file server.
CN201910505278.7A 2019-06-12 2019-06-12 Method and system for efficiently updating server file based on ansable Active CN110233893B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910505278.7A CN110233893B (en) 2019-06-12 2019-06-12 Method and system for efficiently updating server file based on ansable

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910505278.7A CN110233893B (en) 2019-06-12 2019-06-12 Method and system for efficiently updating server file based on ansable

Publications (2)

Publication Number Publication Date
CN110233893A CN110233893A (en) 2019-09-13
CN110233893B true CN110233893B (en) 2021-07-20

Family

ID=67859656

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910505278.7A Active CN110233893B (en) 2019-06-12 2019-06-12 Method and system for efficiently updating server file based on ansable

Country Status (1)

Country Link
CN (1) CN110233893B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110929278A (en) * 2019-11-21 2020-03-27 浪潮云信息技术有限公司 Ansible-based cloud database authority management system and method
CN112988694A (en) * 2019-12-12 2021-06-18 北京车和家信息技术有限公司 Operation and maintenance method and device for batch management of network file systems by centralized management platform
CN112685503A (en) * 2021-01-04 2021-04-20 上海圣剑网络科技股份有限公司 Data processing method, device and system based on automatic operation and maintenance tool

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105183768A (en) * 2015-07-31 2015-12-23 华为数字技术(成都)有限公司 File management method, apparatus and terminal device
CN106168965A (en) * 2016-07-01 2016-11-30 竹间智能科技(上海)有限公司 Knowledge mapping constructing system
US9632812B1 (en) * 2014-05-12 2017-04-25 Trintri Inc. Collecting data associated with virtual machines from various data sources
CN108228322A (en) * 2016-12-12 2018-06-29 阿里巴巴集团控股有限公司 A kind of distributed link tracking, analysis method and server, global scheduler
CN108737562A (en) * 2018-06-07 2018-11-02 山东中创软件商用中间件股份有限公司 A kind of document transmission method and relevant apparatus

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9632812B1 (en) * 2014-05-12 2017-04-25 Trintri Inc. Collecting data associated with virtual machines from various data sources
CN105183768A (en) * 2015-07-31 2015-12-23 华为数字技术(成都)有限公司 File management method, apparatus and terminal device
CN106168965A (en) * 2016-07-01 2016-11-30 竹间智能科技(上海)有限公司 Knowledge mapping constructing system
CN108228322A (en) * 2016-12-12 2018-06-29 阿里巴巴集团控股有限公司 A kind of distributed link tracking, analysis method and server, global scheduler
CN108737562A (en) * 2018-06-07 2018-11-02 山东中创软件商用中间件股份有限公司 A kind of document transmission method and relevant apparatus

Also Published As

Publication number Publication date
CN110233893A (en) 2019-09-13

Similar Documents

Publication Publication Date Title
CN110233893B (en) Method and system for efficiently updating server file based on ansable
CN101621405B (en) Distributed type management monitoring system, monitoring method and establishing method thereof
US6023507A (en) Automatic remote computer monitoring system
EP3386150B1 (en) Terminal failure processing method, device and system
US9417849B2 (en) Communications network, computer architecture, computer-implemented method and computer program product for development and management of femtocell-based applications
CN101222367B (en) Method and network guard system used for cluster network element updating version file
CN107704360B (en) Monitoring data processing method, equipment, server and storage medium
CN107688611B (en) Saltstack-based Redis key value management system and method
CN105808274A (en) Software upgrading method and system as well as corresponding clients and servers
US10033796B2 (en) SAAS network-based backup system
KR20080016160A (en) Method for managing software in terminal using device management server
CN103019757A (en) Method, device and system for synchronizing software among multiple clients
CN106339273A (en) Application program restoration method, terminal and server
CN102209118A (en) Distributed mass data gathering method
CN101854745B (en) Transmission method of software version and device thereof
CN108390907B (en) Management monitoring system and method based on Hadoop cluster
CN107562568B (en) File backup method and device
CN113407555B (en) Operation data updating method and system of equipment handheld terminal
CN113407635B (en) Multi-terminal data synchronization method and system for intelligent manufacturing
CN110535919B (en) Network access method and device of concentrator and power peak regulation system
CN112527381A (en) Multi-platform software version management and updating system
CN113055490B (en) Data storage method and device
CN113407636B (en) Offline data synchronization method and device for digital factory and server
CN113824801B (en) Intelligent integration terminal unified access management component system
KR20150031661A (en) Mobile communication apparatus and method for managing diagnosis information thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20210628

Address after: No. 1036, Shandong high tech Zone wave road, Ji'nan, Shandong

Applicant after: INSPUR SOFTWARE Co.,Ltd.

Address before: 250100 Ji'nan hi tech Zone No. 2877, Shandong Province

Applicant before: INSPUR GROUP Co.,Ltd.

GR01 Patent grant
GR01 Patent grant