A distributed FTP container deployment method, device, terminal and storage medium

By using the service plug-in program in the FTP service to synchronize user information and configuration permissions, combined with the helm containerized deployment, the problems of inefficiency of existing FTP services under multi-user and high IO conditions and complex user management are solved, and more efficient file transfer and flexible user management are achieved.

CN115499308BActive Publication Date: 2025-04-08PENG CHENG LAB
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210972995.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-15
Publication Date
2025-04-08
Estimated Expiration
2042-08-15

AI Technical Summary

Technical Problem

Existing FTP services are difficult to improve file transfer efficiency through horizontal expansion under multi-user and high IO conditions, and user management is complex and operation is inflexible.

Method used

The user storage root directory information in the shared storage server is read through the service plug-in program, and the user information in the cluster is synchronized and initialized to store it in the database of the FTP service, verify the user login permissions, and configure the corresponding user storage root directory and FTP service access permission files. Finally, the FTP service is deployed to the cluster in a containerized manner.

Benefits of technology

It improves the scalability and high availability of the server, improves the efficiency of uploading and downloading of user files, and simplifies user management and permission configuration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115499308B_ABST
    Figure CN115499308B_ABST
Patent Text Reader

Abstract

The present invention discloses a distributed FTP container deployment method, device, terminal and storage medium. The method includes: calling a service plug-in program, reading user storage root directory information in a shared storage server through the service plug-in program, and synchronizing and initializing user information in a cluster and storing it in a database of an FTP service; verifying user login authority through user information in the database, and configuring corresponding user storage root directory information and FTP service access authority files in a shared storage server according to the verification result; and deploying the configured FTP service to the cluster in a helm containerized manner. The present invention improves the overall scalability and high availability of the server through a Mysql database, FTP service and a multi-container microservice distributed networking mode of a service plug-in, thereby improving the efficiency of uploading and downloading user files.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of distributed servers, and in particular to a distributed FTP container deployment method, device, terminal and storage medium. Background Art

[0002] In recent years, with the rapid development of cloud-native technology, containers, as a new type of software delivery, have provided great convenience for the release of microservice applications. Container technology packages applications and their required operating environments in a standard image format, which not only ensures the unification of the runtime environment and applications, but also enables the application to run on any environment equipped with the container engine. Currently, the more popular container engines in the industry include docker, podman, runc, cri-o and many other container solutions.

[0003] Usually, when different users use FTP services, not only do they need to set up specific permission directories for each user, but they also need to manually configure access rights for each user's permission directory to achieve user isolation for file security and confidentiality considerations. When the number of users is large, the above operations are complex, inflexible, and difficult to effectively manage new and old users. In addition, it is impossible to improve file transfer efficiency by horizontally expanding FTP services under multi-user and high IO conditions.

[0004] Therefore, the prior art needs to be improved. Summary of the invention

[0005] The technical problem to be solved by the present invention is that, in view of the defects of the prior art, the present invention provides a distributed FTP container deployment method, device, terminal and storage medium to solve the technical problem of low transmission efficiency of the existing FTP service container.

[0006] The technical solution adopted by the present invention to solve the technical problem is as follows:

[0007] In a first aspect, the present invention provides a distributed FTP container deployment method, comprising:

[0008] Calling a service plug-in program, reading user storage root directory information in a shared storage server through the service plug-in program, and synchronously initializing and storing user information in the cluster into a database of an FTP service;

[0009] Verify the user login authority through the user information in the database, and configure the corresponding user storage root directory information and FTP service access authority file in the shared storage server according to the verification result; wherein the user information is the user information in the database associated with the preset file in the FTP service;

[0010] Deploy the configured FTP service to the cluster in a helm containerized manner.

[0011] In one implementation, the calling of the service plug-in program includes:

[0012] The service plug-in is pre-set in the cluster in a process manner.

[0013] In one implementation, the process of reading user storage root directory information in a shared storage server through a service plug-in program and synchronously initializing and storing user information in a cluster in a database of an FTP service includes:

[0014] Reading user storage root directory information in the shared storage server through the service plug-in program;

[0015] All user information in the cluster user management system is obtained through the service plug-in program, and all user information is stored in the Mysql user data table of the FTP service.

[0016] In one implementation, the step of storing all user information in a Mysql user data table of the FTP service includes:

[0017] The service plug-in program is used to initialize the FTP service access rights of all users to obtain the initialized FTP service access rights.

[0018] In one implementation, the initialized FTP service access rights are rights obtained after user information in the cluster is synchronized to the FTP service.

[0019] In one implementation, the user login authority is verified by the user information in the database, and the corresponding user storage root directory information and FTP service access permission file are configured in the shared storage server according to the verification result, including:

[0020] Verify the user's login authority according to the user information in the database to determine whether the currently logged-in user is a new user;

[0021] If the currently logged-in user is a new user, the user information corresponding to the currently logged-in user is written into the Mysql user data table of the FTP service;

[0022] Access the FTP service cluster according to the user information corresponding to the current logged-in user, and create an FTP access permission file for the current logged-in user;

[0023] A corresponding user root directory is created in the shared storage server for the currently logged-in user.

[0024] In one implementation, the verifying the user login authority according to the user information in the database to determine whether the currently logged-in user is a new user includes:

[0025] Determining, by means of the service plug-in program, whether there is a user root directory corresponding to the currently logged-in user in the shared storage server;

[0026] If there is no user root directory corresponding to the currently logged-in user, it is determined that the currently logged-in user is a new user.

[0027] In one implementation, accessing the FTP service cluster according to the user information corresponding to the currently logged-in user and creating an FTP access permission file for the currently logged-in user includes:

[0028] Access the FTP service cluster according to the user information corresponding to the current logged-in user, and determine the file name and location corresponding to the current logged-in user;

[0029] Configure the user permission file corresponding to the currently logged-in user in the ghome directory of the Linux server according to the file name and location.

[0030] In one implementation, the user login authority is verified according to the user information in the database to determine whether the currently logged-in user is a new user, and then includes:

[0031] If the currently logged-in user is an old user, the corresponding FTP access permission file is modified and updated through the service plug-in program.

[0032] In one implementation, deploying the configured FTP service to the cluster in a helm containerized manner includes:

[0033] Identify the pod container corresponding to the FTP service based on the nodeseletor label;

[0034] Use the pam file to associate the database in the configured FTP service, and deploy the associated FTP service to the cluster in a helm containerized manner.

[0035] In a second aspect, the present invention provides a distributed FTP container deployment device, comprising:

[0036] An initialization module is used to call a service plug-in program, read the user storage root directory information in the shared storage server through the service plug-in program, and synchronize and initialize the user information in the cluster and store it in the database of the FTP service;

[0037] An access rights configuration module, used to verify the user login rights through the user information in the database, and configure the corresponding user storage root directory information and FTP service access rights file in the shared storage server according to the verification result; wherein the user information is the user information in the database associated with the preset file in the FTP service;

[0038] The container deployment module is used to deploy the configured FTP service into the cluster in a helm containerized manner.

[0039] In a third aspect, the present invention provides a terminal, comprising: a processor and a memory, wherein the memory stores a distributed FTP container deployment program, and when the distributed FTP container deployment program is executed by the processor, it is used to implement the operation of the distributed FTP container deployment method as described in the first aspect.

[0040] In a fourth aspect, the present invention further provides a storage medium, which is a computer-readable storage medium, and which stores a distributed FTP container deployment program. When the distributed FTP container deployment program is executed by a processor, it is used to implement the operation of the distributed FTP container deployment method as described in the first aspect.

[0041] The present invention adopts the above technical solution to achieve the following effects:

[0042] The present invention reads the user storage root directory information in the shared storage server through a service plug-in program, and synchronously initializes and stores the user information in the cluster in the database of the FTP service. The user login authority can be verified through the user information in the database, and the corresponding user storage root directory information and FTP service access permission file are configured in the shared storage server according to the verification result; the configured FTP service is deployed to the cluster in a helm containerized manner. The present invention improves the overall scalability and high availability of the server through the multi-container microservice distributed networking mode of the Mysql database, FTP service and service plug-in, thereby improving the efficiency of uploading and downloading user files. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying creative work.

[0044] Figure 1 It is a flow chart of a distributed FTP container deployment method in one implementation of the present invention.

[0045] Figure 2 It is a schematic diagram of a distributed FTP container system in one implementation of the present invention.

