CN117234666A - Object storage operation method and device in container environment and computing equipment - Google Patents

Object storage operation method and device in container environment and computing equipment Download PDF

Info

Publication number
CN117234666A
CN117234666A CN202311250462.4A CN202311250462A CN117234666A CN 117234666 A CN117234666 A CN 117234666A CN 202311250462 A CN202311250462 A CN 202311250462A CN 117234666 A CN117234666 A CN 117234666A
Authority
CN
China
Prior art keywords
container
service
file system
operation request
object storage
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.)
Pending
Application number
CN202311250462.4A
Other languages
Chinese (zh)
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.)
Shanghai Bilibili Technology Co Ltd
Original Assignee
Shanghai Bilibili Technology 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 Shanghai Bilibili Technology Co Ltd filed Critical Shanghai Bilibili Technology Co Ltd
Priority to CN202311250462.4A priority Critical patent/CN117234666A/en
Publication of CN117234666A publication Critical patent/CN117234666A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The embodiment of the application discloses an object storage operation method, an object storage operation device and computing equipment in a container environment, wherein the method comprises the following steps: responding to an operation request executed by a file system of a service container, and transmitting the operation request to an associated container corresponding to the service container through a target kernel module of a host; analyzing the operation request through the target service in the associated container, determining a corresponding storage bucket, and sending the operation request to the storage bucket; and packaging the execution result into a data format conforming to the file system interface, transmitting the packaged execution result to a file system of the service container through the target kernel module, and feeding back the packaged execution result through the file system interface by the file system. The application deploys the corresponding companion container for the business container, analyzes the operation request through the target service in the companion container, and conveniently realizes the object storage of protocols such as S3 and the like through the file system interface operation in the container environment.

Description

