WO2022028056A1 - 一种多架构云平台镜像仓库的镜像列表查询的架构 - Google Patents
一种多架构云平台镜像仓库的镜像列表查询的架构 Download PDFInfo
- Publication number
- WO2022028056A1 WO2022028056A1 PCT/CN2021/096400 CN2021096400W WO2022028056A1 WO 2022028056 A1 WO2022028056 A1 WO 2022028056A1 CN 2021096400 W CN2021096400 W CN 2021096400W WO 2022028056 A1 WO2022028056 A1 WO 2022028056A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- architecture
- mirror
- core component
- image
- component
- 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.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2455—Query execution
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2455—Query execution
- G06F16/24553—Query execution of query operations
- G06F16/24558—Binary matching operations
- G06F16/2456—Join operations
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/25—Integrating or interfacing systems involving database management systems
- G06F16/254—Extract, transform and load [ETL] procedures, e.g. ETL data flows in data warehouses
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45562—Creating, deleting, cloning virtual machine instances
Definitions
- the invention is mainly applied to the structure of the mirror list of the mirror warehouse of the localized multi-architecture cloud platform.
- the mirror list of the mirror warehouse realized by this method supports the query of the mirror from the system architecture level and the mirror classification level, and supports the query of different architectures and different types of images. Category mirrors.
- the present invention provides a structure for querying a mirror image list of a multi-structure cloud platform mirror warehouse, and aims to solve the problem of inconvenient mirror query in harbor.
- the present invention provides a multi-architecture cloud platform mirror warehouse mirror list query architecture, deploying harbor on kubernetes (container cluster management system), and combining the queue components, registration components, core components, database components, Work service components are deployed in different pods (pods are the smallest unit of creation, scheduling and management in kubernetes), including,
- Add two containers to the pod running the core component configure the request offloading component and the extended core component in the two containers respectively, and specify the targetPort (target port) in the svc (service, service) of the pod of the core component as the described The port on which the request offloading component is listening;
- the request offloading component receives the request from the monitored port, and determines whether the request is a query mirroring request, and if so, the request is passed to the expanded core component, and if not, the request is passed to the core component;
- the core component adds tags to the image
- the expansion core component reads the mirror data in the database component, and filters the mirror data according to the query mirror request; calls the registration component according to the screening result, and returns the information of the mirror that matches the screening result.
- the request offloading component receives the requested data packet and reads the value of the check bit to determine whether the request is a query mirroring request.
- the extended core component join connects the first data table, the second data table and the third data table to obtain the mirror data.
- adding tags to the image by the core component includes:
- a webhook (web hook) is configured between the registration component and the extended core component.
- the webhook sends the image name and version to the extended core component and calls the extended core component to obtain Architecture information of the image;
- the extended core component transmits the architecture information to the core component, and the core component generates an architecture tag according to the architecture information, and adds the architecture tag to the image by executing a first instruction.
- adding a label to the image by the core component further includes: creating a custom label through a UI (User Interface, user interface), the UI delivering the custom label to the core component, or controlling the core through the UI
- the component obtains the defined custom label; the core component executes the second instruction to add the custom label to the image.
- the core component adds the name of the image submitted to the registration component and the item number corresponding to the image to the third data table, and after the addition is successful, the core component is removed according to the third data table.
- Other fields other than the image name and item number fields call the corresponding interface to obtain the management content, and the core component adds the obtained management content to the third data table.
- the core component adds the combination of the version and the architecture label of the image submitted to the registration component and the corresponding item number into the first data table, and after the addition is successful, the core component follows the first data table.
- a data table has other fields except the version and schema tag and item number fields to call the corresponding interface to obtain the management content, and the core component adds the obtained management content to the third data table.
- the architecture of the mirror list query of a multi-architecture cloud platform mirror warehouse proposed in this application retrieves the mirror data in the database component by configuring a new extension core component, and the extension core component directly retrieves the mirror data in the database component, respectively.
- the problem of not being able to query mirrors across projects and can be automatically obtained through the cooperation of the extended core component and the webhook.
- the extended component transmits the architectural information to the core component, which is extracted by the core component.
- the keywords in the schema information generate schema tags, and add a fixed schema tag to the image, which is convenient for querying the image based on the schema information.
- FIG. 1 is a schematic diagram of an implementation architecture of a mirror list query of a multi-architecture cloud platform mirror warehouse in an embodiment of the present invention
- FIG. 2 is a schematic diagram of a first data table in an embodiment of the present invention.
- FIG. 3 is a schematic diagram of a second data table in an embodiment of the present invention.
- FIG. 6 is a schematic diagram of the check digit of other request data packets being read by an offloading component in an embodiment of the present invention
- FIG. 7 is a schematic diagram of a flow diversion flow of a diversion component in an embodiment of the present invention.
- the core component of a multi-architecture cloud platform image repository image list query architecture adds a tag to the image, so that the image query request can be easily configured according to the tag;
- adding a tag to the image by the core component includes adding a schema tag and adding a custom tag.
- the adding architecture tag is automatically added to the core component.
- the webhook monitoring port is configured on the registration component
- the webhook terminal is configured on the extended core component.
- the webhook monitoring port listens for an image uploaded to the
- the webhook terminal calls the extension core component and transmits the name and version of the image uploaded to the registration component to the extension core component; the extension called by the webhook terminal
- the core component invokes the registration component interface and sends the name and version of the image to the registration component interface, and the registration component interface returns the architecture information of the image according to the name and version of the image.
- the registration component interface obtains image information through the docker inspect (inspecting container) command.
- the extended core component After the extended core component receives the mirrored architecture information, the extended core component calls the core component and transfers the architecture information to the core component, and the core component extracts the architecture information according to the architecture information.
- the keyword generates an architecture tag, and the architecture tag is added to the image by executing a first instruction, the first instruction is the tag image name: architecture tag xxxx/project-test/image name: image version.
- Adding custom tags to images is done manually. Specifically, when a custom label is newly formulated, the user creates a custom label through the UI according to requirements, and the UI transmits the custom label to the core component; or the user controls the core component through the UI to obtain the custom label that has been formulated. Define the label (stored in the second data table); after the core component obtains the custom label, the core component executes the second instruction to add the custom label to the image, and the second instruction is the tag image name: Custom label xxxx/project-test/image name: image version.
- the UI interface configures the retrieval interface, the custom label adding interface, and the structure label and custom label display column. It is convenient for users to formulate image query policies according to the image labels displayed on the UI.
- the core component invokes the corresponding interface according to other fields of the second data table except the image name and item number fields, to obtain the management content. For example, for the update_time field of the second data table, the core component reads the mirror update time by calling the log interface, and adds the mirror update time to the cell under the update_time field of the second data table.
- the fields of the third data table include number, name (image name), project_id (project number), description (image description), pull_count (image pull count), star_count (image startup count), creation_time (image creation time), update_time (image update creation time).
- the core component adds the name of the image submitted to the registration component and the corresponding item number to the third data table, and after the addition is successful, the core component follows the third data table Other fields except the name and item number fields call the corresponding interface to obtain the management content, and the core component adds the obtained management content to the third data table. For example, for the creation_time field in the third data table, the core component reads the mirror update time by calling the log interface, and adds the mirror update time to the cell under the creation_time field of the third data table.
- the query instruction in the query request is executed, and the expansion core component performs a join connection on the first data table, the second data table and the third data table according to the query mirror request to filter the mirror images to be queried.
- the join connection methods include:
- the complete set of table1 will be generated, and the matching table2 will have a value, and if there is no match, it will be replaced with a null (empty) value to generate a new table;
- the architecture of the mirror list query of a multi-architecture cloud platform mirror warehouse proposed in this application retrieves the mirror data in the database component by configuring a new extension core component, and the extension core component directly retrieves the mirror data in the database component, respectively.
- the problem of not being able to query mirrors across projects and can be automatically obtained through the cooperation of the extended core component and the webhook.
- the extended component transmits the architectural information to the core component, which is extracted by the core component.
- the keywords in the schema information generate schema tags, and add a fixed schema tag to the image, which is convenient for querying the image based on the schema information.
- any reference signs placed between parentheses shall not be construed as limiting the claim.
- the word “comprising” does not exclude the presence of elements or steps not listed in a claim.
- the word “a” or “an” preceding an element does not preclude the presence of a plurality of such elements.
- the invention can be implemented by means of hardware comprising several different components and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by one and the same item of hardware.
- the use of the words first, second, and third, etc. do not denote any order. These words can be interpreted as names.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Computational Linguistics (AREA)
- Software Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
一种多架构云平台镜像仓库的镜像列表查询的架构,在运行核心组件的pod中添加两个容器,在两个容器中分别配置请求分流组件和拓展核心组件,将核心组件的pod的svc中的targetPort指定为所述请求分流组件所监听的端口;所述请求分流组件从端口获取请求,并将查询镜像请求传递给所述拓展核心组件,将除查询镜像请求外的请求传递给所述核心组件处理;所述拓展核心组件读取所述数据库组件中镜像数据,执行查询请求中的查询指令,对镜像数据筛选;根据筛选结果调用所述注册组件接口,返回符合筛选结果的镜像的信息。所述多架构云平台镜像仓库的镜像列表查询的架构可解决harbor镜像查询受限于项目的问题,并能自动配置架构标签方便镜像按架构查询。
Description
本申请要求于2020年08月06日提交中国国家知识产权局,申请号为202010786150.5,发明名称为“一种多架构云平台镜像仓库的镜像列表查询的架构”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本发明涉及镜像查询领域,尤其涉及一种多架构云平台镜像仓库的镜像列表查询的架构。
本发明主要应用于国产化多架构云平台镜像仓库的镜像列表的架构,通过本方法实现的镜像仓库的镜像列表,支持从系统架构级别,镜像分类级别对镜像进行查询,支持查询不同架构,不同分类镜像。
在云计算时代,越来越多的公司和个人使用容器技术,不同架构与不同分类的镜像变得越来越多,镜像的查找与查询变成一个繁重的工作。目前,用的最多的镜像管理工具是harbor,harbor主要是通过项目与标签对镜像进行分类,用户在查询镜像的过程中只能在指定的项目中查询某个镜像,按标签查询也只能在指定的项目中查询,无法实现跨项目查询镜像,而镜像的架构往往是跨项目的,导致在使用harbor时无法便捷地实现系统架构级别的分类与查询。
发明内容
本发明提供多架构云平台镜像仓库的镜像列表查询的架构,旨在解决harbor中无法便捷的查询镜像的问题。
为实现上述目的,本发明提供一种多架构云平台镜像仓库的镜像列表查 询的架构,在kubernetes(容器集群管理系统)上部署harbor,将harbor的队列组件、注册组件、核心组件、数据库组件、工作服务组件部署在不同的pod(pod是kubernetes进行创建、调度和管理的最小单位)中,包括,
在运行核心组件的pod中添加两个容器,在两个容器中分别配置请求分流组件和拓展核心组件,将核心组件的pod的svc(service,服务)中的targetPort(目标端口)指定为所述请求分流组件所监听的端口;
所述请求分流组件从所监听的端口接收请求,并判断请求是否为查询镜像请求,是则将请求传给所述拓展核心组件,不是则将请求传递给所述核心组件;
所述核心组件对镜像添加标签;
所述拓展核心组件读取所述数据库组件中镜像数据,并根据所述查询镜像请求对镜像数据进行筛选;根据筛选结果调用所述注册组件,返回符合筛选结果的镜像的信息。
更进一步地,在请求数据包中配置校验位,根据所述请求数据包是否为镜像查询数据包,在所述校验位配置不同的值。
更进一步地,所述请求分流组件接收请求的数据包读取所述校验位的值判断请求是否为查询镜像请求。
更进一步地,在所述数据库组件中配置第一数据表、第二数据表以及第三数据表,所述第一数据表中包括镜像版本与架构标签组合的字段和项目号,所述第二数据表中包括自定义标签字段与项目号,所述第三数据表包括镜像名字段与项目号。
更进一步地,所述拓展核心组件join连接所述第一数据表、第二数据表和第三数据表获取所述镜像数据。
更进一步地,所述核心组件对镜像添加标签包括:
在注册组件与所述拓展核心组件之间配置webhook(网络钩子),当所述注册组件中增加镜像时,所述webhook向所述拓展核心组件发送镜像名字 与版本并调用所述拓展核心组件获取所述镜像的架构信息;
所述拓展核心组件将所述架构信息传递给所述核心组件,所述核心组件根据所述架构信息生成架构标签,并通过执行第一指令将所述架构标签添加到所述镜像。
更进一步地,所述核心组件对镜像添加标签还包括:通过UI(User Interface,用户界面)创建自定义标签,所述UI将自定义标签输送到所述核心组件,或者通过UI控制所述核心组件获取已经定义的自定义标签;所述核心组件执行第二指令将自定义标签添加到镜像上。
更进一步地,创建自定义标签时,所述核心组件调用所述第二数据表中的数据,对比自定义标签判断自定义标签是否已存在于所述第二数据表中,如果已存在,则所述核心组件通过所述UI反馈标签已存在,如果不存在,则在所述自定义标签被添加到镜像之后所述核心组件将自定义标签添加到所述第二数据表对应的单元格。
更进一步地,所述核心组件将提交到注册组件的镜像的名字与该镜像所对应的项目号添加到所述第三数据表,添加成功后,所述核心组件按照所述第三数据表除镜像名字和项目号字段外的其他字段来调用相应接口,以获取管理内容,所述核心组件将获取的管理内容添加到第三数据表。
更进一步地,所述核心组件将提交到注册组件的镜像的版本与架构标签的组合与所对应的项目号添加到所述第一数据表中,添加成功后,所述核心组件按照所述第一数据表除版本与架构标签和项目号字段外的其他字段来调用相应接口,以获取管理内容,所述核心组件将获取的管理内容添加到第三数据表。
本申请提出的一种多架构云平台镜像仓库的镜像列表查询的架构具体有以下有益效果:
本申请提出的一种多架构云平台镜像仓库的镜像列表查询的架构通过配置新的拓展核心组件来对数据库组件中的镜像数据检索,所述拓展核心组件 直接检索数据库组件中的镜像数据,分别建立项目号与镜像的名称、版本、架构标签以及自定义标签的联系,对所述第一数据表、第二数据表以及第三数据表做join连接来筛选需要查询的镜像,从而突破harbor自身无法跨项目查询镜像的问题;而且能通过所述拓展核心组件与所述webhook配合自动获取通过根据镜像的架构信息,所述拓展组件将架构信息传递给所述核心组件,由所述核心组件提取架构信息中的关键字生成架构标签,对镜像添加固定的架构标签,方便按架构信息对镜像进行查询。
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图示出的结构获得其他的附图。
图1是本发明实施例中的多架构云平台镜像仓库的镜像列表查询的实现架构示意图;
图2是本发明实施例中第一数据表示意图;
图3是本发明实施例中第二数据表示意图;
图4是本发明实施例中第三数据表示意图;
图5是本发明实施例中分流组件读取查询镜像请求数据包校验位示意图;
图6是本发明实施例中分流组件读取其他请求数据包校验位示意图;
图7是本发明实施例中分流组件分流流程示意图。
本发明目的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。
参阅图1所示,本发明提供一种多架构云平台镜像仓库的镜像列表查询的架构,在kubernetes上部署1.10版本以上的harbor,将harbor的队列组件、注册组件、核心组件、数据库组件、工作服务组件部署在不同的pod中。
在运行核心组件的pod中添加两个容器,在两个容器中分别配置请求分流组件和拓展核心组件,将核心组件的pod的svc中的targetPort指定为所述请求分流组件所监听的端口;
所述请求分流组件从所监听的端口接收请求,所述请求分流组件判断请求是否为查询镜像请求,是则将传给所述拓展核心组件,不是则将请求传递给所述核心组件;具体的,将请求数据包的其中一个空闲位配置为校验位,请求如果是查询镜像请求,则将所述校验位设置为1,否则所述校验位设置为0,所述请求分流组件接收请求的数据包读取所述校验位的值,如果校验位的数值为1,判断请求是查询镜像请求,所述请求分流组件将查询镜像请求发送给所述拓展核心组件;如果校验位的数值为0,所述请求分流组件判断请求不是查询镜像请求,所述请求分流组件将请求发送给所述核心组件处理。
通过一种多架构云平台镜像仓库的镜像列表查询的架构的所述核心组件对镜像添加标签,方便根据所述标签配置镜像查询请求;
具体的,所述核心组件对镜像添加标签包括添加架构标签和添加自定义标签。
其中添加架构标签为所述核心组件自动添加,具体的,把webhook监听端口配置在所述注册组件上,把webhook终端配置在所述拓展核心组件,当所述webhook监听端口监听到有镜像上传到所述注册组件时,则所述webhook终端调用所述拓展核心组件并向所述拓展核心组件传输上传到所述注册组件的所述镜像的名称与版本;被所述webhook终端调用的所述拓展核心组件调用注册组件接口并向所述注册组件接口发送所述镜像的名称与版本,所述注 册组件接口根据镜像的名称与版本返回所述镜像的架构信息。具体实施过程中,所述注册组件接口通过docker inspect(检查容器)命令获取镜像信息。所述拓展核心组件接收到镜像的架构信息之后,所述拓展核心组件调用所述核心组件并将所述架构信息传递给所述核心组件,所述核心组件根据所述架构信息提取架构信息中的关键字生成架构标签,并通过执行第一指令将所述架构标签添加到所述镜像,所述第一指令为tag镜像名称:架构标签xxxx/project-test/镜像名称:镜像版本。
向镜像添加自定义标签为手动添加。具体的,新制定自定义标签时,用户根据需求通过UI创建自定义标签,所述UI将自定义标签输送到所述核心组件;或者用户通过所述UI控制所述核心组件获取已经制定的自定义标签(存储于所述第二数据表);所述核心组件获取自定义标签之后,所述核心组件执行第二指令将自定义标签添加到镜像上,所述第二指令为tag镜像名称:自定义标签xxxx/project-test/镜像名称:镜像版本。
具体实施过程中,在UI界面配置检索接口,自定义标签添加接口以及架构标签与自定义标签展示栏。方便用户根据UI展示的镜像标签制定镜像查询策略。
制定查询策略,生成查询镜像的请求;查询镜像的请求经过所述请求分流组件传递给所述拓展核心组件处理;所述拓展核心组件获取镜像查询组件的请求后读取镜像查询请求的数据包中的查询指令,所述拓展核心组件读取所述数据库组件中镜像数据,具体的,所述镜像数据包括在所述数据库组件中配置第一数据表、第二数据表以及第三数据表中的数据。
参阅图2所示,所述第一数据表中字段包括编号、project_id(项目号)、tag(版本与架构标签组合)以及repo(镜像名称)、digest(汇编)、kind(镜像种类)、creation_time(镜像创建时间)、pull_time(镜像拉取时间)和push_time(镜像推送时间)。具体实施过程中,由所述核心组件将提交到注册组件的 镜像的版本与架构与该镜像所对应的项目号添加到所述第一数据表,添加成功后,所述核心组件按照所述第一数据表除版本与架构标签组合和项目号字段外的其他字段来调用相应接口,以获取管理内容,所述核心组件将获取的管理内容添加到第一数据表。如对于第一数据表的creation_time字段,所述核心组件通过调用日志接口读取镜像创建时间,将所述镜像创建时间添加到所述第一数据表creation_time字段下的单元格中。
参阅图3所示,所述第二数据表中字段包括编号、labelname(自定义标签名)、description(自定义标签描述)、color(颜色)、level(等级)、scope(范围)、project_id(项目号)、creation_time(镜像创建时间)、update_time(镜像更新时间)、deleted(已删除)。具体实施过程中,创建自定义标签时,所述核心组件调用所述第二数据表中的数据,对比自定义标签判断自定义标签是否已存在于所述第二数据表中,如果已存在,则所述核心组件通过所述UI反馈标签已存在,如果不存在,在用户将自定义标签添加到镜像之后,则所述核心组件将自定义标签添加到所述第二数据表对应的单元格。所述核心组件按照所述第二数据表除镜像名字和项目号字段外的其他字段来调用相应接口,以获取管理内容。如对于第二数据表update_time字段,所述核心组件通过调用日志接口读取镜像更新时间,将所述镜像更新时间添加到所述第二数据表update_time字段下的单元格中。
参阅图4所示,所述第三数据表的字段包括编号、name(镜像名称)、project_id(项目号)、description(镜像描述)、pull_count(镜像拉取计数)、star_count(镜像启动计数)、creation_time(镜像创建时间)、update_time(镜像更新创建时间)。具体实施过程中,由所述核心组件将提交到注册组件的镜像的名称与所对应的项目号添加到所述第三数据表中,添加成功后,所述核心组件按照所述第三数据表除名称和项目号字段外的其他字段来调用相应 接口,以获取管理内容,所述核心组件将获取的管理内容添加到第三数据表。如对于第三数据表中的creation_time字段,所述核心组件通过调用日志接口读取镜像更新时间,将所述镜像更新时间添加到所述第三数据表creation_time字段下的单元格中。
执行查询请求中的查询指令,所述拓展核心组件根据查询镜像请求对所述第一数据表、第二数据表以及第三数据表做join连接来筛选需要查询的镜像。具体的,join连接方式包括:
通过select column_name(s)
from table 1
inner join table 2
ON table 1.column_name=table 2.column_name
对table1(第一数据表)与table2(第二数据表)按照特定字段取交集生成新的表。如果想要根据自定义标签来对镜像检索,可以将所述第一数据表与第二数据表通过project_id合并,会得到包含自定义标签的镜像的数据表,这个表的字段数多于第二数据表;通过这个表按照自定义标签检索之后,按照这个表中字段的内容调用所述注册组件接口,获取详细的镜像信息。
select column_name(s)
from table 1
leftjoin table 2
ON table 1.column_name=table 2.column_name,
将产生table1的完全集,而table2中匹配的则有值,没有匹配的则以null(空)值取代,生成新的表;
通过select column_name(s)
from table 1
rightjoin table 2
ON table 1.column_name=table 2.column_name
将产生table2的完全集,而table1中有匹配的则有值,没有匹配的则以null值取代,生成新的表。
通过join连接获得新的数据表,根据镜像查询请求中的SQL(Structured Query Language,结构化查询语言)查询指令对数据表进行筛选,根据数据表筛选后的字段与记录调用所述注册组件接口,返回符合筛选结果的镜像的信息。
本申请提出的一种多架构云平台镜像仓库的镜像列表查询的架构通过配置新的拓展核心组件来对数据库组件中的镜像数据检索,所述拓展核心组件直接检索数据库组件中的镜像数据,分别建立项目号与镜像的名称、版本、架构标签以及自定义标签的联系,对所述第一数据表、第二数据表以及第三数据表做join连接来筛选需要查询的镜像,从而突破harbor自身无法跨项目查询镜像的问题;而且能通过所述拓展核心组件与所述webhook配合自动获取通过根据镜像的架构信息,所述拓展组件将架构信息传递给所述核心组件,由所述核心组件提取架构信息中的关键字生成架构标签,对镜像添加固定的架构标签,方便按架构信息对镜像进行查询。
应当注意的是,在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的部件或步骤。位于部件之前的单词“一”或“一个”不排除存在多个这样的部件。本发明可以借助于包括有若干不同部件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。
尽管已描述了本发明的优选实施例,但本领域内的技术人员一旦得知了 基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和修改。
显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。
Claims (10)
- 一种多架构云平台镜像仓库的镜像列表查询的架构,在kubernetes上部署harbor,将harbor的队列组件、注册组件、核心组件、数据库组件、工作服务组件部署在不同的pod中,其特征在于,包括,在运行核心组件的pod中添加两个容器,在两个容器中分别配置请求分流组件和拓展核心组件,将核心组件的pod的svc中的targetPort指定为所述请求分流组件所监听的端口;所述请求分流组件从所监听的端口接收请求,并判断请求是否为查询镜像请求,是则将请求传给所述拓展核心组件,不是则将请求传递给所述核心组件;所述核心组件对镜像添加标签;所述拓展核心组件读取所述数据库组件中镜像数据,并根据所述查询镜像请求对镜像数据进行筛选;根据筛选结果调用所述注册组件,返回符合筛选结果的镜像的信息。
- 根据权利要求1所述的多架构云平台镜像仓库的镜像列表查询的架构,其特征在于,在请求数据包中配置校验位,根据所述请求数据包是否为镜像查询数据包,在所述校验位配置不同的值。
- 根据权利要求2所述的多架构云平台镜像仓库的镜像列表查询的架构,其特征在于,所述请求分流组件接收请求的数据包读取所述校验位的值判断请求是否为查询镜像请求。
- 根据权利要求1所述的多架构云平台镜像仓库的镜像列表查询的架构,其特征在于,在所述数据库组件中配置第一数据表、第二数据表以及第三数据表,所述第一数据表中包括镜像版本与架构标签组合的字段和项目号,所述第二数据表中包括自定义标签字段与项目号,所述第三数据表包括镜像名字段与项目号。
- 根据权利要求4所述的多架构云平台镜像仓库的镜像列表查询的架构,其特征在于,所述拓展核心组件join连接所述第一数据表、第二数据表和第三数据表获取所述镜像数据。
- 根据权利要求1-5中任一所述的多架构云平台镜像仓库的镜像列表查询的架构,其特征在于,所述核心组件对镜像添加标签包括:在注册组件与所述拓展核心组件之间配置webhook,当所述注册组件中增加镜像时,所述webhook向所述拓展核心组件发送镜像名字与版本并调用所述拓展核心组件获取所述镜像的架构信息;所述拓展核心组件将所述架构信息传递给所述核心组件,所述核心组件根据所述架构信息生成架构标签,并通过执行第一指令将所述架构标签添加到所述镜像。
- 根据权利要求1-5中任一所述的多架构云平台镜像仓库的镜像列表查询的架构,其特征在于,所述核心组件对镜像添加标签还包括:通过UI创建自定义标签,所述UI将自定义标签输送到所述核心组件,或者通过UI控制所述核心组件获取已经定义的自定义标签;所述核心组件执行第二指令将自定义标签添加到镜像上。
- 根据权利要求7所述的多架构云平台镜像仓库的镜像列表查询的架构,其特征在于,创建自定义标签时,所述核心组件调用第二数据表中的数据,对比自定义标签判断自定义标签是否已存在于所述第二数据表中,如果已存在,则所述核心组件通过所述UI反馈标签已存在,如果不存在,则在所述自定义标签被添加到镜像之后所述核心组件将自定义标签添加到所述第二数据表对应的单元格。
- 根据权利要求6所述的多架构云平台镜像仓库的镜像列表查询的架构,其特征在于,所述核心组件将提交到注册组件的镜像的名字与所述镜像所对应的项目号添加到第三数据表,添加成功后,所述核心组件按照所述第三数 据表除镜像名字和项目号字段外的其他字段来调用相应接口,以获取管理内容,所述核心组件将获取的管理内容添加到第三数据表。
- 根据权利要求4所述的多架构云平台镜像仓库的镜像列表查询的架构,其特征在于,所述核心组件将提交到注册组件的镜像的版本与架构标签的组合与所对应的项目号添加到所述第一数据表中,添加成功后,所述核心组件按照所述第一数据表除版本与架构标签和项目号字段外的其他字段来调用相应接口,以获取管理内容,所述核心组件将获取的管理内容添加到第三数据表。
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US18/164,711 US12210529B2 (en) | 2020-08-06 | 2023-02-06 | Mirror list query method of multi-architecture cloud platform mirror warehouse |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010786150.5 | 2020-08-06 | ||
| CN202010786150.5A CN112000696B (zh) | 2020-08-06 | 2020-08-06 | 一种多架构云平台镜像仓库的镜像列表查询的架构 |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US18/164,711 Continuation US12210529B2 (en) | 2020-08-06 | 2023-02-06 | Mirror list query method of multi-architecture cloud platform mirror warehouse |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2022028056A1 true WO2022028056A1 (zh) | 2022-02-10 |
Family
ID=73462866
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2021/096400 Ceased WO2022028056A1 (zh) | 2020-08-06 | 2021-05-27 | 一种多架构云平台镜像仓库的镜像列表查询的架构 |
Country Status (3)
| Country | Link |
|---|---|
| US (1) | US12210529B2 (zh) |
| CN (1) | CN112000696B (zh) |
| WO (1) | WO2022028056A1 (zh) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116340342A (zh) * | 2023-03-22 | 2023-06-27 | 北京博睿宏远数据科技股份有限公司 | 一种数据过滤方法、装置、电子设备及存储介质 |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112000696B (zh) * | 2020-08-06 | 2023-01-06 | 苏州浪潮智能科技有限公司 | 一种多架构云平台镜像仓库的镜像列表查询的架构 |
| CN113254145B (zh) * | 2021-04-07 | 2022-05-17 | 复旦大学 | 一种基于微服务架构的人机物融合应用运行支撑方法 |
| CN116107991A (zh) * | 2021-11-10 | 2023-05-12 | 中国电信股份有限公司 | 容器标签数据库构建方法、装置、存储介质及电子设备 |
| CN117519989B (zh) * | 2024-01-03 | 2024-04-02 | 上海燧原智能科技有限公司 | 一种分布式系统托管方法、装置、电子设备及存储介质 |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109684420A (zh) * | 2018-12-21 | 2019-04-26 | 郑州云海信息技术有限公司 | 一种基于kubernetes的高可用部署harbor镜像仓库的方法及装置 |
| US20190138410A1 (en) * | 2017-11-09 | 2019-05-09 | Bank Of America Corporation | Distributed data monitoring device |
| CN109831500A (zh) * | 2019-01-30 | 2019-05-31 | 无锡华云数据技术服务有限公司 | Kubernetes集群中配置文件与Pod的同步方法 |
| CN110333877A (zh) * | 2019-07-09 | 2019-10-15 | 西安点告网络科技有限公司 | 基于应用的可视化容器配置管理方法、装置及系统 |
| CN111262908A (zh) * | 2020-01-09 | 2020-06-09 | 中国工商银行股份有限公司 | 基于jenkins的任务构建方法及系统 |
| CN112000696A (zh) * | 2020-08-06 | 2020-11-27 | 苏州浪潮智能科技有限公司 | 一种多架构云平台镜像仓库的镜像列表查询的架构 |
Family Cites Families (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8688643B1 (en) * | 2010-08-16 | 2014-04-01 | Symantec Corporation | Systems and methods for adaptively preferring mirrors for read operations |
| CN102402446B (zh) * | 2011-11-22 | 2014-12-17 | 华为数字技术(成都)有限公司 | 应用软件的安装方法和应用软件的安装装置 |
| US20160127465A1 (en) * | 2014-10-31 | 2016-05-05 | Bedrock Data, Inc. | Cross-platform data synchronization |
| US10200473B2 (en) * | 2017-03-23 | 2019-02-05 | Netapp, Inc. | Methods and systems for managing networked storage system resources |
| CN109391664B (zh) * | 2017-08-11 | 2021-04-20 | 中国电信股份有限公司 | 用于多集群容器部署的系统和方法 |
| CN109582695A (zh) * | 2018-12-04 | 2019-04-05 | 用友网络科技股份有限公司 | 一种微服务架构下数据通用查询方法及查询系统 |
| CN110647580B (zh) * | 2019-09-05 | 2022-06-10 | 南京邮电大学 | 分布式容器集群镜像管理主节点、从节点、系统及方法 |
-
2020
- 2020-08-06 CN CN202010786150.5A patent/CN112000696B/zh active Active
-
2021
- 2021-05-27 WO PCT/CN2021/096400 patent/WO2022028056A1/zh not_active Ceased
-
2023
- 2023-02-06 US US18/164,711 patent/US12210529B2/en active Active
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20190138410A1 (en) * | 2017-11-09 | 2019-05-09 | Bank Of America Corporation | Distributed data monitoring device |
| CN109684420A (zh) * | 2018-12-21 | 2019-04-26 | 郑州云海信息技术有限公司 | 一种基于kubernetes的高可用部署harbor镜像仓库的方法及装置 |
| CN109831500A (zh) * | 2019-01-30 | 2019-05-31 | 无锡华云数据技术服务有限公司 | Kubernetes集群中配置文件与Pod的同步方法 |
| CN110333877A (zh) * | 2019-07-09 | 2019-10-15 | 西安点告网络科技有限公司 | 基于应用的可视化容器配置管理方法、装置及系统 |
| CN111262908A (zh) * | 2020-01-09 | 2020-06-09 | 中国工商银行股份有限公司 | 基于jenkins的任务构建方法及系统 |
| CN112000696A (zh) * | 2020-08-06 | 2020-11-27 | 苏州浪潮智能科技有限公司 | 一种多架构云平台镜像仓库的镜像列表查询的架构 |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116340342A (zh) * | 2023-03-22 | 2023-06-27 | 北京博睿宏远数据科技股份有限公司 | 一种数据过滤方法、装置、电子设备及存储介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| US20230289351A1 (en) | 2023-09-14 |
| CN112000696A (zh) | 2020-11-27 |
| US12210529B2 (en) | 2025-01-28 |
| CN112000696B (zh) | 2023-01-06 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2022028056A1 (zh) | 一种多架构云平台镜像仓库的镜像列表查询的架构 | |
| US12210522B2 (en) | Enhanced data indexing and searching | |
| US8341120B2 (en) | Apparatus and methods for transferring database objects into and out of database systems | |
| US6493720B1 (en) | Method and system for synchronization of metadata in an information catalog | |
| US7401064B1 (en) | Method and apparatus for obtaining metadata from multiple information sources within an organization in real time | |
| US7243093B2 (en) | Federated query management | |
| US6023696A (en) | Summary table query routing | |
| US7707168B2 (en) | Method and system for data retrieval from heterogeneous data sources | |
| US7020661B1 (en) | Techniques for pruning a data object during operations that join multiple data objects | |
| US10169491B2 (en) | Query servicing with access path security in a relational database management system | |
| US7685106B2 (en) | Sharing of full text index entries across application boundaries | |
| US20120089612A1 (en) | Flexible fully integrated real-time document indexing | |
| WO2020238597A1 (zh) | 基于Hadoop的数据更新方法、装置、系统及介质 | |
| US7546287B2 (en) | System and method to search a database for records matching user-selected search criteria and to maintain persistency of the matched records | |
| US20070094230A1 (en) | Method, apparatus, and system for searching based on filter search specification | |
| US6651070B1 (en) | Client/server database system | |
| US20030088545A1 (en) | System and method to implement a persistent and dismissible search center frame | |
| US20020103790A1 (en) | Utility for cross platform database query | |
| US20080183666A1 (en) | Materialized query table journaling in a computer database system | |
| US11100152B2 (en) | Data portal | |
| US7373350B1 (en) | Virtual metadata analytics and management platform | |
| CN107506356B (zh) | 数据处理方法及其系统 | |
| CN106484694B (zh) | 基于分布式数据库的全文搜索方法及系统 | |
| US8370375B2 (en) | Method for presenting database query result sets using polymorphic output formats | |
| CN115905628A (zh) | 一种动态的资源目录构建方法、装置、设备和存储介质 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 21852186 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 21852186 Country of ref document: EP Kind code of ref document: A1 |