Movatterモバイル変換


[0]ホーム

URL:


CN110442349B - Method and device for service expansion - Google Patents

Method and device for service expansion
Download PDF

Info

Publication number
CN110442349B
CN110442349BCN201910708555.4ACN201910708555ACN110442349BCN 110442349 BCN110442349 BCN 110442349BCN 201910708555 ACN201910708555 ACN 201910708555ACN 110442349 BCN110442349 BCN 110442349B
Authority
CN
China
Prior art keywords
service
instance
package
target
target service
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.)
Active
Application number
CN201910708555.4A
Other languages
Chinese (zh)
Other versions
CN110442349A (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 CN201910708555.4ApriorityCriticalpatent/CN110442349B/en
Publication of CN110442349ApublicationCriticalpatent/CN110442349A/en
Application grantedgrantedCritical
Publication of CN110442349BpublicationCriticalpatent/CN110442349B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

Translated fromChinese

本公开的实施例公开了用于服务扩容的方法和装置。该方法的一具体实施方式包括:接收服务扩容信息,其中,服务扩容信息中包括待扩容服务的服务标识;基于预设的服务程序包集合,获取与服务标识匹配的服务程序包作为目标服务程序包,其中,预设的服务程序包集合中的服务程序包基于待扩容服务在生产环境中的服务实例而生成;确定目标服务程序包与目标服务实例是否一致,其中,目标服务实例包括待扩容服务在当前时刻处于生产环境中的服务实例;响应于确定目标服务程序包与目标服务实例一致,基于目标服务程序包,生成待扩容服务的扩容实例。该实施方式实现了云计算服务中扩容实例与生产环境实例的一致交付。

The embodiments of the present disclosure disclose a method and apparatus for service expansion. A specific implementation of the method includes: receiving service expansion information, wherein the service expansion information includes a service identifier of the service to be expanded; based on a preset service package set, obtaining a service package that matches the service identifier as a target service package, wherein the service packages in the preset service package set are generated based on service instances of the service to be expanded in a production environment; determining whether the target service package is consistent with the target service instance, wherein the target service instance includes a service instance of the service to be expanded that is in a production environment at the current moment; in response to determining that the target service package is consistent with the target service instance, generating an expansion instance of the service to be expanded based on the target service package. This implementation achieves consistent delivery of expansion instances and production environment instances in cloud computing services.

Description

Method and device for service capacity expansion
Technical Field
The embodiment of the disclosure relates to the technical field of computers, in particular to a method and a device for expanding service capacity.
Background
With the rapid development of internet technology, the deployment iteration frequency of Service (Service) instances running on a Service cluster is also increasing. Thus, deployment iterations of a service in a production environment are often involved in performing service expansion.
There are two general ways of deploying services to the service-expanded instance according to the program source provided by the user by using a tool with the capabilities of arranging and distributing files, and adding the expanded instance to the production environment. Therefore, the capacity expansion task and the service deployment iteration task independently operate and do not interfere with each other. And secondly, determining the execution sequence of the capacity expansion task and the deployment iteration task of the same service cluster in a robbery locking mode, thereby ensuring the version consistency of the capacity expansion instance through a mutual exclusion method.
Disclosure of Invention
The embodiment of the disclosure provides a method and a device for service capacity expansion.
In a first aspect, an embodiment of the disclosure provides a method for service expansion, which includes receiving service expansion information, wherein the service expansion information includes a service identifier of a service to be expanded, acquiring a service package matched with the service identifier as a target service package based on a preset service package set, wherein the service package in the preset service package set is generated based on a service instance of the service to be expanded in a production environment, determining whether the target service package is consistent with the target service instance, wherein the target service instance includes a service instance in which the service to be expanded is in the production environment at a current moment, and generating an expansion instance of the service to be expanded based on the target service package in response to determining that the target service package is consistent with the target service instance.
In some embodiments, the method for acquiring the service package matched with the service identifier as the target service package based on the preset service package set comprises the steps of acquiring an instance list matched with the service identifier in a production environment in response to determining that the service package matched with the service identifier does not exist in the service package set, selecting a service instance from the instance list as a data source instance of the service package according to the service instance execution sequence in a deployment iteration scene indicated by the instance list, packaging the data source instance of the service package into the data source instance package, storing the data source instance package in the service package set, and acquiring the data source instance package from the service package set as the target service package in response to storing the data source instance package in the service package set.
In some embodiments, the service package corresponds to a version number, and determining whether the target service package is consistent with the target service instance includes determining whether the version number corresponding to the target service package is consistent with the version number corresponding to the service package of the target service instance.
In some embodiments, the service package comprises a service component file set, and the determining whether the target service package is consistent with the target service instance comprises selecting a target number of service component files from the service component file set in the target service package to generate a file set to be verified, and determining whether the files in the file set to be verified are consistent with the component files corresponding to the target service instance.
In some embodiments, the generating the file set to be verified includes obtaining file verification information indicating a range of verification files, and selecting a service component file from the service component file set in the target service package according to the file verification information to generate the file set to be verified.
In some embodiments, the method further includes deleting the data source instance package from the set of service packages in response to determining that the target service package is inconsistent with the target service instance, and continuing to perform the service package update step.
In some embodiments, the generating the capacity expansion instance of the service to be expanded based on the target service package includes obtaining an instance list matched with the service identifier in the production environment at the current time as a target instance list, and generating the capacity expansion instance of the service to be expanded based on the target service package and the initial capacity expansion instance in response to determining that the service instance matched with the target service exists in the target instance list.
In some embodiments, the method further comprises deleting the data source instance package from the set of service packages in response to determining that there are no instances in the list of target instances that match the target service, and continuing to perform the service package update step.
In some embodiments, the method further includes, in response to generating the capacity-expanding instance, publishing the capacity-expanding instance to a production environment.
In some embodiments, the method further includes determining whether the dilatation instance in the production environment is consistent with the target service instance, determining whether a service instance matching the target service exists in the target instance list in response to determining that the dilatation instance in the production environment is consistent with the target service instance, running an automated test program in response to determining that a service instance matching the target service exists in the target instance list, and generating a test result, and transmitting information characterizing whether the service dilatation is complete in accordance with the test result.
In a second aspect, an embodiment of the present disclosure provides an apparatus for service expansion, including a receiving unit configured to receive service expansion information, where the service expansion information includes a service identifier of a service to be expanded, an obtaining unit configured to obtain, based on a preset service package set, a service package matching the service identifier as a target service package, where the service package in the preset service package set is generated based on a service instance of the service to be expanded in a production environment, a first determining unit configured to determine whether the target service package is consistent with the target service instance, where the target service instance includes the service instance of the service to be expanded in the production environment at a current time, and a generating unit configured to generate, based on the target service package, the expansion instance of the service to be expanded in response to determining that the target service package is consistent with the target service instance.
In some embodiments, the acquisition unit comprises an updating module configured to execute the following service package updating step of acquiring an instance list matched with the service identifier in the production environment in response to determining that the service package matched with the service identifier does not exist in the service package set, selecting a service instance from the instance list as a data source instance of the service package according to the service instance execution sequence in the deployment iteration scene indicated by the instance list, packaging the data source instance of the service package into the data source instance package, and storing the data source instance package in the service package set, and a first acquisition module configured to acquire the data source instance package from the service package set as a target service package in response to storing the data source instance package in the service package set.
In some embodiments, the service package corresponds to a version number, and the first determining unit includes a first determining module configured to determine whether the version number corresponding to the target service package corresponds to the version number corresponding to the service package of the target service instance.
In some embodiments, the service package comprises a service component file set, the first determining unit further comprises a first generating module configured to select a target number of service component files from the service component file set in the target service package to generate a file set to be verified, and a second determining module configured to determine whether the files in the file set to be verified are consistent with the component files corresponding to the target service instance.
In some embodiments, the first generation module includes an acquisition sub-module configured to acquire file verification information indicating a range of verification files, and a generation sub-module configured to select a service component file from a service component file set in a target service package according to the file verification information, and generate a file set to be verified.
In some embodiments, the apparatus further comprises a first updating unit configured to delete the data source instance package from the set of service packages in response to determining that the target service package is inconsistent with the target service instance, and to continue performing the service package updating step.
In some embodiments, the generating unit comprises a second obtaining module configured to obtain an instance list matched with the service identifier in the production environment at the current moment as a target instance list, and a second generating module configured to generate a capacity expansion instance of the service to be expanded based on the target service package and the initial capacity expansion instance in response to determining that the service instance matched with the target service exists in the target instance list.
In some embodiments, the apparatus further comprises a second updating unit configured to delete the data source instance package from the set of service packages in response to determining that there are no instances in the list of target instances that match the target service, and to continue the service package updating step.
In some embodiments, the apparatus further includes a publishing unit configured to publish the capacity-expanded instance to the production environment in response to generating the capacity-expanded instance.
In some embodiments, the apparatus further comprises a second determining unit configured to determine whether the dilatation instance in the production environment is consistent with the target service instance, a third determining unit configured to determine whether a service instance matching the target service exists in the target instance list in response to determining that the dilatation instance in the production environment is consistent with the target service instance, a testing unit configured to run an automated testing program in response to determining that the service instance matching the target service exists in the target instance list, and generate a test result, and a transmitting unit configured to transmit information characterizing whether the dilatation of the service is completed according to the test result.
In a third aspect, embodiments of the present disclosure provide a server comprising one or more processors, storage means having one or more programs stored thereon, which when executed by the one or more processors, cause the one or more processors to implement a method as described in any of the implementations of the first aspect.
In a fourth aspect, embodiments of the present disclosure provide a computer readable medium having stored thereon a computer program which, when executed by a processor, implements a method as described in any of the implementations of the first aspect.
The embodiment of the disclosure provides a method and a device for service capacity expansion, firstly, service capacity expansion information is received. The service expansion information comprises a service identifier of the service to be expanded. And then, based on a preset service package set, acquiring the service package matched with the service identifier as a target service package. The service packages in the preset service package set are generated based on service instances of the service to be expanded in the production environment. Then, it is determined whether the target service package is consistent with the target service instance. The target service instance comprises a service instance in which the service to be expanded is in the production environment at the current moment. And finally, generating a capacity expansion instance of the service to be expanded based on the target service package in response to the fact that the target service package is consistent with the target service instance. Thereby realizing the consistent delivery of the expansion instance and the production environment instance.
Drawings
Other features, objects and advantages of the present disclosure will become more apparent upon reading of the detailed description of non-limiting embodiments, made with reference to the following drawings:
FIG. 1 is an exemplary system architecture diagram in which an embodiment of the present disclosure may be applied;
FIG. 2 is a flow chart of one embodiment of a method for service expansion according to the present disclosure;
Fig. 3 is a schematic diagram of one application scenario of a method for service expansion according to an embodiment of the present disclosure;
fig. 4 is a flow chart of yet another embodiment of a method for service expansion according to the present disclosure;
Fig. 5 is a schematic structural view of one embodiment of an apparatus for service expansion according to the present disclosure;
fig. 6 is a schematic structural diagram of an electronic device suitable for use in implementing embodiments of the present disclosure.
Detailed Description
The present disclosure is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings.
It should be noted that, without conflict, the embodiments of the present disclosure and features of the embodiments may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 illustrates an exemplary architecture 100 to which the methods for service expansion or apparatuses for service expansion of the present disclosure may be applied.
As shown in fig. 1, a system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The terminal devices 101, 102, 103 interact with the server 105 via the network 104 to receive or send messages or the like. Various communication client applications, such as a web browser application, a search class application, an instant messaging tool, a mailbox client, social platform software, a text editing class application, a software development tool, etc., may be installed on the terminal devices 101, 102, 103.
The terminal devices 101, 102, 103 may be hardware or software. When the terminal devices 101, 102, 103 are hardware, they may be various electronic devices having a display screen and supporting software development, including but not limited to smartphones, tablet computers, laptop and desktop computers, and the like. When the terminal devices 101, 102, 103 are software, they can be installed in the above-listed electronic devices. Which may be implemented as multiple software or software modules (e.g., software or software modules for providing distributed services) or as a single software or software module. The present invention is not particularly limited herein.
The server 105 may be a server providing various services, such as a background server providing support for deployment, iteration, expansion, etc. of the service programs used by the terminal devices 101, 102, 103. Alternatively, the server 105 may be a cloud server. The background server can analyze the received service capacity expansion information and the like, and generate a service capacity expansion instance on the premise of meeting capacity expansion conditions.
It should be noted that, the server may be hardware, or may be software. When the server is hardware, the server may be implemented as a distributed server cluster formed by a plurality of servers, or may be implemented as a single server. When the server is software, it may be implemented as a plurality of software or software modules (e.g., software or software modules for providing distributed services), or as a single software or software module. The present invention is not particularly limited herein.
It should be noted that, the method for service expansion provided by the embodiments of the present disclosure is generally performed by the server 105, and accordingly, the device for service expansion is generally disposed in the server 105.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to fig. 2, a flow 200 of one embodiment of a method for service expansion according to the present disclosure is shown. The method for service expansion comprises the following steps:
Step 201, receiving service expansion information.
In this embodiment, the execution body of the method for service expansion (such as the server 105 shown in fig. 1) may receive the service expansion information through a wired connection or a wireless connection. The service expansion information may include a service identifier of the service to be expanded. The service identification described above may be used to uniquely identify the service. The service identification may typically be in the form of a string.
In this embodiment, the execution body may receive the service expansion information in various manners. As an example, the execution subject may directly receive service expansion information transmitted from a terminal used by a user. The service identifier of the service to be expanded in the service expansion information may be used to indicate a service that needs to be expanded by the user. As yet another example, the executing body may receive service expansion information transmitted by a communicatively connected electronic device (e.g., a server for pre-security check). The service expansion information may be generated by the server for pre-security check according to a result of performing pre-security check on the received user expansion request. The user capacity expansion request may include user information and a service identifier of a service to be expanded. The user information may include, but is not limited to, at least one of a user name, a password, an IP (Internet Protocol ) address, a quota of resources (e.g., traffic, network bandwidth, memory, etc.). The pre-security check may include checking the user information, or may include matching between a resource required for expanding the service to be expanded and a resource allowance.
Step 202, based on a preset service package set, obtaining a service package matched with the service identifier as a target service package.
In this embodiment, based on a preset service package set, the executing body may obtain the service package matching the service identifier in step 201 in various manners. The service package may include a code file and an operating environment. The service packages in the preset service package set may be generated based on service instances of the service to be expanded in the production environment. As an example, in response to a service instance being published to the production environment, the execution body may package the service instance and the production environment to generate a service package, and then the execution body may store the generated service package into the preset service package set. In practice, the above-mentioned preset service package set may be stored in the file distribution tool.
In this embodiment, in response to determining that there is a service package in the set of service packages that matches the service identifier in step 201, the executing entity may obtain a matching service package, and determine the matching service package as the target service package. Wherein the matching may include that the service provided by the service package is consistent with the service indicated by the service identification.
Alternatively, in the scenario of service deployment iteration, the service package may correspond to a version number. In general, the version numbers may be in one-to-one correspondence with the service packages.
Optionally, the service package may include a service component file set. Wherein the service component may comprise a subunit for implementing the provision of the above-mentioned services. A plurality of service component files may together form a software foundation for the service components described above.
In some optional implementations of this embodiment, the executing entity may further obtain, as the target service package, a service package matching the service identifier by:
In response to determining that there is no service package in the set of service packages that matches the service identifier, the first step performs the following service package update steps:
s1, acquiring an instance list matched with a service identifier in a production environment.
In these implementations, the executing entity may obtain the list of instances in the production environment that match the service identification in various ways. Wherein, the instance list may include information of instances of the service in the production environment indicated by the service identifier. The information of the above instance may include an instance name. Optionally, a version number corresponding to the instance may also be included. As an example, the executing entity may obtain the instance list from a communicatively connected electronic device (e.g., a database server). As yet another example, the executing body may obtain the instance list locally.
S2, according to the service instance execution sequence in the deployment iteration scene indicated by the instance list, selecting the service instance from the instance list as a data source instance of the service package.
In these implementations, according to the service instance execution sequence in the deployment iteration scenario indicated by the instance list, the execution body may select a service instance from the instance list obtained in step S1 as a data source instance of the service package. In practice, the service instance execution order in the deployment iteration scenario is generally consistent with the arrangement order of the information of the instances in the above-mentioned instance list. Thus, the executing body may select the service instance indicated by the information of the first instance in the instance list as the data source instance of the service package.
Based on the above-mentioned alternative implementation manner, by taking the service instance in which the deployment iteration is being executed as the data source instance, the production environment after the latest deployment iteration is executed can be obtained when the service deployment change of the production environment is triggered.
S3, packaging the data source instance of the service program package into a data source instance program package, and storing the data source instance into a service program package set.
In these implementations, the execution body may package the code, the production environment, and the like corresponding to the data source instance selected in the step S2, so as to generate a data source instance package. Then, the execution body may store the generated data source instance package into the preset service package set.
And a second step of responding to the data source instance package to store in the service package set, and acquiring the data source instance package from the service package set as a target service package.
In these implementations, the executing entity may obtain a data source instance package from the updated service package set in step S3, and determine the data source instance package as the target service package.
Step 203 determines whether the target service package is consistent with the target service instance.
In this embodiment, the executing entity may determine whether the target service package acquired in step 202 is consistent with the target service instance in various manners. The target service may include a service instance in which the service to be expanded is in the production environment at the current time. As an example, based on the version number corresponding to the service package, the execution body may determine whether the version number corresponding to the target service package is identical to the version number corresponding to the service package of the target service instance. In a deployment iteration scenario, the target service instance may generally be a service instance corresponding to a version that is performing a deployment iteration task.
In some optional implementations of this embodiment, based on the service component file set in the service package, the executing entity may determine whether the target service package is consistent with the target service instance according to the following steps:
and selecting a target number of service component files from the service component file sets in the target service program package to generate a file set to be verified.
In these implementations, the execution body may select the target number of service component files from the set of service component files in the target service package by various methods. The target number may be any number preset according to the actual application requirement. The target number may also be a rule-dependent number, such as the number of files belonging to a specified category. The files of the above specified category may be, for example, non-log-type files. And then, the execution body can form the selected at least one service component file into the file set to be verified.
Optionally, the executing body may further generate the file set to be verified by:
s1, acquiring file verification information indicating a verification file range.
Based on the alternative implementation manner, the executing body may obtain the file verification information indicating the verification file range in various manners. As an example, the execution subject may acquire the file authentication information from a terminal that transmits service expansion information. As yet another example, the execution subject may also obtain the file verification information stored in advance from the local. The file verification information may be information indicating a file that needs to be verified, or information indicating a file that does not need to be verified.
S2, selecting a service component file from the service component file set in the target service program package according to the file verification information, and generating a file set to be verified.
Based on the above optional implementation manner, the executing body may select a service component file from the service component file set in the target service package according to the file verification information obtained in the step S1, and generate a file set to be verified. Specifically, the executing body may select a file to be verified indicated by the file verification information, and form the selected at least one service component file into the file set to be verified.
And secondly, determining whether the files in the file set to be verified are consistent with the component files corresponding to the target service instance.
In these implementations, the execution body may determine whether the files in the file set to be verified are consistent with the component files corresponding to the target service instance by using various methods for verifying file consistency. Wherein the above parties may include, but are not limited to, at least one of md5 (MESSAGE DIGEST Algorithm, 5 th edition of the information digest Algorithm), SHA1 (Secure Hash Algorithm ), CRC32 (Cyclic Redundancy Check, cyclic redundancy code).
In these implementations, the execution body may determine whether each file in the set of files to be verified is consistent with the component file corresponding to the target service instance. Alternatively, the executing body may stop determining whether other files in the file set to be verified are consistent when determining that there are inconsistent files.
Based on the above alternative implementation manner, by directly comparing the consistency of the files, whether the service instance (or the service component corresponding to the component file) in the production environment is iterated can still be accurately determined under the deployment iteration scene (such as the scene of using the same version number to package the iteration version) without changing the version number.
In step 204, in response to determining that the target service package is consistent with the target service instance, a capacity expansion instance for the service to be expanded is generated based on the target service package.
In this embodiment, in response to determining that the target service package is consistent with the target service instance, the execution subject may install the target service package to a preset initial capacity expansion instance. The initial capacity expansion example may include an execution basic environment in which the service program indicated by the target service package can run. Optionally, the executing body may also execute the installation verification logic before installation, so as to improve security.
In some optional implementations of this embodiment, in response to determining that the target service package is inconsistent with the target service instance, the executing entity may further delete the data source instance package from the set of service packages and continue to execute the service package update step. Optionally, the executing body may further continue to execute the subsequent steps of the method for service expansion. Therefore, the data source instance of the expansion instance can be updated after the service instance serving as the data source instance is deployed and changed in the production environment. Thereby ensuring the consistency of the capacity expansion instance and the service instance of the production environment.
In some optional implementations of this embodiment, the foregoing execution body may further generate a capacity expansion instance of the service to be expanded by:
The first step is to obtain an instance list matched with the service identifier at the current moment in the production environment as a target instance list.
In these implementations, the executing entity may obtain, as the target instance list, a list of instances matching the service identifier in the production environment at the current time. The instance list may characterize an execution sequence of deployment iterations of the service to be expanded in the production environment at the current time. Thus, the list of target instances at this point may be the same as or different from the list of instances obtained in the alternative implementation of step 202.
And secondly, generating a capacity expansion example of the service to be expanded based on the target service program package and the initial capacity expansion example in response to determining that the service example matched with the target service exists in the target example list.
In these implementations, in response to determining that there is a service instance matching the target service in the target instance list, the method for generating the capacity expansion instance of the service to be expanded may be consistent with the description of step 204, which is not repeated herein.
Optionally, the execution body may further delete the data source instance package from the service package set in response to determining that there are no instances in the target instance list that match the target service, and continue to perform the service package update step. Optionally, the executing body may further continue to execute the steps after the service package updating step in the method for service expansion. Thus, the consistency of the capacity expansion instance and the service instance of the production environment can be still maintained when the service instance as the data source instance no longer participates in the deployment iteration of the service component of the production environment from the moment before.
In some optional implementations of this embodiment, in response to generating the capacity expansion instance, the execution body may further issue the capacity expansion instance to a production environment. Thereby realizing the release of the capacity expansion instance. Based on the above alternative implementation, the information of the capacity expansion instance may be presented at a console (console) of the user terminal when a deployment iteration occurs for a service in the production environment. Thus, the capacity expansion example can be changed together with other examples in the production environment, and version differences are not generated any more.
With continued reference to fig. 3, fig. 3 is a schematic diagram of an application scenario of a method for service expansion according to an embodiment of the present disclosure. In the application scenario of fig. 3, a user 301 sends service expansion information 305 characterizing "add 1 service aa instance" to a server 303 via a terminal device 302. Examples 3041, 3042 are examples of service aa running in a production environment. After receiving the service extension information 305, the server 303 may obtain a "service aa v1.0" package 306 from the file distribution tool. The server 303 may then determine 307 whether the "service aa v1.0" package 306 is consistent with instance 3041. Then, in response to determining agreement, server 303 may generate instance 3043, as shown in step 308. Optionally, the server 303 may also publish the generated instance 3042 to the production environment described above.
Currently, one of the existing technologies generally generates a capacity expansion instance according to a service instance in a current production environment identified by an automatic program, so that the generated capacity expansion instance cannot be guaranteed to be consistent with a version of the production environment at the moment in case of continuing to perform service deployment iteration after initiating a capacity expansion task. The method provided by the embodiment of the present disclosure ensures that the data source instance for generating the capacity expansion instance is the latest version in the production environment by determining whether the service package consistent with the current service instance exists in the preset service package set. Moreover, by taking the consistency of the target service program package and the target service instance as the premise of generating the capacity expansion instance, the priority of ensuring the deployment of the iterative task is realized, and the delivery quality of 'delivery is available' of the capacity expansion instance is ensured.
It should be noted that, since the deployment iteration of the production environment is often in units of service clusters, all the instances in the production environment need to complete the deployment of the new version, which cannot be completed, and only one deployment iteration task is considered to be completed. The capacity expansion task is usually performed by taking one instance as a unit, and only one instance is required to execute all service components in the service to complete the capacity expansion task. Therefore, compared with the locked scheme of mutually exclusive deployment iteration tasks and capacity expansion tasks and the scheme of preferentially executing the capacity expansion tasks, the method provided by the embodiment of the disclosure can realize optimization of deployment iteration considering overall efficiency by preferentially guaranteeing the completion of deployment iteration tasks which are difficult to satisfy.
With further reference to fig. 4, a flow 400 of yet another embodiment of a method for service expansion is shown. The process 400 of the method for service expansion includes the steps of:
step 401, receiving service expansion information.
Step 402, based on a preset service package set, obtaining a service package matched with the service identifier as a target service package.
Step 403 determines whether the target service package is consistent with the target service instance.
In step 404, in response to determining to be consistent, a capacity expansion instance of the service to be expanded is generated based on the target service package.
In response to generating the capacity expansion instance, the capacity expansion instance is published to the production environment, step 405.
The steps 401, 402, 403, 404, and 405 are respectively consistent with the steps 201, 202, 203, and 204 and the optional implementation manners thereof in the foregoing embodiments, and the descriptions of the steps 201, 202, 203, and 204 and the optional implementation manners thereof are also applicable to the steps 401, 402, 403, 404, and 405, which are not repeated herein.
Step 406, determining whether the capacity expansion instance in the production environment is consistent with the target service instance.
In the present embodiment, the execution subject of the method for service expansion (such as the server 105 shown in fig. 1) may determine whether the expansion instance in the production environment coincides with the target service instance according to a method similar to step 403 in the foregoing embodiment. As an example, the execution body may traverse the service component list corresponding to the capacity expansion instance, and determine whether each service component file is consistent with the corresponding service component file in the target service instance.
In response to determining that the dilatation instance in the production environment is consistent with the target service instance, a determination is made as to whether a service instance matching the target service exists in the target instance list 407.
In this embodiment, in response to determining that the dilatation instance in the production environment is consistent with the target service instance, the execution body may determine whether there is a service instance matching the target service in the target instance list. The method for determining whether the service instances match may refer to step 202 and optional implementation manners in the foregoing embodiment, which are not described herein.
It should be noted that the current time corresponding to the target instance list is different from the time in the alternative implementation of step 204 in the foregoing embodiment. Thus, it may be further determined whether a deployment iteration of the service component occurs between the two moments.
In response to determining that there is a service instance in the list of target instances that matches the target service, an automated test program is run and test results are generated, step 408.
In this implementation, in response to determining that there is a service instance in the target instance list in step 407 that matches the target service, the execution body may determine that the source instance of the generated expanded instance is still participating in the deployment iteration of the service component in the production environment. The execution body may then test the generated flash instance using various automated test procedures and generate test results.
In some alternative implementations of the present embodiment, in response to determining that there are no service instances in the list of target instances in step 407 that match the target service, the executing entity may delete the data source instance package from the set of service packages and continue to execute the service package update step. Optionally, the executing body may further continue to execute the steps after the service package updating step in the method for service expansion. Thus, the consistency of the capacity expansion instance and the service instance of the production environment can be still maintained when the service instance as the data source instance no longer participates in the deployment iteration of the service component of the production environment from the moment before.
And 409, sending information representing whether the service capacity expansion is completed or not according to the test result.
In this embodiment, according to whether the test indicated by the test result passes or not, the execution body may send feedback information consistent with the test result to the target terminal. The feedback information may be used to characterize whether the service expansion is completed. The target terminal may be any terminal specified in advance, for example, a display device communicatively connected to the execution subject. The target terminal may be a terminal according to a rule, for example, a terminal that transmits the service expansion information. Thus, the completion result of the service expansion can be fed back to the terminal device.
As can be seen from fig. 4, compared with the embodiment corresponding to fig. 2, the flow 400 of the method for service expansion in this embodiment represents a step of further testing an expansion instance in a production environment, and a step of transmitting information according to the test result. Therefore, the solution described in this embodiment can check the dilatation instance issued to the production environment again, so that consistency of the dilatation instance and the target service instance can be determined in a scenario of deployment iteration of the data source instance of the production environment in a period from after deployment of part of service components in the dilatation instance is completed to before deployment of all the service components is completed, and the situation that the dilatation instance is completely consistent with the service version and the dependent environment of the production environment at the time of delivery is realized.
With further reference to fig. 5, as an implementation of the method shown in the foregoing figures, the present disclosure provides an embodiment of an apparatus for service expansion, which corresponds to the method embodiment shown in fig. 2, and which is particularly applicable to various electronic devices.
As shown in fig. 5, the apparatus 500 for service expansion provided in this embodiment includes a receiving unit 501, an obtaining unit 502, a first determining unit 503, and a generating unit 504. Wherein the receiving unit 501 is configured to receive service expansion information, wherein the service expansion information comprises a service identifier of a service to be expanded, the obtaining unit 502 is configured to obtain a service package matched with the service identifier as a target service package based on a preset service package set, wherein the service package in the preset service package set is generated based on a service instance of the service to be expanded in a production environment, the first determining unit 503 is configured to determine whether the target service package is consistent with the target service instance, wherein the target service instance comprises a service instance in which the service to be expanded is in the production environment at the current moment, and the generating unit 504 is configured to generate an expanded instance of the service to be expanded based on the target service package in response to determining that the target service package is consistent with the target service instance.
In this embodiment, the specific processes of the receiving unit 501, the obtaining unit 502, the first determining unit 503 and the generating unit 504 in the apparatus 500 for service expansion and the technical effects thereof may refer to the relevant descriptions of the steps 201, 202, 203 and 204 in the corresponding embodiment of fig. 2, and are not repeated here.
In some alternative implementations of the present embodiment, the acquiring unit 502 may include an updating module (not shown in the figure) and a first acquiring module (not shown in the figure). The updating module can be configured to execute the following service package updating steps in response to determining that the service package matched with the service identifier does not exist in the service package set, wherein the service package updating steps comprise the steps of obtaining an instance list matched with the service identifier in a production environment, selecting a service instance from the instance list as a data source instance of the service package according to the service instance execution sequence in a deployment iteration scene indicated by the instance list, packaging the data source instance of the service package into a data source instance package, and storing the data source instance of the service package into the service package set. The first obtaining module may be configured to obtain the data source instance package from the service package set as the target service package in response to the data source instance package being stored in the service package set.
In some alternative implementations of the present embodiment, the service package may correspond to a version number. The first determining unit 503 may include a first determining module (not shown in the figure) configured to determine whether a version number corresponding to the target service package matches a version number corresponding to the service package of the target service instance.
In some alternative implementations of the present embodiment, a set of service component files may be included in the service package. The first determining unit 503 may further include a first generating module (not shown in the figure) and a second determining module (not shown in the figure). The first generating module may be configured to select a target number of service component files from the service component file sets in the target service package, and generate a file set to be verified. The second determining module may be configured to determine whether a file in the file set to be verified is consistent with a component file corresponding to the target service instance.
In some optional implementations of this embodiment, the first generating module may include an acquiring sub-module (not shown in the figure) and a generating sub-module (not shown in the figure). Wherein, the above-mentioned acquisition sub-module may be configured to acquire the file verification information indicating the verification file range. The generating submodule may be configured to select a service component file from the service component file set in the target service program package according to the file verification information, and generate a file set to be verified.
In some optional implementations of this embodiment, the apparatus 500 for service expansion may further include a first updating unit (not shown in the figure) configured to delete the data source instance package from the service package set in response to determining that the target service package is inconsistent with the target service instance, and continue to perform the service package updating step.
In some optional implementations of this embodiment, the generating unit 504 may include a second obtaining module (not shown in the figure) and a second generating module (not shown in the figure). The second obtaining module may be configured to obtain, as the target instance list, an instance list matching with the service identifier in the production environment at the current time. The second generating module may be configured to generate a capacity expansion instance of the service to be expanded based on the target service package and the initial capacity expansion instance in response to determining that there is a service instance matching the target service in the target instance list.
In some optional implementations of this embodiment, the apparatus 500 for service expansion may further include a second updating unit (not shown in the figure) configured to delete the data source instance package from the service package set in response to determining that there is no instance in the target instance list that matches the target service, and continue to perform the service package updating step.
In some optional implementations of the present embodiment, the apparatus 500 for service expansion may further include a publishing unit (not shown in the figure) configured to publish the expansion instance to the production environment in response to generating the expansion instance.
In some optional implementations of this embodiment, the apparatus 500 for service expansion may further include a second determining unit (not shown in the figure), a third determining unit (not shown in the figure), a testing unit (not shown in the figure), and a sending unit (not shown in the figure). Wherein the second determining unit may be configured to determine whether the capacity expansion instance in the production environment is consistent with the target service instance. The third determining unit may be configured to determine whether a service instance matching the target service exists in the target instance list in response to determining that the capacity expanded instance in the production environment matches the target service instance. The test unit may be configured to run an automated test program and generate test results in response to determining that there are service instances in the list of target instances that match the target service. The sending unit may be configured to send information indicating whether the service expansion is completed according to the test result.
The apparatus provided in the above embodiment of the present disclosure receives service expansion information through the receiving unit 501. The service expansion information comprises a service identifier of the service to be expanded. Then, based on the preset service package set, the acquiring unit 502 acquires the service package matched with the service identifier as the target service package. The service packages in the preset service package set are generated based on service instances of the service to be expanded in the production environment. Thereafter, the first determination unit 503 determines whether the target service package is consistent with the target service instance. The target service instance comprises a service instance in which the service to be expanded is in the production environment at the current moment. In response to determining that the target service package is consistent with the target service instance, the generating unit 504 generates a capacity expansion instance of the service to be expanded based on the target service package. Thereby realizing the consistent delivery of the expansion instance and the production environment instance.
Referring now to fig. 6, a schematic diagram of an electronic device (e.g., server in fig. 1) 600 suitable for use in implementing embodiments of the present disclosure is shown. The server illustrated in fig. 6 is merely an example, and should not be construed as limiting the functionality and scope of use of the embodiments of the present disclosure in any way.
As shown in fig. 6, the electronic device 600 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 601, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
In general, devices may be connected to I/O interface 605 including input devices 606, including for example, touch screens, touch pads, keyboards, mice, etc., output devices 607, including for example, liquid Crystal Displays (LCDs), speakers, vibrators, etc., storage devices 608, including for example, magnetic tape, hard disks, etc., and communication devices 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 6 shows an electronic device 600 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead. Each block shown in fig. 6 may represent one device or a plurality of devices as needed.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via communication means 609, or from storage means 608, or from ROM 602. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing means 601.
It should be noted that, the computer readable medium according to the embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of a computer-readable storage medium may include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In an embodiment of the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. Whereas in embodiments of the present disclosure, the computer-readable signal medium may comprise a data signal propagated in baseband or as part of a carrier wave, with computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to electrical wiring, fiber optic cable, RF (Radio Frequency) and the like, or any suitable combination of the foregoing.
The computer readable medium may be contained in the server or may exist alone without being incorporated in the server. The computer readable medium carries one or more programs, which when executed by the server, cause the server to receive service expansion information, wherein the service expansion information includes a service identifier of a service to be expanded, acquire a service package matching the service identifier as a target service package based on a preset service package set, wherein the service package in the preset service package set is generated based on a service instance of the service to be expanded in a production environment, determine whether the target service package is consistent with the target service instance, wherein the target service instance includes a service instance of the service to be expanded in the production environment at a current moment, and generate an expanded instance of the service to be expanded based on the target service package in response to determining that the target service package is consistent with the target service instance
Computer program code for carrying out operations of embodiments of the present disclosure may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments described in the present disclosure may be implemented by means of software, or may be implemented by means of hardware. The described units may also be provided in a processor, for example as a processor comprising a receiving unit, an obtaining unit, a determining unit, a generating unit. The names of these units do not in any way constitute a limitation of the unit itself, for example, the receiving unit may also be described as "a unit receiving service expansion information, wherein the service expansion information includes a service identifier of the service to be expanded".
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by those skilled in the art that the scope of the invention in the embodiments of the present disclosure is not limited to the specific combination of the above technical features, but encompasses other technical features formed by any combination of the above technical features or their equivalents without departing from the spirit of the invention. Such as the above-described features, are mutually substituted with (but not limited to) the features having similar functions disclosed in the embodiments of the present disclosure.

Claims (18)

Translated fromChinese
1.一种用于服务扩容的方法,包括:1. A method for service expansion, comprising:接收服务扩容信息,其中,所述服务扩容信息中包括待扩容服务的服务标识;Receiving service expansion information, wherein the service expansion information includes a service identifier of the service to be expanded;响应于确定服务程序包集合中不存在与所述服务标识匹配的服务程序包,执行如下服务程序包更新步骤:获取生产环境中、与所述服务标识匹配的实例列表;根据所述实例列表所指示的部署迭代场景下的服务实例执行顺序,从所述实例列表中选取服务实例作为服务程序包的数据源实例;将所述服务程序包的数据源实例打包成数据源实例程序包,存入所述服务程序包集合;从所述服务程序包集合中获取所述数据源实例程序包作为目标服务程序包,其中,预设的服务程序包集合中的服务程序包基于所述待扩容服务在生产环境中的服务实例而生成;In response to determining that there is no service package matching the service identifier in the service package set, the following service package update steps are performed: obtaining an instance list matching the service identifier in the production environment; selecting a service instance from the instance list as a data source instance of a service package according to the execution order of the service instances in the deployment iteration scenario indicated by the instance list; packaging the data source instance of the service package into a data source instance package, and storing it in the service package set; obtaining the data source instance package from the service package set as a target service package, wherein the service packages in the preset service package set are generated based on the service instances of the service to be expanded in the production environment;确定所述目标服务程序包与目标服务实例是否一致,其中,所述目标服务实例包括所述待扩容服务在当前时刻处于所述生产环境中的服务实例;Determine whether the target service package is consistent with a target service instance, wherein the target service instance includes a service instance of the service to be expanded that is currently in the production environment;响应于确定所述目标服务程序包与所述目标服务实例一致,基于所述目标服务程序包,生成所述待扩容服务的扩容实例;In response to determining that the target service package is consistent with the target service instance, generating an expanded instance of the service to be expanded based on the target service package;响应于确定所述目标服务程序包与所述目标服务实例不一致,从所述服务程序包集合中删除所述数据源实例程序包;以及继续执行所述服务程序包更新步骤。In response to determining that the target service package is inconsistent with the target service instance, deleting the data source instance package from the service package set; and continuing to execute the service package update step.2.根据权利要求1所述的方法,其中,服务程序包对应有版本号;以及2. The method according to claim 1, wherein the service package corresponds to a version number; and所述确定所述目标服务程序包与目标服务实例是否一致,包括:The determining whether the target service package is consistent with the target service instance includes:确定所述目标服务程序包对应的版本号与所述目标服务实例的服务程序包对应的版本号是否一致。Determine whether the version number corresponding to the target service package is consistent with the version number corresponding to the service package of the target service instance.3.根据权利要求1所述的方法,其中,服务程序包中包括服务组件文件集合;以及3. The method according to claim 1, wherein the service package includes a service component file set; and所述确定所述目标服务程序包与目标服务实例是否一致,包括:The determining whether the target service package is consistent with the target service instance includes:从所述目标服务程序包中的服务组件文件集合中选取目标数目个服务组件文件,生成待验证文件集合;Selecting a target number of service component files from the service component file set in the target service program package to generate a file set to be verified;确定所述待验证文件集合中的文件与所述目标服务实例对应的组件文件是否一致。Determine whether the files in the to-be-verified file set are consistent with the component files corresponding to the target service instance.4.根据权利要求3所述的方法,其中,所述生成待验证文件集合,包括:4. The method according to claim 3, wherein generating a set of files to be verified comprises:获取指示验证文件范围的文件验证信息;Obtaining document verification information indicating a scope of the document to be verified;根据所述文件验证信息,从所述目标服务程序包中的服务组件文件集合中选取服务组件文件,生成所述待验证文件集合。According to the file verification information, a service component file is selected from the service component file set in the target service program package to generate the file set to be verified.5.根据权利要求1所述的方法,其中,所述基于所述目标服务程序包,生成所述待扩容服务的扩容实例,包括:5. The method according to claim 1, wherein generating the expansion instance of the service to be expanded based on the target service package comprises:获取当前时刻、所述生产环境中、与所述服务标识匹配的实例列表作为目标实例列表;Obtaining a list of instances matching the service identifier in the production environment at the current moment as a target instance list;响应于确定所述目标实例列表中存在与所述目标服务匹配的服务实例,基于所述目标服务程序包和初始扩容实例,生成所述待扩容服务的扩容实例。In response to determining that there is a service instance matching the target service in the target instance list, an expanded instance of the service to be expanded is generated based on the target service program package and the initial expanded instance.6.根据权利要求5所述的方法,其中,所述方法还包括:6. The method according to claim 5, wherein the method further comprises:响应于确定所述目标实例列表中不存在与所述目标服务匹配的实例,从所述服务程序包集合中删除所述数据源实例程序包;以及继续执行所述服务程序包更新步骤。In response to determining that there is no instance matching the target service in the target instance list, deleting the data source instance package from the service package set; and continuing to execute the service package update step.7.根据权利要求6所述的方法,其中,所述方法还包括:7. The method according to claim 6, wherein the method further comprises:响应于生成所述扩容实例,将所述扩容实例发布至所述生产环境。In response to generating the capacity expansion instance, the capacity expansion instance is released to the production environment.8.根据权利要求7所述的方法,其中,所述方法还包括:8. The method according to claim 7, wherein the method further comprises:确定所述生产环境中的所述扩容实例与所述目标服务实例是否一致;Determining whether the expansion instance in the production environment is consistent with the target service instance;响应于确定所述生产环境中的所述扩容实例与所述目标服务实例一致,确定所述目标实例列表中是否存在与所述目标服务匹配的服务实例;In response to determining that the expanded instance in the production environment is consistent with the target service instance, determining whether there is a service instance matching the target service in the target instance list;响应于确定所述目标实例列表中存在与所述目标服务匹配的服务实例,运行自动化测试程序,以及生成测试结果;In response to determining that there is a service instance matching the target service in the target instance list, running an automated testing program and generating a test result;根据所述测试结果,发送表征所述服务扩容是否完成的信息。According to the test result, information indicating whether the service expansion is completed is sent.9.一种用于服务扩容的装置,包括:9. A device for service expansion, comprising:接收单元,被配置成接收服务扩容信息,其中,所述服务扩容信息中包括待扩容服务的服务标识;A receiving unit, configured to receive service expansion information, wherein the service expansion information includes a service identifier of a service to be expanded;获取单元,被配置成响应于确定服务程序包集合中不存在与所述服务标识匹配的服务程序包,执行如下服务程序包更新步骤:获取生产环境中、与所述服务标识匹配的实例列表;根据所述实例列表所指示的部署迭代场景下的服务实例执行顺序,从所述实例列表中选取服务实例作为服务程序包的数据源实例;将所述服务程序包的数据源实例打包成数据源实例程序包,存入所述服务程序包集合;从所述服务程序包集合中获取所述数据源实例程序包作为目标服务程序包,其中,预设的服务程序包集合中的服务程序包基于所述待扩容服务在生产环境中的服务实例而生成;The acquisition unit is configured to, in response to determining that there is no service package matching the service identifier in the service package set, perform the following service package update steps: acquire an instance list matching the service identifier in the production environment; select a service instance from the instance list as a data source instance of the service package according to the execution order of the service instances in the deployment iteration scenario indicated by the instance list; package the data source instance of the service package into a data source instance package, and store it in the service package set; acquire the data source instance package from the service package set as a target service package, wherein the service packages in the preset service package set are generated based on the service instances of the service to be expanded in the production environment;第一确定单元,被配置成确定所述目标服务程序包与目标服务实例是否一致,其中,所述目标服务实例包括所述待扩容服务在当前时刻处于所述生产环境中的服务实例;A first determining unit is configured to determine whether the target service package is consistent with a target service instance, wherein the target service instance includes a service instance of the service to be expanded that is currently in the production environment;生成单元,被配置成响应于确定所述目标服务程序包与所述目标服务实例一致,基于所述目标服务程序包,生成所述待扩容服务的扩容实例;a generating unit, configured to generate, in response to determining that the target service package is consistent with the target service instance, an expanded instance of the service to be expanded based on the target service package;第一更新单元,被配置成响应于确定所述目标服务程序包与所述目标服务实例不一致,从所述服务程序包集合中删除所述数据源实例程序包;以及继续执行所述服务程序包更新步骤。The first updating unit is configured to, in response to determining that the target service package is inconsistent with the target service instance, delete the data source instance package from the service package set; and continue to execute the service package updating step.10.根据权利要求9所述的装置,其中,服务程序包对应有版本号;所述第一确定单元包括:10. The device according to claim 9, wherein the service package corresponds to a version number; and the first determining unit comprises:第一确定模块,被配置成确定所述目标服务程序包对应的版本号与所述目标服务实例的服务程序包对应的版本号是否一致。The first determination module is configured to determine whether a version number corresponding to the target service package is consistent with a version number corresponding to the service package of the target service instance.11.根据权利要求9所述的装置,其中,服务程序包中包括服务组件文件集合;所述第一确定单元还包括:11. The device according to claim 9, wherein the service package includes a service component file set; and the first determining unit further includes:第一生成模块,被配置成从所述目标服务程序包中的服务组件文件集合中选取目标数目个服务组件文件,生成待验证文件集合;A first generating module is configured to select a target number of service component files from the service component file set in the target service program package to generate a set of files to be verified;第二确定模块,被配置成确定所述待验证文件集合中的文件与所述目标服务实例对应的组件文件是否一致。The second determination module is configured to determine whether the files in the to-be-verified file set are consistent with the component files corresponding to the target service instance.12.根据权利要求11所述的装置,其中,所述第一生成模块包括:12. The apparatus according to claim 11, wherein the first generating module comprises:获取子模块,被配置成获取指示验证文件范围的文件验证信息;an acquisition submodule configured to acquire file verification information indicating a verification file range;生成子模块,被配置成根据所述文件验证信息,从所述目标服务程序包中的服务组件文件集合中选取服务组件文件,生成所述待验证文件集合。The generating submodule is configured to select a service component file from the service component file set in the target service program package according to the file verification information to generate the set of files to be verified.13.根据权利要求9所述的装置,其中,所述生成单元包括:13. The apparatus according to claim 9, wherein the generating unit comprises:第二获取模块,被配置成获取当前时刻、所述生产环境中、与所述服务标识匹配的实例列表作为目标实例列表;A second acquisition module is configured to acquire a list of instances matching the service identifier in the production environment at a current moment as a target instance list;第二生成模块,被配置成响应于确定所述目标实例列表中存在与所述目标服务匹配的服务实例,基于所述目标服务程序包和初始扩容实例,生成所述待扩容服务的扩容实例。The second generating module is configured to generate an expanded instance of the service to be expanded based on the target service program package and the initial expanded instance in response to determining that there is a service instance matching the target service in the target instance list.14.根据权利要求13所述的装置,其中,所述装置还包括:14. The apparatus according to claim 13, wherein the apparatus further comprises:第二更新单元,被配置成响应于确定所述目标实例列表中不存在与所述目标服务匹配的实例,从所述服务程序包集合中删除所述数据源实例程序包;以及继续执行所述服务程序包更新步骤。The second updating unit is configured to delete the data source instance package from the service package set in response to determining that there is no instance matching the target service in the target instance list; and continue to execute the service package updating step.15.根据权利要求14所述的装置,其中,所述装置还包括:15. The apparatus according to claim 14, wherein the apparatus further comprises:发布单元,被配置成响应于生成所述扩容实例,将所述扩容实例发布至所述生产环境。The publishing unit is configured to publish the expanded instance to the production environment in response to generating the expanded instance.16.根据权利要求15所述的装置,其中,所述装置还包括:16. The apparatus according to claim 15, wherein the apparatus further comprises:第二确定单元,被配置成确定所述生产环境中的所述扩容实例与所述目标服务实例是否一致;A second determining unit is configured to determine whether the expansion instance in the production environment is consistent with the target service instance;第三确定单元,被配置成响应于确定所述生产环境中的所述扩容实例与所述目标服务实例一致,确定所述目标实例列表中是否存在与所述目标服务匹配的服务实例;A third determining unit is configured to determine whether there is a service instance matching the target service in the target instance list in response to determining that the expansion instance in the production environment is consistent with the target service instance;测试单元,被配置成响应于确定所述目标实例列表中存在与所述目标服务匹配的服务实例,运行自动化测试程序,以及生成测试结果;a testing unit configured to, in response to determining that there is a service instance matching the target service in the target instance list, run an automated testing program and generate a test result;发送单元,被配置成根据所述测试结果,发送表征所述服务扩容是否完成的信息。The sending unit is configured to send information indicating whether the service expansion is completed according to the test result.17.一种服务器,包括:17. A server, comprising:一个或多个处理器;one or more processors;存储装置,其上存储有一个或多个程序;a storage device having one or more programs stored thereon;当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-8中任一所述的方法。When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 8.18.一种计算机可读介质,其上存储有计算机程序,其中,该程序被处理器执行时实现如权利要求1-8中任一所述的方法。18. A computer readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
CN201910708555.4A2019-08-012019-08-01 Method and device for service expansionActiveCN110442349B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201910708555.4ACN110442349B (en)2019-08-012019-08-01 Method and device for service expansion

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201910708555.4ACN110442349B (en)2019-08-012019-08-01 Method and device for service expansion

Publications (2)

Publication NumberPublication Date
CN110442349A CN110442349A (en)2019-11-12
CN110442349Btrue CN110442349B (en)2025-04-01

Family

ID=68432796

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201910708555.4AActiveCN110442349B (en)2019-08-012019-08-01 Method and device for service expansion

Country Status (1)

CountryLink
CN (1)CN110442349B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN111538738B (en)*2020-04-272023-04-14咪咕文化科技有限公司 Service upgrade method, device, electronic device and storage medium
CN111625195B (en)*2020-05-262023-11-07北京百度网讯科技有限公司 Method and device for server expansion
CN111698326B (en)*2020-06-122023-01-31北京百度网讯科技有限公司 Method and device for determining cost attribution of cloud service resources
CN116032902A (en)*2022-12-232023-04-28北京方位通讯设备有限公司Method for realizing intercom broadcast expansion on android system VoIP phone

Citations (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN108628613A (en)*2018-05-022018-10-09山东汇贸电子口岸有限公司The implementation method of the stateful service of container cluster based on domestic CPU and OS
CN109495306A (en)*2018-11-272019-03-19平安科技(深圳)有限公司A kind of expansion method and equipment of business network

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN105681060B (en)*2014-11-172020-01-31中兴通讯股份有限公司 A virtualized network function management and upgrading method, device and server
CN108023742B (en)*2016-10-312021-08-27阿里巴巴集团控股有限公司Application capacity expansion method, device and system
CN109783073B (en)*2017-11-132023-05-23中兴通讯股份有限公司Method and device for popup of application container, micro service and storage medium
CN109995552B (en)*2017-12-292021-09-03华为技术有限公司VNF service instantiation method and device
CN109660421A (en)*2018-10-262019-04-19平安科技(深圳)有限公司Method, apparatus, server and the storage medium of flexible scheduling resource

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN108628613A (en)*2018-05-022018-10-09山东汇贸电子口岸有限公司The implementation method of the stateful service of container cluster based on domestic CPU and OS
CN109495306A (en)*2018-11-272019-03-19平安科技(深圳)有限公司A kind of expansion method and equipment of business network

Also Published As

Publication numberPublication date
CN110442349A (en)2019-11-12

Similar Documents

PublicationPublication DateTitle
CN110442349B (en) Method and device for service expansion
US20220261804A1 (en)Deploying a cloud-based system using a distributed ledger
CN109522363B (en)Cloud platform synchronization method, system, equipment and storage medium based on block chain
US20180307472A1 (en)Simultaneous deployment on cloud devices and on on-premise devices
CN110535659B (en)Method, apparatus, electronic device and computer readable medium for processing data request
CN108337303A (en)A kind of method of data synchronization and distributed system
US9589153B2 (en)Securing integrity and consistency of a cloud storage service with efficient client operations
CN111708836B (en)Cluster management method, device and cluster system
CN112748962A (en)Application loading method and device, electronic equipment and computer readable medium
CN111338834B (en)Data storage method and device
CN109032620A (en)The configuration file generation method and device of application program
CN109814889B (en)Method and apparatus for updating source code base
US12210443B2 (en)Multi-client orchestrated automated testing platform
CN110019158A (en)A kind of method and apparatus of monitoring data quality
CN112579353A (en)Automatic operation and maintenance method and device and big data platform
CN113094211B (en)Backup data processing method and device
CN111209205B (en)Configuration method, configuration device and electronic equipment
CN111767221A (en) Interface testing method, apparatus, equipment and storage medium
CN111814131A (en)Method and device for equipment registration and configuration management
CN115996179B (en) Service node testing method, device, readable medium and electronic device
CN112463616B (en) A chaos testing method and device for Kubernetes container platform
CN112181975B (en) Method and apparatus for creating a database in a data warehouse
CN113626873B (en)Authentication method, device, electronic equipment and computer readable medium
CN115022053A (en) Method, apparatus and system for accessing a blockchain network
CN114428631A (en) Configuration file management method, apparatus, computer readable medium and electronic device

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