Object storage operation method and device in container environment and computing equipment
Technical Field
The embodiment of the application relates to the technical field of Internet, in particular to an object storage operation method, an object storage operation device and computing equipment in a container environment.
Background
The object storage technology is a distributed storage technology, is used for storing and managing large-scale data objects, is selected by clients such as a plurality of enterprises as a final storage scheme due to the characteristics of high expandability, high data reliability and the like, and is generally implemented by adopting a containerized deployment scheme. In some business scenarios, when a binary tool such as FFmpeg needs to perform operations such as reading, writing, deleting, etc. on an object store of the S3 protocol, an additional program is generally required to process the authentication logic of the S3 protocol, so that the business service can operate the object store of the S3 protocol through the file system interface, but it is difficult to operate the object store through the file system interface in a container environment in a physical machine.
Disclosure of Invention
In view of the above problems, the present application provides an object storage operation method, apparatus and computing device in a container environment, for solving the following problems: the existing object storage operation mode is difficult to operate the object storage through a file system interface in a container environment.
According to an aspect of an embodiment of the present application, there is provided an object storage operation method in a container environment, including:
responding to an operation request executed by a file system of a service container, and transmitting the operation request to an associated container corresponding to the service container through a target kernel module of a host;
analyzing the operation request through the target service in the associated container, determining a corresponding storage bucket, and sending the operation request to the storage bucket so that the storage bucket executes the operation request to obtain an execution result;
and packaging the execution result into a data format conforming to the file system interface, transmitting the packaged execution result to a file system of the service container through the target kernel module, and feeding back the packaged execution result through the file system interface by the file system.
Further, before the operation request is transferred to the associated container corresponding to the service container through the target kernel module of the host machine in response to the operation request executed for the file system of the service container, the method includes:
configuring corresponding object storage credentials for at least one object storage service;
and deploying a corresponding associated container for the service container, loading a target service in the associated container, and authenticating the corresponding object storage service according to the object storage certificate through the target service.
Further, deploying a corresponding companion container for the business container further includes:
starting an associated container, setting a mounting catalog of the associated container in a file system on a host machine, setting a mounting mode of the associated container as a binding mounting mode, and setting a mounting propagation mode as a sharing mounting mode;
setting a mounting catalog of a service container in a file system on a host machine so that the service container and an associated container have the same mounting catalog, setting a mounting mode of the service container as a binding mounting mode, and setting a mounting propagation mode as a sharing mounting mode.
Further, authenticating the corresponding object store service by the target service according to the object store credential further comprises:
any object storage service is mounted on a mounting catalog in a file system through a target service;
and creating a client connection pool and authenticating any object storage service according to the object storage certificate corresponding to the any object storage service.
Further, after authenticating the corresponding object store service by the target service according to the object store credential, the method further comprises:
after passing the authentication, a long connection is maintained with the object storage service.
Further, the delivering the operation request to the associated container corresponding to the service container through the target kernel module of the host machine further comprises:
the file system of the service container transmits the operation request to a target kernel module of the host;
and the target kernel module transmits the operation request to the associated container corresponding to the service container.
Further, parsing the operation request in the companion container through the target service, determining the corresponding bucket further includes:
and determining a corresponding object storage service in the associated container through the target service according to the mount catalog to be requested in the operation request, and determining a corresponding storage bucket according to the subdirectory of the mount catalog to be requested and the object identification in the operation request.
Further, sending the operation request to the bucket further comprises:
and selecting a corresponding client by the target service according to the determined object storage service, and sending an operation request to the storage barrel by using the client.
Further, the target service includes: the object stores the mount service.
According to another aspect of an embodiment of the present application, there is provided an object storage operation device in a container environment, including:
the transmission module is suitable for responding to the operation request executed by the file system of the service container and transmitting the operation request to the associated container corresponding to the service container through the target kernel module of the host;
the analysis module is suitable for analyzing the operation request through the target service in the associated container, determining a corresponding storage bucket, and sending the operation request to the storage bucket so as to enable the storage bucket to execute the operation request to obtain an execution result;
the packaging module is suitable for packaging the execution result into a data format conforming to a file system interface;
the transfer module is further adapted to: and transmitting the encapsulated execution result to a file system of the service container through the target kernel module, and feeding back the encapsulated execution result through a file system interface by the file system.
According to yet another aspect of an embodiment of the present application, there is provided a computing device including: the device comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface are communicated with each other through the communication bus;
the memory is used for storing at least one executable instruction, and the executable instruction enables the processor to execute the operation corresponding to the object storage operation method in the container environment.
According to still another aspect of the embodiments of the present application, there is provided a computer storage medium having stored therein at least one executable instruction for causing a processor to perform operations corresponding to the object storage operation method in the above container environment.
According to the object storage operation method, the device, the computing equipment and the storage medium in the container environment, corresponding companion containers are deployed for the service containers, the companion containers and the service containers have the same mounting catalogs on the host, and all containers with the same mounting catalogs can be conveniently stored through file system interface operation objects by setting the mounting propagation mode of container mounting as a shared mounting mode; object storage service is mounted on a mounting catalog in a file system through target service in an associated container, and authentication logic is processed; transmitting the operation request to a companion container, determining a corresponding storage bucket in the companion container through analyzing the operation request by a target service, and transmitting the operation request to the storage bucket to enable the storage bucket to execute the operation request; the execution result is packaged into a data format conforming to the file system interface, and the packaged execution result is transmitted to the file system of the service container through the target kernel module, so that the file system can feed back the packaged execution result through the file system interface, object storage through protocols such as file system interface operation S3 and the like in a container environment is conveniently realized, and an object storage operation mode is optimized.
The foregoing description is only an overview of the technical solutions of the embodiments of the present application, and may be implemented according to the content of the specification, so that the technical means of the embodiments of the present application can be more clearly understood, and the following specific implementation of the embodiments of the present application will be more apparent.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the application. Also, like reference numerals are used to designate like parts throughout the figures. In the drawings:
FIG. 1 illustrates a flow diagram of a method of object store operation in a container environment, according to one embodiment of the application;
FIG. 2 illustrates a flow diagram of a method of object store operation in a container environment, according to another embodiment of the application;
FIG. 3 shows a deployment diagram of a business container and an accompanying container;
FIG. 4 illustrates a schematic diagram of an object store operation method in a container environment according to another embodiment of the present application;
FIG. 5 illustrates a block diagram of an object store operating device in a container environment, according to one embodiment of the application;
FIG. 6 illustrates a schematic diagram of a computing device, according to one embodiment of the application.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
First, terms related to one or more embodiments of the present application will be explained.
Object storage: is a computer data storage architecture that manages data as objects, each of which typically includes the data itself, an unequal amount of metadata, and a globally unique identifier.
FFmpeg: the free software tool of the open source code can execute the functions of video recording, conversion, streaming and the like of various formats of audio and video.
S3 protocol: is an object storage standard access protocol.
Service container: running certain services in an isolated environment provided by a container, referred to as a service container, helps to increase security and helps to better manage resources for such services.
An associated container: refers to an auxiliary container started in a Pod for performing some work independent of the main process (main container).
Host machine: is a hosting environment for the container, and the container runs on the host machine, wherein operations such as creating, starting, stopping, destroying and the like of the container are all carried out on the host machine.
S3Fuse service: and the function module is used for mounting the object storage supporting the S3 protocol into a file system.
Service services: refers to a functional module within a service container for implementing service logic for a service.
fuse. Ko: refers to a kernel module of FUSE (Filesystemin Userspace, user space file system), which is generally built in a Linux system.
Bucket (Bucket): the term "storage space" used for storing objects in the object storage is understood to mean a carrier of the objects, and is understood to mean a "container" for storing the objects. Multiple objects may be stored in one bucket.
Object (Object): is the basic unit of object storage and is understood to be any type of format of data, such as pictures, documents, and audio-video files.
Object storage service: refers to a functional module for providing object storage for clients such as enterprises, which are divided according to the clients.
AK/SK (Access Key/Secret Key): is an authentication credential for accessing an API or resource (e.g., object store) of a cloud service provider; wherein AK is an access key used to identify the identity of the user, SK is used to cryptographically sign the access key to verify the identity. AK/SK has independence, and an account bound by AK can only use the resources under the account and cannot access other resources. The SK is used for carrying out encryption signature on the AK, and only the corresponding AK and SK can be accessed to corresponding resources.
Binding mount (bind mount): the method is a mounting mode, allows the mapping relation between the file in the dock container and the local file to be established, and the content written into the file by the process in the container is stored in the mapped local file. Any file or folder on the host can be mounted to the container.
Shared mount (shared mount): is a mount propagation method, in which any content that is mounted by the host machine in the mount volume is visible in the container, any mount created in the container is propagated to the host machine and then to all containers using the same volume.
libfuse: the user space library is responsible for communicating with the kernel module, receiving a request from the kernel module and writing a result back to the kernel module; which provides a library of functions in communication with the fuse. Ko kernel module.
VFS (Virtual File System): is a virtual file system that abstracts many different file system types and implements a universal access method to all file system types so that each file system can be used as well as each other file system. In particular, a unified interface is provided for all file systems, and access to each particular file system is achieved through the interface defined by the VFS.
XFS: the log file system has high performance and reliability, can better manage a large number of files and directories, and can recover the file system faster under abnormal conditions.
EXT4: the system is a fourth generation extended file system and is a log file system with wider Linux application.
FIG. 1 shows a flow diagram of a method of object store operation in a container environment, according to one embodiment of the application, as shown in FIG. 1, the method comprising the steps of:
step S101, responding to the operation request executed by the file system of the service container, and transmitting the operation request to the associated container corresponding to the service container through the target kernel module of the host machine.
In the embodiment of the application, a corresponding associated container is deployed for each service container, that is, each service container is deployed while carrying an associated container, and the service container and the associated container have a corresponding relationship. Wherein the companion container is capable of providing a target service comprising: the object stores the mount service.
Taking the object storage applicable to the S3 protocol as an example, the target service may specifically be the S3Fuse service. The companion container and the business container have the same mount directory on the host. The object storage of the S3 protocol can be mounted to the mounting catalog of the file system through the S3Fuse service in the accompanying container, and the authentication logic can be conveniently processed, so that the mounting catalog can operate the object storage of the S3 protocol through the file system interface under the container environment. Wherein the operations include: read operations, write operations, delete operations, etc.
When the business service of the business container needs to perform operations such as reading, writing, deleting and the like on objects such as files under the mounting directory of the business container, namely, an operation request executed by a file system of the business container is received, the operation request is responded, and the operation request is transmitted to an associated container corresponding to the business container through a target kernel module of the host machine. Specifically, the target kernel module may be a fuse. Ko kernel module.
In step S101, the operation request may be transferred to a target kernel module of the host by a file system of the service container, and then transferred to a companion container corresponding to the service container by the target kernel module.
Step S102, analyzing the operation request through the target service in the associated container, determining a corresponding storage bucket, and sending the operation request to the storage bucket so that the execution result of the operation request is obtained by the storage bucket.
The operation request may include information such as a mount directory to be requested, an object identifier of an object to be operated, and an operation action. Taking the target service as an S3Fuse service as an example, in an associated container corresponding to the service container, analyzing the operation request through the S3Fuse service to obtain a storage bucket required by the operation request. And then sending an operation request to the storage barrel, and executing the operation request by the storage barrel to obtain an execution result.
Step S103, the execution result is packaged into a data format conforming to the file system interface, the packaged execution result is transmitted to the file system of the service container through the target kernel module, and the file system feeds back the packaged execution result through the file system interface.
In order to achieve storage of operation objects through a file system interface, after an execution result is obtained, the embodiment of the application encapsulates the execution result into a data format conforming to the file system interface according to the data format requirement of the file system interface, and the encapsulated execution result is obtained. And transmitting the encapsulated execution result to a file system of the service container through the target kernel module, so that the file system can feed the encapsulated execution result back to the service of the service container through a file system interface.
According to the object storage operation method in the container environment provided by the embodiment of the application, a corresponding companion container is deployed for a service container, an operation request is transmitted to the companion container, a corresponding storage barrel is determined in the companion container through analyzing the operation request by a target service, and the operation request is sent to the storage barrel to enable the storage barrel to execute the operation request; and the execution result is packaged into a data format which accords with a file system interface, the packaged execution result is transmitted to a file system of a service container through a target kernel module, and the file system feeds back the packaged execution result through the file system interface, so that object storage of protocols such as S3 and the like through the file system interface in a container environment is conveniently realized, and compared with direct operation of the object storage through the protocols such as S3 and the like, the operation flow is effectively simplified through the file system interface, and the object storage operation mode is optimized.
FIG. 2 shows a flow diagram of a method of object store operation in a container environment, according to another embodiment of the application, as shown in FIG. 2, the method comprising the steps of:
step S201, configuring corresponding object storage credentials for at least one object storage service.
Embodiments of the present application may be adapted to manage one or more object store services. The different object storage services may correspond to different enterprises, for example, the plurality of object storage services may be specifically a cloud storage service of enterprise 1, a cloud storage service of enterprise 2, a cloud storage service of enterprise 3, and so on. In order to protect the data security of the object storage service, a corresponding object storage credential needs to be configured for the object storage service, wherein the object storage service and the object storage credential have a one-to-one correspondence. If the number of the object storage services is one, configuring corresponding object storage credentials for the object storage services; if the number of the object storage services is multiple, configuring corresponding object storage credentials for each object storage service. The object storage certificate can be an AK/SK identity authentication certificate.
Step S202, a corresponding associated container is deployed for the business container, target service is loaded in the associated container, and the corresponding object storage service is authenticated according to the object storage certificate through the target service.
The method comprises the steps of starting a companion container, setting a mounting catalog of the companion container in a file system on a host machine, setting a mounting mode of the companion container as a binding mounting mode (bind mount), and setting a mounting propagation mode as a shared mounting mode (shared mount); setting a mounting catalog of a service container in a file system on a host machine so that the service container and an associated container have the same mounting catalog, setting a mounting mode of the service container as a binding mounting mode, and setting a mounting propagation mode as a sharing mounting mode. Fig. 3 shows a deployment diagram of a business container and an accompanying container. By setting the mount propagation mode of the container mount to be the shared mount mode, all containers with the same mount catalog can be conveniently made to operate the object store through the file system interface, for example, the object store of the operation S3 protocol.
In the embodiment of the application, the companion container can provide a target service, and taking the object storage applicable to the S3 protocol as an example, the target service can be specifically an S3Fuse service. Loading target service in the associated container, and mounting any object storage service on a mounting catalog in a file system through the target service; and creating a client connection pool and authenticating any object storage service according to the object storage certificate corresponding to the any object storage service configured in the step S201.
To facilitate use of the object store service, a long connection may be maintained with the object store service after authentication passes. Optionally, after the authentication is passed, if the logon operation is performed for the object storage service, when the object storage service is used next time, the corresponding object storage service is also required to be authenticated according to the object storage credential through the target service, and after the authentication is passed, the object storage service can be used, and the object storage is operated.
In step S203, in response to the operation request executed on the file system of the service container, the file system of the service container transmits the operation request to the target kernel module of the host machine, and the target kernel module transmits the operation request to the associated container corresponding to the service container.
When the service of the service container needs to operate the objects such as the file under the mounting directory of the service container, the operation request can comprise a read request, a write request, a delete request and the like, and the file system of the service container transmits the operation request to the target kernel module of the host machine in response to the operation request, and then the target kernel module transmits the operation request to the target service of the associated container corresponding to the service container. Wherein the target kernel module may be a fuse. Ko kernel module.
Step S204, analyzing the operation request through the target service in the associated container, determining the corresponding storage bucket, and sending the operation request to the storage bucket so that the execution result of the operation request is obtained by the storage bucket.
The operation request may include information such as a mount directory to be requested, an object identifier of an object to be operated, and an operation action. Specifically, the operation request is parsed in the associated container through the target service, the corresponding object storage service is determined according to the mount directory to be requested in the operation request, and the corresponding storage bucket is determined according to the sub-directory of the mount directory to be requested and the object identification in the operation request. After determining the bucket, the corresponding client may be selected by the target service according to the determined object storage service, and an operation request may be sent to the bucket by using the client.
Taking the corresponding relation between the mount catalog and the object storage service as an example, taking the target service as an S3Fuse service, the S3Fuse service analyzes the operation request through the libfuse, determines the corresponding object storage service name according to the mount catalog to be requested in the operation request, and analyzes a storage bucket corresponding to the object identification in the operation request according to the subdirectory of the mount catalog to be requested, namely, the storage bucket is used for storing the object to be operated, which is aimed at by the operation request. And S3, the Fuse service selects a corresponding client according to the determined object storage service name, and sends an operation request to the storage barrel by using the client. And executing the operation request by the storage barrel to obtain an execution result. The execution result may include information such as an execution status (e.g., execution success or execution failure). When the operation request is to read the data content of an object, if the execution is successful, the execution result may further include the data content of the object.
Step S205, the execution result is packaged into a data format conforming to the file system interface, the packaged execution result is transmitted to the file system of the service container through the target kernel module, and the file system feeds back the packaged execution result through the file system interface.
Taking the target kernel module as a fuse. Ko kernel module as an example, the libfuse can encapsulate the execution result into a data format conforming to the file system interface according to the data format requirement of the file system interface, obtain the encapsulated execution result and return the encapsulated execution result to the fuse. Ko kernel module, and the fuse. Ko kernel module transmits the encapsulated execution result to the file system of the service container for which the operation request is directed, so that the file system can feed back the encapsulated execution result to the service of the service container through the file system interface.
Fig. 4 is a schematic diagram illustrating an object storage operation method in a container environment according to another embodiment of the present application, and as shown in fig. 4, the method is adapted to manage N object storage services, namely, object storage service 1 to object storage service N; the host comprises a VFS virtual file system and file systems such as FUSE, XFS, EXT 4; the associated container and the service container have the same mounting catalog on the host, the service container and the associated container have corresponding relations, the associated container and the object storage service also have corresponding relations, the corresponding relations between the associated container and the object storage service can be one-to-one relations or one-to-many relations, and the corresponding relations are not limited herein; the target service (such as S3Fuse service) in the companion container communicates with a target kernel module (such as Fuse. Ko kernel module) of the host machine through the libfuse, receives an operation request from the target kernel module, encapsulates an execution result into a data format conforming to a file system interface, and returns the encapsulated execution result to the target kernel module; and then the target kernel module transmits the encapsulated execution result to a file system of the business container aimed at by the operation request, and the file system can feed back the encapsulated execution result to business services of the business container through a file system interface.
According to the object storage operation method in the container environment provided by the embodiment of the application, the corresponding accompanying container is deployed for the service container, the accompanying container and the service container have the same mounting catalog on the host, and by setting the mounting propagation mode of the container mounting as the sharing mounting mode, all containers with the same mounting catalog can be conveniently and conveniently operated to store objects through the file system interface; object storage service is mounted on a mounting catalog in a file system through target service in an associated container, and authentication logic is processed; transmitting the operation request to a companion container, determining a corresponding storage bucket in the companion container through analyzing the operation request by a target service, and transmitting the operation request to the storage bucket to enable the storage bucket to execute the operation request; the execution result is packaged into a data format which accords with a file system interface, the packaged execution result is transmitted to a file system of a service container through a target kernel module, and the file system feeds back the packaged execution result through the file system interface, so that object storage which can operate protocols such as S3 through the file system interface in a container environment is conveniently realized, and an object storage operation mode is optimized.
FIG. 5 illustrates a block diagram of an object store operating device in a container environment, according to one embodiment of the present application, as shown in FIG. 5, comprising: a delivery module 510, a parsing module 520, and a packaging module 530.
The transfer module 510 is adapted to: and responding to the operation request executed by the file system of the service container, and transmitting the operation request to the associated container corresponding to the service container through the target kernel module of the host machine.
The parsing module 520 is adapted to: analyzing the operation request in the associated container through the target service, determining a corresponding storage bucket, and sending the operation request to the storage bucket so that the execution result of the operation request is obtained by the storage bucket.
The encapsulation module 530 is adapted to: and packaging the execution result into a data format conforming to the file system interface.
The transfer module 510 is further adapted to: and transmitting the encapsulated execution result to a file system of the service container through the target kernel module, and feeding back the encapsulated execution result through a file system interface by the file system.
Optionally, the apparatus further comprises a deployment module 540. The deployment module 540 is adapted to: configuring corresponding object storage credentials for at least one object storage service; and deploying a corresponding associated container for the service container, loading a target service in the associated container, and authenticating the corresponding object storage service according to the object storage certificate through the target service.
Optionally, the deployment module 540 is further adapted to: starting an associated container, setting a mounting catalog of the associated container in a file system on a host machine, setting a mounting mode of the associated container as a binding mounting mode, and setting a mounting propagation mode as a sharing mounting mode; setting a mounting catalog of a service container in a file system on a host machine so that the service container and an associated container have the same mounting catalog, setting a mounting mode of the service container as a binding mounting mode, and setting a mounting propagation mode as a sharing mounting mode.
Optionally, the deployment module 540 is further adapted to: any object storage service is mounted on a mounting catalog in a file system through a target service; and creating a client connection pool and authenticating any object storage service according to the object storage certificate corresponding to the any object storage service.
Optionally, the deployment module 540 is further adapted to: after passing the authentication, a long connection is maintained with the object storage service.
Optionally, the transfer module 510 is further adapted to: the file system of the service container transmits the operation request to a target kernel module of the host; and the target kernel module transmits the operation request to the associated container corresponding to the service container.
Optionally, the parsing module 520 is further adapted to: and determining a corresponding object storage service in the associated container through the target service according to the mount catalog to be requested in the operation request, and determining a corresponding storage bucket according to the subdirectory of the mount catalog to be requested and the object identification in the operation request.
Optionally, the parsing module 520 is further adapted to: and selecting a corresponding client by the target service according to the determined object storage service, and sending an operation request to the storage barrel by using the client.
Optionally, the target service includes: the object stores the mount service.
The above descriptions of the modules refer to the corresponding descriptions in the method embodiments, and are not repeated herein.
According to the object storage operation device provided by the embodiment of the application, the corresponding accompanying container is deployed for the service container, the accompanying container and the service container have the same mounting catalog on the host machine, and all containers with the same mounting catalog can be conveniently stored through the file system interface operation object by setting the mounting propagation mode of the container mounting as a sharing mounting mode; object storage service is mounted on a mounting catalog in a file system through target service in an associated container, and authentication logic is processed; transmitting the operation request to a companion container, determining a corresponding storage bucket in the companion container through analyzing the operation request by a target service, and transmitting the operation request to the storage bucket to enable the storage bucket to execute the operation request; the execution result is packaged into a data format which accords with a file system interface, the packaged execution result is transmitted to a file system of a service container through a target kernel module, and the file system feeds back the packaged execution result through the file system interface, so that object storage which can operate protocols such as S3 through the file system interface in a container environment is conveniently realized, and an object storage operation mode is optimized.
The embodiment of the application also provides a nonvolatile computer storage medium, and the computer storage medium stores at least one executable instruction, and the executable instruction can execute the object storage operation method in the container environment in any method embodiment.
FIG. 6 illustrates a schematic diagram of a computing device, according to one embodiment of the application, the particular embodiment of which is not limiting of the particular implementation of the computing device.
As shown in fig. 6, the computing device may include: a processor 602, a communication interface (Communications Interface), a memory 606, and a communication bus 608.
Wherein:
processor 602, communication interface 604, and memory 606 perform communication with each other via communication bus 608.
Communication interface 604 is used to communicate with network elements of other devices, such as clients or other servers.
The processor 602 is configured to execute the program 610, and may specifically perform relevant steps in the embodiment of the method for storing and operating an object in the container environment.
In particular, program 610 may include program code including computer-operating instructions.
The processor 602 may be a central processing unit CPU or a specific integrated circuit ASIC (Application Specific Integrated Circuit) or one or more integrated circuits configured to implement embodiments of the present application. The one or more processors included by the computing device may be the same type of processor, such as one or more CPUs; but may also be different types of processors such as one or more CPUs and one or more ASICs.
A memory 606 for storing a program 610. The memory 606 may comprise high-speed RAM memory or may further comprise non-volatile memory (non-volatile memory), such as at least one disk memory.
The program 610 may be specifically configured to cause the processor 602 to execute the object storage operation method in the container environment in any of the above-described method embodiments. The specific implementation of each step in the program 610 may refer to corresponding descriptions in the corresponding steps and units in the object storage operation embodiment in the container environment, which are not described herein. It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the apparatus and modules described above may refer to corresponding procedure descriptions in the foregoing method embodiments, which are not repeated herein.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual system, or other apparatus. Various general-purpose systems may also be used with the teachings herein. The required structure for a construction of such a system is apparent from the description above. In addition, embodiments of the present application are not directed to any particular programming language. It will be appreciated that the teachings of embodiments of the present application described herein may be implemented in a variety of programming languages, and the above description of specific languages is provided for disclosure of enablement and best mode of the embodiments of the present application.
In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the application may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the above description of exemplary embodiments of the application, various features of the embodiments of the application are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be construed as reflecting the intention that: i.e., an embodiment of the application that is claimed, requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this application.
Those skilled in the art will appreciate that the modules in the apparatus of the embodiments may be adaptively changed and disposed in one or more apparatuses different from the embodiments. The modules or units or components of the embodiments may be combined into one module or unit or component and, furthermore, they may be divided into a plurality of sub-modules or sub-units or sub-components. Any combination of all features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or units of any method or apparatus so disclosed, may be used in combination, except insofar as at least some of such features and/or processes or units are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings), may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features but not others included in other embodiments, combinations of features of different embodiments are meant to be within the scope of embodiments of the application and form different embodiments. For example, in the following claims, any of the claimed embodiments can be used in any combination.
The various component embodiments of the present application may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that some or all of the functions of some or all of the components in accordance with embodiments of the present application may be implemented in practice using a microprocessor or Digital Signal Processor (DSP). Embodiments of the present application may also be implemented as a device or apparatus program (e.g., a computer program and a computer program product) for performing a portion or all of the methods described herein. Such a program embodying the embodiments of the present application may be stored on a computer readable medium, or may have the form of one or more signals. Such signals may be downloaded from an internet website, provided on a carrier signal, or provided in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the application, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. Embodiments of the application may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the words first, second, third, etc. do not denote any order. These words may be interpreted as names.

