Movatterモバイル変換


[0]ホーム

URL:


CN111290768A - Updating method, device, equipment and medium for containerization application system - Google Patents

Updating method, device, equipment and medium for containerization application system
Download PDF

Info

Publication number
CN111290768A
CN111290768ACN202010074813.0ACN202010074813ACN111290768ACN 111290768 ACN111290768 ACN 111290768ACN 202010074813 ACN202010074813 ACN 202010074813ACN 111290768 ACN111290768 ACN 111290768A
Authority
CN
China
Prior art keywords
release
resource change
change request
application
update
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
CN202010074813.0A
Other languages
Chinese (zh)
Other versions
CN111290768B (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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co LtdfiledCriticalBeijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202010074813.0ApriorityCriticalpatent/CN111290768B/en
Publication of CN111290768ApublicationCriticalpatent/CN111290768A/en
Application grantedgrantedCritical
Publication of CN111290768BpublicationCriticalpatent/CN111290768B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Classifications

Landscapes

Abstract

The application discloses an updating method, device, equipment and medium of a containerized application system, and relates to an updating technology of a computer program architecture. The specific implementation scheme is as follows: acquiring an initial resource change request; calling an admission control management program of resource change to acquire a release strategy configured for an initial resource change request; calling a modification program in an admission control management program, and modifying the initial resource change request according to the release strategy to form a target resource change request; and changing the resources of the application instance including the containerization management in the containerization application system according to the target resource change request. According to the technical scheme of the embodiment of the application, the initial resource change request is modified by introducing the release strategy, so that the resource is changed according to the modified initial resource change request, the effective control on the resource change process is realized, the function influence on the service execution process in the change process is reduced, and the intrusiveness of the resource change is reduced.

Description

Translated fromChinese
一种容器化应用系统的更新方法、装置、设备和介质A method, device, device and medium for updating a containerized application system

技术领域technical field

本申请实施例涉及计算机技术领域,尤其涉及计算机程序架构的更新技术。The embodiments of the present application relate to the field of computer technology, and in particular, to an update technology of a computer program architecture.

背景技术Background technique

Kubernetes系统是业界应用广泛的用于容器化应用的自动部署,扩缩和管理的容器编排系统。Kubernetes系统中包括多种资源类型,典型的包括Deployment、ReplicaSet和Pod。Deployment可以通过一个或多个ReplicaSet来管理一个或多个Pod。Pod为无状态应用实例,具体用于为用户提供业务服务。Deployment和ReplicaSet可以根据配置的预期控制目标,对Pod进行管理。The Kubernetes system is a container orchestration system widely used in the industry for automatic deployment, scaling and management of containerized applications. The Kubernetes system includes a variety of resource types, typically including Deployment, ReplicaSet, and Pod. A Deployment can manage one or more Pods through one or more ReplicaSets. Pods are stateless application instances, which are specifically used to provide business services to users. Deployments and ReplicaSets can manage Pods according to the expected control goals of the configuration.

在诸如Kubernetes系统的这类容器化管理应用实例的系统中,可能会涉及到软件的升级更新,则旧版本的Pod需要重新发布为新版本的Pod,再提供业务服务。In a containerized management application instance system such as the Kubernetes system, software upgrades may be involved, and the old version of the Pod needs to be re-released as a new version of the Pod to provide business services.

现有Kubernetes系统中,提供了Recreate(重建更新)和Rolling Update(滚动更新)这两种更新模式,能够用于发布新版本的Pod。但是,对于新版本Pod的发布过程很难进行控制,所以无法满足新旧版本Pod交替过程中的发布控制需求。In the existing Kubernetes system, two update modes, Recreate (rebuild update) and Rolling Update (rolling update) are provided, which can be used to release new versions of Pods. However, it is difficult to control the release process of the new version of the Pod, so it cannot meet the release control requirements during the transition between the old and new versions of the Pod.

发明内容SUMMARY OF THE INVENTION

本申请实施例提供一种容器化应用系统的更新方法、装置、设备和介质,以使得系统的升级更新过程可控,满足更新发布的不同业务需求。Embodiments of the present application provide an update method, apparatus, device, and medium for a containerized application system, so that the system upgrade and update process can be controlled, and different business requirements of update release can be met.

第一方面,本申请实施例提供了一种容器化应用系统的更新方法,包括:In a first aspect, an embodiment of the present application provides a method for updating a containerized application system, including:

获取初始资源变更请求;Get the initial resource change request;

调用资源变更的准入控制管理程序,获取为所述初始资源变更请求配置的发布策略;Invoke the admission control management program for resource change to obtain the release policy configured for the initial resource change request;

调用所述准入控制管理程序中的修改程序,根据所述发布策略对所述初始资源变更请求进行修改,以形成目标资源变更请求;calling the modification program in the admission control management program, and modifying the initial resource modification request according to the release policy to form a target resource modification request;

根据所述目标资源变更请求,对所述容器化应用系统中的资源进行变更,其中,所述资源至少包括容器化管理的应用实例。According to the target resource change request, the resources in the containerized application system are changed, wherein the resources at least include containerized managed application instances.

本申请实施例通过获取初始资源变更请求;调用资源变更的准入控制管理程序,获取为初始资源变更请求配置的发布策略;调用准入控制管理程序中的修改程序,根据发布策略对初始资源变更请求进行修改,以形成目标资源变更请求;根据目标资源变更请求,对容器化应用系统中的资源尽心变更;其中,资源至少包括容器化管理的应用实例。上述技术方案通过在准入控制环节,引入针对初始资源变更请求所配置的发布策略,对初始资源变更请求进行修改,从而根据修改后的初始资源变更请求进行资源变更,实现了对资源变更过程的有效控制,同时减小了变更过程中对业务执行过程的功能影响,减少了资源变更的侵入性。In the embodiment of the present application, the initial resource change request is obtained; the admission control management program for resource change is called to obtain the release policy configured for the initial resource change request; the modification program in the admission control management program is called to change the initial resource according to the release policy The request is modified to form a target resource change request; according to the target resource change request, the resources in the containerized application system are carefully changed; wherein, the resources at least include containerized managed application instances. In the above technical solution, a release policy configured for the initial resource change request is introduced in the admission control link, and the initial resource change request is modified, so that the resource change is performed according to the modified initial resource change request, and the resource change process is realized. Effective control, while reducing the functional impact on the business execution process during the change process, and reducing the intrusiveness of resource changes.

可选的,所述发布策略中包括发布规则和当前发布状态。Optionally, the release policy includes release rules and current release status.

上述申请中的一个可选实施方式中,通过将发布策略细化为包括发布规则和当前发布状态,为资源变更过程的发布控制提供依据。In an optional implementation manner of the above application, by refining the release policy to include release rules and current release status, a basis is provided for release control in the resource change process.

可选的,所述发布规则包括下述至少一项:Optionally, the release rule includes at least one of the following:

新发布应用实例的发布批次数量;The number of release batches of newly released application instances;

每批次新发布应用实例的数量;The number of newly released application instances per batch;

后续批次的发布条件,用于在满足所述发布条件时允许后续批次的发布。The release condition of the subsequent batch is used to allow the release of the subsequent batch when the release condition is satisfied.

上述申请中的一个可选实施方式中,通过将发布规则细化为包括新发布使用实例的发布批次数量,为对发布过程的批次控制提供依据。In an optional embodiment of the above application, by refining the release rule to include the number of release batches of newly released use instances, a basis is provided for batch control of the release process.

上述申请中的另一可选实施方式中,通过将发布规则细化为包括每批次新发布应用实例的数量,为每一批次进行应用实例的发布数量控制提供依据。In another optional implementation manner in the above application, by refining the release rule to include the number of newly released application instances in each batch, a basis is provided for controlling the number of application instances released in each batch.

上述申请中的再一可选实施方式中,通过将发布规则细化为包括后续批次的发布条件,为相邻两批次之间的衔接方式,以及在后批次的发送时机提供依据。In yet another optional embodiment in the above application, by refining the release rule to include the release conditions of the subsequent batch, a basis is provided for the connection method between two adjacent batches and the sending timing of the subsequent batch.

可选的,所述后续批次的发布条件包括下述至少一项:Optionally, the release conditions of the subsequent batches include at least one of the following:

接收到用户输入的后续批次发布指示;Receive a subsequent batch release instruction input by the user;

满足相邻批次的发布时间间隔;Satisfy the release time interval of adjacent batches;

已发布批次运行正常。Published batches are working fine.

上述申请中的一种可选实施方式,通过将后续批次的发布条件细化为包括接收到用户输入的后续批次发布指示,以通过人为控制的方式触发在后批次的发布,同时实现了在先批次发布后的人为暂停控制。In an optional implementation manner of the above application, by refining the release conditions of the subsequent batches to include the subsequent batch release instructions received from the user input, the release of the subsequent batches is triggered in a human-controlled manner, and at the same time, the Controls artificial pauses after the release of previous batches.

上述申请中的另一可选实施方式,通过将后续批次的发布条件细化为包括满足相邻批次的发布时间间隔,以通过暂停时长的方式触发在后批次的发布,同时实现了在先批次发布后的时长暂停控制。In another optional implementation manner in the above application, by refining the release conditions of the subsequent batches to include the release time interval that satisfies the adjacent batches, the release of the subsequent batches is triggered by the pause duration, and at the same time, the Pause control for the length of time after the previous batch is released.

上述申请中的再一可选实施方式,通过将后续批次的发布条件细化为包括已发布批次正常运行,以在在先批次正常运行的情况下,进行在后批次的发布,同时实现了在先批次发布后的异常暂停控制。In yet another optional embodiment in the above application, by refining the release conditions of the subsequent batches to include the normal operation of the released batches, so that the latter batches can be released under the condition that the previous batches are in normal operation, At the same time, the abnormal suspension control after the release of the previous batch is realized.

可选的,所述当前发布状态包括应用实例的发布中、已暂停、已取消和已完成。Optionally, the current publishing status includes publishing of the application instance, paused, canceled and completed.

上述申请中的一个可选实施方式,通过将当前发布状态细化为包括应用实例的发布中、已暂停、已取消和已完成,从而完善了根据发布策略对初始资源变更请求进行修改的参照依据。An optional implementation of the above application, by refining the current release status to include the application instance's release, paused, canceled, and completed, thereby improving the reference basis for modifying the initial resource change request according to the release strategy .

可选的,获取初始资源变更请求包括:Optionally, obtaining the initial resource change request includes:

获取用户输入的更新请求,所述更新请求用于指示重新发布所述容器化应用系统中管理的应用实例;obtaining an update request input by the user, where the update request is used to instruct to republish the application instance managed in the containerized application system;

根据所述更新请求确定更新模式和更新参数;determining an update mode and update parameters according to the update request;

根据所述更新模式和更新参数,产生所述初始资源变更请求。The initial resource change request is generated according to the update mode and update parameters.

上述申请中的一个可选实施方式,通过将初始资源变更请求的获取操作,细化为获取用户输入的更新请求,根据更新请求确定更新模式和更新参数,并根据更显模式和更新参数,进行初始资源变更请求的生成,能够适配当前Kubernetes系统的运行机制,并完善了在当前Kubernetes系统中进行初始资源变更请求生成的生成方式。An optional implementation manner in the above application, by refining the acquisition operation of the initial resource change request into acquiring the update request input by the user, determining the update mode and update parameters according to the update request, and performing the update mode and update parameters according to the update mode. The generation of the initial resource change request can adapt to the operating mechanism of the current Kubernetes system, and improve the generation method of initial resource change request generation in the current Kubernetes system.

可选的,所述更新模式包括重建更新或滚动更新,对应于所述滚动更新模式的更新参数包括应用实例超出预期控制目标的最大值,应用实例低于预期控制目标的最大值。Optionally, the update mode includes reconstruction update or rolling update, and the update parameters corresponding to the rolling update mode include a maximum value that the application instance exceeds an expected control target, and a maximum value that the application instance falls below the expected control target.

上述申请中的一种可选实施方式,通过将更新模式进行细化,并在更新模式包括滚动更新模式时,对更新参数进行了进一步地细分,从而保证本申请中的初始资源变更请求的生成方式,能够适配重建更新和滚动更新两种更新模式,进一步丰富了初始资源变更请求的生成方式。In an optional implementation manner in the above application, the update mode is refined, and when the update mode includes a rolling update mode, the update parameters are further subdivided, thereby ensuring that the initial resource change request in the present application is valid. The generation method can adapt to the two update modes of reconstruction update and rolling update, which further enriches the generation method of the initial resource change request.

可选的,调用所述准入控制管理程序中的修改程序,根据所述发布策略对所述初始资源变更请求进行修改,以形成目标资源变更请求包括:Optionally, calling the modification program in the admission control management program, and modifying the initial resource change request according to the release policy, so as to form the target resource change request, comprising:

调用所述准入控制管理程序中的修改程序,根据所述发布策略中的发布规则,确定发布的新版本应用实例数量是否符合当前发布批次的数量要求;Invoke the modification program in the admission control management program, and determine whether the number of application instances of the new version to be released meets the requirements of the current release batch according to the release rules in the release policy;

如果不符合当前发布批次的数量要求,则根据所述发布规则,修改当前发布批次中所发布的新版本应用实例数量,以形成所述目标资源变更请求。If the quantity requirement of the current release batch is not met, the quantity of the new version application instance released in the current release batch is modified according to the release rule to form the target resource change request.

上述申请中的一个可选实施方式,通过将初始资源变更请求的修改机制细化为通过调用准入控制管理程序中的修改程序对不符合当前发布批次的数量要求的新版本应用实例数量进行修改,完善了初始资源变更请求的修改机制。In an optional implementation manner of the above application, the modification mechanism of the initial resource change request is refined to modify the number of application instances of the new version that do not meet the quantity requirements of the current release batch by calling the modification program in the admission control management program. Modified to improve the modification mechanism of the initial resource change request.

可选的,新版本应用实例在新建的ReplicaSet中发布,原有的旧版本应用实例保留在原有的ReplicaSet中。Optionally, the new version of the application instance is published in the newly created ReplicaSet, and the original old version of the application instance is retained in the original ReplicaSet.

上述申请中的一种可选实施方式,通过将应用实例的管理对象细化为ReplicaSet,进一步完善了本申请所适用的Kubernetes系统的架构组成。In an optional implementation manner in the above application, by refining the management object of the application instance into a ReplicaSet, the architectural composition of the Kubernetes system to which this application applies is further improved.

可选的,调用资源变更的准入控制管理程序,获取为所述初始资源变更请求配置的发布策略包括:Optionally, invoking the admission control management program for resource change, and obtaining the release policy configured for the initial resource change request includes:

调用资源变更的准入控制管理程序,在准入控制配置描述文件中查找与待变更资源绑定的发布策略,作为所述初始资源变更请求配置的发布策略。The admission control management program for resource change is invoked, and the release policy bound to the resource to be changed is searched in the admission control configuration description file as the release policy configured by the initial resource change request.

上述申请中的一个可选实施方式,通过将发布策略的获取机制细化为调用资源变更的准入控制管理程序,在准入控制配置描述文件中查找与待变更资源绑定的发布策略,完善了发布策略的确定机制,并通过预先建立发布策略与待变更资源之间的对应关系,保证了发布策略的针对性、专一性和可控性。In an optional implementation manner of the above application, by refining the acquisition mechanism of the release policy into an admission control management program that invokes resource changes, the admission control configuration description file is searched for the release policy bound to the resource to be changed, and the improvement is achieved. The determination mechanism of the release strategy is established, and the corresponding relationship between the release strategy and the resources to be changed is established in advance to ensure the pertinence, specificity and controllability of the release strategy.

可选的,所述方法还包括:Optionally, the method further includes:

根据用户输入来新增、更改或删除所述发布策略的内容,以及根据用户输入变更所述发布策略与资源之间的绑定关系。The content of the publishing policy is added, modified or deleted according to the user input, and the binding relationship between the publishing policy and the resource is changed according to the user input.

上述申请中的一个可选实施方式,通过追加对发布策略的新增、更改、删除以及关系绑定操作,完善了发布策略与资源之间的关系绑定机制,为发布策略的针对性、专一性和可行性提供支撑。An optional implementation manner in the above application improves the relationship binding mechanism between publishing strategies and resources by adding operations such as adding, changing, deleting, and relationship binding to publishing strategies, providing targeted and specialized publishing strategies. Provide support for consistency and feasibility.

第二方面,本申请实施例还提供了一种容器化应用系统的更新装置,包括:In a second aspect, an embodiment of the present application further provides an update device for a containerized application system, including:

部署控制模块,用于获取初始资源变更请求;The deployment control module is used to obtain the initial resource change request;

准入控制模块,用于调用资源变更的准入控制管理程序,获取为所述初始资源变更请求配置的发布策略;an admission control module, used for invoking an admission control management program for resource change, to obtain a release policy configured for the initial resource change request;

准入控制模块,用于调用所述准入控制管理程序中的修改程序,根据所述发布策略对所述初始资源变更请求进行修改,以形成目标资源变更请求;an admission control module, configured to invoke a modification program in the admission control management program, and modify the initial resource modification request according to the release policy to form a target resource modification request;

准入控制模块,用于根据所述目标资源变更请求,对所述容器化应用系统中的资源进行变更,其中,所述资源至少包括容器化管理的应用实例。The admission control module is configured to change the resources in the containerized application system according to the target resource change request, wherein the resources at least include containerized managed application instances.

第三方面,本申请实施例还提供了一种电子设备,包括:In a third aspect, an embodiment of the present application also provides an electronic device, including:

至少一个处理器;以及at least one processor; and

与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein,

所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行第一方面实施例所提供的一种容器化应用系统的更新方法。The memory stores instructions executable by the at least one processor, the instructions are executed by the at least one processor, so that the at least one processor can execute the container provided by the embodiment of the first aspect The update method of the application system.

第四方面,本申请实施例还提供了一种存储有计算机指令的非瞬时计算机可读存储介质,所述计算机指令用于使所述计算机执行第一方面实施例所提供的一种容器化应用系统的更新方法。In a fourth aspect, embodiments of the present application further provide a non-transitory computer-readable storage medium storing computer instructions, where the computer instructions are used to cause the computer to execute the containerized application provided by the embodiments of the first aspect System update method.

上述可选方式所具有的其他效果将在下文中结合具体实施例加以说明。Other effects of the above-mentioned optional manners will be described below with reference to specific embodiments.

附图说明Description of drawings

附图用于更好地理解本方案,不构成对本申请的限定。其中:The accompanying drawings are used for better understanding of the present solution, and do not constitute a limitation to the present application. in:

图1A是本申请实施例的一种容器化应用系统的基本结构示意图;FIG. 1A is a schematic diagram of the basic structure of a containerized application system according to an embodiment of the present application;

图1B是本申请实施例的一种原生Deployment模型的软件架构示意图;1B is a schematic diagram of the software architecture of a native Deployment model according to an embodiment of the present application;

图1C是本申请实施例一中一种容器化应用系统的更新方法的流程图;1C is a flowchart of a method for updating a containerized application system in Embodiment 1 of the present application;

图2是本申请实施例二中的一种容器化应用系统的更新方法的流程图;2 is a flowchart of a method for updating a containerized application system in Embodiment 2 of the present application;

图3是本申请实施例三中的一种容器化应用系统的更新装置的结构图;3 is a structural diagram of an update device for a containerized application system in Embodiment 3 of the present application;

图4是用来实现本申请实施例四中的一种容器化应用系统的更新方法的电子设备的框图。FIG. 4 is a block diagram of an electronic device used to implement a method for updating a containerized application system in Embodiment 4 of the present application.

具体实施方式Detailed ways

以下结合附图对本申请的示范性实施例做出说明,其中包括本申请实施例的各种细节以助于理解,应当将它们认为仅仅是示范性的。因此,本领域普通技术人员应当认识到,可以对这里描述的实施例做出各种改变和修改,而不会背离本申请的范围和精神。同样,为了清楚和简明,以下的描述中省略了对公知功能和结构的描述。Exemplary embodiments of the present application are described below with reference to the accompanying drawings, which include various details of the embodiments of the present application to facilitate understanding, and should be considered as exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present application. Also, descriptions of well-known functions and constructions are omitted from the following description for clarity and conciseness.

为了清楚的介绍本申请各实施例的技术方案,首先对本申请实施例所涉及的系统架构进行说明。In order to clearly introduce the technical solutions of the embodiments of the present application, the system architecture involved in the embodiments of the present application is first described.

参见图1A所示的一种容器化应用系统的基本结构示意图。该系统包括:Deployment、ReplicaSet和Pod。其中,Deployment、ReplicaSet和Pod均为资源对象的资源类型。其中,一个Deployment可以管理一个或多个ReplicaSet,一个ReplicaSet可以管理一个或多个Pod。Pod为无状态应用实例,具体为用户提供业务服务。Refer to the schematic diagram of the basic structure of a containerized application system shown in FIG. 1A . The system includes: Deployment, ReplicaSet and Pod. Among them, Deployment, ReplicaSet, and Pod are resource types of resource objects. Among them, a Deployment can manage one or more ReplicaSets, and a ReplicaSet can manage one or more Pods. Pods are stateless application instances that specifically provide business services to users.

参见图1B所示的一种原生Deployment模型的软件架构示意图。该模型包括:部署控制模块(Deployment Controller)10、资源变更服务模块(API Server)20和发布策略管理模块30。Refer to the schematic diagram of the software architecture of a native Deployment model shown in FIG. 1B . The model includes: a deployment control module (Deployment Controller) 10 , a resource change service module (API Server) 20 and a release policy management module 30 .

其中,部署控制模块10用于接收用户通过部署控制可视化界面发送的资源变更请求;Wherein, the deployment control module 10 is configured to receive the resource change request sent by the user through the deployment control visual interface;

资源变更服务模块20,用于作为统一的资源变更管理入口,基于资源变更请求提供资源变更服务。The resource change service module 20 is used as a unified resource change management portal to provide resource change services based on resource change requests.

其中,资源变更服务模块20,包括:接口监听模块(API Handler)21、准入控制模块(Admission Controller)22和数据库(etcd)23。The resource change service module 20 includes: an interface monitoring module (API Handler) 21 , an admission control module (Admission Controller) 22 and a database (etcd) 23 .

其中,接口监听模块21,用于监听资源变更请求的生成情况;Wherein, the interface monitoring module 21 is used for monitoring the generation of resource change requests;

准入控制模块22,用于在监听到资源变更请求生成时,拦截所生成的资源变更请求,并对所拦截的资源变更请求执行资源修改和资源验证等相关逻辑的至少一种,并将修改后的资源持久化到数据库23中。The admission control module 22 is used to intercept the generated resource change request when monitoring the generation of the resource change request, and execute at least one of related logics such as resource modification and resource verification on the intercepted resource change request, and modify the The latter resource is persisted to the database 23.

其中,发布策略管理模块30,用于存储各资源与发布策略之间的绑定关系;Wherein, the release strategy management module 30 is used to store the binding relationship between each resource and the release strategy;

准入控制模块22,还用于根据资源变更请求在发布策略管理模块30中查找与待变更资源绑定的发布策略,并根据查找到的发布策略修改资源变更请求,以根据修改后的资源变更请求进行资源变更。The admission control module 22 is further configured to search the release policy management module 30 for a release policy bound to the resource to be changed according to the resource change request, and to modify the resource change request according to the found release policy, so as to change the resource according to the modified resource. Request a resource change.

实施例一Example 1

图1C是本申请实施例一中的一种容器化应用系统的更新方法的流程图,本申请实施例适用于在图1B所示的原生Deployment模型中,对图1A所示的容器化应用系统中的资源对象进行变更的情况。该方法通过容器化应用系统的更新装置执行,该装置通过软件和/或硬件实现,并具体配置于电子设备中。FIG. 1C is a flowchart of a method for updating a containerized application system in Embodiment 1 of the present application. This embodiment of the present application is applicable to the native Deployment model shown in FIG. 1B , to the containerized application system shown in FIG. 1A When the resource object in is changed. The method is executed by an update device of the containerized application system, the device is implemented by software and/or hardware, and is specifically configured in an electronic device.

如图1C所示的一种容器化应用系统的更新方法,包括:A method for updating a containerized application system, as shown in Figure 1C, includes:

S101、获取初始资源变更请求。S101. Obtain an initial resource change request.

示例性地,初始资源变更请求可以理解为,由用户根据实际变更需求来操作部署控制可视化界面从而发起的资源变更请求,用于指示对容器化应用系统中的资源对象进行变更操作。Exemplarily, the initial resource change request can be understood as a resource change request initiated by a user operating the deployment control visual interface according to actual change requirements, and is used to instruct a change operation to a resource object in the containerized application system.

其中,资源对象主要是指对Deployment的变更。需要说明的是,所变更的资源对象,还可以是在变更Deployment之后,由Deployment直接或间接管理的其他资源对象,如ReplicaSet或Pod等。Among them, the resource object mainly refers to the changes to the Deployment. It should be noted that the changed resource objects can also be other resource objects managed by the Deployment directly or indirectly after the Deployment is changed, such as ReplicaSet or Pod.

一般的,不会主动发起对ReplicaSet和Pod的变更,而是由部署控制模块进行Deployment的变更,变更Deployment之后,Deployment会变更其所控制的ReplicaSet,进一步地,ReplicaSet会变更其所控制的Pod。Generally, changes to ReplicaSets and Pods will not be initiated actively, but the deployment control module will change the Deployment. After the Deployment is changed, the Deployment will change the ReplicaSet it controls, and further, the ReplicaSet will change the Pod it controls.

其中,所变更资源至少包括容器化管理的应用实例,也即Pod。具体所变更内容可以包括镜像版本、环境变量、和配置文件的挂载等的至少一个。The changed resources include at least containerized managed application instances, that is, Pods. The specific changed content may include at least one of an image version, an environment variable, and the mounting of a configuration file.

示例性地,由部署控制模块获取用户操作部署控制可视化界面所产生的初始资源变更请求,以实现对Deployment的变更;或者由部署控制模块获取部署控制模块自身所发起的初始资源变更请求,以实现对ReplicaSet或Pod的变更。Exemplarily, the initial resource change request generated by the user operating the deployment control visualization interface is obtained by the deployment control module to realize the change to the Deployment; or the deployment control module obtains the initial resource change request initiated by the deployment control module itself to realize the change. Changes to ReplicaSets or Pods.

具体的,对Deployment这类资源的变更请求是由用户通过操作部署控制可视化界面,或通过接口调用操作具体的交互内容而发起的。对ReplicaSet这类资源的变更请求是由部署控制模块发起的,具体的变更内容是对Deployment的变更的相关内容(ReplicaSet的描述文件可以根据Deployment的描述文件创建,所以变更了Deployment描述文件的部分内容,可以自动生成新的ReplicaSet的描述文件)。对Pod这类资源的变更请求也是由部署控制模块发起的,具体的变更内容是对Deployment的变更的相关内容(Pod的描述文件可以基于变更了Deployment描述文件的部分内容所自动生成的新的ReplicaSet的描述文件创建)。Specifically, the change request for resources such as Deployment is initiated by the user by operating the deployment control visual interface, or by calling the interface to operate the specific interactive content. The change request for resources such as ReplicaSet is initiated by the deployment control module, and the specific content of the change is the relevant content of the change to the Deployment (the description file of the ReplicaSet can be created according to the description file of the Deployment, so part of the content of the description file of the Deployment is changed. , which can automatically generate a new ReplicaSet description file). The change request for resources such as Pod is also initiated by the deployment control module, and the specific content of the change is the relevant content of the change to the Deployment (the description file of the Pod can be based on a new ReplicaSet that is automatically generated based on part of the content of the changed Deployment description file. description file creation).

S102、调用资源变更的准入控制管理程序,获取为所述初始资源变更请求配置的发布策略。S102. Invoke an admission control management program for resource change to acquire a release policy configured for the initial resource change request.

其中,发布策略中包括发布规则和当前发布状态。The release policy includes release rules and current release status.

其中,发布规则,用于表征进行资源重新发布时所需满足的发布条件。例如,重新发布Pod的规则。Among them, the release rule is used to represent the release condition that needs to be satisfied when the resource is re-released. For example, rules for republishing Pods.

可选的,发布规则可以包括新发布应用实例的发布批次数量,用于对应用实例发布时的批次数量加以控制,以减少频繁进行应用实例的发布对系统的稳定性所带来的影响;或者可选的,发布规则可以包括:每批次新发布应用实例的数量,用于对每一批次所发布的应用实例的数量加以控制,以减少单批次大量进行应用实例的发布给系统的稳定性和安全性带来的影响;或者可选的,发布规则可以包括:后续批次的发布条件,用于实现对各批次的发送过程进行暂停控制,便于对已发布批次的应用实例的性能监控,便于及时对性能较差的应用实例进行干预。Optionally, the release rules may include the number of release batches of newly released application instances, which are used to control the number of batches when application instances are released, so as to reduce the impact of frequent release of application instances on the stability of the system. ; or optionally, the release rules may include: the number of newly released application instances in each batch, which is used to control the number of application instances released in each batch, so as to reduce a large number of application instances released in a single batch to The impact of the stability and security of the system; or alternatively, the release rules may include: release conditions for subsequent batches, which are used to realize the suspension control of the sending process of each batch, so as to facilitate the release of the released batches. The performance monitoring of application instances facilitates timely intervention on application instances with poor performance.

其中,后续批次的发布条件,用于在满足该发布条件时允许后续批次的发布,从而实现批次间的发布控制,简化了分批发布时的用户操作。Among them, the release condition of the subsequent batch is used to allow the release of the subsequent batch when the release condition is satisfied, so as to realize the release control between batches and simplify the user operation during batch release.

可选的,后续批次的发布条件,可以包括:接收到用户输入的后续批次发布指示,以便于用户对已发布批次的应用实例的性能指标进行异常监测,并在未发现异常的情况下触发下一批次的发布,从而实现了对发布过程的人工控制;可选的,后续批次的发布条件,可以包括:满足相邻批次的发布时间间隔,以便于在发布时间间隔中对在先批次已发布应用实例的性能进行监控,便于在该时间间隔内对异常情况的应用实例进行干预,从而实现了对发布过程的自动控制;可选的,后续批次的发布条件,可以包括:已发布批次运行正常,以便保证已发布批次的应用实例的性能。Optionally, the release conditions for subsequent batches may include: receiving a subsequent batch release instruction input by the user, so that the user can monitor the performance indicators of the application instances of the released batches abnormally, and if no abnormality is found The next batch is triggered to release the next batch, thereby realizing manual control of the release process; optionally, the release conditions of subsequent batches may include: satisfying the release time interval of adjacent batches, so that the release time interval can be Monitoring the performance of the published application instances in the previous batch is convenient for intervening in the abnormal application instances within the time interval, thus realizing the automatic control of the publishing process; optional, the publishing conditions of the subsequent batches, Can include: Published batches are functioning properly in order to guarantee the performance of the published batch's application instance.

示例性地,当通过人工控制在后批次的发布时,当在前批次发布完成暂停后,需要用户手动确定在前批次所发布的应用实例没有问题,然后触发在后批次的发布操作。具体的,可以是在人机交互界面,如前述部署控制可视化界面,提醒在前批次更新完成,并在该人机交互界面由用户触发再次启动下一批次发布,例如通过命令行输入或按键控制等。Exemplarily, when the release of the later batch is manually controlled, after the release of the previous batch is completed and suspended, the user is required to manually confirm that there is no problem with the application instance published in the previous batch, and then trigger the release of the latter batch. operate. Specifically, it can be on the human-computer interaction interface, such as the aforementioned deployment control visualization interface, to remind the previous batch of update completion, and trigger the user to start the next batch of release on the human-computer interaction interface, for example, through command line input or button control, etc.

示例性地,当通过自动控制在后批次的发布时,当在前批次发布完成暂停后,间隔一定时间进行发布,间隔时间内,如果应用实例发现异常,则进行异常报警,并取消下一批次的发布。Exemplarily, when the release of the later batch is automatically controlled, after the release of the previous batch is suspended, the release is performed at a certain interval. During the interval, if an abnormality is found in the application instance, an abnormality alarm will be issued, and the next batch will be cancelled. A batch of releases.

其中,当前发布状态用于表征应用实例在发布过程中所处的当前状态。可选的,当前发布状态可以包括:应用实例的发布中、已暂停、已取消和已完成。The current release state is used to represent the current state of the application instance during the release process. Optionally, the current publishing status may include: publishing of the application instance, paused, canceled, and completed.

具体的,当资源变更服务模块中所部署的接口监听模块监听到部署控制模块获取到初始资源变更请求时,准入控制模块对该初始资源变更请求进行拦截,并调用资源变更的准入控制管理程序,以获取为初始资源变更请求配置的发布策略,以便后续根据该发布策略对所拦截的初始资源变更请求执行相应逻辑。Specifically, when the interface monitoring module deployed in the resource change service module monitors that the deployment control module obtains the initial resource change request, the admission control module intercepts the initial resource change request, and invokes the admission control management of the resource change. program to obtain the release policy configured for the initial resource change request, so that the corresponding logic can be subsequently executed on the intercepted initial resource change request according to the release policy.

在本申请实施例的一种可选实施方式中,预先建立了各发布策略与资源之间的绑定关系,并将该绑定关系预先存储在电子设备本地、与电子设备相关联的其他设备或云端中。相应的,调用资源变更的准入控制管理程序,获取为所述初始资源变更请求配置的发布策略,可以是:调用资源变更的准入控制管理程序,以根据预先设定的绑定关系,查找与待变更资源所绑定的发布策略,作为初始资源变更请求配置的发布策略。In an optional implementation of the embodiment of the present application, a binding relationship between each release policy and a resource is pre-established, and the binding relationship is pre-stored locally in the electronic device and other devices associated with the electronic device or in the cloud. Correspondingly, invoking the admission control management program for resource modification to obtain the release policy configured for the initial resource modification request may be: invoking the admission control management program for resource modification to search for the resource modification according to the preset binding relationship. The release strategy bound to the resource to be changed is used as the release strategy configured for the initial resource change request.

典型的,发布策略与资源之间的绑定关系以准入控制配置描述文件的形式存在于发布策略管理模块中,并通过调用资源变更的准入控制管理程序,在准入控制配置描述文件中查找与待变更资源绑定的发布策略,作为所述初始资源变更请求配置的发布策略。Typically, the binding relationship between the release policy and the resource exists in the release policy management module in the form of an admission control configuration description file, and is stored in the admission control configuration description file by calling the admission control management program for resource changes. Find the release policy bound to the resource to be changed as the release policy configured by the initial resource change request.

可选的,根据用户输入新增、更改或删除所述发布策略的内容,以及根据用户输入变更所述发布策略与资源之间的绑定关系。Optionally, the content of the publishing policy is added, modified or deleted according to the user input, and the binding relationship between the publishing policy and the resource is changed according to the user input.

具体的,用户通过部署控制可视化界面或接口输入新增、更改或删除所述发布策略的内容;部署控制模块接收到待新增内容、待更改内容或待删除内容后,将上述内容发送至资源变更服务模块;资源变更服务模块中的准入控制模块将上述内容传输至发布策略管理模块,以使发布策略管理模块根据待新增内容、待更改内容或待删除内容对准入控制配置描述文件中的发布策略进行更新。Specifically, the user inputs the content of adding, changing or deleting the publishing strategy through the deployment control visual interface or interface; after receiving the content to be added, the content to be changed or the content to be deleted, the deployment control module sends the above content to the resource Change service module; the admission control module in the resource change service module transmits the above content to the publishing policy management module, so that the publishing policy management module aligns the admission control configuration description file according to the content to be added, the content to be changed or the content to be deleted Update the release policy in .

S103、调用所述准入控制管理程序中的修改程序,根据所述发布策略对所述初始资源变更请求进行修改,以形成目标资源变更请求。S103. Invoke a modification program in the admission control management program, and modify the initial resource modification request according to the release policy to form a target resource modification request.

示例性地,在初始资源变更请求中包括新发布应用实例的初始发布批次数量和/或每批次新发布应用实例的初始数量。Exemplarily, the initial resource change request includes the initial batch number of newly released application instances and/or the initial number of newly released application instances in each batch.

当初始资源变更请求中的初始发布批次数量,或者每批次新发布应用实例的初始数量与发布规则中所包含的相应内容不一致时,根据发布策略中所包含的内容,对初始资源变更请求中的不一致内容进行修改,以形成满足发布策略的目标资源变更请求。When the number of initial release batches in the initial resource change request, or the initial number of newly released application instances in each batch is inconsistent with the corresponding content contained in the release rules, the initial resource change request will be processed according to the content contained in the release policy. Inconsistencies in the content are modified to form a target resource change request that satisfies the release policy.

具体的,准入控制模块调用准入控制管理程序中的修改程序,将所获取的初始资源变更请求,以及与初始资源变更请求相对应的发布策略作为输入参数,对初始资源变更请求进行修改,得到目标资源变更请求。Specifically, the admission control module calls the modification program in the admission control management program, and uses the acquired initial resource change request and the release policy corresponding to the initial resource change request as input parameters to modify the initial resource change request, Get the target resource change request.

S104、根据所述目标资源变更请求,对所述容器化应用系统中的资源进行变更,其中,所述资源至少包括容器化管理的应用实例。S104. Change the resources in the containerized application system according to the target resource change request, where the resources at least include containerized managed application instances.

具体的,准入控制模块根据所述目标资源变更请求,对所述容器化应用系统中的资源进行变更,例如可以是对资源所对应的镜像版本、环境变量、配置文件的挂载等中的至少一个进行变更。Specifically, the admission control module changes the resources in the containerized application system according to the target resource change request, for example, it may be in the image version, environment variable, and configuration file mounting corresponding to the resource. At least one changes.

本申请实施例通过获取初始资源变更请求;调用资源变更的准入控制管理程序,获取为初始资源变更请求配置的发布策略;调用准入控制管理程序中的修改程序,根据发布策略对初始资源变更请求进行修改,以形成目标资源变更请求;根据目标资源变更请求,对容器化应用系统中的资源尽心变更;其中,资源至少包括容器化管理的应用实例。上述技术方案通过在准入控制环节,引入针对初始资源变更请求所配置的发布策略,对初始资源变更请求进行修改,从而根据修改后的初始资源变更请求进行资源变更,实现了对资源变更过程的有效控制,同时减小了变更过程中对业务执行过程的功能影响,减少了资源变更对程序代码的侵入性,而是利用了已有的准入控制环节中的修改机制来完成资源变更的可控性。In the embodiment of the present application, the initial resource change request is obtained; the admission control management program for resource change is called to obtain the release policy configured for the initial resource change request; the modification program in the admission control management program is called to change the initial resource according to the release policy The request is modified to form a target resource change request; according to the target resource change request, the resources in the containerized application system are carefully changed; wherein, the resources include at least containerized managed application instances. In the above technical solution, a release policy configured for the initial resource change request is introduced in the admission control link, and the initial resource change request is modified, so that the resource change is performed according to the modified initial resource change request, and the resource change process is realized. Effective control, while reducing the functional impact on the business execution process during the change process, and reducing the intrusiveness of resource changes to the program code, but using the existing modification mechanism in the admission control link to complete the availability of resource changes. control.

实施例二Embodiment 2

图2是本申请实施例二中的一种容器化应用系统的更新方法的流程图,本申请实施例在上述各实施例的技术方案的基础上,进行了优化改进。FIG. 2 is a flowchart of a method for updating a containerized application system in Embodiment 2 of the present application. The embodiments of the present application are optimized and improved on the basis of the technical solutions of the foregoing embodiments.

进一步地,将操作“获取初始资源变更请求”细化为“获取用户输入的更新请求,所述更新请求用于指示重新发布所述容器化应用系统中管理的应用实例;根据所述更新请求确定更新模式和更新参数;根据所述更新模式和更新参数,产生所述初始资源变更请求”,以完善初始资源变更请求的生成机制。Further, the operation "obtaining an initial resource change request" is refined into "obtaining an update request input by the user, where the update request is used to instruct to republish the application instance managed in the containerized application system; determine according to the update request. Update mode and update parameters; according to the update mode and update parameters, generate the initial resource change request" to improve the generation mechanism of the initial resource change request.

如图2所示的一种容器化应用系统的更新方法,包括:A method for updating a containerized application system, as shown in Figure 2, includes:

S201、获取用户输入的更新请求,所述更新请求用于指示重新发布所述容器化应用系统中管理的应用实例。S201. Obtain an update request input by a user, where the update request is used to instruct to republish an application instance managed in the containerized application system.

S202、根据所述更新请求确定更新模式和更新参数。S202. Determine an update mode and update parameters according to the update request.

其中,所述更新模式包括重建更新(Recreate Update)模式或滚动更新(RollingUpdate)模式,对应于所述滚动更新模式的更新参数包括应用实例超出预期控制目标的最大值,应用实例低于预期控制目标的最大值。The update mode includes a Recreate Update mode or a Rolling Update mode, and the update parameters corresponding to the rolling update mode include the maximum value of the application instance exceeding the expected control target, and the application instance being lower than the expected control target the maximum value of .

其中,应用实例超出预期控制目标的最大值(maxSurge),是可选配置项,用来指定可以超过期望的Pod数量的最大个数。该值可以是一个绝对值(例如5)或者是期望的Pod数量的百分比(例如10%)。可以通过百分比计算的绝对值向上取整。默认值是1。Among them, the maximum value (maxSurge) that the application instance exceeds the expected control target is an optional configuration item used to specify the maximum number of Pods that can exceed the expected number of Pods. The value can be an absolute value (eg 5) or a percentage of the desired number of pods (eg 10%). The absolute value calculated by the percentage can be rounded up. The default value is 1.

其中,应用实例低于预期控制目标的最大值(maxUnavailable),是可选配置项,用来指定在升级过程中不可用Pod的最大数量。该值可以是一个绝对值(例如5),也可以是期望Pod数量的百分比(例如10%)。可以通过计算百分比的绝对值向下取整。默认值是1。Among them, the application instance is lower than the maximum value of the expected control target (maxUnavailable), which is an optional configuration item used to specify the maximum number of unavailable Pods during the upgrade process. The value can be an absolute value (such as 5) or a percentage of the desired number of pods (such as 10%). It can be rounded down by calculating the absolute value of the percentage. The default value is 1.

需要说明的是,为了保证更新操作的顺利实现,maxUnavailable和maxSurge两者不能同时为0。It should be noted that, in order to ensure the smooth implementation of the update operation, both maxUnavailable and maxSurge cannot be 0 at the same time.

S203、根据所述更新模式和更新参数,产生所述初始资源变更请求。S203. Generate the initial resource change request according to the update mode and the update parameter.

当用户配置了更新模式和更新参数后,配置控制模块可以根据更新模式和/或更新参数,产生初始资源变更请求。After the user configures the update mode and update parameters, the configuration control module may generate an initial resource change request according to the update mode and/or update parameters.

在本申请实施例的一种可选实施方式中,当更新模式为滚动更新模式时,则根据更新模式和更新参数,生成初始资源变更请求。In an optional implementation manner of the embodiment of the present application, when the update mode is the rolling update mode, an initial resource change request is generated according to the update mode and the update parameters.

举例说明,假设Deployment控制的Pod副本数量是9,若maxSurge为30%,则Deployment控制的Pod副本数量不超过

Figure BDA0002378211350000121
(其中,
Figure BDA0002378211350000122
为向上取整)。若maxUnavailable为30%,则Deployment控制的Pod副本数量不超过
Figure BDA0002378211350000123
(其中,
Figure BDA0002378211350000124
为向下取整)。因此,在第一次变更时,根据更新模式和更新参数所生成的初始资源变更请求中,新版本ReplicaSet的pod副本数量是3,旧版本ReplicaSet的pod副本数量是7。在第二次变更时,重复扩容和缩容的过程,在第一批发布的新版本的pod均未发现异常时,扩容2个,缩容5个,确定所生成的初始资源变更请求中新版本ReplicaSet的pod副本数量是5,旧版本ReplicaSet的pod副本数量是5。For example, assuming that the number of Pod replicas controlled by Deployment is 9, if maxSurge is 30%, the number of Pod replicas controlled by Deployment does not exceed
Figure BDA0002378211350000121
(in,
Figure BDA0002378211350000122
is rounded up). If maxUnavailable is 30%, the number of Pod replicas controlled by the Deployment does not exceed
Figure BDA0002378211350000123
(in,
Figure BDA0002378211350000124
is rounded down). Therefore, during the first change, in the initial resource change request generated according to the update mode and update parameters, the number of pod copies of the new version of ReplicaSet is 3, and the number of pod copies of the old version of ReplicaSet is 7. In the second change, repeat the process of expanding and shrinking. When no abnormality is found in the first batch of pods of the new version released, expand by 2 and reduce by 5, and confirm that the new initial resource change request is generated. The number of pod replicas for the version ReplicaSet is 5, and the number of pod replicas for the old version ReplicaSet is 5.

在本申请实施例的另一可选实施方式中,当更新模式为重建更新模式时,鉴于重建更新模式需要删除所有的旧版本的ReplicaSet控制的Pod,因此,可以直接根据更新模式,生成初始资源变更请求,在该初始资源变更请求中,控制旧版本pod为0,以及控制新版本pod为9。In another optional implementation of the embodiment of the present application, when the update mode is the reconstruction update mode, since the reconstruction update mode needs to delete all Pods controlled by the ReplicaSet of the old version, the initial resources can be generated directly according to the update mode Change request, in the initial resource change request, control the old version pod as 0, and control the new version pod as 9.

S204、调用资源变更的准入控制管理程序,获取为所述初始资源变更请求配置的发布策略。S204. Invoke an admission control management program for resource change to acquire a release policy configured for the initial resource change request.

示例性地,发布策略中包括每批次新发布应用实例的数量。Exemplarily, the release policy includes the number of newly released application instances in each batch.

S205、调用所述准入控制管理程序中的修改程序,根据所述发布策略对所述初始资源变更请求进行修改,以形成目标资源变更请求。S205. Invoke a modification program in the admission control management program, and modify the initial resource modification request according to the release policy to form a target resource modification request.

示例性地,调用所述准入控制管理程序中的修改程序,根据所述发布策略对所述初始资源变更请求进行修改,以形成目标资源变更请求,可以是:调用所述准入控制管理程序中的修改程序,根据所述发布策略中的发布规则,确定发布的新版本应用实例数量是否符合当前发布批次的数量要求;如果不符合当前发布批次的数量要求,则根据所述发布规则,修改当前发布批次中所发布的新版本应用实例数量,以形成所述目标资源变更请求。Exemplarily, calling the modification program in the admission control management program, and modifying the initial resource change request according to the release policy to form a target resource change request, may be: calling the admission control management program In the modification program, according to the release rules in the release strategy, determine whether the number of new version application instances released meets the quantity requirements of the current release batch; if it does not meet the quantity requirements of the current release batch, then according to the release rules , and modify the number of application instances of the new version released in the current release batch to form the target resource change request.

以每批新发布应用实例的数量不超过2为例。Take the number of newly released application instances in each batch not exceeding 2 as an example.

延续前例,当采用滚动更新模式所生成的初始资源变更请求中,新版本ReplicaSet的pod副本数量是3,旧版本ReplicaSet的pod副本数量是7时,显然新版本ReplicaSet的pod副本数量不满足分布策略(3>2),则需要根据每批新发布应用实例的数量(2)对新旧版本ReplicaSet的Pod副本数量分别进行修改,得到目标资源变更请求。在目标资源变更请求中,新版本ReplicaSet的pod副本数量是2,旧版本ReplicaSet的pod副本数量是7。Continuing the previous example, in the initial resource change request generated by the rolling update mode, when the number of pod copies of the new version of ReplicaSet is 3 and the number of pod copies of the old version of ReplicaSet is 7, obviously the number of pod copies of the new version of ReplicaSet does not meet the distribution strategy (3>2), it is necessary to modify the number of Pod copies of the old and new versions of ReplicaSet according to the number of newly released application instances in each batch (2) to obtain the target resource change request. In the target resource change request, the number of pod replicas of the new version ReplicaSet is 2, and the number of pod replicas of the old version ReplicaSet is 7.

延续前例,当采用重建更新模式所生成的初始资源变更请求中,新版本ReplicaSet的pod副本数量是9,旧版本ReplicaSet的pod副本数量是0时,显然新版本ReplicaSet的pod副本数量不满足分布策略(9>2),则需要根据每批新发布应用实例的数量(2)对新旧版本ReplicaSet的Pod副本数量分别进行修改,得到目标资源变更请求。在目标资源变更请求中,新版本ReplicaSet的pod副本数量是2,旧版本ReplicaSet的pod副本数量是8。Continuing the previous example, when the initial resource change request generated by the rebuild update mode, the number of pod copies of the new version of ReplicaSet is 9, and the number of pod copies of the old version of ReplicaSet is 0, obviously the number of pod copies of the new version of ReplicaSet does not meet the distribution strategy (9>2), it is necessary to modify the number of Pod copies of the old and new versions of ReplicaSet respectively according to the number of newly released application instances in each batch (2) to obtain the target resource change request. In the target resource change request, the number of pod replicas of the new version ReplicaSet is 2, and the number of pod replicas of the old version ReplicaSet is 8.

可选的,新版本应用实例在新建的ReplicaSet中发布,原有的旧版本应用实例保留在原有的ReplicaSet中。Optionally, the new version of the application instance is published in the newly created ReplicaSet, and the original old version of the application instance is retained in the original ReplicaSet.

S206、根据所述目标资源变更请求,对所述容器化应用系统中的资源进行变更,其中,所述资源至少包括容器化管理的应用实例。S206. Change the resources in the containerized application system according to the target resource change request, where the resources at least include containerized managed application instances.

本申请实施例通过将初始资源变更请求的获取操作,细化为获取用户输入的更新请求,根据更新请求确定更新模式和更新参数,并根据更新模式和更新参数,进行初始资源变更请求的生成,能够适配当前Kubernetes系统的运行机制,并完善了在当前Kubernetes系统中进行初始资源变更请求生成的生成方式。The embodiment of the present application refines the acquisition operation of the initial resource change request into acquiring the update request input by the user, determines the update mode and the update parameter according to the update request, and generates the initial resource change request according to the update mode and the update parameter, It can adapt to the operating mechanism of the current Kubernetes system, and improve the generation method of initial resource change request generation in the current Kubernetes system.

实施例三Embodiment 3

图3是本申请实施例三中的一种容器化应用系统的更新装置的结构图。本申请实施例适用于在图1B所示的原生Deployment模型中,对图1A所示的容器化应用系统中的资源对象进行变更的情况。该装置通过软件和/或硬件实现,并具体配置于电子设备中。FIG. 3 is a structural diagram of a device for updating a containerized application system according to Embodiment 3 of the present application. The embodiments of the present application are applicable to the case of changing the resource objects in the containerized application system shown in FIG. 1A in the native Deployment model shown in FIG. 1B . The apparatus is implemented by software and/or hardware, and is specifically configured in an electronic device.

如图3所示的一种容器化应用系统的更新装置300,包括:部署控制模块301和准入控制模块302。As shown in FIG. 3 , anupdate apparatus 300 of a containerized application system includes: adeployment control module 301 and anadmission control module 302 .

部署控制模块301,用于获取初始资源变更请求;adeployment control module 301, configured to obtain an initial resource change request;

准入控制模块302,用于调用资源变更的准入控制管理程序,获取为所述初始资源变更请求配置的发布策略;anadmission control module 302, configured to invoke an admission control management program for resource change, and obtain a release policy configured for the initial resource change request;

准入控制模块302,用于调用所述准入控制管理程序中的修改程序,根据所述发布策略对所述初始资源变更请求进行修改,以形成目标资源变更请求;Anadmission control module 302, configured to invoke a modification program in the admission control management program, and modify the initial resource change request according to the release policy to form a target resource change request;

准入控制模块302,用于根据所述目标资源变更请求,对所述容器化应用系统中的资源进行变更,其中,所述资源至少包括容器化管理的应用实例。Theadmission control module 302 is configured to change the resources in the containerized application system according to the target resource change request, wherein the resources at least include containerized managed application instances.

本申请实施例通过部署控制模块获取初始资源变更请求;通过准入控制模块调用资源变更的准入控制管理程序,获取为初始资源变更请求配置的发布策略;通过准入控制模块调用准入控制管理程序中的修改程序,根据发布策略对初始资源变更请求进行修改,以形成目标资源变更请求;通过准入控制模块根据目标资源变更请求,对容器化应用系统中的资源尽心变更;其中,资源至少包括容器化管理的应用实例。上述技术方案通过引入针对初始资源变更请求所配置的发布策略,对初始资源变更请求进行修改,从而根据修改后的初始资源变更请求进行资源变更,实现了对资源变更过程的有效控制,同时减小了变更过程中对业务执行过程的功能影响,减少了资源变更的侵入性。In this embodiment of the present application, the initial resource change request is obtained through the deployment control module; the admission control management program for resource change is called through the admission control module to obtain the release policy configured for the initial resource change request; the admission control management program is called through the admission control module The modification program in the program modifies the initial resource change request according to the release policy to form the target resource change request; through the admission control module, according to the target resource change request, the resources in the containerized application system are carefully changed; among them, the resources are at least Includes containerized managed application instances. The above technical solution modifies the initial resource change request by introducing a release policy configured for the initial resource change request, so that the resource change is performed according to the modified initial resource change request, thereby realizing the effective control of the resource change process and reducing the The functional impact on the business execution process during the change process is reduced, and the intrusiveness of resource changes is reduced.

进一步地,所述发布策略中包括发布规则和当前发布状态。Further, the release policy includes release rules and current release status.

进一步地,所述发布规则包括下述至少一项:Further, the release rule includes at least one of the following:

新发布应用实例的发布批次数量;The number of release batches of newly released application instances;

每批次新发布应用实例的数量;The number of newly released application instances per batch;

后续批次的发布条件,用于在满足所述发布条件时允许后续批次的发布。The release condition of the subsequent batch is used to allow the release of the subsequent batch when the release condition is satisfied.

进一步地,所述后续批次的发布条件包括下述至少一项:Further, the release conditions of the subsequent batches include at least one of the following:

接收到用户输入的后续批次发布指示;Receive a subsequent batch release instruction input by the user;

满足相邻批次的发布时间间隔;Satisfy the release time interval of adjacent batches;

已发布批次运行正常。Published batches are working fine.

进一步地,所述当前发布状态包括应用实例的发布中、已暂停、已取消和已完成。Further, the current publishing status includes publishing of the application instance, suspended, cancelled and completed.

进一步地,部署控制模块301,用于:Further, thedeployment control module 301 is used for:

获取用户输入的更新请求,所述更新请求用于指示重新发布所述容器化应用系统中管理的应用实例;obtaining an update request input by the user, where the update request is used to instruct to republish the application instance managed in the containerized application system;

根据所述更新请求确定更新模式和更新参数;determining an update mode and update parameters according to the update request;

根据所述更新模式和更新参数,产生所述初始资源变更请求。The initial resource change request is generated according to the update mode and update parameters.

进一步地,所述更新模式包括重建更新或滚动更新,对应于所述滚动更新模式的更新参数包括应用实例超出预期控制目标的最大值,应用实例低于预期控制目标的最大值。Further, the update mode includes reconstruction update or rolling update, and the update parameters corresponding to the rolling update mode include the maximum value that the application instance exceeds the expected control target, and the application instance is lower than the maximum value of the expected control target.

进一步地,准入控制模块302,在执行调用所述准入控制管理程序中的修改程序,根据所述发布策略对所述初始资源变更请求进行修改,以形成目标资源变更请求时,具体用于:Further, when theadmission control module 302 executes and calls the modification program in the admission control management program, and modifies the initial resource change request according to the release policy to form the target resource change request, it is specifically used for: :

调用所述准入控制管理程序中的修改程序,根据所述发布策略中的发布规则,确定发布的新版本应用实例数量是否符合当前发布批次的数量要求;Invoke the modification program in the admission control management program, and determine whether the number of application instances of the new version to be released meets the requirements of the current release batch according to the release rules in the release policy;

如果不符合当前发布批次的数量要求,则根据所述发布规则,修改当前发布批次中所发布的新版本应用实例数量,以形成所述目标资源变更请求。If the quantity requirement of the current release batch is not met, the quantity of the new version application instance released in the current release batch is modified according to the release rule to form the target resource change request.

进一步地,新版本应用实例在新建的ReplicaSet中发布,原有的旧版本应用实例保留在原有的ReplicaSet中。Further, the new version of the application instance is released in the newly created ReplicaSet, and the original old version of the application instance is retained in the original ReplicaSet.

进一步地,准入控制模块302,在执行调用资源变更的准入控制管理程序,获取为所述初始资源变更请求配置的发布策略时,具体用于:Further, when theadmission control module 302 executes the admission control management program that invokes the resource change and obtains the release policy configured for the initial resource change request, it is specifically used for:

调用资源变更的准入控制管理程序,在准入控制配置描述文件中查找与待变更资源绑定的发布策略,作为所述初始资源变更请求配置的发布策略。The admission control management program for resource change is invoked, and the release policy bound to the resource to be changed is searched in the admission control configuration description file as the release policy configured by the initial resource change request.

进一步地,部署控制模块301,还用于获取用户输入来新增、更改或删除所述发布策略的内容;Further, thedeployment control module 301 is further configured to obtain user input to add, modify or delete the content of the publishing policy;

相应的,准入控制模块302,还用于根据用户输入来新增、更改或删除所述发布策略的内容,以及根据用户输入变更所述发布策略与资源之间的绑定关系。Correspondingly, theadmission control module 302 is further configured to add, change or delete the content of the publishing policy according to user input, and change the binding relationship between the publishing policy and resources according to user input.

上述容器化应用系统的更新装置可执行本申请任意实施例所提供的容器化应用系统的更新方法,具备执行容器化应用系统的更新方法相应的功能模块和有益效果。The above-mentioned updating apparatus for a containerized application system can execute the updating method for a containerized application system provided by any embodiment of the present application, and has functional modules and beneficial effects corresponding to executing the updating method for a containerized application system.

实施例四Embodiment 4

根据本申请的实施例,本申请还提供了一种电子设备和一种可读存储介质。According to the embodiments of the present application, the present application further provides an electronic device and a readable storage medium.

如图4所示,是实现本申请实施例的容器化应用系统的更新方法的电子设备的框图。电子设备旨在表示各种形式的数字计算机,诸如,膝上型计算机、台式计算机、工作台、个人数字助理、服务器、刀片式服务器、大型计算机、和其它适合的计算机。电子设备还可以表示各种形式的移动装置,诸如,个人数字处理、蜂窝电话、智能电话、可穿戴设备和其它类似的计算装置。本文所示的部件、它们的连接和关系、以及它们的功能仅仅作为示例,并且不意在限制本文中描述的和/或者要求的本申请的实现。As shown in FIG. 4 , it is a block diagram of an electronic device implementing the method for updating a containerized application system according to an embodiment of the present application. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic devices may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are by way of example only, and are not intended to limit implementations of the application described and/or claimed herein.

如图4所示,该电子设备包括:一个或多个处理器401、存储器402,以及用于连接各部件的接口,包括高速接口和低速接口。各个部件利用不同的总线互相连接,并且可以被安装在公共主板上或者根据需要以其它方式安装。处理器可以对在电子设备内执行的指令进行处理,包括存储在存储器中或者存储器上以在外部输入/输出装置(诸如,耦合至接口的显示设备)上显示GUI的图形信息的指令。在其它实施方式中,若需要,可以将多个处理器和/或多条总线与多个存储器和多个存储器一起使用。同样,可以连接多个电子设备,各个设备提供部分必要的操作(例如,作为服务器阵列、一组刀片式服务器、或者多处理器系统)。图4中以一个处理器401为例。As shown in FIG. 4, the electronic device includes: one ormore processors 401, amemory 402, and interfaces for connecting various components, including a high-speed interface and a low-speed interface. The various components are interconnected using different buses and may be mounted on a common motherboard or otherwise as desired. The processor may process instructions executed within the electronic device, including instructions stored in or on memory to display graphical information of the GUI on an external input/output device, such as a display device coupled to the interface. In other embodiments, multiple processors and/or multiple buses may be used with multiple memories and multiple memories, if desired. Likewise, multiple electronic devices may be connected, each providing some of the necessary operations (eg, as a server array, a group of blade servers, or a multiprocessor system). Aprocessor 401 is taken as an example in FIG. 4 .

存储器402即为本申请所提供的非瞬时计算机可读存储介质。其中,所述存储器存储有可由至少一个处理器执行的指令,以使所述至少一个处理器执行本申请所提供的容器化应用系统的更新方法。本申请的非瞬时计算机可读存储介质存储计算机指令,该计算机指令用于使计算机执行本申请所提供的容器化应用系统的更新方法。Thememory 402 is the non-transitory computer-readable storage medium provided by the present application. Wherein, the memory stores instructions executable by at least one processor, so that the at least one processor executes the method for updating a containerized application system provided by the present application. The non-transitory computer-readable storage medium of the present application stores computer instructions, and the computer instructions are used to cause the computer to execute the method for updating the containerized application system provided by the present application.

存储器402作为一种非瞬时计算机可读存储介质,可用于存储非瞬时软件程序、非瞬时计算机可执行程序以及模块,如本申请实施例中的容器化应用系统的更新方法对应的程序指令/模块(例如,附图3所示的部署控制模块301和准入控制模块302)。处理器401通过运行存储在存储器402中的非瞬时软件程序、指令以及模块,从而执行服务器的各种功能应用以及数据处理,即实现上述方法实施例中的容器化应用系统的更新方法。As a non-transitory computer-readable storage medium, thememory 402 can be used to store non-transitory software programs, non-transitory computer-executable programs and modules, such as program instructions/modules corresponding to the method for updating the containerized application system in the embodiments of the present application. (eg,deployment control module 301 andadmission control module 302 shown in Figure 3). Theprocessor 401 executes various functional applications and data processing of the server by running the non-transitory software programs, instructions and modules stored in thememory 402, that is, implementing the method for updating the containerized application system in the above method embodiments.

存储器402可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储所述容器化应用系统的更新方法的电子设备的使用所创建的数据等。此外,存储器402可以包括高速随机存取存储器,还可以包括非瞬时存储器,例如至少一个磁盘存储器件、闪存器件、或其他非瞬时固态存储器件。在一些实施例中,存储器402可选包括相对于处理器401远程设置的存储器,这些远程存储器可以通过网络连接至实现容器化应用系统的更新方法的电子设备。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。Thememory 402 may include a storage program area and a storage data area, wherein the storage program area may store an operating system and an application program required by at least one function; the storage data area may store the use of the electronic device for the update method of the containerized application system created data, etc. Additionally,memory 402 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, thememory 402 may optionally include memory disposed remotely with respect to theprocessor 401, and these remote memories may be connected to the electronic device implementing the update method of the containerized application system through a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

实现容器化应用系统的更新方法的电子设备还可以包括:输入装置403和输出装置404。处理器401、存储器402、输入装置403和输出装置404可以通过总线或者其他方式连接,图4中以通过总线连接为例。The electronic device implementing the method for updating the containerized application system may further include: aninput device 403 and anoutput device 404 . Theprocessor 401 , thememory 402 , theinput device 403 and theoutput device 404 may be connected by a bus or in other ways, and the connection by a bus is taken as an example in FIG. 4 .

输入装置403可接收输入的数字或字符信息,以及产生与实现容器化应用系统的更新方法的电子设备的用户设置以及功能控制有关的键信号输入,例如触摸屏、小键盘、鼠标、轨迹板、触摸板、指示杆、一个或者多个鼠标按钮、轨迹球、操纵杆等输入装置。输出装置404可以包括显示设备、辅助照明装置(例如,LED)和触觉反馈装置(例如,振动电机)等。该显示设备可以包括但不限于,液晶显示器(LCD)、发光二极管(LED)显示器和等离子体显示器。在一些实施方式中,显示设备可以是触摸屏。Theinput device 403 can receive input numerical or character information, and generate key signal input related to user settings and function control of the electronic device implementing the update method of the containerized application system, such as touch screen, keypad, mouse, trackpad, touch Input devices such as pads, pointing sticks, one or more mouse buttons, trackballs, joysticks, etc.Output devices 404 may include display devices, auxiliary lighting devices (eg, LEDs), haptic feedback devices (eg, vibration motors), and the like. The display device may include, but is not limited to, a liquid crystal display (LCD), a light emitting diode (LED) display, and a plasma display. In some implementations, the display device may be a touch screen.

此处描述的系统和技术的各种实施方式可以在数字电子电路系统、集成电路系统、专用ASIC(专用集成电路)、计算机硬件、固件、软件、和/或它们的组合中实现。这些各种实施方式可以包括:实施在一个或者多个计算机程序中,该一个或者多个计算机程序可在包括至少一个可编程处理器的可编程系统上执行和/或解释,该可编程处理器可以是专用或者通用可编程处理器,可以从存储系统、至少一个输入装置、和至少一个输出装置接收数据和指令,并且将数据和指令传输至该存储系统、该至少一个输入装置、和该至少一个输出装置。Various implementations of the systems and techniques described herein can be implemented in digital electronic circuitry, integrated circuit systems, application specific ASICs (application specific integrated circuits), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include being implemented in one or more computer programs executable and/or interpretable on a programmable system including at least one programmable processor that The processor, which may be a special purpose or general-purpose programmable processor, may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device an output device.

这些计算程序(也称作程序、软件、软件应用、或者代码)包括可编程处理器的机器指令,并且可以利用高级过程和/或面向对象的编程语言、和/或汇编/机器语言来实施这些计算程序。如本文使用的,术语“机器可读介质”和“计算机可读介质”指的是用于将机器指令和/或数据提供给可编程处理器的任何计算机程序产品、设备、和/或装置(例如,磁盘、光盘、存储器、可编程逻辑装置(PLD)),包括,接收作为机器可读信号的机器指令的机器可读介质。术语“机器可读信号”指的是用于将机器指令和/或数据提供给可编程处理器的任何信号。These computational programs (also referred to as programs, software, software applications, or codes) include machine instructions for programmable processors, and may be implemented using high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages calculation program. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or apparatus for providing machine instructions and/or data to a programmable processor ( For example, magnetic disks, optical disks, memories, programmable logic devices (PLDs), including machine-readable media that receive machine instructions as machine-readable signals. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.

为了提供与用户的交互,可以在计算机上实施此处描述的系统和技术,该计算机具有:用于向用户显示信息的显示装置(例如,CRT(阴极射线管)或者LCD(液晶显示器)监视器);以及键盘和指向装置(例如,鼠标或者轨迹球),用户可以通过该键盘和该指向装置来将输入提供给计算机。其它种类的装置还可以用于提供与用户的交互;例如,提供给用户的反馈可以是任何形式的传感反馈(例如,视觉反馈、听觉反馈、或者触觉反馈);并且可以用任何形式(包括声输入、语音输入或者、触觉输入)来接收来自用户的输入。To provide interaction with a user, the systems and techniques described herein may be implemented on a computer having a display device (eg, a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user ); and a keyboard and pointing device (eg, a mouse or trackball) through which a user can provide input to the computer. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (eg, visual feedback, auditory feedback, or tactile feedback); and can be in any form (including acoustic input, voice input, or tactile input) to receive input from the user.

可以将此处描述的系统和技术实施在包括后台部件的计算系统(例如,作为数据服务器)、或者包括中间件部件的计算系统(例如,应用服务器)、或者包括前端部件的计算系统(例如,具有图形用户界面或者网络浏览器的用户计算机,用户可以通过该图形用户界面或者该网络浏览器来与此处描述的系统和技术的实施方式交互)、或者包括这种后台部件、中间件部件、或者前端部件的任何组合的计算系统中。可以通过任何形式或者介质的数字数据通信(例如,通信网络)来将系统的部件相互连接。通信网络的示例包括:局域网(LAN)、广域网(WAN)和互联网。The systems and techniques described herein may be implemented on a computing system that includes back-end components (eg, as a data server), or a computing system that includes middleware components (eg, an application server), or a computing system that includes front-end components (eg, a user's computer having a graphical user interface or web browser through which a user may interact with implementations of the systems and techniques described herein), or including such backend components, middleware components, Or any combination of front-end components in a computing system. The components of the system may be interconnected by any form or medium of digital data communication (eg, a communication network). Examples of communication networks include: Local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.

计算机系统可以包括客户端和服务器。客户端和服务器一般远离彼此并且通常通过通信网络进行交互。通过在相应的计算机上运行并且彼此具有客户端-服务器关系的计算机程序来产生客户端和服务器的关系。A computer system can include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server arises by computer programs running on the respective computers and having a client-server relationship to each other.

本申请实施例通过获取初始资源变更请求;调用资源变更的准入控制管理程序,获取为初始资源变更请求配置的发布策略;调用准入控制管理程序中的修改程序,根据发布策略对初始资源变更请求进行修改,以形成目标资源变更请求;根据目标资源变更请求,对容器化应用系统中的资源尽心变更;其中,资源至少包括容器化管理的应用实例。上述技术方案通过引入针对初始资源变更请求所配置的发布策略,对初始资源变更请求进行修改,从而根据修改后的初始资源变更请求进行资源变更,实现了对资源变更过程的有效控制,同时减小了变更过程中对业务执行过程的功能影响,减少了资源变更的侵入性。In the embodiment of the present application, the initial resource change request is obtained; the admission control management program for resource change is called to obtain the release policy configured for the initial resource change request; the modification program in the admission control management program is called to change the initial resource according to the release policy The request is modified to form a target resource change request; according to the target resource change request, the resources in the containerized application system are carefully changed; wherein, the resources at least include containerized managed application instances. The above technical solution modifies the initial resource change request by introducing a release policy configured for the initial resource change request, so that the resource change is performed according to the modified initial resource change request, thereby realizing the effective control of the resource change process and reducing the The functional impact on the business execution process during the change process is reduced, and the intrusiveness of resource changes is reduced.

应该理解,可以使用上面所示的各种形式的流程,重新排序、增加或删除步骤。例如,本发申请中记载的各步骤可以并行地执行也可以顺序地执行也可以不同的次序执行,只要能够实现本申请公开的技术方案所期望的结果,本文在此不进行限制。It should be understood that steps may be reordered, added or deleted using the various forms of flow shown above. For example, the steps described in the present application can be performed in parallel, sequentially or in different orders, and as long as the desired results of the technical solutions disclosed in the present application can be achieved, no limitation is imposed herein.

上述具体实施方式,并不构成对本申请保护范围的限制。本领域技术人员应该明白的是,根据设计要求和其他因素,可以进行各种修改、组合、子组合和替代。任何在本申请的精神和原则之内所作的修改、等同替换和改进等,均应包含在本申请保护范围之内。The above-mentioned specific embodiments do not constitute a limitation on the protection scope of the present application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent replacements and improvements made within the spirit and principles of this application shall be included within the protection scope of this application.

Claims (14)

Translated fromChinese
1.一种容器化应用系统的更新方法,其特征在于,包括:1. A method for updating a containerized application system, comprising:获取初始资源变更请求;Get the initial resource change request;调用资源变更的准入控制管理程序,获取为所述初始资源变更请求配置的发布策略;Invoke the admission control management program for resource change to obtain the release policy configured for the initial resource change request;调用所述准入控制管理程序中的修改程序,根据所述发布策略对所述初始资源变更请求进行修改,以形成目标资源变更请求;calling the modification program in the admission control management program, and modifying the initial resource modification request according to the release policy to form a target resource modification request;根据所述目标资源变更请求,对所述容器化应用系统中的资源进行变更,其中,所述资源至少包括容器化管理的应用实例。According to the target resource change request, the resources in the containerized application system are changed, wherein the resources at least include containerized managed application instances.2.根据权利要求1所述的方法,其特征在于,所述发布策略中包括发布规则和当前发布状态。2 . The method according to claim 1 , wherein the publishing policy includes publishing rules and current publishing status. 3 .3.根据权利要求2所述的方法,其特征在于,所述发布规则包括下述至少一项:3. The method according to claim 2, wherein the release rule comprises at least one of the following:新发布应用实例的发布批次数量;The number of release batches of newly released application instances;每批次新发布应用实例的数量;The number of newly released application instances per batch;后续批次的发布条件,用于在满足所述发布条件时允许后续批次的发布。The release condition of the subsequent batch is used to allow the release of the subsequent batch when the release condition is satisfied.4.根据权利要求3所述的方法,其特征在于,所述后续批次的发布条件包括下述至少一项:4. The method according to claim 3, wherein the release conditions of the subsequent batches include at least one of the following:接收到用户输入的后续批次发布指示;Receive a subsequent batch release instruction input by the user;满足相邻批次的发布时间间隔;Satisfy the release time interval of adjacent batches;已发布批次运行正常。Published batches are working fine.5.根据权利要求2所述的方法,其特征在于,所述当前发布状态包括应用实例的发布中、已暂停、已取消和已完成。5. The method according to claim 2, wherein the current publishing status includes publishing, paused, canceled, and completed of the application instance.6.根据权利要求1-5任一所述的方法,其特征在于,获取初始资源变更请求包括:6. The method according to any one of claims 1-5, wherein obtaining the initial resource change request comprises:获取用户输入的更新请求,所述更新请求用于指示重新发布所述容器化应用系统中管理的应用实例;obtaining an update request input by the user, where the update request is used to instruct to republish the application instance managed in the containerized application system;根据所述更新请求确定更新模式和更新参数;determining an update mode and update parameters according to the update request;根据所述更新模式和更新参数,产生所述初始资源变更请求。The initial resource change request is generated according to the update mode and update parameters.7.根据权利要求6所述的方法,其特征在于,所述更新模式包括重建更新模式或滚动更新模式,对应于所述滚动更新模式的更新参数包括应用实例超出预期控制目标的最大值,应用实例低于预期控制目标的最大值。7. The method according to claim 6, wherein the update mode comprises a rebuild update mode or a rolling update mode, the update parameters corresponding to the rolling update mode include the maximum value that the application instance exceeds the expected control target, and the application The instance is below the maximum value of the expected control objective.8.根据权利要求7所述的方法,其特征在于,调用所述准入控制管理程序中的修改程序,根据所述发布策略对所述初始资源变更请求进行修改,以形成目标资源变更请求包括:8. The method according to claim 7, wherein calling a modification program in the admission control management program, and modifying the initial resource change request according to the release policy, so as to form a target resource change request comprises: :调用所述准入控制管理程序中的修改程序,根据所述发布策略中的发布规则,确定发布的新版本应用实例数量是否符合当前发布批次的数量要求;Invoke the modification program in the admission control management program, and determine whether the number of application instances of the new version to be released meets the requirements of the current release batch according to the release rules in the release policy;如果不符合当前发布批次的数量要求,则根据所述发布规则,修改当前发布批次中所发布的新版本应用实例数量,以形成所述目标资源变更请求。If the quantity requirement of the current release batch is not met, the quantity of the new version application instance released in the current release batch is modified according to the release rule to form the target resource change request.9.根据权利要求8所述的方法,其特征在于,新版本应用实例在新建的ReplicaSet中发布,原有的旧版本应用实例保留在原有的ReplicaSet中。9 . The method according to claim 8 , wherein the new version application instance is published in the newly created ReplicaSet, and the original old version application instance is retained in the original ReplicaSet. 10 .10.根据权利要求1所述的方法,其特征在于,调用资源变更的准入控制管理程序,获取为所述初始资源变更请求配置的发布策略包括:10 . The method according to claim 1 , wherein invoking an admission control management program for resource change, and acquiring a release policy configured for the initial resource change request comprises: 10 .调用资源变更的准入控制管理程序,在准入控制配置描述文件中查找与待变更资源绑定的发布策略,作为所述初始资源变更请求配置的发布策略。The admission control management program for resource change is invoked, and the release policy bound to the resource to be changed is searched in the admission control configuration description file as the release policy configured by the initial resource change request.11.根据权利要求1所述的方法,其特征在于,还包括:11. The method of claim 1, further comprising:根据用户输入新增、更改或删除所述发布策略的内容,以及根据用户输入变更所述发布策略与资源之间的绑定关系。The content of the publishing strategy is added, modified or deleted according to the user input, and the binding relationship between the publishing strategy and the resource is changed according to the user input.12.一种容器化应用系统的更新装置,其特征在于,包括:12. A device for updating a containerized application system, comprising:部署控制模块,用于获取初始资源变更请求;The deployment control module is used to obtain the initial resource change request;准入控制模块,用于调用资源变更的准入控制管理程序,获取为所述初始资源变更请求配置的发布策略;an admission control module, used for invoking an admission control management program for resource change, to obtain a release policy configured for the initial resource change request;准入控制模块,用于调用所述准入控制管理程序中的修改程序,根据所述发布策略对所述初始资源变更请求进行修改,以形成目标资源变更请求;an admission control module, configured to invoke a modification program in the admission control management program, and modify the initial resource change request according to the release policy to form a target resource change request;准入控制模块,用于根据所述目标资源变更请求,对所述容器化应用系统中的资源进行变更,其中,所述资源至少包括容器化管理的应用实例。The admission control module is configured to change the resources in the containerized application system according to the target resource change request, wherein the resources at least include containerized managed application instances.13.一种电子设备,其特征在于,包括:13. An electronic device, characterized in that, comprising:至少一个处理器;以及at least one processor; and与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行权利要求1-11中任一项所述的一种容器化应用系统的更新方法。The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the execution of any of claims 1-11 An update method for containerized application systems.14.一种存储有计算机指令的非瞬时计算机可读存储介质,其特征在于,所述计算机指令用于使所述计算机执行权利要求1-11中任一项所述的一种容器化应用系统的更新方法。14. A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to make the computer execute a containerized application system according to any one of claims 1-11 update method.
CN202010074813.0A2020-01-222020-01-22Updating method, device, equipment and medium of containerized application systemActiveCN111290768B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202010074813.0ACN111290768B (en)2020-01-222020-01-22Updating method, device, equipment and medium of containerized application system

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202010074813.0ACN111290768B (en)2020-01-222020-01-22Updating method, device, equipment and medium of containerized application system

Publications (2)

Publication NumberPublication Date
CN111290768Atrue CN111290768A (en)2020-06-16
CN111290768B CN111290768B (en)2023-10-20

Family

ID=71030719

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202010074813.0AActiveCN111290768B (en)2020-01-222020-01-22Updating method, device, equipment and medium of containerized application system

Country Status (1)

CountryLink
CN (1)CN111290768B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN112860343A (en)*2021-02-102021-05-28北京百度网讯科技有限公司Configuration changing method, system, device, electronic equipment and storage medium
CN113076248A (en)*2021-04-082021-07-06马上消费金融股份有限公司Application processing method, device and equipment and readable storage medium
CN113726871A (en)*2021-08-272021-11-30猪八戒股份有限公司Dispatching method and system for automatic code release
CN113760322A (en)*2021-02-072021-12-07北京沃东天骏信息技术有限公司 Software update method, device and system
CN114531443A (en)*2022-02-182022-05-24京东科技信息技术有限公司Cluster-based container control method and system
CN116301986A (en)*2023-03-082023-06-23天翼云科技有限公司Dynamic upgrading method for container application based on controller mode
CN117369946A (en)*2023-10-182024-01-09中科驭数(北京)科技有限公司Container deployment method and device based on DPU, electronic equipment and medium

Citations (11)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20070288526A1 (en)*2006-06-082007-12-13Emc CorporationMethod and apparatus for processing a database replica
CN103176790A (en)*2011-12-262013-06-26阿里巴巴集团控股有限公司Application releasing method and application releasing system
CN105100051A (en)*2015-05-292015-11-25北京京东尚科信息技术有限公司Method and system for realizing data resource access right control
US20180091583A1 (en)*2016-09-262018-03-29Amazon Technologies, Inc.Multi-party updates to distributed systems
CN108509253A (en)*2018-04-032018-09-07南京中兴软创软件技术有限公司A kind of method of a large amount of container mirror images of release quickly
CN108536524A (en)*2018-03-132018-09-14Oppo广东移动通信有限公司resource updating method, device, terminal and storage medium
US10079832B1 (en)*2017-10-182018-09-18Palantir Technologies Inc.Controlling user creation of data resources on a data processing platform
CN108874403A (en)*2018-05-302018-11-23深圳市分期乐网络科技有限公司Dissemination method, device, equipment and the storage medium of rule file
CN109814910A (en)*2018-12-142019-05-28深圳壹账通智能科技有限公司Automate gray scale dissemination method, device, computer system and storage medium
CN110287029A (en)*2019-06-272019-09-27中国—东盟信息港股份有限公司A method of it is adjusted based on kubernetes container resource dynamic
CN110427204A (en)*2019-08-082019-11-08浪潮云信息技术有限公司A kind of automation gray scale dissemination method based on container and service grid

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20070288526A1 (en)*2006-06-082007-12-13Emc CorporationMethod and apparatus for processing a database replica
CN103176790A (en)*2011-12-262013-06-26阿里巴巴集团控股有限公司Application releasing method and application releasing system
CN105100051A (en)*2015-05-292015-11-25北京京东尚科信息技术有限公司Method and system for realizing data resource access right control
US20180091583A1 (en)*2016-09-262018-03-29Amazon Technologies, Inc.Multi-party updates to distributed systems
US10079832B1 (en)*2017-10-182018-09-18Palantir Technologies Inc.Controlling user creation of data resources on a data processing platform
CN108536524A (en)*2018-03-132018-09-14Oppo广东移动通信有限公司resource updating method, device, terminal and storage medium
CN108509253A (en)*2018-04-032018-09-07南京中兴软创软件技术有限公司A kind of method of a large amount of container mirror images of release quickly
CN108874403A (en)*2018-05-302018-11-23深圳市分期乐网络科技有限公司Dissemination method, device, equipment and the storage medium of rule file
CN109814910A (en)*2018-12-142019-05-28深圳壹账通智能科技有限公司Automate gray scale dissemination method, device, computer system and storage medium
CN110287029A (en)*2019-06-272019-09-27中国—东盟信息港股份有限公司A method of it is adjusted based on kubernetes container resource dynamic
CN110427204A (en)*2019-08-082019-11-08浪潮云信息技术有限公司A kind of automation gray scale dissemination method based on container and service grid

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
EDDY TRUYEN 等: "A Comprehensive Feature Comparison Study of Open-Source Container Orchestration Frameworks", 《APPLIED SCIENCES》, vol. 9, no. 5, pages 1 - 76*
SHAWN-LI: "Pod控制器Deployment使用详解(更新策略、回滚策略、暂停策略)以及金丝雀发布详解", pages 1 - 3*
何思玫: "面向容器云平台的集群资源调度管理器的设计与实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》, no. 12, pages 139 - 177*
阿里云: "Kubernetes分批发布", pages 1 - 3, Retrieved from the Internet <URL:《https://help.aliyun.com/document_detail/96666.html》>*

Cited By (11)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN113760322A (en)*2021-02-072021-12-07北京沃东天骏信息技术有限公司 Software update method, device and system
CN112860343A (en)*2021-02-102021-05-28北京百度网讯科技有限公司Configuration changing method, system, device, electronic equipment and storage medium
CN112860343B (en)*2021-02-102024-04-23北京百度网讯科技有限公司 Configuration change method, system, device, electronic device and storage medium
CN113076248A (en)*2021-04-082021-07-06马上消费金融股份有限公司Application processing method, device and equipment and readable storage medium
CN113076248B (en)*2021-04-082021-11-30马上消费金融股份有限公司Application processing method, device and equipment and readable storage medium
CN113726871A (en)*2021-08-272021-11-30猪八戒股份有限公司Dispatching method and system for automatic code release
CN113726871B (en)*2021-08-272024-02-02猪八戒股份有限公司Scheduling method and system for automatic code release
CN114531443A (en)*2022-02-182022-05-24京东科技信息技术有限公司Cluster-based container control method and system
CN114531443B (en)*2022-02-182024-05-17京东科技信息技术有限公司Container control method and system based on cluster
CN116301986A (en)*2023-03-082023-06-23天翼云科技有限公司Dynamic upgrading method for container application based on controller mode
CN117369946A (en)*2023-10-182024-01-09中科驭数(北京)科技有限公司Container deployment method and device based on DPU, electronic equipment and medium

Also Published As

Publication numberPublication date
CN111290768B (en)2023-10-20

Similar Documents

PublicationPublication DateTitle
CN111290768B (en)Updating method, device, equipment and medium of containerized application system
KR102796214B1 (en)Distributed training method and system, device and storage medium
CN111258609B (en)Upgrading method and device of Kubernetes cluster, electronic equipment and medium
US20210191780A1 (en)Method and apparatus for processing development machine operation task, device and storage medium
CN111930521A (en) Method, apparatus, electronic device, and readable storage medium for deploying applications
WO2023109138A1 (en)Method and apparatus for starting android application in linux system, and electronic device
CN112073994A (en)Method and device for over-the-air upgrading, electronic equipment and readable storage medium
CN111324417B (en)Component control method and device of Kubernetes cluster, electronic equipment and medium
US12210892B2 (en)Method for implementing smart contract based on blockchain
CN111581948A (en) Document parsing method, device, device and storage medium
JP2021096857A (en)Data processing method, device, electronic apparatus, and storage medium
KR20220151585A (en)Business data processing method, apparatus, electronic apparatus, storage media and computer program
CN114185734B (en)Method and device for monitoring clusters and electronic equipment
CN111625195B (en) Method and device for server expansion
CN111782147B (en) Method and device for cluster expansion and contraction
CN111930539B (en) Task management method, device, equipment and storage medium based on tag engine
CN112732312B (en) Method and device for updating application program, electronic device and medium
CN112084395A (en)Search method, search device, electronic device, and storage medium
KR102546577B1 (en)Method and device for mini program data processing
CN112817992B (en) Method, device, electronic device and readable storage medium for performing modification tasks
CN112069137A (en)Method and device for generating information, electronic equipment and computer readable storage medium
CN111857656A (en) Data processing method, device, electronic device and storage medium
CN112527368B (en)Cluster kernel version updating method and device, electronic equipment and storage medium
CN111258954A (en) Data migration method, device, device and storage medium
CN118170427A (en) A version upgrade method, device, electronic device and storage medium for cloud phone

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp