CN117033325A - Mirror image file preheating and pulling method and device - Google Patents

Mirror image file preheating and pulling method and device Download PDF

Info

Publication number
CN117033325A
CN117033325A CN202311292392.9A CN202311292392A CN117033325A CN 117033325 A CN117033325 A CN 117033325A CN 202311292392 A CN202311292392 A CN 202311292392A CN 117033325 A CN117033325 A CN 117033325A
Authority
CN
China
Prior art keywords
container
cluster
mirror image
preheating
target
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.)
Granted
Application number
CN202311292392.9A
Other languages
Chinese (zh)
Other versions
CN117033325B (en
Inventor
李俊
郑彬
陈方明
廖林荣
王晋龙
何益鑫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hundsun Technologies Inc
Original Assignee
Hundsun Technologies Inc
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 Hundsun Technologies Inc filed Critical Hundsun Technologies Inc
Priority to CN202311292392.9A priority Critical patent/CN117033325B/en
Publication of CN117033325A publication Critical patent/CN117033325A/en
Application granted granted Critical
Publication of CN117033325B publication Critical patent/CN117033325B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/172Caching, prefetching or hoarding of files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45583Memory management, e.g. access or allocation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Facsimiles In General (AREA)

Abstract

The application provides a preheating pulling method and a preheating pulling device for an image file, wherein the preheating pulling method for the image file comprises the following steps: receiving a container mirror image preheating instruction, wherein the container mirror image preheating instruction carries resource configuration information; determining at least one container cluster identifier according to the resource configuration information, and generating mirror image preheating configuration information corresponding to each container cluster identifier; and sending the mirror image preheating configuration information to the service container clusters corresponding to the container cluster identifiers so that the service container clusters preheat and pull the container mirror image file based on the mirror image preheating configuration information. The mirror image preheating configuration information corresponding to each container cluster identifier is determined by the container control cluster and then is issued to the corresponding service container cluster, so that the distribution efficiency of the mirror image preheating configuration information is improved; and the container control cluster is utilized to send out the preheating pulling task of the mirror image file to a plurality of service container clusters at the same time, so that the preheating pulling efficiency of the service container clusters to the container mirror image file is improved.

Description

Mirror image file preheating and pulling method and device
Technical Field
The application relates to the technical field of computers, in particular to a preheating pulling method of image files. The application also relates to a preheating pulling device of the image file, a computing device and a computer readable storage medium.
Background
With the continuous development of computer technology, containers are generally created by using kubernetes, so that projects can cope with the pressure of higher calculation amount; in practical application, a smaller container mirror image can be deployed quickly, but when the container mirror image is larger, a longer time is needed for preheating and pulling the container mirror image; in order to improve the creation efficiency of the container, a mirror image preheating mode is generally adopted to pre-heat and pull data to the memory.
However, the current image preheating mode is aimed at a single cluster, and the lack of image preheating aimed at a plurality of clusters simultaneously leads to lower efficiency of image preheating.
Disclosure of Invention
In view of this, the embodiment of the application provides a method for preheating and pulling an image file. The present application also relates to a preheating pulling device for mirror image files, a computing device and a computer readable storage medium, so as to solve the above-mentioned problems in the prior art.
According to a first aspect of an embodiment of the present application, there is provided a method for pre-heating and pulling an image file, applied to controlling a container cluster, including:
receiving a container mirror image preheating instruction, wherein the container mirror image preheating instruction carries resource configuration information;
Determining at least one container cluster identifier according to the resource configuration information, and generating mirror image preheating configuration information corresponding to each container cluster identifier;
and sending the mirror image preheating configuration information to the service container clusters corresponding to the container cluster identifiers so that the service container clusters preheat and pull the container mirror image file based on the mirror image preheating configuration information.
According to a second aspect of the embodiment of the present application, there is provided a preheating pulling device for an image file, which is applied to a container control cluster, including:
the receiving module is configured to receive a container mirror image preheating instruction, wherein the container mirror image preheating instruction carries resource configuration information;
the determining module is configured to determine at least one container cluster identifier according to the resource configuration information and generate mirror image preheating configuration information corresponding to each container cluster identifier;
the sending module is configured to send the mirror image preheating configuration information to the service container clusters corresponding to the container cluster identifiers, so that the service container clusters preheat and pull the container mirror image file based on the mirror image preheating configuration information.
According to a third aspect of the embodiment of the present application, there is provided a method for pre-heating and pulling an image file, applied to a service container cluster, including:
Receiving target mirror image preheating configuration information sent by a container control cluster;
creating an image file pulling task for the service container cluster based on the target image preheating configuration information;
and preheating and pulling the image file of the target container according to the image file pulling task.
According to a fourth aspect of the embodiment of the present application, there is provided a preheating pulling device for an image file, which is applied to a container control cluster, including:
the receiving module is configured to receive target mirror image preheating configuration information sent by the container control cluster;
the creation module is configured to create an image file pulling task for the target service container cluster based on the target image preheating configuration information;
and the preheating pulling module is configured to preheat and pull the image file of the target container according to the image file pulling task.
According to a fifth aspect of the embodiment of the present application, there is provided a method for pre-heating and pulling an image file, which is applied to a container cluster control system, where the container cluster control system includes a container control cluster and at least two service container clusters; wherein,
the container control cluster receives a container mirror image preheating instruction, wherein the container mirror image preheating instruction carries resource configuration information; determining at least one container cluster identifier according to the resource configuration information, and generating mirror image preheating configuration information corresponding to each container cluster identifier; sending each mirror image preheating configuration information to a service container cluster corresponding to each container cluster identifier, so that each service container cluster preheats and pulls a container mirror image file based on the mirror image preheating configuration information;
The service container cluster receives the target mirror image preheating configuration information sent by the container control cluster; creating an image file pulling task for the service container cluster based on the target image preheating configuration information; and preheating and pulling the image file of the target container according to the image file pulling task.
According to a sixth aspect of embodiments of the present application, there is provided a computing device comprising a memory, a processor and computer instructions stored on the memory and executable on the processor, the processor implementing the steps of a warm-up pull method for image files when executing the computer instructions.
According to a seventh aspect of embodiments of the present application, there is provided a computer readable storage medium storing computer instructions which, when executed by a processor, implement the steps of a warm-up pull method for an image file.
The method for preheating and pulling the image file receives a container image preheating instruction, wherein the container image preheating instruction carries resource configuration information; determining at least one container cluster identifier according to the resource configuration information, and generating mirror image preheating configuration information corresponding to each container cluster identifier; and sending the mirror image preheating configuration information to the service container clusters corresponding to the container cluster identifiers so that the service container clusters preheat and pull the container mirror image file based on the mirror image preheating configuration information.
According to the embodiment of the application, the mirror image preheating configuration information corresponding to each container cluster identifier is determined in the resource configuration information by the container control cluster, and then each mirror image preheating configuration information is issued to the corresponding service container cluster, so that the distribution efficiency of the mirror image preheating configuration information is improved; and the preheating pulling task of sending mirror image files to a plurality of service container clusters is realized by utilizing the container control clusters, so that the preheating pulling efficiency of the service container clusters to the container mirror image files can be improved, and the service pulling speed of the subsequent service container clusters is further improved.
Drawings
FIG. 1 is a schematic diagram of a scenario of a method for pre-heating and pulling an image file according to an embodiment of the present application;
FIG. 2 is a flowchart of a method for pre-heating and pulling an image file applied to a container control cluster according to an embodiment of the present application;
FIG. 3 is a flowchart of a method for pre-heating and pulling an image file applied to a service container cluster according to an embodiment of the present application;
FIG. 4 is a process flow diagram of a method for pre-heating and pulling an image file applied to a data filtering service according to an embodiment of the present application;
FIG. 5 is a schematic structural diagram of a device for preheating and pulling image files applied to a container control cluster according to an embodiment of the present application;
Fig. 6 is a schematic structural diagram of a device for pulling image files of a service container cluster according to an embodiment of the present application;
FIG. 7 is a schematic diagram of a method for pre-heating and pulling an image file applied to a container cluster control system according to an embodiment of the present application;
FIG. 8 is a block diagram of a computing device according to one embodiment of the application.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. The present application may be embodied in many other forms than those herein described, and those skilled in the art will readily appreciate that the present application may be similarly embodied without departing from the spirit or essential characteristics thereof, and therefore the present application is not limited to the specific embodiments disclosed below.
The terminology used in the one or more embodiments of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of the application. As used in one or more embodiments of the application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used in one or more embodiments of the present application refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that, although the terms first, second, etc. may be used in one or more embodiments of the application to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first may also be referred to as a second, and similarly, a second may also be referred to as a first, without departing from the scope of one or more embodiments of the application. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "responsive to a determination", depending on the context.
First, terms related to one or more embodiments of the present application will be explained.
k8s: kubernetes, abbreviated as K8s, is an abbreviation that replaces the 8 characters "ubennete" in the middle of a name with 8. Is an open source for managing containerized applications on multiple hosts in a cloud platform, and the goal of Kubernetes is to make deploying containerized applications simple and efficient (powerful), which provides a mechanism for application deployment, planning, updating, and maintenance.
A container: a container is a portable software unit that can consolidate applications and all their dependencies into one software package that is not limited by the underlying host operating system.
Dragonfly: is a file distribution and mirror image acceleration system based on P2P technology.
The distributed cloud is a cloud computing mode for deploying cloud services to different geographic positions as required and providing unified management capability. In distributed clouds, although service deployment is decentralized and possible in various regions, the requirements for management are concentrated. Kubernetes have become a standard of cloud environments, and a distributed cloud platform needs to be capable of supporting deployment and management of various types of Kubernetes clusters in multiple ways, and providing capabilities of unified authentication, partition management, unified access, unified configuration and the like on the distributed cloud platform, so that users can manage and access the environments of the distributed cloud as if the users are running locally.
In the production practice of Kubernetes cluster environments, smaller container images can quickly deploy a boot. When the mirror image of the application reaches more than several GB, downloading the mirror image on the node usually consumes a great amount of time, even if the project like Dramonfly is used for improving the distribution efficiency of the mirror image of the container by introducing the P2P network, the user still has to wait for the mirror image data to be completely downloaded to the local place and then can create the container of the user, in this case, the time for pulling the mirror image consumes the bottleneck point of the maximum quick service pull (the extreme case can occupy more than 95% of the total duration, the service starting speed is in the second level, and the mirror image is pulled in the minute level), so the mirror image preheating capability is very important.
However, the current image preheating mode only focuses on the host and the determined image to be preheated, and the following scenarios are not used: firstly, in a distributed cloud scene, clients are used together by multi-cloud multi-k 8s clusters, but the current preheating scheme is aimed at a single cluster and cannot carry out efficient mirror image preheating on a plurality of clusters; further, the environments (which may include environments with various dimensions, such as products, projects, namespaces, tenants, users, etc.) of the client in the distributed cloud multi-k 8s cluster are all relevant, and the current mirror image preset cannot embody the relationship between the environments, for example, the relationship between the renter and the tenant; and many times the name of the mirror to be preheated is not known in advance, for example: when the client performs mirror image deployment on the a-environment of the A-cluster, the b-environment related to the a-environment cannot be determined, and therefore the b-environment cannot be preheated in advance based on the mirror image of the a-environment of the A-cluster.
In the distributed cloud scene, the user can directly preheat the direct designated mirror images of a plurality of cluster dimensions, and can also mutually learn and preheat the related images in clusters or among cross-cluster environments so as to improve the speed of pulling up business application in a plurality of scenes. In the distributed cloud scene, the scheme of the application can carry out mirror image preheating for a single cluster and can also carry out mirror image preheating for a plurality of clusters; the mirror image can be preheated in a correlation learning mode through a multidimensional environment, so that the service starting speed is remarkably improved in some use scenes of the distributed cloud.
In the present application, a method for preheating and pulling an image file is provided, and the present application relates to a preheating and pulling device for an image file, a computing device, and a computer-readable storage medium, which are described in detail in the following embodiments one by one.
Fig. 1 is a schematic view of a scenario of a method for preheating and pulling an image file according to an embodiment of the present application, which specifically includes:
a user issues resource configuration information on a container control cluster of a distributed cloud, wherein the resource configuration information comprises mirror image preheating configuration information for carrying out mirror image preheating on nodes in the cluster; the main controller of the container control cluster determines a cluster identifier 1 of a service container cluster A and a cluster identifier 2 of a service container cluster B which need to be subjected to mirror preheating by analyzing the resource configuration information, and obtains mirror preheating configuration information A corresponding to the cluster identifier 1 and mirror preheating configuration information B corresponding to the cluster identifier 2 by dividing the resource configuration information; the mirror image preheating configuration information is issued to a service container cluster A, and the mirror image preheating configuration information B is issued to a service container cluster B; the sub-controller of the service container cluster A detects the issuing of the mirror image preheating configuration information A, and generates JobA for pulling the container mirror image file according to the mirror image preheating configuration information A, so that the node in the cluster A is controlled to pull the container mirror image file of mirror image preheating, and the node in the service container cluster A is conveniently used for mirror image preheating based on the pulled container mirror image file; similarly, the subcontroller of the service container cluster B detects the issuing of the mirror image preheating configuration information B, and generates JobB for pulling the container mirror image file according to the mirror image preheating configuration information B, thereby controlling the nodes in the service container cluster B to pull the container mirror image file preheated by mirror image.
The preheating pulling method of the mirror image file receives a container mirror image preheating instruction, wherein the container mirror image preheating instruction carries resource configuration information; determining at least one container cluster identifier according to the resource configuration information, and generating mirror image preheating configuration information corresponding to each container cluster identifier; and sending the mirror image preheating configuration information to the service container clusters corresponding to the container cluster identifiers so that the service container clusters preheat and pull the container mirror image file based on the mirror image preheating configuration information.
The mirror image preheating configuration information corresponding to each container cluster identifier is determined in the resource configuration information by the container control cluster, and then each mirror image preheating configuration information is issued to the corresponding service container cluster, so that the distribution efficiency of the mirror image preheating configuration information is improved; and the preheating pulling task of issuing mirror image files to a plurality of service container clusters is realized by utilizing the container control clusters, so that the preheating pulling efficiency of the service container clusters to the container mirror image files can be improved.
Fig. 2 shows a flowchart of a method for pre-heating and pulling an image file, which is applied to a container control cluster and specifically includes the following steps:
Step 202: and receiving a container mirror image preheating instruction, wherein the container mirror image preheating instruction carries resource configuration information.
The container mirror image preheating instruction refers to an instruction for mirror image preheating of nodes in a cluster; the resource allocation information is information for generating image file pulling tasks corresponding to the service container clusters.
Specifically, a user uploads resource configuration information to a container control cluster, and the container control cluster generates a container mirror image preheating instruction according to the resource configuration information under the condition that the container control cluster receives the mirror image preheating task trigger; the resource configuration information is carried in the container mirror image preheating instruction, and the subsequent container control clusters can issue mirror image preheating configuration information corresponding to each service container cluster according to the resource configuration information.
In a specific embodiment of the present application, a container control cluster receives resource allocation information for a service container cluster a and a service container cluster B uploaded by a user; a container image warm-up instruction generated based on the resource configuration information.
And receiving a container mirror image preheating instruction carrying the resource configuration information so as to distribute the configuration information to each service container cluster for the resource configuration information by the container control cluster.
Step 204: and determining at least one container cluster identifier according to the resource configuration information, and generating mirror image preheating configuration information corresponding to each container cluster identifier.
Wherein, the container cluster identifier refers to a field that can uniquely represent the service container cluster, for example, the container cluster identifier is a service container cluster name "a"; the mirror image preheating configuration information refers to configuration information which corresponds to each service container cluster in the resource configuration information and is used for configuring mirror image preheating tasks.
Specifically, the resource configuration information comprises one, two or more container cluster identifiers; the resource configuration information comprises mirror image preheating configuration information corresponding to each container cluster identifier; after the resource configuration information is determined in the container mirror image preheating instruction, the container control cluster analyzes the container cluster identification in the resource configuration information and the mirror image preheating configuration information corresponding to the container cluster identification so as to distribute the mirror image preheating configuration information to the service container clusters corresponding to the container cluster identification.
In a specific embodiment of the application, resolving the resource configuration information to obtain a container cluster identifier m and a container cluster identifier n; and searching mirror image preheating configuration information 1 corresponding to the container cluster identifier m in the resource configuration information according to the container cluster identifier m, and searching mirror image preheating configuration information 2 corresponding to the cluster identifier n in the resource configuration information based on the container cluster identifier n.
In practical application, because the mirror image files among the service container clusters may have the same content, the association relationship among the clusters can be determined, and the clusters needing mirror image preheating can be determined according to the association relationship.
Specifically, the method for determining at least one container cluster identifier according to the resource configuration information may include:
determining at least one initial container cluster identifier according to the resource configuration information;
determining associated container cluster identifiers corresponding to the initial container cluster identifiers;
and determining each initial container cluster identifier and each associated container cluster identifier as a container cluster identifier.
The initial container cluster identifier refers to a container cluster identifier obtained by analyzing resource configuration information; the associated container cluster identifier refers to a container cluster identifier with an association relationship with the initial container cluster identifier; in practical application, the associated container cluster identifier may be consistent or inconsistent with the container cluster identifier parsed in the resource configuration information; in the case where there is no correspondence between the associated container cluster identity and the container cluster identity parsed from the resource configuration information, the associated container cluster identity may be retrieved from a container cluster relationship table based on the initial container cluster identity.
Specifically, analyzing the resource configuration information to obtain one, two or more initial container cluster identifiers; searching an associated container cluster identifier corresponding to the initial container cluster identifier in a container cluster table which is created in advance according to the initial container cluster identifier; and taking each initial container cluster identifier and each associated container cluster identifier as container cluster identifiers.
In a specific embodiment of the present application, resolving the resource configuration information to obtain initial container cluster identifiers 1 and 2; searching in a container cluster relation table according to the initial container cluster identifications 1 and 2; the obtained search result comprises the following steps: the container cluster identifications 3 and 4 associated with the initial container cluster identification 1 are used as associated container cluster identifications, and the container cluster identification 5 associated with the initial container cluster identification 2 is used as associated container cluster identification; and taking the initial container cluster identifiers 1 and 2 and the associated container cluster identifiers 3, 4 and 5 as container cluster identifiers for subsequent issuing of mirror image preheating configuration information.
In practical application, before determining the associated container cluster identifier corresponding to each initial container cluster identifier, the method further comprises:
determining an associated service container cluster corresponding to each service container cluster;
A cluster association relationship between the business container cluster and the associated business container cluster is created.
Wherein, the service container cluster refers to a cluster formed by service nodes; the associated service container cluster refers to a container cluster with an association relationship with nodes in the service container cluster; the cluster association relationship refers to a mapping relationship between service container clusters, for example, if service container cluster a, service container cluster B, and service container cluster C each contain tenant nodes, then the service container cluster a associated service cluster may be service container cluster B and service container cluster C.
Specifically, determining a service container cluster and an associated service container cluster of the service container cluster; and determining a cluster association relation based on the association relation between the service container clusters and the associated service container clusters, determining a container cluster identifier of the service container clusters and an associated container cluster identifier of the associated container clusters, and recording the container cluster identifier and the associated container cluster identifier based on the cluster association relation to obtain a container cluster relation table.
The method comprises the steps of determining at least one container cluster identifier according to resource configuration information, and generating mirror image preheating configuration information corresponding to each container cluster identifier, so that the resource configuration information is divided, and the mirror image preheating configuration information is conveniently distributed to corresponding service container clusters.
Step 206: and sending the mirror image preheating configuration information to the service container clusters corresponding to the container cluster identifiers so that the service container clusters preheat and pull the container mirror image file based on the mirror image preheating configuration information.
The container mirror image file is a file for pre-heating and pulling to the memory to create a container.
Specifically, under the condition that the initial container cluster identifiers are not provided with the corresponding associated container cluster identifiers, any initial container cluster identifier is determined to be used as a target initial container cluster identifier; determining a target business container cluster corresponding to the target initial container cluster identifier; and sending the target mirror image preheating configuration information corresponding to the target initial container cluster identifier to the target service container cluster.
In a specific embodiment of the present application, container cluster identifiers 1, 2 and 3 are obtained by analyzing resource configuration information; resolving mirror image preheating configuration information corresponding to each container cluster identifier in the resource configuration information based on the container cluster identifiers 1, 2 and 3; and sending the image preheating configuration information corresponding to each image preheating identifier to the container cluster corresponding to each image preheating identifier.
The process of issuing the mirror image preheating configuration information is that no associated container cluster identification exists; in practical application, the process of issuing the mirror image preheating configuration information with the associated container cluster identifier is as follows, and specifically, the method for sending each mirror image preheating configuration information to the service container cluster corresponding to each container cluster identifier may include:
Determining a target initial container cluster identifier and at least one target associated container cluster identifier corresponding to the target initial container cluster identifier, wherein the target initial container cluster identifier is any one of the initial container cluster identifiers;
determining target service container clusters corresponding to the target initial container cluster identifiers and associated service container clusters corresponding to the target associated container cluster identifiers;
and sending target mirror image preheating configuration information corresponding to the target initial container cluster identification to the target service container clusters and each associated service container cluster.
The target association container identifier refers to a container cluster identifier with an association relationship with the target initial container cluster identifier; the target service container cluster refers to a service container cluster corresponding to the target initial container cluster identifier; the associated service container cluster refers to a service container cluster corresponding to the target associated container cluster.
Specifically, determining a target service container cluster corresponding to the target initial container cluster identifier and an associated service container cluster corresponding to the target associated container cluster identifier respectively; and respectively sending the target mirror image preheating configuration information corresponding to the target initial container cluster identification to the target initial container clusters and each associated service container cluster.
In a specific embodiment of the present application, the initial container cluster identifier 1 is determined by analyzing the resource configuration information; determining target associated container identifications 2 and 3 of an initial mirror image preheating identification 1; determining a service container cluster 1 corresponding to the initial container cluster identifier 1, and a service container cluster 2 and a service container cluster 3 corresponding to the target associated container identifiers 2 and 3; and determining mirror image preheating configuration information corresponding to the initial container cluster identifier 1, and transmitting the mirror image preheating configuration information to the service container cluster 1, the service container cluster 2 and the service container cluster 3.
And sending the mirror image preheating configuration information to the service container clusters corresponding to the container cluster identifiers, so that the distribution efficiency of the mirror image preheating configuration information is improved, and the mirror image preheating efficiency of the nodes in the subsequent service container clusters is improved.
In practical application, after the target service container cluster is determined to realize the pulling of the mirror image file, the corresponding associated service container cluster can also pull the mirror image file.
Specifically, after sending each mirror image preheating configuration information to the service container cluster corresponding to each container cluster identifier, the method further includes:
receiving a mirror image preheating pulling notification returned by the target service container cluster;
Responding to the mirror image preheating pulling notification, and determining at least one target associated container cluster identifier corresponding to the target service container cluster;
and sending the target mirror image preheating configuration information corresponding to the target service container cluster to target associated container clusters corresponding to the target associated container cluster identifiers, so that each target associated container cluster preheats and pulls the container mirror image file based on the target mirror image preheating configuration information.
The mirror preheating pull notification refers to a notification returned by the target service container cluster by receiving the mirror preheating configuration information.
Specifically, after the target mirror image preheating configuration information analyzed in the resource configuration information by the container control cluster is sent to the target service container cluster, the association relationship between the service container clusters can be logically analyzed; after receiving the target mirror image preheating configuration information, the target service container cluster returns a mirror image preheating pulling notification to the container control cluster; after determining the target associated container cluster identifiers, the container control cluster determines associated service container clusters corresponding to the target associated container cluster identifiers according to the target associated container cluster identifiers; and sending the target mirror image preheating configuration information corresponding to the target container cluster identification to each associated service container cluster.
In a specific embodiment of the present application, mirror image preheating configuration information corresponding to a container cluster identifier 1 is sent to a service container cluster a corresponding to the container cluster identifier 1; after receiving the mirror image preheating configuration information, the service container cluster A returns a mirror image preheating pulling notification to the container control cluster; the container control cluster responds to the mirror image preheating pulling notification to determine associated container cluster identifications 2 and 3 of the container cluster identification 1; further determining a service container cluster A and a service container cluster B corresponding to the associated container identifiers 2 and 3, and respectively sending mirror image preheating configuration information to the service container cluster A and the service container cluster B.
By the mirror image preheating pulling notification returned by the target service container cluster, the mirror image preheating configuration information can be still sent to the associated service container cluster under the condition that the container control cluster cannot acquire the cluster association relationship.
In one embodiment of the present application, resource configuration information o45 is determined; analyzing the resource configuration information o45 to determine that the mirror image with the version number of "1.9.1" is preheated for the node with the pool1 in the service container cluster A, then the mirror image preheating configuration information of the service container cluster A in the resource configuration information o45 is issued to the service container cluster A, the service container cluster A performs pulling of the container mirror image file with the version number of "1.9.1", and the node with the pool1 in the service container cluster A preheats and pulls the container mirror image file with the version number of "1.9.1"; analyzing the resource configuration information o45 to determine that the nodes with node names of "node1 and node5" in the service container cluster B are subjected to mirror preheating with the version number of "9.0.72", then the mirror preheating configuration information of the service container cluster B in the resource configuration information o45 is issued to the service container cluster B, the service container cluster B performs pulling of the container mirror file with the version number of "9.0.72", and the nodes with node names of "node1 and node5" in the service container cluster B are subjected to mirror preheating to pull the container mirror file with the version number of "9.0.72".
Further, after the mirror preheating configuration information is sent to the service container clusters, the resource state needs to be updated, specifically, after each mirror preheating configuration information is sent to the service container cluster corresponding to each container cluster identifier, the method further includes:
receiving a resource update state notification returned by each service container cluster;
updating the resource status of the container control cluster based on each resource update status notification.
The resource update status notification is a notification of a processing condition of the service container cluster, for example, the resource update status notification may be a notification that the image preheating configuration information is successfully sent, may be a notification that the image preheating configuration information is failed to be sent, may be a notification that an image file is not pulled, and the like.
Specifically, the container control cluster receives a resource update status notification returned by each service container cluster; and adjusting the resource state corresponding to each resource configuration information based on the resource update state notification corresponding to each resource configuration information, so that the follow-up processing is facilitated.
In a specific embodiment of the present application, a resource update status notification returned by the service container cluster a is received: the mirror image preheating configuration information is successfully sent; the resource status of the resource configuration information corresponding to the service container cluster A in the container control cluster is adjusted from 'sent' to 'successful sending' based on the resource update status notification.
In practical application, besides realizing the issue of the container mirror image file based on the container control cluster to create the container mirror image file of the container, the information for adjusting the mirror image can be sent to the service container cluster under the condition that the container mirror image file is adjusted.
Specifically, after sending each mirror image preheating configuration information to the service container cluster corresponding to each container cluster identifier, the method further includes:
receiving a mirror image adjustment instruction of a first container mirror image file aiming at a first initial service container cluster, wherein the mirror image adjustment instruction carries mirror image adjustment information;
and responding to the mirror image adjustment instruction, and sending the mirror image adjustment information to the first initial service container cluster.
Wherein, the first initial service container cluster refers to any container cluster in the initial service container clusters; the image adjustment information refers to information for adjusting the container image file, for example, deleting information in the container image file, adding information in the container image file, and the like; the image adjustment instruction refers to an instruction for adjusting the container image file.
Specifically, the container control cluster receives a mirror image adjustment instruction of a first container mirror image file aiming at a first initial service container cluster; and determining mirror image adjustment information in the mirror image adjustment information, and sending the mirror image adjustment information to the first initial service container cluster so that the first initial service container cluster adjusts the mirror image file according to the mirror image adjustment information.
In one embodiment of the present application, a container control cluster receives a mirror adjustment instruction for a container mirror file of a service container cluster a; resolving the image adjustment instruction to obtain image adjustment information, wherein the image adjustment information is to adjust the version number of the container image file from 1.9.1 to 1.9.2; and sending the mirror image adjustment information to the service container cluster A so that the service container cluster A pulls the container mirror image file with the version number of 1.9.2 according to the mirror image adjustment information.
Further, after the image file of the first initial service container cluster is adjusted, the adjusting of the image file of the associated service container cluster of the first initial service container cluster may be further performed, that is, after the image adjustment information is sent to the first initial service container cluster, the method further includes:
receiving an adjustment completion notification returned by the first initial service container cluster;
determining at least one associated service container cluster corresponding to the first initial service container cluster in response to the adjustment completion notification;
and sending the mirror image adjustment information to each associated service container cluster.
The adjustment completion notification refers to notification that the first initial service container cluster completes adjustment of the image file; the associated service container cluster refers to a service container cluster having an association relationship with the first initial service container cluster.
Specifically, after the first initial service container cluster completes adjustment of the corresponding mirror image file according to the mirror image adjustment information, sending an adjustment completion notification to the container control cluster, or detecting the adjustment of the mirror image file completed by the first initial service container cluster by the container control cluster; and further determining at least one associated service container cluster corresponding to the first initial service container cluster, and respectively sending mirror image adjustment information to each associated service container cluster so as to enable each associated service container cluster to complete adjustment of mirror image files, thereby realizing synchronization of adjustment of the mirror image files.
And distributing the mirror image adjustment information through the container control cluster, so that the adjustment of the container mirror image files of the association relationship is realized, and the adjustment efficiency of the container mirror image files is improved.
The preheating pulling method of the mirror image file receives a container mirror image preheating instruction, wherein the container mirror image preheating instruction carries resource configuration information; determining at least one container cluster identifier according to the resource configuration information, and generating mirror image preheating configuration information corresponding to each container cluster identifier; and sending the mirror image preheating configuration information to the service container clusters corresponding to the container cluster identifiers so that the service container clusters preheat and pull the container mirror image file based on the mirror image preheating configuration information.
The mirror image preheating configuration information corresponding to each container cluster identifier is determined in the resource configuration information by the container control cluster, and then each mirror image preheating configuration information is issued to the corresponding service container cluster, so that the distribution efficiency of the mirror image preheating configuration information is improved; and the preheating pulling task of sending mirror image files to a plurality of service container clusters is realized by utilizing the container control clusters, so that the preheating pulling efficiency of the service container clusters to the container mirror image files can be improved, and the service pulling speed of the subsequent service container clusters is further improved.
Fig. 3 shows a flowchart of a method for pre-heating and pulling an image file, which is applied to a service container cluster and specifically includes the following steps:
step 302: and receiving target mirror image preheating configuration information sent by the container control cluster.
The service container cluster refers to any container cluster which receives mirror image preheating configuration information sent by the container control cluster; the container control cluster refers to a container cluster capable of dividing resource configuration information into mirror image preheating configuration information corresponding to each service container cluster; the target mirror image preheating configuration information refers to mirror image preheating configuration information corresponding to the service container cluster.
In a specific embodiment of the present application, the service container cluster a receives the mirror preheating configuration information issued by the container control cluster.
And receiving the target image preheating configuration information sent by the container control cluster so as to pull the container image file based on the target image preheating configuration information.
Step 304: and creating an image file pulling task for the service container cluster based on the target image preheating configuration information.
The mirror image file pulling task refers to a task of pulling a mirror image file of a corresponding container in a mirror image warehouse by a node in a service container cluster.
Specifically, the target image preheating configuration information comprises a target container image identifier and target container image link information; the method for creating the image file pulling task for the service container cluster based on the target image preheating configuration information can comprise the following steps:
and generating an image file pulling task aiming at the image file of the target container according to the image identification of the target container and the image link information of the target container.
The target container mirror image identification refers to the identification of a container mirror image file; the target container mirror link information refers to the storage information of the container mirror file.
Specifically, analyzing the target image preheating configuration information to obtain a target container image identifier and target container image link information; and generating an image file pulling task based on the target container image identification and the target container image link information, so that nodes in the subsequent container clusters can pull the container image file based on the image file pulling task.
In one embodiment of the present application, the received image preheating configuration information is parsed to determine the target container image identifier "1" and the target container image link information "e-table"; and generating an image file pulling task for the image file of the target container based on the image identification of the target container and the image link information of the target container.
And generating an image file pulling task for the image file of the target container according to the image identification of the target container and the image link information of the target container so as to execute the image file pulling task based on the image identification of the target container and the image link information of the target container.
Step 306: and preheating and pulling the image file of the target container according to the image file pulling task.
The target container image file refers to a container image file which needs to be pulled by the service container cluster.
Specifically, the method for preheating and pulling the image file of the target container according to the image file pulling task may include:
determining a target storage position of the target container mirror file according to the target container mirror link information;
determining the target container image file in the target storage location according to the target container image identifier;
and preheating and pulling the mirror image file of the target container.
Where the target storage location refers to a storage location of the target container image file, for example, in an image repository, database, document, etc.
Specifically, a target storage position of the target container mirror image file is determined according to the target container mirror image link information, the target container mirror image file corresponding to the target container identifier is further retrieved at the target storage position according to the target container mirror image identifier, and finally the target container mirror image file is preheated and pulled from the target storage position by the node.
In one embodiment of the present application, the storage location of the container image file is determined to be the data table D of the image repository according to the target container image link information; and according to the target container mirror image identifier '1', retrieving a container mirror image file corresponding to the target container mirror image identifier '1' in a data table D of the mirror image warehouse, and performing preheating pulling as the target container mirror image file to be preheated.
The target container mirror image file is preheated and pulled according to the target container mirror image identification and the target container mirror image link information, so that the target container mirror image file is accurately preheated and pulled, and the preheating and pulling accuracy of the target container mirror image file is improved.
Further, in the case that an association relationship exists between service container clusters, the image file may be adjusted based on the association relationship between service container clusters, and specifically, the method further includes:
receiving mirror image adjustment information sent by a container control cluster, wherein the mirror image adjustment information is determined based on adjustment completion notification sent by a reference service container cluster to the container control cluster;
and adjusting the image file of the target container based on the image adjustment information.
Wherein the reference service container cluster is a service container cluster having an association relationship with the service container cluster.
Specifically, after receiving the mirror image adjustment instruction, the reference service container cluster adjusts the mirror image file of the reference service container cluster; after the container control cluster monitors that the reference service container cluster completes the adjustment of the mirror image file, the container control cluster sends mirror image adjustment information to the service container cluster; and the service container cluster receives the mirror image adjustment information sent by the container control cluster, and adjusts the target container mirror image file corresponding to the service container cluster based on the mirror image adjustment information.
In a specific embodiment of the present application, after receiving the mirror image file adjustment instruction, the service container cluster B triggers adjustment of the mirror image file corresponding to the service container cluster B; after the business container cluster B finishes adjustment, sending an adjustment completion notification to the container control cluster; the container control cluster determines a service container cluster B associated service container cluster, namely an associated service container cluster A and an associated service container cluster C, based on the adjustment completion notification; sending mirror image adjustment information to the associated service container cluster A and the associated service container cluster C; the associated service container cluster A and the associated service container cluster C receive the mirror image adjustment information. And adjusting the corresponding mirror image file.
The distribution efficiency of the mirror image adjustment information is improved by the distribution of the mirror image adjustment information by the container control cluster.
In a specific embodiment of the present application, the service container cluster A, B receives the mirror image preheating configuration information issued by the container control cluster based on the resource configuration information uf 30; the service container clusters A, B are mutually monitored, and when the correlation mirror image information appears in the space named test in the service container cluster B, mirror image preheating is carried out on the nodes containing the pool1 labels in the service container cluster A based on the correlation mirror image information; and carrying out mirror image preheating on nodes named node2 and node5 in the service container cluster A based on the correlation mirror image information when the correlation mirror image information is detected to appear in the space named telantTestuser1 in the service container cluster A.
The mirror image preheating configuration information is sent to the associated service container clusters, or the associated service container clusters are monitored, so that the target container mirror image file can be adjusted based on the associated service container clusters, the distribution form of the mirror image preheating configuration information is enriched, the relevance among the service container clusters is considered, the issuing efficiency of the mirror image preheating configuration information is improved, the preheating pulling efficiency of the service container clusters to the container mirror image file is improved, and the service pulling speed of the subsequent service container clusters is improved.
The application is applied to a preheating pulling method of an image file of a service container cluster, and receives target image preheating configuration information sent by a container control cluster; creating an image file pulling task for the service container cluster based on the target image preheating configuration information; and preheating and pulling the image file of the target container according to the image file pulling task.
And generating an image file pulling task through the received image preheating configuration information, so that the preheating pulling of the container image file is performed in response to the image file pulling task, and the preheating pulling efficiency of the container image file is improved.
The method for preheating and pulling the image file provided by the application is taken as an example in the application of the method for preheating and pulling the image file in the data screening service in the following way with reference to fig. 4. Fig. 4 shows a process flow diagram of a method for preheating and pulling an image file applied to a data screening service according to an embodiment of the present application, which specifically includes the following steps:
step 402: and uploading the resource configuration information to the container control cluster.
Specifically, the resource configuration information includes mirror image preheating configuration information corresponding to each service container cluster.
Step 404: the main controller carries out logic processing on the resource configuration information and determines mirror image preheating configuration information corresponding to each service container cluster.
Step 406: and sending mirror image preheating configuration information to the sub-controllers of each service container cluster.
Step 408: an image warm-up job is created based on the image warm-up configuration information.
Step 410: interaction with the CRI completes the pulling of the container image file.
Step 412: and after the event notification is completed, updating the state of the target subcontroller, and changing the state of the subset group mirror image preheating resource.
Step 414: and monitoring the corresponding resource state update of the sub-controller resources, and updating the state of the main controller.
Step 416: the mirrored warm-up status field of the container control cluster is changed.
Step 418: and continuously monitoring or inquiring to find a new image needing to be subjected to image preheating according to the information in the control image preheating resource, and continuously executing an image preheating flow.
Corresponding to the method embodiment, the application also provides an embodiment of a preheating pulling device for the image file, which is applied to a container control cluster, and fig. 5 shows a schematic structural diagram of the preheating pulling device for the image file provided by the embodiment of the application. As shown in fig. 5, the apparatus includes:
the receiving module 502 is configured to receive a container image preheating instruction, where the container image preheating instruction carries resource configuration information;
a determining module 504, configured to determine at least one container cluster identifier according to the resource configuration information, and generate mirror image preheating configuration information corresponding to each container cluster identifier;
the sending module 506 is configured to send each image preheating configuration information to the service container cluster corresponding to each container cluster identifier, so that each service container cluster prefetches the container image file based on the image preheating configuration information.
Optionally, the determining module 504 is further configured to:
Determining at least one initial container cluster identifier according to the resource configuration information;
determining associated container cluster identifiers corresponding to the initial container cluster identifiers;
and determining each initial container cluster identifier and each associated container cluster identifier as a container cluster identifier.
Optionally, the sending module 506 is further configured to:
determining a target initial container cluster identifier and at least one target associated container cluster identifier corresponding to the target initial container cluster identifier, wherein the target initial container cluster identifier is any one of the initial container cluster identifiers;
determining target service container clusters corresponding to the target initial container cluster identifiers and associated service container clusters corresponding to the target associated container cluster identifiers;
and sending target mirror image preheating configuration information corresponding to the target initial container cluster identification to the target service container clusters and each associated service container cluster.
Optionally, the apparatus further comprises a creation sub-module configured to:
determining an associated service container cluster corresponding to each service container cluster;
a cluster association relationship between the business container cluster and the associated business container cluster is created.
Optionally, the apparatus further comprises a first transmitting sub-module configured to:
receiving a mirror image adjustment instruction of a first container mirror image file aiming at a first initial service container cluster, wherein the mirror image adjustment instruction carries mirror image adjustment information;
and responding to the mirror image adjustment instruction, and sending the mirror image adjustment information to the first initial service container cluster.
Optionally, the apparatus further comprises a transmitting sub-module:
receiving an adjustment completion notification returned by the first initial service container cluster;
determining at least one associated service container cluster corresponding to the first initial service container cluster in response to the adjustment completion notification;
and sending the mirror image adjustment information to each associated service container cluster.
Optionally, the apparatus further comprises a second transmitting sub-module configured to:
receiving a mirror image preheating pulling notification returned by the target service container cluster;
responding to the mirror image preheating pulling notification, and determining at least one target associated container cluster identifier corresponding to the target service container cluster;
and sending the target mirror image preheating configuration information corresponding to the target service container cluster to target associated container clusters corresponding to the target associated container cluster identifiers, so that each target associated container cluster preheats and pulls the container mirror image file based on the target mirror image preheating configuration information.
Optionally, the apparatus further comprises an update sub-module configured to:
receiving a resource update state notification returned by each service container cluster;
updating the resource status of the container control cluster based on each resource update status notification.
The application is applied to a preheating pulling device of an image file of a container control cluster, and a receiving module is configured to receive a container image preheating instruction, wherein the container image preheating instruction carries resource configuration information; the determining module is configured to determine at least one container cluster identifier according to the resource configuration information and generate mirror image preheating configuration information corresponding to each container cluster identifier; the sending module is configured to send the mirror image preheating configuration information to the service container clusters corresponding to the container cluster identifiers, so that the service container clusters preheat and pull the container mirror image file based on the mirror image preheating configuration information.
The mirror image preheating configuration information corresponding to each container cluster identifier is determined in the resource configuration information by the container control cluster, and then each mirror image preheating configuration information is issued to the corresponding service container cluster, so that the distribution efficiency of the mirror image preheating configuration information is improved; and the preheating pulling task of issuing mirror image files to a plurality of service container clusters is realized by utilizing the container control clusters, so that the preheating pulling efficiency of the service container clusters to the container mirror image files can be improved.
Corresponding to the method embodiment, the application also provides an embodiment of a preheating pulling device for the image file, which is applied to the service container cluster, and fig. 6 shows a schematic structural diagram of the preheating pulling device for the image file provided by an embodiment of the application. As shown in fig. 6, the apparatus includes:
a receiving module 602, configured to receive target image preheating configuration information sent by the container control cluster;
a creation module 604 configured to create an image file pull task for the business container cluster based on the target image warm-up configuration information;
the preheat pulling module 606 is configured to preheat the target container image file according to the image file pulling task.
Optionally, the target image preheating configuration information includes a target container image identifier and target container image link information;
the creation module 604 is further configured to:
and generating an image file pulling task aiming at the image file of the target container according to the image identification of the target container and the image link information of the target container.
Optionally, the preheat pull module 606 is further configured to:
determining a target storage position of the target container mirror file according to the target container mirror link information;
Determining the target container image file in the target storage location according to the target container image identifier;
and preheating and pulling the mirror image file of the target container.
Optionally, the apparatus further comprises an adjustment sub-module configured to:
receiving mirror image adjustment information sent by a container control cluster, wherein the mirror image adjustment information is determined based on adjustment completion notification sent by a reference service container cluster to the container control cluster;
and adjusting the image file of the target container based on the image adjustment information.
The application is applied to a preheating pulling device of an image file of a service container cluster, and a receiving module is configured to receive target image preheating configuration information sent by a container control cluster; the creation module is configured to create an image file pulling task for the service container cluster based on the target image preheating configuration information; and the preheating pulling module is configured to preheat and pull the image file of the target container according to the image file pulling task. And generating an image file pulling task through the received image preheating configuration information, so that the preheating pulling of the container image file is performed in response to the image file pulling task, the preheating pulling efficiency of the service container cluster on the container image file can be improved, and the service pulling speed of the subsequent service container cluster is further improved.
Fig. 7 is a schematic diagram of a method for pre-heating and pulling an image file according to an embodiment of the present application, which is applied to a container cluster control system, where the container cluster control system includes a container control cluster and at least two service container clusters.
The container control cluster 702 receives a container mirror preheating instruction, where the container mirror preheating instruction carries resource configuration information; determining at least one container cluster identifier according to the resource configuration information, and generating mirror image preheating configuration information corresponding to each container cluster identifier; sending each mirror image preheating configuration information to a service container cluster corresponding to each container cluster identifier, so that each service container cluster preheats and pulls a container mirror image file based on the mirror image preheating configuration information;
a service container cluster 704, which receives the target mirror image preheating configuration information sent by the container control cluster; creating an image file pulling task for the service container cluster based on the target image preheating configuration information; and preheating and pulling the image file of the target container according to the image file pulling task.
Specifically, the service container cluster 704 is any service container cluster of at least two service container clusters.
The application is applied to the preheating and pulling method of the mirror image file of the container cluster control system, and the mirror image preheating configuration information corresponding to each container cluster identification is determined in the resource configuration information by the container control cluster, and then each mirror image preheating configuration information is issued to the corresponding service container cluster, so that the distribution efficiency of the mirror image preheating configuration information is improved; the preheating pulling task of issuing mirror image files to a plurality of service container clusters is realized by utilizing the container control clusters, so that the preheating pulling efficiency of the service container clusters to the container mirror image files can be improved; and generating an image file pulling task according to the received image preheating configuration information, so that the preheating pulling of the container image file is performed in response to the image file pulling task, and the preheating pulling efficiency of the container image file is improved.
The foregoing is a schematic solution of a preheating pulling device for an image file in this embodiment. It should be noted that, the technical solution of the image file preheating and pulling device and the technical solution of the image file preheating and pulling method belong to the same concept, and details of the technical solution of the image file preheating and pulling device which are not described in detail can be referred to the description of the technical solution of the image file preheating and pulling method.
Fig. 8 illustrates a block diagram of a computing device 800 provided in accordance with an embodiment of the present application. The components of computing device 800 include, but are not limited to, memory 810 and processor 820. Processor 820 is coupled to memory 810 through bus 830 and database 850 is used to hold data.
Computing device 800 also includes access device 840, access device 840 enabling computing device 800 to communicate via one or more networks 860. Examples of such networks include public switched telephone networks (PSTN, public Switched Telephone Network), local area networks (LAN, local Area Network), wide area networks (WAN, wide Area Network), personal area networks (PAN, personal Area Network), or combinations of communication networks such as the internet. Access device 840 may include one or more of any type of network interface, wired or wireless, such as a network interface card (NIC, network interface controller), such as an IEEE802.11 wireless local area network (WLAN, wireless Local Area Network) wireless interface, a worldwide interoperability for microwave access (Wi-MAX, worldwide Interoperability for Microwave Access) interface, an ethernet interface, a universal serial bus (USB, universal Serial Bus) interface, a cellular network interface, a bluetooth interface, a near field communication (NFC, near Field Communication) interface, and so forth.
In one embodiment of the application, the above-described components of computing device 800, as well as other components not shown in FIG. 8, may also be connected to each other, such as by a bus. It should be understood that the block diagram of the computing device illustrated in FIG. 8 is for exemplary purposes only and is not intended to limit the scope of the present application. Those skilled in the art may add or replace other components as desired.
Computing device 800 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., tablet, personal digital assistant, laptop, notebook, netbook, etc.), mobile phone (e.g., smart phone), wearable computing device (e.g., smart watch, smart glasses, etc.), or other type of mobile device, or a stationary computing device such as a desktop computer or personal computer (PC, personal Computer). Computing device 800 may also be a mobile or stationary server.
Wherein processor 820 implements the steps of the warm-up pull method for image files when executing the computer instructions.
The foregoing is a schematic illustration of a computing device of this embodiment. It should be noted that, the technical solution of the computing device and the technical solution of the method for preheating and pulling the image file belong to the same concept, and details of the technical solution of the computing device, which are not described in detail, can be referred to the description of the technical solution of the method for preheating and pulling the image file.
An embodiment of the present application also provides a computer-readable storage medium storing computer instructions that, when executed by a processor, implement the steps of a warm-up pull method for an image file as described above.
The above is an exemplary version of a computer-readable storage medium of the present embodiment. It should be noted that, the technical solution of the storage medium and the technical solution of the method for preheating and pulling the image file belong to the same concept, and details of the technical solution of the storage medium which are not described in detail can be referred to the description of the technical solution of the method for preheating and pulling the image file.
The foregoing describes certain embodiments of the present application. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
The computer instructions include computer program code that may be in source code form, object code form, executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth.
It should be noted that, for the sake of simplicity of description, the foregoing method embodiments are all expressed as a series of combinations of actions, but it should be understood by those skilled in the art that the present application is not limited by the order of actions described, as some steps may be performed in other order or simultaneously in accordance with the present application. Further, those skilled in the art will appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily all required for the present application.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to the related descriptions of other embodiments.
The preferred embodiments of the application disclosed above are intended only to assist in the explanation of the application. Alternative embodiments are not intended to be exhaustive or to limit the application to the precise form disclosed. Obviously, many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the application and the practical application, to thereby enable others skilled in the art to best understand and utilize the application. The application is limited only by the claims and the full scope and equivalents thereof.