[0046] Figure 3 It is a functional principle diagram of a terminal in one implementation of the present invention.

[0047] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0048] In order to make the purpose, technical solution and advantages of the present invention clearer and more specific, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0049] Exemplary Methods

[0050] The current implementation of FTP services is generally done by deploying FTP services on bare metal. This method requires creating a designated storage directory for each user, manually editing the configuration directory permission file for each user, and adding the user's username and password to the file. In this way, after each addition and modification of user information, the service needs to be restarted for the overall effect to take effect. This method is complex to operate and has poor flexibility. It is only suitable for small-scale user scenarios. It is not only difficult to effectively manage new and old users, but also causes service downtime every time an update operation is performed, which will cause poor user experience and data loss. In addition, if only a single FTP service is deployed in a high IO scenario, it is difficult to achieve rapid horizontal expansion of the service, which will cause users to wait too long. In this case, if the FTP service is deployed in a container, it is also necessary to consider whether the user's file storage path is unique in the service, so as to maintain data consistency.

[0051] In response to the above technical problems, a distributed FTP container deployment method is provided in this embodiment. Through the multi-container microservice distributed networking mode of MySQL database, FTP service and service plug-in, the overall scalability and high availability of the server are improved, thereby improving the efficiency of uploading and downloading user files.

[0052] like Figure 1 As shown, an embodiment of the present invention provides a distributed FTP container deployment method, comprising the following steps:

[0053] Step S100, calling a service plug-in program, reading user storage root directory information in a shared storage server through the service plug-in program, and synchronously initializing and storing user information in the cluster into a database of an FTP service.

[0054] In this embodiment, the distributed FTP container deployment method is applied to a terminal, and the terminal includes but is not limited to: a computer and other devices.

[0055] In this embodiment, considering that there are a large number of users in the existing cluster (for example, a kubernetes cluster, hereinafter referred to as a cluster) system, and each user already has a large amount of existing data in the underlying shared storage service, in order to provide FTP service permissions to each user in the existing cluster, it is necessary to connect the cluster user system and the FTP service user system while avoiding large-scale data migration, and to avoid the heavy operations caused by manually configuring FTP permission files for each user separately, while taking into account the effectiveness of user management and the high availability of services without downtime; therefore, in this embodiment, a multi-container microservice networking mode of Mysql, FTP and service plug-ins is designed, and FTP service permissions are configured for existing users in the system without perception, which not only ensures that the FTP service does not need to be restarted to take effect when user information is modified, updated, or added, but also can be distributedly deployed in a containerized manner. Service applications provide users with FTP service functions and service level expansion capabilities.

[0056] like Figure 2 As shown, in this embodiment, the designed multi-container microservice architecture of Mysql, FTP and service plug-ins includes: a cluster user management system, a service plug-in, a Mysql service, an FTP service cluster and a shared storage service.

[0057] In the multi-container microservice architecture, the cluster user management system is the user management interface of the system, which can be used to manage user information in the cluster; the service plug-in is a system plug-in, which runs in the container in the cluster as a process and can be used to verify whether the user has FTP service permissions; the Mysql service is the Mysql database; the FTP service cluster is a distributed server cluster; and the shared storage service is a shared storage.

[0058] In this embodiment, it is necessary to set up a service plug-in program in the cluster in advance, that is, to set up the service plug-in program in the cluster in advance in the form of a process; specifically, the service plug-in runs in the pod container in the cluster in the form of a process; the role of the service plug-in in the specific application scenario is: when the user logs in to the cluster and uses the ftp service, the service plug-in will compare the user information with the FTP user service information, and while triggering the ftp service permission check, it determines whether the user has the FTP service permission.

[0059] This embodiment pre-sets the service plug-in program so that when the FTP service is deployed, the user storage root directory information in the existing shared storage service can be automatically read, and then the cluster user information is synchronously initialized and stored in the Mysql database service of the FTP service.

[0060] Specifically, in an implementation of this embodiment, the following steps are included before step S100:

[0061] Step S001, pre-setting the service plug-in program in the cluster in a process manner.

[0062] In this embodiment, when the FTP service is actually deployed, when a user accesses the cluster system, the cluster user management system performs authentication and is responsible for the user's login, registration and verification; and the service plug-in can assist the cluster user management system to complete the corresponding work.