Claims (12)

1. A method of object storage operation in a container environment, comprising:
responding to an operation request executed by a file system of a service container, and transmitting the operation request to an associated container corresponding to the service container through a target kernel module of a host;
analyzing the operation request in the associated container through a target service, determining a corresponding storage bucket, and sending the operation request to the storage bucket so that the storage bucket executes the operation request to obtain an execution result;
and packaging the execution result into a data format conforming to a file system interface, transmitting the packaged execution result to a file system of the service container through the target kernel module, and feeding back the packaged execution result through the file system interface by the file system.
2. The method of claim 1, prior to said passing of said operation request to a companion container corresponding to a business container by a target kernel module of a host in response to an operation request performed for a file system of said business container, comprising:
configuring corresponding object storage credentials for at least one object storage service;
and deploying a corresponding associated container for the service container, loading the target service in the associated container, and authenticating the corresponding object storage service according to the object storage certificate through the target service.
3. The method of claim 2, the deploying a corresponding companion container for the business container further comprising:
starting the accompanying container, setting a mounting catalog of the accompanying container in a file system on the host machine, setting a mounting mode of the accompanying container as a binding mounting mode, and setting a mounting propagation mode as a sharing mounting mode;
setting a mounting catalog of the service container in a file system on the host machine so that the service container and the associated container have the same mounting catalog, setting a mounting mode of the service container as a binding mounting mode, and setting a mounting propagation mode as a sharing mounting mode.
4. The method of claim 3, the authenticating, by the target service, the corresponding object store service according to the object store credential further comprising:
any object storage service is mounted on a mounting catalog in the file system through the target service;
and creating a client connection pool and authenticating any object storage service according to the object storage certificate corresponding to the any object storage service.
5. The method of any of claims 2-4, after the authenticating, by the target service, the corresponding object store service according to the object store credential, the method further comprising:
after passing the authentication, a long connection is maintained with the object storage service.
6. The method of any of claims 1-5, the passing the operation request to a companion container corresponding to the business container by a target kernel module of a host further comprising:
the file system of the service container transmits the operation request to a target kernel module of the host;
and the target kernel module transmits the operation request to an associated container corresponding to the service container.
7. The method of any of claims 1-6, the parsing the operation request in the companion container by a target service, determining a corresponding bucket further comprising:
and determining a corresponding object storage service in the associated container through a target service according to the mount catalog to be requested in the operation request, and determining a corresponding storage bucket according to the subdirectory of the mount catalog to be requested and the object identification in the operation request.
8. The method of claim 7, the sending the operation request to the bucket further comprising:
and selecting a corresponding client by the target service according to the determined object storage service, and sending the operation request to the storage barrel by using the client.
9. The method of any of claims 1-8, the target service comprising: the object stores the mount service.
10. An object storage handling device in a container environment, comprising:
the transmission module is suitable for responding to an operation request executed by a file system of a service container and transmitting the operation request to an associated container corresponding to the service container through a target kernel module of a host;
the analyzing module is suitable for analyzing the operation request through a target service in the associated container, determining a corresponding storage bucket, and sending the operation request to the storage bucket so that the storage bucket executes the operation request to obtain an execution result;
the packaging module is suitable for packaging the execution result into a data format conforming to a file system interface;
the transfer module is further adapted to: and transmitting the encapsulated execution result to a file system of the service container through the target kernel module, and feeding back the encapsulated execution result through a file system interface by the file system.
11. A computing device, comprising: the device comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete communication with each other through the communication bus;
the memory is configured to store at least one executable instruction, where the executable instruction causes the processor to perform operations corresponding to the method for storing objects in the container environment according to any one of claims 1-9.
12. A computer storage medium having stored therein at least one executable instruction for causing a processor to perform operations corresponding to the method of object storage operations in a container environment according to any one of claims 1 to 9.
CN202311250462.4A 2023-09-25 2023-09-25 Object storage operation method and device in container environment and computing equipment Pending CN117234666A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311250462.4A CN117234666A (en) 2023-09-25 2023-09-25 Object storage operation method and device in container environment and computing equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311250462.4A CN117234666A (en) 2023-09-25 2023-09-25 Object storage operation method and device in container environment and computing equipment