Claims (16)

1. A method for pre-heating and pulling an image file, which is applied to a container control cluster, the method comprising:
receiving a container mirror image preheating instruction, wherein the container mirror image preheating instruction carries resource configuration information;
determining at least one container cluster identifier according to the resource configuration information, and generating mirror image preheating configuration information corresponding to each container cluster identifier;
and sending the mirror image preheating configuration information to the service container clusters corresponding to the container cluster identifiers so that the service container clusters preheat and pull the container mirror image file based on the mirror image preheating configuration information.
2. The method of claim 1, wherein determining at least one container cluster identity from the resource configuration information comprises:
determining at least one initial container cluster identifier according to the resource configuration information;
determining associated container cluster identifiers corresponding to the initial container cluster identifiers;
and determining each initial container cluster identifier and each associated container cluster identifier as a container cluster identifier.
3. The method of claim 2, wherein sending each mirrored warm-up configuration information to a service container cluster corresponding to each container cluster identity comprises:
determining a target initial container cluster identifier and at least one target associated container cluster identifier corresponding to the target initial container cluster identifier, wherein the target initial container cluster identifier is any one of the initial container cluster identifiers;
determining target service container clusters corresponding to the target initial container cluster identifiers and associated service container clusters corresponding to the target associated container cluster identifiers;
and sending target mirror image preheating configuration information corresponding to the target initial container cluster identification to the target service container clusters and each associated service container cluster.
4. The method of claim 2, wherein prior to determining the associated container cluster identity corresponding to each initial container cluster identity, further comprising:
determining an associated service container cluster corresponding to each service container cluster;
a cluster association relationship between the business container cluster and the associated business container cluster is created.
5. The method of claim 2, wherein after sending each mirrored warm-up configuration information to each service container cluster corresponding to each container cluster identifier, further comprising:
receiving a mirror image adjustment instruction of a first container mirror image file aiming at a first initial service container cluster, wherein the mirror image adjustment instruction carries mirror image adjustment information;
and responding to the mirror image adjustment instruction, and sending the mirror image adjustment information to the first initial service container cluster.
6. The method of claim 5, wherein after sending the mirror adjustment information to the first initial business container cluster, further comprising:
receiving an adjustment completion notification returned by the first initial service container cluster;
determining at least one associated service container cluster corresponding to the first initial service container cluster in response to the adjustment completion notification;
And sending the mirror image adjustment information to each associated service container cluster.
7. The method of claim 1, wherein after sending each mirrored warm-up configuration information to each service container cluster corresponding to each container cluster identifier, further comprising:
receiving a mirror image preheating pulling notification returned by the target service container cluster;
responding to the mirror image preheating pulling notification, and determining at least one target associated container cluster identifier corresponding to the target service container cluster;
and sending the target mirror image preheating configuration information corresponding to the target service container cluster to target associated container clusters corresponding to the target associated container cluster identifiers, so that each target associated container cluster preheats and pulls the container mirror image file based on the target mirror image preheating configuration information.
8. The method of claim 1, wherein after sending each mirrored warm-up configuration information to each service container cluster corresponding to each container cluster identifier, further comprising:
receiving a resource update state notification returned by each service container cluster;
updating the resource status of the container control cluster based on each resource update status notification.
9. A method for pre-heating and pulling an image file, which is applied to a service container cluster, the method comprising:
Receiving target mirror image preheating configuration information sent by a container control cluster;
creating an image file pulling task for the service container cluster based on the target image preheating configuration information;
and preheating and pulling the image file of the target container according to the image file pulling task.
10. The method of claim 9, wherein the target image warm-up configuration information includes a target container image identification and target container image link information;
creating an image file pulling task for the service container cluster based on the target image preheating configuration information, including:
and generating an image file pulling task aiming at the image file of the target container according to the image identification of the target container and the image link information of the target container.
11. The method of claim 10, wherein pre-heating the pull target container image file according to the image file pull task comprises:
determining a target storage position of the target container mirror file according to the target container mirror link information;
determining the target container image file in the target storage location according to the target container image identifier;
and preheating and pulling the mirror image file of the target container.
12. The method of claim 11, wherein after preheating the pulling of the target container image file according to the image file pulling task, further comprising:
receiving mirror image adjustment information sent by a container control cluster, wherein the mirror image adjustment information is determined based on adjustment completion notification sent by a reference service container cluster to the container control cluster;
and adjusting the image file of the target container based on the image adjustment information.
13. The preheating pulling method of the mirror image file is characterized by being applied to a container cluster control system, wherein the container cluster control system comprises a container control cluster and at least two service container clusters; wherein,
the container control cluster receives a container mirror image preheating instruction, wherein the container mirror image preheating instruction carries resource configuration information; determining at least one container cluster identifier according to the resource configuration information, and generating mirror image preheating configuration information corresponding to each container cluster identifier; sending each mirror image preheating configuration information to a service container cluster corresponding to each container cluster identifier, so that each service container cluster preheats and pulls a container mirror image file based on the mirror image preheating configuration information;
The service container cluster receives the target mirror image preheating configuration information sent by the container control cluster; creating an image file pulling task for the service container cluster based on the target image preheating configuration information; and preheating and pulling the image file of the target container according to the image file pulling task.
14. The preheating pulling device for the image file is characterized by being applied to a container control cluster and comprising the following components:
the receiving module is configured to receive a container mirror image preheating instruction, wherein the container mirror image preheating instruction carries resource configuration information;
the determining module is configured to determine at least one container cluster identifier according to the resource configuration information and generate mirror image preheating configuration information corresponding to each container cluster identifier;
the sending module is configured to send the mirror image preheating configuration information to the service container clusters corresponding to the container cluster identifiers, so that the service container clusters preheat and pull the container mirror image file based on the mirror image preheating configuration information.
15. A computing device comprising a memory, a processor, and computer instructions stored on the memory and executable on the processor, wherein the processor, when executing the computer instructions, performs the steps of the method of any one of claims 1-8 or 9-12.
16. A computer readable storage medium storing computer instructions which, when executed by a processor, implement the steps of the method of any one of claims 1-8 or 9-12.
CN202311292392.9A 2023-10-08 2023-10-08 Mirror image file preheating and pulling method and device Active CN117033325B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311292392.9A CN117033325B (en) 2023-10-08 2023-10-08 Mirror image file preheating and pulling method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311292392.9A CN117033325B (en) 2023-10-08 2023-10-08 Mirror image file preheating and pulling method and device