[0063] Specifically, in an implementation of this embodiment, step S100 includes the following steps:

[0064] Step S101, reading user storage root directory information in the shared storage server through the service plug-in program;

[0065] Step S102, obtaining all user information in the cluster user management system through the service plug-in program, and storing all user information in the Mysql user data table of the FTP service;

[0066] Step S103: initializing the FTP service access rights of all users through the service plug-in program to obtain initialized FTP service access rights.

[0067] In this embodiment, when the system is released online for the first time, all user information currently existing in the cluster user system will be automatically submitted to the Mysql user data table of the FTP service, and FTP access permissions will be initialized for all users in the current cluster; among which, the initialized FTP service access permissions are the permissions after the user information in the cluster is synchronized to the FTP service.

[0068] Specifically, the access rights after initialization are: the cluster user account name information will be synchronized to the FTP service account name, and a password will be initialized for the FTP account name. At the same time, the user will have an independent root directory related to the username in the shared storage.

[0069] This embodiment automatically reads the user storage root directory information in the existing shared storage service through the service plug-in program, and then synchronously initializes the cluster user information and stores it in the Mysql database service of the FTP service, ensuring that the user information in the cluster can be added, deleted, and updated in real time without stopping the service; moreover, the service plug-in can simultaneously configure FTP service permissions for new and old users in the cluster system, and realize file isolation and permission control in real time.

[0070] like Figure 1As shown, in one implementation of the embodiment of the present invention, the distributed FTP container deployment method further includes the following steps:

[0071] Step S200, verifying the user login authority through the user information in the database, and configuring the corresponding user storage root directory information and FTP service access authority file in the shared storage server according to the verification result.

[0072] In this embodiment, the service plug-in can be used to verify users who log into the cluster user system, and then different operations can be performed according to new users and old users; for new users, FTP access permission files can be automatically created; for old users, the service plug-in can also be used to update and modify FTP access permission passwords and other information.

[0073] Specifically, in an implementation of this embodiment, step S200 includes the following steps:

[0074] Step S201, verifying the user login authority according to the user information in the database to determine whether the currently logged-in user is a new user;

[0075] Step S202, if the currently logged-in user is a new user, then the user information corresponding to the currently logged-in user is written into the Mysql user data table of the FTP service;

[0076] Step S203, accessing the FTP service cluster according to the user information corresponding to the currently logged-in user, and creating an FTP access permission file for the currently logged-in user;

[0077] Step S204: Create a corresponding user root directory for the currently logged-in user in the shared storage server.

[0078] In this embodiment, after initializing FTP access rights for all users in the current cluster, when a new user accesses the FTP service, the service plug-in will first verify the user information in the cluster management system; wherein the user information is the user information in the preset file association database in the FTP service, that is, in this embodiment, in the FTP service, the pam file is used to associate the user information in the Mysql database (that is, the user storage root directory information) to complete the login permission verification for the user to access the service.

[0079] Furthermore, after the service plug-in verifies the user information, the service plug-in will also access the user's shared storage service to determine whether the storage path already exists, and then the service plug-in will determine whether the user is a new user of the FTP service. If it is a new user, its user information will be written to the FTP-Mysql service accordingly, and the FTP service cluster will be accessed, and an FTP access permission file will be automatically created for the user, and a dedicated user root directory will be created for the user in the shared storage service.

[0080] Specifically, in an implementation of this embodiment, step S201 includes the following steps:

[0081] Step S201a, determining, by the service plug-in program, whether there is a user root directory corresponding to the currently logged-in user in the shared storage server;

[0082] Step S201b: If there is no user root directory corresponding to the currently logged-in user, it is determined that the currently logged-in user is a new user.

[0083] Specifically, during the process of the service plug-in verifying the user information, the service plug-in will check whether the user root directory exists in the storage service. If not, it will determine that the user currently logging in to access the FTP service is a new user, and create a new user root directory for the new user.

[0084] Specifically, in an implementation of this embodiment, the following steps are further included after step S201:

[0085] Step S201c: if the currently logged-in user is an old user, the corresponding FTP access permission file is modified and updated through the service plug-in program.