Publications (1)

Publication Number Publication Date
CN117234666A true CN117234666A (en) 2023-12-15

Family

ID=89090859

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311250462.4A Pending CN117234666A (en) 2023-09-25 2023-09-25 Object storage operation method and device in container environment and computing equipment

Country Status (1)

Country Link
CN (1) CN117234666A (en)

Similar Documents

Publication Publication Date Title
EP4047487B1 (en) File storage method, terminal, and storage medium
US10146942B2 (en) Method to protect BIOS NVRAM from malicious code injection by encrypting NVRAM variables and system therefor
CN114586010B (en) On-demand execution of object filtering code in output path of object store service
CN114586011B (en) Inserting an owner-specified data processing pipeline into an input/output path of an object storage service
JP2022520703A (en) Creating and running a secure container
US8005851B2 (en) Streaming virtual disk for virtual applications
US10496590B2 (en) Enabling redirection policies to be applied based on the windows class of a USB device
US9767118B2 (en) Optimized UEFI file system with network file system compound statements
US10977049B2 (en) Installing of operating system
CN112764946B (en) Cross-process data transmission method and device, electronic equipment and storage medium
CN110659100B (en) Container management method, device and equipment
CN113395340A (en) Information updating method, device, equipment, system and readable storage medium
CN114385091A (en) Method and device for realizing network disk drive character, network disk and storage medium
CN111259364B (en) Method, device, equipment and storage medium for using national secret encryption card
CN113961520A (en) Dynamic file mounting method, system, computer equipment and readable storage medium
EP2124153B1 (en) Methods and device for implementing multi-functional peripherals using a single standard driver
US10735514B2 (en) Remote application configuration on network-attached storage
CN114020689A (en) Data processing method, data processing device, electronic device, and storage medium
CN117234666A (en) Object storage operation method and device in container environment and computing equipment
CN114911421B (en) Data storage method, system, device and storage medium based on CSI plug-in
CN113986858B (en) Linux compatible android system shared file operation method and device
CN116303309A (en) File mounting method and device and electronic equipment
CN112738181B (en) Method, device and server for cluster external IP access
CN114679442A (en) Cloud desktop based user data synchronization method, device, equipment and storage medium
CN109739615B (en) Mapping method and device of virtual hard disk and cloud computing platform

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