Container processing method, device, electronic equipment and system
By using the target cloud disk in the container group to isolate write IO and set storage limits, the problems of storage limit usage and IO dependency of the container group in the host machine are solved, and isolation and stability between container groups are improved.
Patent Information
- Application Number
- CN202010756278.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-31
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2040-07-31
AI Technical Summary
In the existing technology, when container groups are deployed on the same host machine, storage quota usage is restricted, write IO relies on the local disk IO capabilities of the host machine, and isolation is poor, causing container groups to interfere with each other and posing a risk to service stability.
Set the root file system write layer and data volumes of the target container group on the target cloud disk, isolate write IO through the target cloud disk, set storage limits to limit storage capacity, and prohibit over-limit storage to avoid interference.
It achieves storage isolation between container groups, avoids IO dependence on the host's local disk, reduces mutual interference, improves service stability, and prevents the risk of storage overload.
Smart Images

Figure CN113296878B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of Internet technology, and more specifically, to a container processing method, a container processing device, an electronic device, a computer-readable storage medium, and a container processing system. Background Art
[0002] With the development of container cluster technology, the application of cluster technology is becoming more and more extensive.
[0003] In the prior art, at least one container group can be deployed in the host machine, such as Figure 1 As shown, container group 1 and container group 2 can be deployed in the host. The container image, root file system write layer, and data volume of each container group are all set on the local disk of the host where the container group is deployed. When multiple container groups are deployed on the same host, the data generated by the multiple container groups will be stored on the local disk of the host. This will result in the storage quota (Quota) of the container group. Write IO depends on the IO capacity of the host's local disk, and the isolation is relatively poor. It is easy to cause interference between container groups deployed on the same host, posing a greater risk to service stability. Summary of the Invention
[0004] One purpose of this specification is to provide a new technical solution to enhance container storage isolation.
[0005] According to a first aspect of the present specification, there is provided a container processing method, comprising:
[0006] Create the target cloud disk corresponding to the target container group;
[0007] Mount the target cloud disk to the host machine where the target container group is deployed;
[0008] Setting the root file system write layer and data volume of the target container group in the target cloud disk;
[0009] The data generated by the target container group is stored in the target cloud disk.
[0010] Optionally, creating a target cloud disk corresponding to the target container group includes:
[0011] Obtain a preset storage limit, and create the target cloud disk according to the storage limit.
[0012] Optionally, also include:
[0013] Detecting the used storage capacity of the target cloud disk;
[0014] When the used storage capacity reaches the storage limit, storing data in the target cloud disk is prohibited.
[0015] Optionally, also include:
[0016] The container image of the target container group is set in the local disk of the host machine where the target container group is deployed.
[0017] According to a second aspect of the present specification, there is provided a container processing device, comprising:
[0018] The cloud disk creation module is used to create the target cloud disk corresponding to the target container group;
[0019] A mounting module, used to mount the target cloud disk to the host machine where the target container group is deployed;
[0020] A setting module, configured to set the root file system write layer and data volume of the target container group in the target cloud disk;
[0021] The data storage module is used to store the data generated by the target container group in the target cloud disk.
[0022] Optionally, the cloud disk creation module is further configured to:
[0023] Obtain a preset storage limit, and create the target cloud disk according to the storage limit.
[0024] Optionally, also include:
[0025] A module for detecting the used storage capacity of the target cloud disk;
[0026] A module for prohibiting data storage in the target cloud disk when the used storage capacity reaches the storage limit.
[0027] According to a third aspect of this specification, an electronic device is provided, including:
[0028] The device according to the second aspect of this specification; or
[0029] A processor and a memory, wherein the memory is used to store instructions, and the instructions are used to control the processor to execute the method according to the first aspect of this specification.
[0030] According to a fourth aspect of the present specification, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method described in the first aspect of the present specification is implemented.
[0031] According to a fifth aspect of the present specification, a container processing system is provided, including a host machine and a target cloud disk mounted on the host machine, wherein a target container group is deployed on the host machine, and the container image of the target container group is set on the local disk of the host machine; the root file system write layer and data volume of the target container group are set on the target cloud disk corresponding to the target container group.
[0032] Through the embodiments of this specification, write I / O for the target container group is isolated to a separate target cloud disk. Write I / O no longer relies on the I / O capabilities of the host machine's local disk. You can mount the target cloud disk based on your specific I / O performance requirements. Furthermore, there is no interference between target container groups, or between any target container group and other container groups deployed on the same host machine.
[0033] Other features and advantages of the present specification will become apparent from the following detailed description of exemplary embodiments of the present specification with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the specification and, together with the description, serve to explain the principles of the specification.
[0035] Figure 1 A schematic diagram of an existing scene is shown.
[0036] Figure 2 The block diagram shows an example of a hardware configuration of an electronic device that can be used to implement the embodiments of this specification.
[0037] Figure 3 A block diagram showing another example of a hardware configuration of an electronic device that can be used to implement the embodiments of this specification.
[0038] Figure 4 A schematic diagram of a scenario of an embodiment of this specification is shown.
[0039] Figure 5 A schematic flow chart showing a container processing method according to an embodiment of the present specification.
[0040] Figure 6 A block diagram showing a container processing apparatus according to an embodiment of the present specification.
[0041] Figure 7 A block diagram showing an example of an electronic device according to an embodiment of this specification.
[0042] Figure 8 A block diagram of a container processing system according to an embodiment of the present specification is shown. DETAILED DESCRIPTION
[0043] Various exemplary embodiments of the present specification will now be described in detail with reference to the accompanying drawings. It should be noted that unless otherwise specifically stated, the relative arrangements of components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of this specification.
[0044] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present disclosure, its application, or uses.
[0045] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered part of the specification.
[0046] In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not limiting. Therefore, other examples of the exemplary embodiments may have different values.
[0047] It should be noted that like reference numerals and letters refer to like items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0048] <Hardware Configuration>
[0049] Figure 2 and Figure 3 It is a block diagram of the hardware configuration of an electronic device that can be used to implement the embodiments of this specification.
[0050] In one embodiment, Figure 2 As shown, the electronic device 1000 may be a server 1100 .
[0051] Server 1100 is a computer that provides processing, database, and communication facilities. Server 1100 can be a monolithic server or a distributed server across multiple computers or computer data centers. Servers can be of various types, such as, but not limited to, web servers, news servers, mail servers, messaging servers, advertising servers, file servers, application servers, interactive servers, database servers, or proxy servers. In some embodiments, each server can include hardware, software, or embedded logic components, or a combination of two or more such components, for performing the appropriate functions supported or implemented by the server.
[0052] In one embodiment, the server can be a blade server, a rack server, or a cloud server, etc., or it can be a server group composed of multiple servers, or it can be implemented as a cloud architecture, for example, by a server cluster deployed in the cloud, and can also include one or more of the above types of servers, etc.
[0053] In this embodiment, the server 1100 can be as follows Figure 2 As shown, it includes a processor 1110 , a memory 1120 , an interface device 1130 , a communication device 1140 , a display device 1150 , and an input device 1160 .
[0054] In this embodiment, the server 1100 may also include a speaker, a microphone, etc., which are not limited here.
[0055] The processor 1110 can be a dedicated server processor, or a desktop processor or mobile processor that meets the performance requirements, and is not limited here. The memory 1120 includes, for example, ROM (read-only memory), RAM (random access memory), and non-volatile memory such as a hard disk. The interface device 1130 includes, for example, various bus interfaces, such as a serial bus interface (including a USB interface), a parallel bus interface, etc. The communication device 1140 is capable of wired or wireless communication. The display device 1150 is, for example, a liquid crystal display, an LED display, a touch display, etc. The input device 1160 may include, for example, a touch screen, a keyboard, etc.
[0056] In this embodiment, the memory 1120 of the server 1100 is used to store instructions for controlling the processor 1110 to perform at least the container processing method according to any embodiment of this specification. A skilled artisan can design instructions based on the solutions disclosed in this specification. How instructions control the processor's operations is well known in the art and will not be described in detail here.
[0057] Despite Figure 2 , multiple devices of the server 1100 are shown; however, this specification may only involve some of the devices, for example, the server 1100 only involves the memory 1120 and the processor 1110 .
[0058] In one embodiment, the electronic device 1000 may be a terminal device 1200 such as a PC or a notebook computer used by an operator. Figure 3 As shown, no limitation is given here.
[0059] In this embodiment, refer to Figure 3 As shown, the terminal device 1200 may include a processor 1210, a memory 1220, an interface device 1230, a communication device 1240, a display device 1250, an input device 1260, a speaker 1270, a microphone 1280, and the like.
[0060] The processor 1210 may be a mobile processor. The memory 1220 may include, for example, ROM (read-only memory), RAM (random access memory), and non-volatile memory such as a hard disk. The interface device 1230 may include, for example, a USB interface, a headphone jack, and the like. The communication device 1240 may be capable of wired or wireless communication. The communication device 1240 may include a short-range communication device, such as any device that performs short-range wireless communication based on a short-range wireless communication protocol such as Hilink, WiFi (IEEE 802.11), Mesh, Bluetooth, ZigBee, Thread, Z-Wave, NFC, UWB, LiFi, or the like. The communication device 1240 may also include a long-range communication device, such as any device that performs WLAN, GPRS, or 2G / 3G / 4G / 5G long-range communication. The display device 1250 may be, for example, an LCD display or a touch screen display. The input device 1260 may include, for example, a touch screen or a keyboard. The user may input / output voice information through the speaker 1270 and microphone 1280.
[0061] In this embodiment, the memory 1220 of the terminal device 1200 is used to store instructions for controlling the processor 1210 to perform at least the container processing method according to any embodiment of this specification. A skilled artisan can design instructions based on the solutions disclosed in this specification. How instructions control the processor's operations is well known in the art and will not be described in detail here.
[0062] Despite Figure 3 , multiple devices of the terminal device 1200 are shown, but this specification may only involve some of the devices, for example, the terminal device 1200 only involves the memory 1220, the processor 1210, and the display device 1250.
[0063] <Application Scenario>
[0064] Figure 4 This is a schematic diagram of the embodiment scenario of this specification.
[0065] The container processing method of this embodiment can be specifically applied in a cluster scenario.
[0066] At least one target container group can be deployed in the host, such as Figure 4As shown, target container group 1 and target container group 2 can be deployed in the host machine. The root file system write layer and data volume of target container group 1 can be set in the target cloud disk corresponding to target container group 1, and the container image of target container group 1 can be set in the local disk of the host machine where the target container group is deployed. The root file system write layer and data volume of target container group 2 can be set in the target cloud disk corresponding to target container group 1, and the container image of target container group 2 can be set in the local disk of the host machine where the target container group is deployed. The data generated by all containers in each target container group is usually stored in the root file system write layer or data volume. In this way, when any target container group generates data, the generated data can be stored in the corresponding target cloud disk.
[0067] Through the embodiments of this specification, write I / O for the target container group is isolated to a separate target cloud disk. Write I / O no longer relies on the I / O capabilities of the host machine's local disk. Target cloud disks with varying performance can be mounted based on individual I / O performance requirements. Furthermore, the target container group no longer interferes with other container groups deployed on the same host machine.
[0068] Furthermore, by pre-setting a storage quota for the target cloud disk, the available storage capacity of the corresponding target container group is limited by the target cloud disk. If the used storage capacity of any target cloud disk reaches the storage quota set for that target cloud disk, data storage to that target cloud disk is prohibited. This prevents any target container group deployed on the same host from being forcibly deleted by the container group management component on the host if the target container group exceeds the storage limit.
[0069] <Method Example>
[0070] In this embodiment, a container processing method is provided. The container processing method can be implemented by an electronic device. The electronic device can be Figure 2 The server 1100 shown may also be Figure 3 The terminal device 1200 is shown.
[0071] according to Figure 5 As shown, the container processing method of this embodiment may include the following steps S1000 to S4000:
[0072] Step S1000: Create a target cloud disk corresponding to the target container group.
[0073] Kubernetes is a container-based cluster management platform. The Kubernetes cluster includes a master node (Master) and multiple compute nodes (Node) that are connected to the master node. The master node is used to manage and control multiple compute nodes. The compute node is a workload node, and one or more container groups (Pod) can be deployed in each compute node. The container group pod is the basic operating unit of Kubernetes and is the smallest deployment unit that can be created, debugged, and managed. In this embodiment, the compute node where the target container group is deployed is the host of the target container group.
[0074] Each container group encapsulates one or more containers for hosting software programs. A container is a group of processes that are resource-constrained and isolated from each other.
[0075] Containers in the same pod share storage resources, network resources, and container runtime configuration items. For example, a pod has only one IP address, and multiple containers in the same pod share that IP address. Another example is that multiple containers in a pod are deployed on the same compute node.
[0076] In one embodiment of the present specification, creating a target cloud disk corresponding to the target container group may further include: obtaining a preset storage quota, and creating the target cloud disk according to the storage quota.
[0077] Specifically, the available capacity of the target cloud disk created based on the storage limit may be the same as the storage limit. The storage limit may be pre-set by the user based on the application scenario or specific needs, for example, the storage limit may be 100GB.
[0078] In one embodiment of the present specification, creating a target cloud disk may further include: obtaining a preset performance type; and creating a target cloud disk according to the performance type.
[0079] The performance types include standard cloud disks, high-efficiency cloud disks, SSD (Solid State Disk or Solid State Drive) cloud disks, and ESSD (Enhanced SSD) cloud disks, with the data read and write speeds of these performance types increasing in order. The performance type can be pre-set by the user based on the application scenario or specific needs.
[0080] Step S2000: Mount the target cloud disk to the host machine where the target container group is deployed.
[0081] In this embodiment, by mounting the target cloud disk to the host machine where the target container group is deployed, the target container group in the host machine can use the target cloud disk.
[0082] Step S3000: Set the root file system write layer and data volume of the target container group in the target cloud disk.
[0083] The target container group has a corresponding container image, root file system write layer, and data volume. The containers in the target container group have their own container image and root file system write layer, but share data volumes.
[0084] A container image is a set of root filesystem files that packages the product code and its dependent runtime environment. Container images are stored in layers on the host machine and are read-only data. Furthermore, for all containers deployed on the same host machine, the container image is stored on the host machine's local disk. A container image must be specified when running a container.
[0085] A volume is a logical abstraction for storing persistent data in a container. It can be extended to different storage media, such as cloud disks and NAS, through plug-ins and can be shared among multiple containers in the same container group.
[0086] The root file system writable layer is where newly generated non-volume data is placed during container runtime, and its lifecycle is consistent with that of the container.
[0087] The data generated by all containers in the target container group is usually stored in the root file system write layer or data volumes. In this embodiment, by mounting the target cloud disk to the host where the target container group is deployed and setting the root file system write layer and data volumes of all containers in the target container group on the target cloud disk, the data generated by all containers in the target container group can be stored on the target cloud disk.
[0088] In one embodiment of the present specification, the method may further include: setting the container image of the target container group in a local disk of a host machine where the target container group is deployed.
[0089] Based on this embodiment, when multiple target container groups are deployed in a host machine, the container images of the multiple target container groups can share the local disk of the host machine.
[0090] Step S4000: Store the data generated by the target container group in the target cloud disk.
[0091] In the embodiments of this specification, data generated by all containers in the target container group is typically stored in the root file system write layer or data volumes. By pre-setting the target container group's root file system write layer and data volumes on the target cloud disk, when the target container group generates data, the generated data can be stored on the target cloud disk.
[0092] Through the embodiments of this specification, write I / O for the target container group is isolated to a separate target cloud disk. Write I / O no longer relies on the I / O capabilities of the host machine's local disk. You can mount the target cloud disk based on your specific I / O performance requirements. Furthermore, there is no interference between target container groups, or between any target container group and other container groups deployed on the same host machine.
[0093] In one embodiment of the present specification, the method may further include: detecting the used storage capacity of the target cloud disk; and prohibiting data storage in the target cloud disk when the used storage capacity reaches a preset storage limit.
[0094] When the used storage capacity reaches the storage limit, it means that the target cloud disk cannot continue to store the data generated by the target container group. Therefore, data storage in the target cloud disk may be prohibited.
[0095] In this case, since the cloud disks corresponding to different container groups are isolated from each other, prohibiting data storage in the target cloud disk will not affect other cloud disks or the normal operation of containers in other container groups.
[0096] In this embodiment, a separate target cloud disk is mounted for each target container group. The target container group's root file system write layer and data volumes are placed on the corresponding target cloud disk. Storage limits are also pre-set for the target cloud disk. This way, the storage used by the entire target container group is limited to the target cloud disk. Furthermore, there's no risk of any target cloud disk exceeding its storage limit and being forcibly shut down by the kubelet, the container group management component on the Kubernetes host where the target container group is deployed.
[0097] In one embodiment of the present specification, the method may further include: when the user creates the target container group, providing the user with an option of whether to isolate. If the user chooses isolation, the container processing method of this specification may be executed for the target container group, or a payment interface may be provided, and if the user successfully pays, the container processing method of this specification may be executed for the target container group. If the user chooses not to isolate, the root file system write layer and / or data volume of the target container group may be refused to be set in the target cloud disk, so that the data generated by the target container group cannot be stored in the target cloud disk, but is stored in the local disk of the host machine where the target container group is deployed.
[0098] <Device Example>
[0099] In this embodiment, a container processing device 6000 is provided. Figure 6As shown, it includes a cloud disk creation module 6100, a mounting module 6200, a setting module 6300, and a data storage module 6400. The cloud disk creation module 6100 is used to create a target cloud disk corresponding to the target container group; the mounting module 6200 is used to mount the target cloud disk to the host machine where the target container group is deployed; the setting module 6300 is used to set the root file system write layer and data volume of the target container group in the target cloud disk; and the data storage module 6200 is used to store the data generated by the target container group in the target cloud disk.
[0100] In one embodiment of the present specification, the cloud disk creation module 6100 is further configured to:
[0101] Get the preset storage limit and create a target cloud disk based on the storage limit.
[0102] In one embodiment of the present specification, the container processing device 6000 may further include:
[0103] A module for detecting the used storage capacity of the target cloud disk;
[0104] A module that prohibits data storage to the target cloud disk when the used storage capacity reaches the storage limit.
[0105] In one embodiment of the present specification, the container processing device 6000 may further include:
[0106] A module used to set the container image of the target container group to the local disk of the host machine where the target container group is deployed.
[0107] Those skilled in the art will appreciate that the container processing apparatus 6000 can be implemented in various ways. For example, the container processing apparatus 6000 can be implemented by configuring a processor with instructions. For example, the instructions can be stored in a ROM, and when the device is started, the instructions are read from the ROM into a programmable device to implement the container processing apparatus 6000. For example, the container processing apparatus 6000 can be embedded in a dedicated device (e.g., an ASIC). The container processing apparatus 6000 can be divided into independent units or integrated into a single unit. The container processing apparatus 6000 can be implemented using one of the various implementations described above, or a combination of two or more of the various implementations described above.
[0108] In this embodiment, the container processing device 6000 can have various implementation forms. For example, the container processing device 6000 can be a functional module running in any software product or application that provides container processing services, or a peripheral embedded component, plug-in, patch, etc. of these software products or applications, or the software products or applications themselves.
[0109] <Electronic equipment>
[0110] In this embodiment, an electronic device 7000 is also provided. The electronic device 7000 may be Figure 2 The server 1100 shown may also be Figure 3 The terminal device 1200 is shown.
[0111] In one aspect, the electronic device 7000 may include the aforementioned container processing device 6000, for implementing the container processing method of any embodiment of this specification.
[0112] On the other hand, Figure 7 As shown, the electronic device 7000 may further include a processor 7100 and a memory 7200, wherein the memory 7200 is used to store executable instructions; the processor 7100 is used to control the electronic device 7000 to execute the container processing method according to any embodiment of this specification under the control of the instructions.
[0113] <Computer-readable storage medium>
[0114] In this embodiment, a computer-readable storage medium is further provided, on which a computer program is stored. When the computer program is executed by a processor, the container processing method according to any embodiment of this specification is implemented.
[0115] <system>
[0116] In this embodiment, a container processing system is also provided. Figure 8 As shown, the container processing system 8000 may include a host machine 8100 and a target cloud disk 8200 mounted on the host machine. A target container group is deployed on the host machine 8100, and the container image of the target container group is set on the local disk of the host machine 8100; the root file system write layer and data volume of the target container group are set on the target cloud disk 8200 corresponding to the target container group.
[0117] In this embodiment, the number of target container groups deployed on the host machine 8100 can be one or more, and this specification does not limit the number of target container groups.
[0118] In one example, since the root file system write layer and data volume of the target container group are set in the target cloud disk 8200, the container processing system can store the data generated by the target container group in the corresponding target cloud disk 8200.
[0119] In one example, the container processing system may detect the used storage capacity of the target cloud disk, and prohibit storing data in the target cloud disk when the used storage capacity reaches the storage limit of the target cloud disk.
[0120] The present specification may be a system, method, and / or computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present specification.
[0121] A computer-readable storage medium can be a tangible device that can hold and store instructions for use by an instruction execution device. A computer-readable storage medium can be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination thereof. As used herein, a computer-readable storage medium is not to be construed as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through an electrical wire.
[0122] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions to be stored in the computer-readable storage medium in each computing / processing device.
[0123] The computer program instructions for performing the operations of this specification can be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, and conventional procedural programming languages such as "C" language or similar programming languages. Computer-readable program instructions can be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), is personalized by utilizing the state information of the computer-readable program instructions, and the electronic circuit can execute the computer-readable program instructions, thereby realizing various aspects of this specification.
[0124] Various aspects of this specification are described herein with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this specification. It should be understood that each block of the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer-readable program instructions.
[0125] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device is generated that implements the functions / actions specified in one or more blocks in the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, where these instructions cause the computer, programmable data processing device, and / or other device to operate in a specific manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing various aspects of the functions / actions specified in one or more blocks in the flowchart and / or block diagram.
[0126] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more blocks in the flowchart and / or block diagram.
[0127] The flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to the multiple embodiments of this specification. In this regard, each box in the flowchart or block diagram can represent a part of a module, program segment or instruction, and the part of the module, program segment or instruction contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions. It is well known to those skilled in the art that implementation by hardware, implementation by software, and implementation by a combination of software and hardware are all equivalent.
[0128] While the embodiments of the present disclosure have been described above, the foregoing description is intended to be illustrative, non-exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is selected to best explain the principles of the embodiments, their practical applications, or technological improvements in the marketplace, or to enable others skilled in the art to understand the embodiments disclosed herein. The scope of this disclosure is defined by the appended claims.
Claims
1. A container processing method comprising: Create the target cloud disk corresponding to the target container group; Mount the target cloud disk to the host machine where the target container group is deployed; Setting the root file system write layer and data volume of the target container group in the target cloud disk; storing the data generated by the target container group in the target cloud disk; The creating of the target cloud disk corresponding to the target container group includes: creating the target cloud disk according to a storage limit, wherein the available capacity of the target cloud disk is the same as the storage limit, and the storage limit is pre-set according to the application scenario of the host machine or the requirements of the host machine; or creating the target cloud disk according to a performance type, wherein the performance type is used to represent the data reading and writing speed between different cloud disks, the performance type is pre-set according to the application scenario or the requirements, and different cloud disks include the target cloud disk; The method further includes: setting the container image of the target container group in a local disk of a host machine where the target container group is deployed, wherein the cloud disks corresponding to different container groups are isolated from each other; The method further includes: in response to creating the target container group, providing an isolation option and a non-isolation option; in response to performing a selection operation on the isolation option, starting execution from creating the target cloud disk corresponding to the target container group; and in response to performing the selection operation on the non-isolation option, storing the data generated by the target container group in the local disk.
2. The method according to claim 1, further comprising: Detecting the used storage capacity of the target cloud disk; When the used storage capacity reaches the storage limit, storing data in the target cloud disk is prohibited.
3. A container processing device comprising: The cloud disk creation module is used to create the target cloud disk corresponding to the target container group; A mounting module, used to mount the target cloud disk to the host machine where the target container group is deployed; A setting module, configured to set the root file system write layer and data volume of the target container group in the target cloud disk; A data storage module, configured to store the data generated by the target container group in the target cloud disk; The cloud disk creation module is further configured to: create the target cloud disk according to a storage limit, wherein the available capacity of the target cloud disk is the same as the storage limit, and the storage limit is pre-set according to the application scenario of the host machine or the requirements of the host machine; or create the target cloud disk according to a performance type, wherein the performance type is used to represent the data reading and writing speed between different cloud disks, and the performance type is pre-set according to the application scenario or the requirements, and different cloud disks include the target cloud disk; The device is further configured to: a module for setting the container image of the target container group in the local disk of the host machine where the target container group is deployed, wherein the cloud disks corresponding to different container groups are isolated from each other; The device is further configured to: in response to creating the target container group, provide an isolation option and a non-isolation option; in response to performing a selection operation on the isolation option, start execution from creating the target cloud disk corresponding to the target container group; and in response to performing the selection operation on the non-isolation option, store the data generated by the target container group in the local disk.
4. The apparatus according to claim 3, further comprising: A module for detecting the used storage capacity of the target cloud disk; A module for prohibiting data storage in the target cloud disk when the used storage capacity reaches the storage limit.
5. An electronic device, wherein: include: The device according to any one of claims 3 to 4; or, A processor and a memory, wherein the memory is used to store instructions, and the instructions are used to control the processor to execute the method according to any one of claims 1 to 2. 6 . A computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the method according to claim 1 when executed by a processor.
7. A container processing system, comprising a host machine and a target cloud disk mounted on the host machine; a target container group is deployed on the host machine, and the container image of the target container group is set on the local disk of the host machine; the root file system write layer and data volume of the target container group are set on the target cloud disk corresponding to the target container group, wherein: The target cloud disk is created in any of the following ways: creating the target cloud disk according to a storage limit, wherein the available capacity of the target cloud disk is the same as the storage limit, and the storage limit is pre-set according to the application scenario of the host machine or the requirements of the host machine; or creating the target cloud disk according to a performance type, wherein the performance type is used to represent the data reading and writing speed between different cloud disks, and the performance type is pre-set according to the application scenario or the requirements, and different cloud disks include the target cloud disk; wherein the container image of the target container group is set in the local disk of the host machine where the target container group is deployed, and the cloud disks corresponding to different container groups are isolated from each other; if the isolation option is selected, the target cloud disk corresponding to the target container group is created; if the non-isolation option is selected, the data generated by the target container group is stored in the local disk.
Citation Information
Patent Citations
A system backup method and device
CN109669808A
Cloud disk mounting system and method based on container
CN109951525A