Publications (2)

Publication Number Publication Date
CN117033325A true CN117033325A (en) 2023-11-10
CN117033325B CN117033325B (en) 2023-12-26

Family

ID=88634064

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311292392.9A Active CN117033325B (en) 2023-10-08 2023-10-08 Mirror image file preheating and pulling method and device

Country Status (1)

Country Link
CN (1) CN117033325B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017045424A1 (en) * 2015-09-18 2017-03-23 乐视控股(北京)有限公司 Application program deployment system and deployment method
CN112506617A (en) * 2020-12-16 2021-03-16 新浪网技术(中国)有限公司 Mirror image updating method and device for sidecar container in Kubernetes cluster
CN112799777A (en) * 2020-12-31 2021-05-14 杭州朗澈科技有限公司 Method for preheating scheduling in assembly line
WO2021217871A1 (en) * 2020-04-28 2021-11-04 平安科技(深圳)有限公司 Method and apparatus for deploying micro service cluster, computer device and storage medium
WO2021232289A1 (en) * 2020-05-20 2021-11-25 深圳市欢太科技有限公司 Image pulling method and related product
CN113849266A (en) * 2021-08-19 2021-12-28 新浪网技术(中国)有限公司 Service deployment method and device for multiple Kubernetes clusters
CN114443215A (en) * 2021-12-24 2022-05-06 曙光信息产业(北京)有限公司 Service application deployment method and device, computer equipment and storage medium
CN115268949A (en) * 2022-07-20 2022-11-01 天翼云科技有限公司 Mirror preheating method, device, equipment and storage medium
WO2023045256A1 (en) * 2021-09-22 2023-03-30 苏州浪潮智能科技有限公司 Image pulling method and system, computer device, and readable storage medium
CN115981670A (en) * 2022-12-09 2023-04-18 洛阳市众信佳人工智能科创研究院有限公司 Container cluster service deployment method, device, server and storage medium
WO2023109015A1 (en) * 2021-12-16 2023-06-22 苏州浪潮智能科技有限公司 Container application scheduling method and apparatus, electronic device and storage medium
CN116781719A (en) * 2022-11-03 2023-09-19 中移(苏州)软件技术有限公司 Container mirror image preheating method, electronic equipment and storage medium

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017045424A1 (en) * 2015-09-18 2017-03-23 乐视控股(北京)有限公司 Application program deployment system and deployment method
WO2021217871A1 (en) * 2020-04-28 2021-11-04 平安科技(深圳)有限公司 Method and apparatus for deploying micro service cluster, computer device and storage medium
WO2021232289A1 (en) * 2020-05-20 2021-11-25 深圳市欢太科技有限公司 Image pulling method and related product
CN112506617A (en) * 2020-12-16 2021-03-16 新浪网技术(中国)有限公司 Mirror image updating method and device for sidecar container in Kubernetes cluster
CN112799777A (en) * 2020-12-31 2021-05-14 杭州朗澈科技有限公司 Method for preheating scheduling in assembly line
CN113849266A (en) * 2021-08-19 2021-12-28 新浪网技术(中国)有限公司 Service deployment method and device for multiple Kubernetes clusters
WO2023045256A1 (en) * 2021-09-22 2023-03-30 苏州浪潮智能科技有限公司 Image pulling method and system, computer device, and readable storage medium
WO2023109015A1 (en) * 2021-12-16 2023-06-22 苏州浪潮智能科技有限公司 Container application scheduling method and apparatus, electronic device and storage medium
CN114443215A (en) * 2021-12-24 2022-05-06 曙光信息产业(北京)有限公司 Service application deployment method and device, computer equipment and storage medium
CN115268949A (en) * 2022-07-20 2022-11-01 天翼云科技有限公司 Mirror preheating method, device, equipment and storage medium
CN116781719A (en) * 2022-11-03 2023-09-19 中移(苏州)软件技术有限公司 Container mirror image preheating method, electronic equipment and storage medium
CN115981670A (en) * 2022-12-09 2023-04-18 洛阳市众信佳人工智能科创研究院有限公司 Container cluster service deployment method, device, server and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
徐星;李银桥;刘学锋;毛建华;: "企业开发、测试环境快速部署方案的设计与实现", 工业控制计算机, no. 03 *
李英华;: "面向容器的集群资源管理系统研究", 无线互联科技, no. 07 *
杨忠;: "面向Docker容器的动态负载集群伸缩研究", 舰船电子工程, no. 08 *