[0086] In this embodiment, during the process of the service plug-in verifying user information, if there is a user root directory corresponding to the user currently logged in to access the FTP service in the storage service, then the user currently logged in to access the FTP service is determined to be an old user. For old users, the service plug-in can also be used to update and modify information such as the password of the FTP access permission.

[0087] Specifically, in an implementation of this embodiment, step S203 includes the following steps:

[0088] Step S203a, accessing the FTP service cluster according to the user information corresponding to the currently logged-in user, and determining the file name and location corresponding to the currently logged-in user;

[0089] Step S203b, configuring a user authority file corresponding to the currently logged-in user in the ghome directory of the Linux server according to the file name and location.

[0090] In this embodiment, when automatically creating an FTP access permission file for a new user, it can be determined and set according to the permission file corresponding to the user: the service plug-in will execute the configuration of the user permission file in the / ghome directory of the Linux server, specifically in / ghome / .vsftpd / vftpuser_conf / ; then, a dedicated user root directory is created for the user in the shared storage service, that is, the newly created user root directory is in the form of a single user's root directory, for example: / ghome / $userid.

[0091] In this embodiment, in the FTP service, the pam file is used to associate the user information in the Mysql database (that is, the user storage root directory information) to complete the login permission verification of the user access service, and the configuration of the user root directory and FTP access rights is completed in the storage service according to the actual user situation (for example: the number of pod containers can be set and the number of cluster elastic scaling services can be handed over to achieve dynamic configuration of FTP access rights). Finally, the service is containerized and deployed to the kubernetes cluster in the helm mode, which not only realizes the elastic scaling and distributed deployment of the FTP service, but also meets the high availability and scalability requirements.

[0092] When adding a new user, this embodiment can automatically configure the FTP service user access rights for the new user and create a root directory for the user's rights, which is more flexible. In addition, after adding a new user, there is no need to restart the FTP service to make it effective. The mode of managing user passwords through MySQL and managing user rights through the FTP service ensures the sustainability of the service, avoids data loss after service updates and interruptions, and improves the user experience.

[0093] like Figure 1 As shown, in one implementation of the embodiment of the present invention, the distributed FTP container deployment method further includes the following steps:

[0094] Step S300, deploy the configured FTP service to the cluster in a helm containerized manner.

[0095] In this embodiment, the robustness of the system is ensured by deploying multiple services in containers. The unified management of the Kubernetes cluster can flexibly increase or decrease the number of container services in the FTP cluster according to specific usage conditions, thereby ensuring the scalability of the FTP service.

[0096] Specifically, in an implementation of this embodiment, step S300 includes the following steps:

[0097] Step S301, identifying the pod container corresponding to the FTP service according to the nodeseletor label;

[0098] Step S302: Use the pam file to associate the database in the configured FTP service, and deploy the associated FTP service to the cluster in a helm containerized manner.

[0099] In this embodiment, in the FTP service cluster, in order to adapt to the high concurrency requirements of multiple users in high IO scenarios, the FTP service needs to be deployed in a distributed manner. In the Kubernetes cluster, a unified nodeseletor label is used to uniformly identify the FTP service pod container.

[0100] Specifically, when using the nodeseletor label to identify pod containers, the Kubernetes cluster will label multiple pod containers of the same service deployed, for example, ftp; this way, multiple pod containers can be uniformly identified as ftp services. This is the role of the nodeselector label.

[0101] This embodiment uniformly identifies the FTP service pod containers, making it convenient for administrators to flexibly and uniformly manage and expand the service according to actual usage, without having to worry about the overall unavailability of the service after a single service goes down, or the need to restart the service when users update.

[0102] Furthermore, in this embodiment, all FTP services use the pam file to associate the database to implement permission authentication (the Pam file will store the database information of the ftp user account and password, which is used for dynamic verification when the user logs in, facilitating dynamic management). From the perspective of the security of the intranet file system, when the user logs in using the client, the service will be accessed in passive mode; through the above networking mode and the mutual cooperation between modules, the containerized deployment of the FTP service can be realized, and the requirements of high availability and distributed expansion can be met.

[0103] This embodiment achieves the following technical effects through the above technical solution:

[0104] This embodiment reads the user storage root directory information in the shared storage server through the service plug-in program, and synchronizes and initializes the user information in the cluster and stores it in the database of the FTP service. The user login authority can be verified through the user information in the database, and the corresponding user storage root directory information and FTP service access permission file are configured in the shared storage server according to the verification result; the configured FTP service is deployed to the cluster in a helm containerized manner. This embodiment improves the overall scalability and high availability of the server through the multi-container microservice distributed networking mode of Mysql database, FTP service and service plug-in, thereby improving the efficiency of uploading and downloading user files.

[0105] Exemplary Devices

[0106] Based on the above embodiments, the present invention further provides a distributed FTP container deployment device, including:

[0107] An initialization module is used to call a service plug-in program, read the user storage root directory information in the shared storage server through the service plug-in program, and synchronize and initialize the user information in the cluster and store it in the database of the FTP service;

[0108] An access rights configuration module, used to verify the user login rights through the user information in the database, and configure the corresponding user storage root directory information and FTP service access rights file in the shared storage server according to the verification result; wherein the user information is the user information in the database associated with the preset file in the FTP service;

[0109] The container deployment module is used to deploy the configured FTP service into the cluster in a helm containerized manner.

[0110] Based on the above embodiment, the present invention further provides a terminal, whose principle block diagram can be as follows: Figure 3 shown.

[0111] The terminal includes: a processor, a memory, an interface, a display screen and a communication module connected via a system bus; wherein the processor of the terminal is used to provide computing and control capabilities; the memory of the terminal includes a storage medium and an internal memory; the storage medium stores an operating system and a computer program; the internal memory provides an environment for the operation of the operating system and the computer program in the storage medium; the interface is used to connect to external devices, such as mobile terminals and computers; the display screen is used to display corresponding information; and the communication module is used to communicate with a cloud server or a mobile terminal.

[0112] When the computer program is executed by a processor, it is used to implement the operation of a distributed FTP container deployment method.

[0113] It can be understood by those skilled in the art that Figure 3 The principle block diagram shown in the figure is only a block diagram of a partial structure related to the scheme of the present invention, and does not constitute a limitation on the terminal to which the scheme of the present invention is applied. The specific terminal may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0114] In one embodiment, a terminal is provided, which includes: a processor and a memory, wherein the memory stores a distributed FTP container deployment program, and when the distributed FTP container deployment program is executed by the processor, it is used to implement the operations of the above distributed FTP container deployment method.

[0115] In one embodiment, a storage medium is provided, wherein the storage medium stores a distributed FTP container deployment program, and when the distributed FTP container deployment program is executed by a processor, it is used to implement the operations of the above distributed FTP container deployment method.

[0116] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the computer program can be stored in a non-volatile storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include non-volatile and / or volatile memory.

[0117] In summary, the present invention provides a distributed FTP container deployment method, device, terminal and storage medium, the method comprising: calling a service plug-in program, reading the user storage root directory information in the shared storage server through the service plug-in program, and synchronously initializing and storing the user information in the cluster in the database of the FTP service; verifying the user login authority through the user information in the database, and configuring the corresponding user storage root directory information and FTP service access permission file in the shared storage server according to the verification result; deploying the configured FTP service to the cluster in a helm containerized manner. The present invention improves the overall scalability and high availability of the server through the Mysql database, FTP service and the multi-container microservice distributed networking mode of the service plug-in, thereby improving the efficiency of uploading and downloading user files.

[0118] It should be understood that the application of the present invention is not limited to the above examples. For ordinary technicians in this field, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.

Claims

1. A distributed FTP container deployment method, characterized in that: The distributed FTP container deployment method includes: The terminal calls the service plug-in program, reads the user storage root directory information in the shared storage server through the service plug-in program, and synchronizes and initializes the user information in the cluster and stores it in the database of the FTP service; The terminal verifies the user login authority through the user information in the database, and configures the corresponding user storage root directory information and FTP service access authority file in the shared storage server according to the verification result; wherein the user information is the user information in the database associated with the preset file in the FTP service; The terminal deploys the configured FTP service to the cluster in a helm containerized manner; The service plug-in program is a service plug-in program set in the cluster; the database of the FTP service is an FTP authority service database set in the cluster; the shared storage server is a shared storage connected to the cluster, used to store data corresponding to each user in the cluster.

2. The distributed FTP container deployment method according to claim 1, characterized in that: The terminal calls the service plug-in program, which previously includes: The service plug-in is pre-set in the cluster in a process manner.

3. The distributed FTP container deployment method according to claim 1, characterized in that: The method of reading the user storage root directory information in the shared storage server through the service plug-in program and synchronously initializing and storing the user information in the cluster in the database of the FTP service includes: Reading user storage root directory information in the shared storage server through the service plug-in program; All user information in the cluster user management system is obtained through the service plug-in program, and all user information is stored in the Mysql user data table of the FTP service.

4. The distributed FTP container deployment method according to claim 3, characterized in that: The storing of all user information in the Mysql user data table of the FTP service then includes: The service plug-in program is used to initialize the FTP service access rights of all users to obtain the initialized FTP service access rights.

5. The distributed FTP container deployment method according to claim 4, characterized in that: The initialized FTP service access rights are rights after user information in the cluster is synchronized to the FTP service.

6. The distributed FTP container deployment method according to claim 1, characterized in that: The terminal verifies the user login authority through the user information in the database, and configures the corresponding user storage root directory information and FTP service access authority file in the shared storage server according to the verification result, including: Verify the user's login authority according to the user information in the database to determine whether the currently logged-in user is a new user; If the currently logged-in user is a new user, the user information corresponding to the currently logged-in user is written into the Mysql user data table of the FTP service; Access the FTP service according to the user information corresponding to the currently logged-in user, and create an FTP access permission file for the currently logged-in user; A corresponding user root directory is created in the shared storage server for the currently logged-in user.

7. The distributed FTP container deployment method according to claim 6, characterized in that: The verifying the user login authority according to the user information in the database to determine whether the currently logged-in user is a new user includes: Determining, by means of the service plug-in program, whether there is a user root directory corresponding to the currently logged-in user in the shared storage server; If there is no user root directory corresponding to the currently logged-in user, it is determined that the currently logged-in user is a new user.

8. The distributed FTP container deployment method according to claim 6, characterized in that: The step of accessing the FTP service according to the user information corresponding to the currently logged-in user and creating an FTP access permission file for the currently logged-in user includes: Access the FTP service according to the user information corresponding to the currently logged-in user, and determine the file name and location corresponding to the currently logged-in user; Configure the user permission file corresponding to the currently logged-in user in the ghome directory of the Linux server according to the file name and location.

9. The distributed FTP container deployment method according to claim 6, characterized in that: The user login authority is verified according to the user information in the database to determine whether the currently logged-in user is a new user, and then includes: If the currently logged-in user is an old user, the corresponding FTP access permission file is modified and updated through the service plug-in program.

10. The distributed FTP container deployment method according to claim 1, characterized in that: The terminal deploys the configured FTP service to the cluster in a helm containerized manner, including: Identify the pod container corresponding to the FTP service based on the nodeseletor label; Use the pam file to associate the database in the configured FTP service, and deploy the associated FTP service to the cluster in a helm containerized manner.

11. A distributed FTP container deployment device, characterized in that: include: An initialization module is used to call a service plug-in program, read the user storage root directory information in the shared storage server through the service plug-in program, and synchronize and initialize the user information in the cluster and store it in the database of the FTP service; An access rights configuration module, used to verify the user login rights through the user information in the database, and configure the corresponding user storage root directory information and FTP service access rights file in the shared storage server according to the verification result; wherein the user information is the user information in the database associated with the preset file in the FTP service; The container deployment module is used to deploy the configured FTP service into the cluster in a helm containerized manner; The service plug-in program is a service plug-in program set in the cluster; the database of the FTP service is an FTP authority service database set in the cluster; the shared storage server is a shared storage connected to the cluster, used to store data corresponding to each user in the cluster.

12. A terminal, characterized in that: include: A processor and a memory, wherein the memory stores a distributed FTP container deployment program, and when the distributed FTP container deployment program is executed by the processor, it is used to implement the operation of the distributed FTP container deployment method according to any one of claims 1 to 10.

13. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and the storage medium stores a distributed FTP container deployment program. When the distributed FTP container deployment program is executed by a processor, it is used to implement the operation of the distributed FTP container deployment method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Method for accessing cloud storage network file system

    CN106844111A

  • Realization method and device of distributed FTP (File Transfer Protocol) service

    CN107302600A