Version and authority management method of oversized file
Technical Field
The invention relates to the technical field of computers, in particular to a version and authority management method of an oversized file.
Background
In the research and development process of software, various types of files are usually output, besides code files, files such as design manuscripts, pictures, webpages, scripts and the like are generated, and the files and the codes are possibly input and modified by a plurality of developers and are subject to version evolution along with the whole software development period; in order to save the files safely and effectively coordinate parallel modification of a plurality of developers, the developers can acquire the latest file version in time and easily recover to the previous version, and meanwhile, the files are prevented from being lost and mishandled and need to be version-managed; in addition, the files also belong to the development assets of software, and authority management is required to be carried out on the files, particularly, files with large volumes, proportional design manuscripts, pictures and the like; the size may be hundreds of megabytes or even a few G, and version and rights management is more desirable.
Currently, tools that typically reference sources, such as SVN (version control system), manage the version and rights of files, which keep track of time-varying data, place these data in a central data archive, which records each time the file changes, so that the user can restore the archive to an old version or view the history of the file changes; SVN adopts a client/service system, a local server needs to be built, various versions of the project are stored on the server, program developers firstly obtain the latest version of the project from the server and copy the latest version of the project to the local server, and on the basis, each developer can independently develop the project on the own client and submit new codes to the server at any time; the latest codes on the server can be obtained through updating operation, so that the consistency with the versions used by other developers is maintained; the SVN adopts centralized management, stores contents through a relational database and a binary storage mode, sets rights at a server, and refines according to a directory; as long as the configuration is good at the server, the client only needs to synchronously submit, and the method is convenient to use, simple to operate and easy to get up.
Some companies and organizations will purchase dedicated data storage settings to manage files, such as NAS (network attached storage); NAS is defined as a special dedicated data storage server that includes storage devices (e.g., disk arrays, CD/DVD drives, tape drives, or removable storage media) and embedded system software that can provide cross-platform file sharing functionality; in the configuration, the NAS centrally manages and processes all data on the network, loads are unloaded from application or enterprise servers, the total cost is effectively reduced, and the user investment is protected; the NAS itself can also support multiple protocols (e.g., NFS, CIFS, FTP, HTTP, etc.) and various operating systems; through any workstation, the NAS device can be intuitively and conveniently managed by adopting an IE or Netscape browser without directly surfing the Internet by a server.
However, the management of oversized files in the prior art has the following disadvantages:
The SVN is adopted for version and authority management, and a server with common configuration cannot meet the performance requirement of the server, so that a developer can have low updating speed when operating a file; when a plurality of developers interact with the server even, the phenomenon of blocking possibly occurs, and development work is influenced;
the NAS is adopted to manage the version and the authority, a developer can only upload and delete the file through a browser, and can not review and track the modification history of the file or the directory; in addition, the NAS can only create user and configuration rights from the whole system level, can not perform rights configuration according to the catalogue like SVN, and can not meet the requirement of files on the rights granularity.
Disclosure of Invention
The invention aims to solve the defects in the prior art and provides a version and authority management method of an oversized file.
In order to achieve the above purpose, the invention adopts the following technical scheme:
A version and authority management method of an oversized file comprises the following steps:
s1: logging in the NAS and verifying a Docker suite on the NAS;
The NAS is a network attached storage device;
Inputting an IP address of the NAS in a browser, entering a login interface, and inputting a user name and a password of a root account in the login interface for login;
After the account number is successfully logged in, accessing a suite center, and selecting the latest version dock suite from the suite center for installation;
after the installation is completed, verifying whether the dock kit is successfully installed or not through a command line tool;
specifically, executing a dock version command through a command line tool, if the page of the dock kit can normally display version information, indicating that the dock kit is successfully installed, otherwise, the dock kit is failed to be installed, and reinstalling.
S2: creating an SVN mirror image;
The method comprises the following substeps:
S21: creating a catalog;
Creating a catalog on the NAS through mkdir commands, wherein the catalog is a mapping address of a root catalog of the SVN warehouse and a SVN container;
s22: pulling the centOS image and verifying;
pulling the centOS image from the public resource pool as a base image by docker pull CentOS commands;
The public resource library is an online warehouse for hosting public dock images and comprises various dock images which are already constructed;
the CentOS image is a dock image constructed based on a CentOS operating system;
verifying whether the downloading of the centOS image is successful through docker imsges commands;
Specifically, through docker imsges commands, listing all locally stored docker images, searching whether the output contains a row of the CentOS, and if so, downloading the CentOS images successfully; reverse downloading fails;
s23: creating and starting an SVN container;
Creating an SVN container by using a dock run command, and configuring an SVN container ID, a mapping catalog of the SVN container and a mapping access port of the SVN container based on a CentOS image;
Starting an SVN container, and verifying whether the SVN container is successfully started or not through a dock ps command; specifically, listing all running SVN containers through a dock ps command, checking whether the created SVN containers exist or not, and if so, indicating that the SVN containers are started successfully if the created SVN containers exist and are in a state of up; otherwise, the SVN container fails to start;
s3: installing and configuring SVN and authority;
The method comprises the following substeps:
s31: checking the condition of a currently running container;
Executing a dock ps command to list all containers currently running and displaying basic information of the containers, wherein the basic information comprises container IDs, mirror images, mapping access ports and the like;
s32: installing components required by SVN services in an SVN container;
Obtaining an SVN container ID created in the step S23 according to the basic information of the displayed container, executing a dock exec command to enter the SVN container, and installing components required by SVN service in the SVN container;
the components include httpd, subversion, mod _dav_svn, mod_ldap;
Httped refers to a APACHE HTTP server, subversion refers to a subversion version control system, mod_dav_svn refers to an Apache module of subversion, and mod_ldap refers to an LDAP module of a APACHE HTTP server;
s33: modifying a configuration file of the SVN;
Copying subversion the default configuration file into the configuration file of Apache; the Apache configuration file refers to a folder for storing APACHE HTTP servers;
Further, the system also comprises a loading module, SVN path configuration and LDAP configuration authentication;
The loading module comprises an SVN module for loading and supporting DAV protocol, a module for loading and controlling SVN access, a self-defining module and the like;
the SVN path configuration comprises the steps of configuring an SVN path, enabling a DAV protocol to support SVN, designating the directory created in the step S21 as a root directory of an SVN warehouse, allowing the SVN warehouse directory and contained content to be listed, and designating the position of an authority control file;
The LDAP configuration authentication designates the LDAP as an authentication provider, and a user name and a password are required to be provided during user authentication;
S4: starting and testing SVN service;
The method comprises the following substeps:
S41: starting Apache service and checking Apache service state;
starting APACHE HTTP the server using a start command, restarting the Apache service using a restart command or reloading the configuration file using a reload command if the Apache service is already running;
Checking the state of the Apache service through systemctl command, and if the Apache service operates normally, displaying the active/running state;
S42: configuring directory rights of SVN;
Changing the ownership of the directory created in the step S21 into users and user groups of Apache service;
s43: creating an SVN warehouse and configuring directory rights of the SVN warehouse;
Creating a new SVN warehouse through the create command;
Defining different user groups and users contained in each user group, wherein the user names are consistent with the user names in the LDAP; setting directory authorities of each group to the SVN warehouse according to actual requirements; the directory rights comprise read-write rights, read rights, write rights and the like;
performing an operation of adding, deleting, modifying and checking files in the SVN code warehouse by a developer on the windows system through a client tool TortoiseSVN;
The developer performs the operations of adding, deleting and checking the files in the SVN code warehouse through commands on the linux system;
and a developer uses tools such as a command line SmartSVN and the like to realize the operations of adding, deleting and checking files in the SVN code warehouse on the mac system.
Compared with the prior art, the invention has the beneficial effects that:
the method provided by the invention has the advantages that the directory is established as the warehouse address of the SVN server, the SVN dock mirror image is customized, the port of the mirror image bearing container and the mapping directory are configured, and the LDAP configuration is added in the SVN configuration of the mirror image, so that the performance problem of the server and the problem that the NAS cannot carry out version and authority management when the file volume is large are solved;
According to the method, a developer can directly access an address of the SVN server depending on the NAS through a browser of a local computer, and check or download files in an SVN code warehouse; or on the terminal setting that different operating systems can be connected to the SVN server, the operations of adding, deleting, modifying and checking files in the SVN code warehouse are realized through the LDAP account of the terminal setting, tools or command lines in the authority range.
Detailed Description
For a further understanding of the objects, construction, features, and functions of the invention, reference should be made to the following detailed description of the preferred embodiments.
A version and authority management method of an oversized file comprises the following steps:
s1: logging in the NAS and verifying a Docker suite on the NAS;
The NAS is a network attached storage device;
Inputting an IP address of the NAS in a browser, entering a login interface, and inputting a user name and a password of a root account in the login interface for login;
After the account number is successfully logged in, accessing a suite center, and selecting the latest version dock suite from the suite center for installation;
after the installation is completed, verifying whether the dock kit is successfully installed or not through a command line tool;
specifically, executing a dock version command through a command line tool, if the page of the dock kit can normally display version information, indicating that the dock kit is successfully installed, otherwise, the dock kit is failed to be installed, and reinstalling.
S2: creating an SVN mirror image;
The method comprises the following substeps:
S21: creating a catalog;
Creating a catalog on the NAS through mkdir commands, wherein the catalog is a mapping address of a root catalog of the SVN warehouse and a SVN container;
s22: pulling the centOS image and verifying;
pulling the centOS image from the public resource pool as a base image by docker pull CentOS commands;
The public resource library is an online warehouse for hosting public dock images and comprises various dock images which are already constructed;
the CentOS image is a dock image constructed based on a CentOS operating system;
verifying whether the downloading of the centOS image is successful through docker imsges commands;
Specifically, through docker imsges commands, listing all locally stored docker images, searching whether the output contains a row of the CentOS, and if so, downloading the CentOS images successfully; reverse downloading fails;
s23: creating and starting an SVN container;
Creating an SVN container by using a dock run command, and configuring an SVN container ID, a mapping catalog of the SVN container and a mapping access port of the SVN container based on a CentOS image;
specifically, the mapping directory of the SVN container is configured through the parameter of the name and the parameter of the v, and the mapping access port of the SVN container is configured through the parameter of the p;
Starting an SVN container, and verifying whether the SVN container is successfully started or not through a dock ps command; specifically, listing all running SVN containers through a dock ps command, checking whether the created SVN containers exist or not, and if so, indicating that the SVN containers are started successfully if the created SVN containers exist and are in a state of up; otherwise, the SVN container fails to start;
s3: installing and configuring SVN and authority;
The method comprises the following substeps:
s31: checking the condition of a currently running container;
Executing a dock ps command to list all containers currently running and displaying basic information of the containers, wherein the basic information comprises container IDs, mirror images, mapping access ports and the like;
s32: installing components required by SVN services in an SVN container;
Obtaining an SVN container ID created in the step S23 according to the basic information of the displayed container, executing a dock exec command to enter the SVN container, and installing components required by SVN service in the SVN container;
the components include httpd, subversion, mod _dav_svn, mod_ldap;
Httped refers to a APACHE HTTP server, subversion refers to a subversion version control system, mod_dav_svn refers to an Apache module of subversion, and mod_ldap refers to an LDAP module of a APACHE HTTP server;
The LDAP configuration authentication designates the LDAP as an authentication provider, and a user name and a password are required to be provided during user authentication;
by installing these components, the SVN container can run an Apache server and support access and management of Subversion warehouse through HTTP protocol;
s33: modifying a configuration file of the SVN;
Copying subversion the default configuration file into the configuration file of Apache; the Apache configuration file refers to a folder for storing APACHE HTTP servers;
Further, the system also comprises a loading module, SVN path configuration and LDAP configuration authentication;
The loading module comprises an SVN module for loading and supporting DAV protocol, a module for loading and controlling SVN access, a self-defining module and the like;
the SVN path configuration comprises the steps of configuring an SVN path, enabling a DAV protocol to support SVN, designating the directory created in the step S21 as a root directory of an SVN warehouse, allowing the SVN warehouse directory and contained content to be listed, and designating the position of an authority control file;
The SVN warehouse is accessed through HTTP by modifying the configuration file of SVN, and user authentication is carried out through LDAP; when a user accesses the svn path, a valid LDAP username and password must be provided to access the repository,
S4: starting and testing SVN service;
The method comprises the following substeps:
S41: starting Apache service and checking Apache service state;
starting APACHE HTTP the server using a start command, restarting the Apache service using a restart command or reloading the configuration file using a reload command if the Apache service is already running;
Checking the state of the Apache service through systemctl command, and if the Apache service operates normally, displaying the active/running state;
S42: configuring directory rights of SVN;
Changing the ownership of the directory created in the step S21 into users and user groups of Apache service;
ensuring that the Apache process (or any other process running the SVN service) has the right to access and modify the directory;
s43: creating an SVN warehouse and configuring directory rights of the SVN warehouse;
Creating a new SVN warehouse through the create command;
Defining different user groups and users contained in each user group, wherein the user names are consistent with the user names in the LDAP server; setting directory authorities of each group to the SVN warehouse according to actual requirements; the directory rights comprise read-write rights, read rights, write rights and the like;
performing an operation of adding, deleting, modifying and checking files in the SVN code warehouse by a developer on the windows system through a client tool TortoiseSVN;
The developer performs the operations of adding, deleting and checking the files in the SVN code warehouse through commands on the linux system;
and a developer uses tools such as a command line SmartSVN and the like to realize the operations of adding, deleting and checking files in the SVN code warehouse on the mac system.
The invention has been described with respect to the above-described embodiments, however, the above-described embodiments are merely examples of practicing the invention. It should be noted that the disclosed embodiments do not limit the scope of the invention. On the contrary, the intention is to cover all modifications, equivalents, and alternatives falling within the spirit and scope of the invention.