Also Published As

Publication number Publication date
CN117033325B (en) 2023-12-26

Similar Documents

Publication Publication Date Title
CN110768833B (en) Application arrangement and deployment method and device based on kubernets
CN102207957B (en) Partial item change tracking and synchronization
US9407703B2 (en) Connection management system, and a method for linking connection management server in thin client system
CN102819461B (en) Desktop synchronous method, device, equipment and system
US7831734B2 (en) Method and system for remote configuration of network devices
CN109829308A (en) The management method and device of control strategy, storage medium, electronic device
CN103425511B (en) The system and method for application software installation and deployment in cloud computing environment
US20160191618A1 (en) Method and system for synchronizing information to contacts on cloud platform
CN101689182A (en) Efficient updates for distributed file systems
CN110247951A (en) A kind of file transfer control method, device, equipment and storage medium
CN116134448A (en) Joint machine learning using locality sensitive hashing
US10778520B2 (en) Hyper-converged infrastructure correlation system
CN103312489A (en) Method and device for synchronizing terminal and server
CN114238237A (en) Task processing method and device, electronic equipment and computer readable storage medium
CN111786810A (en) Automatic deployment method and system for large-scale test bed nodes
CN114968283A (en) Container mirror image pulling method, device and equipment and readable storage medium
CN113204368B (en) Application processing method, server and storage medium
CN110661851A (en) Data exchange method and device
CN117033325B (en) Mirror image file preheating and pulling method and device
KR20170111838A (en) Automatic Service Configuration Methods utilizing Thing Functions and Cloud Services
CN110018875B (en) Desktop synchronization implementation method based on IDV
US20200250047A1 (en) Performing selective backup operations
CN115525396A (en) Application management method and device based on cloud protogenesis
CN107147651B (en) Gray level publishing system and publishing method thereof
CN111552571B (en) Application feedback method, computer device and computer storage medium

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
GR01 Patent grant
GR01 Patent grant