CN112527338A - Micro-service upgrading method, electronic equipment and readable storage medium - Google Patents

Micro-service upgrading method, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN112527338A
CN112527338A CN201910874959.0A CN201910874959A CN112527338A CN 112527338 A CN112527338 A CN 112527338A CN 201910874959 A CN201910874959 A CN 201910874959A CN 112527338 A CN112527338 A CN 112527338A
Authority
CN
China
Prior art keywords
micro
service
upgrading
version number
target version
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.)
Pending
Application number
CN201910874959.0A
Other languages
Chinese (zh)
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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201910874959.0A priority Critical patent/CN112527338A/en
Priority to PCT/CN2020/105877 priority patent/WO2021052026A1/en
Publication of CN112527338A publication Critical patent/CN112527338A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the invention relates to the field of cloud computing, and discloses a micro-service upgrading method, electronic equipment and a readable storage medium. The method for upgrading the micro-service comprises the following steps: identifying a development framework to which the micro service to be upgraded belongs; acquiring basic information for upgrading through an application programming interface corresponding to the identified development framework, wherein the basic information at least comprises a target version number; extracting an upgrading script packet according to the target version number; and executing the upgrading script packet to upgrade the micro service. According to the method and the system, the micro-service can be upgraded and managed conveniently, and the development difficulty of the micro-service upgrading management architecture is reduced.

Description

Micro-service upgrading method, electronic equipment and readable storage medium
Technical Field
The embodiment of the invention relates to the field of cloud computing, in particular to a micro-service upgrading method, electronic equipment and a readable storage medium.
Background
With the rise of cloud computing services, the original single architecture does not meet the requirements of more and more complex services, users are increased, and the application concurrency capability of more and more single architectures is very limited. Based on the deficiency of the single-body architecture system, a micro-Service architecture is proposed, such as a Platform as a Service (PaaS) cloud Platform based on container micro-Service.
The microservice architecture is to develop a single program into a microservice, each microservice running in its own process and communicating using a lightweight mechanism, usually the HTTP RESTFUL interface. These services are divided around business capabilities and deployed independently through automated deployment mechanisms. These services may use different programming languages, different databases, different development frameworks to ensure centralized management. Each micro service is independently deployed, mutually independent and mutually decoupled, has extremely strong transverse expansion capability, and can be deployed in a clustering manner in the face of a high-concurrency scene to strengthen the load capacity of the system.
However, due to the mutual independence of the micro-services, the database access layer of the micro-service platform has some problems in unified management, and especially when the micro-services need to be upgraded, the unified upgrade management is more difficult.
Disclosure of Invention
The embodiment of the invention aims to provide a micro-service upgrading method, electronic equipment and a readable storage medium, so that management micro-services can be upgraded conveniently, and the development difficulty of a micro-service upgrading management framework is reduced.
In order to solve the above technical problem, an embodiment of the present invention provides a method for upgrading a microservice, including: identifying a development framework to which the micro service to be upgraded belongs; acquiring basic information for upgrading through an application programming interface corresponding to the identified development framework, wherein the basic information at least comprises a target version number; extracting an upgrading script packet according to the target version number; and executing the upgrading script packet to upgrade the micro service.
The embodiment of the invention also provides a micro-service upgrading device, which comprises: the identification module is used for identifying a development framework to which the micro service to be upgraded belongs; the acquisition module is used for acquiring basic information for upgrading through an application programming interface corresponding to the identified development framework, wherein the basic information at least comprises a target version number; the extraction module is used for extracting the upgrading script package according to the target version number; and the execution module is used for executing the upgrading script package so as to upgrade the micro service.
An embodiment of the present invention 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 to enable the at least one processor to perform the microservice upgrade method as described above.
Embodiments of the present invention also provide a computer-readable storage medium storing a computer program, which when executed by a processor implements the microservice upgrade method as described above.
Compared with the prior art, the method and the system have the advantages that the basic information required by upgrading is obtained through the development framework of the butt joint micro-service, the existing condition that each micro-service on the service platform is upgraded and managed through developing other management micro-services is avoided, and the difficulty in achieving the butt joint of the development framework to which the micro-service belongs and calling of the information required by upgrading is far lower than the difficulty in achieving the development of the other micro-services, so that the upgrading scheme in the application can reduce the development difficulty of the framework required by upgrading management, and the development period is shortened. In addition, because the available development frameworks on different micro-service platforms are consistent, the micro-services from different micro-service platforms can be uniformly managed through the butting development framework, even if the micro-services to be upgraded come from different service platforms, the micro-services can be uniformly managed and upgraded, and therefore the micro-service upgrading method is universal to all the service platforms and has wider application scenes.
As a further improvement, the target version number is one of: the combination of a first target version number of the micro service, a second target version number of a platform to which the micro service belongs, and the first target version number and the second target version number. It can be seen that different target version numbers can be selected according to upgrading requirements, so that the upgrading scheme is more flexible and changeable.
As a further improvement, when the target version number is: when the first target version number and the second target version number are combined, the extracting the upgrading script package according to the target version number comprises the following steps: extracting the micro service script packet according to the first target version number, and extracting a platform general function script packet in a platform script packet according to the second target version number; and taking the micro service script package and the platform general function script package as the upgrading script package. According to the scheme, the platform universal function script package is stored in the platform script package, the platform universal function script package can be stored in the micro-service upgrading package without being repeated, the code amount of the micro-service upgrading script package is reduced, and the creation time of the upgrading script package is shortened.
As a further improvement, the executing the upgrade script package to upgrade the microservice specifically includes: and reporting information to the bus at a preset upgrading node. The scheme presets the upgrading nodes for reporting information, so that the upgrading process can be customized conveniently, and the realization of the upgrading process is enriched.
As a further improvement, after the executing the upgrade script package, the method includes: and reporting the upgrading result to a bus of a platform to which the micro service belongs. According to the scheme, the upgrade result is newly reported, so that the upgrade result of the micro-service can be conveniently known.
As a further improvement, after the executing the upgrade script package, the method includes: and when a certain micro service to be upgraded is not successfully upgraded, rolling back the micro service which is not successfully upgraded. According to the scheme, the micro service which is not upgraded successfully is automatically rolled back, so that the normal use of the micro service is ensured.
As a further improvement, the development framework to which the micro service to be upgraded belongs is identified according to a preset adaptation rule. The scheme identifies the development framework to which the micro-service belongs through the adaptation rule, so that the identification result is correct.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
One or more embodiments are illustrated by way of example in the accompanying drawings, which correspond to the figures in which like reference numerals refer to similar elements and which are not to scale unless otherwise specified.
FIG. 1 is a flowchart of a method for upgrading a microservice according to a first embodiment of the present invention;
FIG. 2 is a flowchart of a micro-service upgrade method according to a second embodiment of the present invention;
FIG. 3 is a flowchart of a method for upgrading a microservice according to a third embodiment of the present invention;
FIG. 4 is a schematic diagram of the architecture of a microservice upgrade system according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of a micro-service upgrade apparatus according to a fifth embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to a third embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, it will be appreciated by those of ordinary skill in the art that numerous technical details are set forth in order to provide a better understanding of the present application in various embodiments of the present invention. However, the technical solution claimed in the present application can be implemented without these technical details and various changes and modifications based on the following embodiments. The following embodiments are divided for convenience of description, and should not constitute any limitation to the specific implementation manner of the present invention, and the embodiments may be mutually incorporated and referred to without contradiction.
The first embodiment of the invention relates to a micro-service upgrading method. The flow is shown in fig. 1, and specifically comprises the following steps:
step 101, identifying a development framework to which the micro service to be upgraded belongs.
Specifically, one service platform may include multiple service development frameworks, such as zhongxing cloud and aristo cloud, and the development frameworks to which micro services belong are various, such as dropwizard, springboot, oscp, springclosed, and the like, and different development frameworks adopt different development languages.
Continuing to explain, the embodiment can identify the development framework to which the micro service to be upgraded belongs through the preset adaptation rule. The preset adaptation rule may be, for example, an identification sequence packet corresponding to a certain development framework, where the following is given as an example of one program packet:
Figure BDA0002204037850000071
therefore, the program packages corresponding to different development frames are identified, so that the identification result is accurate.
And 102, acquiring basic information for upgrading through an application programming interface corresponding to the identified development framework.
Specifically, an application programming interface, i.e., API. The APIs corresponding to each development framework are listed as follows: an API corresponding to a development framework dropwizard is a ServerLifecycleListener interface; an API corresponding to the development framework springboot is an applicationRunner interface; and the API corresponding to the development framework oscp is a MainServiceBase interface.
More specifically, after the development framework is identified, since the upgrading method in this embodiment interfaces with the API corresponding to the development framework, the microservice will pull up the upgrading function. For example, the following steps are carried out: the hk2 of the ServerLifecycleListener interface for the development framework dropwizard pulls up the upgrading function; an ApplicationRunner interface @ automatic wired annotation pull-up function for developing a framework springboot; the development framework oscp is implemented with the MainServiceBase interface direct new.
Continuing to explain, after identifying the development framework to which the micro service to be upgraded belongs in step 101, docking the micro service start interface in the development framework for different development frameworks, and acquiring basic information for upgrading, where the basic information at least includes: a target version number. In practical application, the basic information specifically includes: information of the micro-service and information of the platform to which the micro-service belongs (i.e. environment variables), including: database connection information, micro-service names and the like. Basic information acquisition is realized by butting the API, so that the database upgrading management system can be automatically loaded when the micro-service is started, and the injection of the upgrading management system in the application can be realized. It can be seen that the above process actually describes the process of injecting the environmental variables.
It should be further noted that, for convenience of management, each micro service to be upgraded may be named by unifying a name of the micro service in advance, for example, by using a "development framework-micro service name", and specifically, the micro service topology of the development framework oscp to which the micro service belongs may be named as "oscp-topology", so that the micro services from different micro service platforms are convenient for unified management.
And 103, extracting an upgrading script package according to the target version number.
Specifically, the target version number may be a first target version number of the micro service or a second target version number of the platform to which the micro service belongs, the first target version number may be information of the micro service acquired in step 102, and the second target version number may be information of the platform to which the micro service belongs in step 102. In practical application, which version number is selected for upgrading the micro-service version can be determined according to business needs. If three micro services to be upgraded, namely a, b and c, exist, a second target version number of a platform to which the micro service belongs is selected to obtain an upgrading script package, and if three micro services to be upgraded, namely 1, 2 and 3, are added subsequently, the three micro services can use a first target version number of the micro service to extract the upgrading script package. Because the version numbers are independent, different micro services can not influence each other even if different types of target version numbers are selected for upgrading.
And 104, executing the upgrading script package.
Specifically, when an upgrade script package of a certain micro service is extracted in step 103, the upgrade script package may be executed to upgrade the micro service.
Therefore, the basic information of the micro-services required by the upgrade is acquired through the development framework for the butt joint of the micro-services, the existing upgrade management of each micro-service on the service platform through the development of other management micro-services is avoided, and the realization difficulty of the butt joint of the development framework to which the micro-services belong and the calling of the information required by the upgrade is far lower than the realization difficulty of the development of other micro-services, so that the upgrade scheme in the application can reduce the development difficulty of the framework required by the upgrade management and shorten the development period. In addition, because the available development frameworks on different micro-service platforms are consistent, the micro-services from different micro-service platforms can be uniformly managed through the butting development framework, even if the micro-services to be upgraded come from different service platforms, the micro-services can be uniformly managed and upgraded, and therefore the micro-service upgrading method is universal to all the service platforms and has wider application scenes. Moreover, the upgrading method in the embodiment of the application can be called and executed by the micro-service, so that a user name and a password of the database do not need to be disclosed to the outside, and the safety is improved.
The second embodiment of the invention relates to a micro-service upgrading method. The second embodiment is substantially the same as the first embodiment, and mainly differs in that: in the first embodiment, the upgrade script packet is extracted according to the first target version number of the micro service or the second target version number of the platform to which the micro service belongs, and in the present embodiment, partial upgrade script packets are respectively extracted according to the first target version number and the second target version number, so that the code amount of the upgrade script packet of the micro service can be reduced as much as possible, and the creation time of the upgrade script packet can be shortened.
Specifically, the flow of the micro-service upgrading method in this embodiment is shown in fig. 2, which specifically includes the following steps:
step 201 and step 202 are similar to step 101 and step 102 in the first embodiment, and are not described again here.
And step 203, extracting the upgrading script package according to the target version number.
Specifically, in this embodiment, a table structure of a part of platform general functions may be placed in an upgrade script packet corresponding to a platform version number, such as performance, alarm, random ID generation, etc., and a table structure specific to a part of micro services may be placed in an upgrade packet file of the micro service itself, so that it can be found that a part of functions to be upgraded in the micro services are platform general functions, and thus a plurality of micro services need to upgrade these general functions, and each upgrade script packet corresponding to a micro service needs to include an upgrade script of this part of general functions, while in this embodiment, a script packet of this part of platform general functions is stored in an upgrade script packet corresponding to a platform version number, so that even if these general functions need to be upgraded in the micro service, a corresponding script packet can be extracted from the platform script packet, and the upgrade script of this part of functions does not need to repeatedly appear in the upgrade packet of the micro service itself, the code amount of the upgrading script package of the micro service is effectively reduced, and the establishing time of the upgrading script package is shortened. It can be found that the extraction paths of the two types of script packages are determined through the combination of the two target version numbers in the application, and the combination of the two types of paths is formed, so that the extraction of the upgrade package is more flexible and changeable.
Further, the target version number in this embodiment is a combination of the first target version number and the second target version number. For example, the following steps are carried out: if a micro service to be upgraded, named inv-basic, exists, the first target version number of the micro service is 16.19.v1, the second target version number of the platform to which the micro service belongs is 12.19.10.b11, the micro service version numbers can be spliced on the basis of the platform version numbers to form new target version numbers 12.19.10.b11-16.19.v1, and the new target version numbers can be seen to include both the first target version number and the second target version number.
When the upgrading script packet is extracted according to the target version number, the method specifically comprises the following steps:
step 2031, extracting the micro service script packet according to the first target version number.
Specifically, the upgrading script packet corresponding to the micro-service itself can be extracted according to the first target version number, and the part of the script packet can only include the upgrading script with the special function of the micro-service.
Step 2032, extracting the platform universal function script package from the platform script package according to the second target version number.
Specifically, a platform universal function script package can be extracted according to the second target version number, and the script package corresponds to the upgrading of the platform universal function.
Step 2033, the micro service script package and the platform general function script package confirm the upgrade script package.
Specifically, in this step, the micro service script packet extracted in step 2031 and the platform general function script packet extracted in step 2032 may be combined into an upgrade script packet.
In practical application, the target version number may be determined only according to the second target version number, and if only the universal function needs to be upgraded, the universal function script package may be obtained according to the second target version number and used as the upgrade script package. On the other hand, the target version number can be determined only according to the first target version number, and if only the universal function needs to be upgraded, the special function script package of the micro-service can be obtained according to the first target version number and used as the upgrade script package.
The specific execution process of extracting the upgrade script package according to the target version number in step 203 is specifically described in step 2031 to step 2033. In this embodiment, after the platform general function script packet is extracted, in practical applications, the platform general function script packet may be extracted before the micro service script packet is extracted, that is, the execution sequence of step 2031 and step 2032 is not limited herein.
Step 204 is similar to step 104 in the first embodiment, and is not described herein again.
As can be seen, in the embodiment, the platform target version number and the micro-service target version number are combined into a new target version number, so that two upgrade packages are respectively extracted according to two types of version numbers when the micro-service is upgraded. Therefore, the platform universal function script package can be stored in the platform script package, the platform universal function script package can not be repeatedly stored in the micro-service upgrading package, the code amount of the micro-service upgrading script package is favorably reduced, and the establishing time of the upgrading script package is shortened.
The third embodiment of the invention relates to a micro-service upgrading method. The third embodiment is a further improvement on the first embodiment, and the main improvement is that: in the third embodiment of the present invention, the upgrade node is preset, and a message body is returned to the preset upgrade node, so that the upgrade process can be inserted into the custom step, and the implementation process of the microservice upgrade is more flexible and changeable.
A flowchart of the micro-service upgrading method in this embodiment is shown in fig. 3, which specifically includes the following steps:
steps 301 and 302 are similar to steps 101 and 102 in the first embodiment, and are not described again here.
Step 303, register the observation action.
Specifically, the observation action registered in this embodiment is composed of a basic action and an extended action, and the currently basic execution action includes four upgrade nodes, an action before upgrade, an action after execution of the definition language, an action after execution of the data manipulation language, and an action after upgrade. The above four actions are the basic callback interfaces in the upgrading method in this embodiment, and a single micro service may or may not be directly implemented, that is, nothing is done. On the other hand, the extension action can be realized through the IServiceObserver interface in the embodiment, and then the self-defined upgrade node is registered in the observation queue to realize the registration of the extension action, so that the extension action can realize the self-defined observation action. The step fully releases the potential of the upgrading process and meets the functional requirements of complex micro-services.
Step 304 is similar to step 103 in the first embodiment, and is not described herein again.
Step 305, the upgrade script package is executed.
Specifically, in this embodiment, since the observation action is registered in advance, in the upgrade process in this step, information may be reported to the bus at a preset upgrade node, where the reported information may be a returned message body, specifically, a returned dbmsgneum message body, so as to realize observation of the upgrade process.
If the registered upgrading node comprises upgrading, after the upgrading script packet is executed, reporting the upgrading result to a bus of a platform to which the micro service belongs. According to the scheme, the upgrading result is reported, so that the upgrading result of the micro service can be conveniently known. Specifically, in the implementation process in the embodiment, the kafka message is sent to a message bus of the pass platform for summarizing, and the result is reflected on the user interface.
It should be noted that, if all the micro services to be upgraded are successfully upgraded, the next operation is performed, and if some micro service to be upgraded is not successfully upgraded, the micro service which is not successfully upgraded is subjected to rollback operation. Wherein, the rollback refers to the behavior of processing error of the program or data, and restoring the program or data to the last correct state, and the rollback includes the types of program rollback, data rollback and the like. According to the scheme, the micro service which is not upgraded successfully is automatically rolled back, so that the normal use of the micro service is ensured.
Therefore, the upgrade node for reporting the information is preset in the embodiment, so that the upgrade process can be customized conveniently, and the implementation of the upgrade process is enriched. And the upgrading result can be reported newly, so that the upgrading result of the micro-service can be conveniently known. Meanwhile, the micro-service which is not upgraded successfully is automatically rolled back, so that the normal use of the micro-service is ensured.
The micro-service upgrade method in the first to third embodiments may be implemented by a micro-service upgrade system as shown in fig. 4, where the method includes: an adaptation layer, a functional layer, and a database layer. The adaptation layer is used for interfacing micro services in the micro service cloud, specifically, the micro service cloud comprises micro services to be upgraded, and when the number of the micro services to be upgraded is multiple, the micro services to be upgraded can come from one micro service cloud platform or multiple micro service cloud platforms. The functional layer can be used for providing functions of version number analysis processing, registration of observation nodes and the like; the database layer is used for finding out the corresponding upgrading script package according to the target version number and processing the links of different types of databases.
Therefore, after the combination of the embodiments of the application, the micro-service upgrading method is compatible with various development languages and development frameworks of micro-services. After the dependence is added, different micro-service structures can be automatically identified, the upgrading script packet can be extracted in different modes, an observation interface of the upgrading process is provided in the whole upgrading process, and the intervention capacity of the upgrading process is provided. The upgrading system is irrelevant to what kind of database is used, is suitable for various cloud computing pass platforms, simplifies the maintenance process of the micro-service database, simplifies the management complexity of the cloud computing platform on the database access layer, and improves the development and use efficiency of service deployment.
A fourth embodiment of the present invention relates to a microservice upgrading apparatus, as shown in fig. 5, which specifically includes:
and the identification module is used for identifying the development framework to which the micro service to be upgraded belongs.
And the acquisition module is used for acquiring basic information for upgrading through the application programming interface corresponding to the identified development framework. Specifically, the basic information includes at least a target version number.
And the extraction module is used for extracting the upgrading script package according to the target version number.
And the execution module is used for executing the upgrading script package so as to upgrade the microservice.
In one example, the target version number is one of: the combination of a first target version number of the micro service, a second target version number of a platform to which the micro service belongs, and the first target version number and the second target version number.
In one example, when the target version number is: when the first target version number and the second target version number are combined, the extraction module specifically includes:
and the extraction submodule is used for extracting the micro service script packet according to the first target version number and extracting the platform general function script packet in the platform script packet according to the second target version number.
And the determining submodule is used for determining the upgrading script package by the micro service script package and the platform general function script package.
In one example, the execution module is specifically configured to report information to the bus at a preset upgrade node.
In one example, the micro-service upgrading device further comprises: and the reporting module is used for reporting the upgrading result to a bus of the platform to which the micro service belongs.
In one example, the micro-service upgrading device further comprises: and the rollback module is used for performing rollback operation on the micro service which is not successfully upgraded when a certain micro service to be upgraded is not successfully upgraded after the upgrading script packet is executed.
In one example, the identification module specifically identifies a development framework to which the micro service to be upgraded belongs according to a preset adaptation rule.
A fifth embodiment of the present invention relates to an electronic apparatus, as shown in fig. 6, including:
at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the micro-service upgrade method according to any one of the first to third embodiments.
Where the memory and processor are connected by a bus, the bus may comprise any number of interconnected buses and bridges, the buses connecting together one or more of the various circuits of the processor and the memory. The bus may also connect various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. A bus interface provides an interface between the bus and the transceiver. The transceiver may be one element or a plurality of elements, such as a plurality of receivers and transmitters, providing a means for communicating with various other apparatus over a transmission medium. The data processed by the processor is transmitted over a wireless medium via an antenna, which further receives the data and transmits the data to the processor.
The processor is responsible for managing the bus and general processing and may also provide various functions including timing, peripheral interfaces, voltage regulation, power management, and other control functions. And the memory may be used to store data used by the processor in performing operations.
A sixth embodiment of the present invention relates to a computer-readable storage medium storing a computer program. The computer program realizes the above-described method embodiments when executed by a processor.
It will be understood by those of ordinary skill in the art that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed by several physical components in cooperation. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as is well known to those of ordinary skill in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, Digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by a computer. In addition, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to those skilled in the art.
It will be understood by those of ordinary skill in the art that the foregoing embodiments are specific examples for carrying out the invention, and that various changes in form and details may be made therein without departing from the spirit and scope of the invention in practice.

Claims (10)

1. A method for microservice upgrade, comprising:
identifying a development framework to which the micro service to be upgraded belongs;
acquiring basic information for upgrading through an application programming interface corresponding to the identified development framework, wherein the basic information at least comprises a target version number;
extracting an upgrading script packet according to the target version number;
and executing the upgrading script packet to upgrade the micro service.
2. The microservice upgrade method according to claim 1, wherein the target version number is one of: the combination of a first target version number of the micro service, a second target version number of a platform to which the micro service belongs, and the first target version number and the second target version number.
3. The micro-service upgrade method according to claim 2, wherein when the target version number is: when the first target version number and the second target version number are combined, the extracting the upgrading script package according to the target version number comprises the following steps:
extracting the micro service script packet according to the first target version number, and extracting a platform general function script packet in a platform script packet according to the second target version number;
and confirming the upgrading script package by the micro service script package and the platform general function script package.
4. The microservice upgrade method according to claim 1, wherein the executing the upgrade script package to upgrade the microservice comprises:
and reporting information to the bus at a preset upgrading node.
5. The micro-service upgrade method according to claim 4, wherein after the executing the upgrade script package, comprising:
and reporting the upgrading result to a bus of a platform to which the micro service belongs.
6. The micro-service upgrade method according to claim 4, wherein after the executing the upgrade script package, comprising:
and when a certain micro service to be upgraded is not successfully upgraded, rolling back the micro service which is not successfully upgraded.
7. The microservice upgrade method according to any one of claims 1 to 6, characterized in that the development framework to which the microservice to be upgraded belongs is identified according to preset adaptation rules.
8. A microservice upgrade apparatus, comprising:
the identification module is used for identifying a development framework to which the micro service to be upgraded belongs;
the acquisition module is used for acquiring basic information for upgrading through an application programming interface corresponding to the identified development framework, wherein the basic information at least comprises a target version number;
the extraction module is used for extracting the upgrading script package according to the target version number;
and the execution module is used for executing the upgrading script package so as to upgrade the micro service.
9. An electronic device, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the microservice upgrade method of any of claims 1-7.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the microservice upgrade method according to any one of claims 1 to 7.
CN201910874959.0A 2019-09-17 2019-09-17 Micro-service upgrading method, electronic equipment and readable storage medium Pending CN112527338A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910874959.0A CN112527338A (en) 2019-09-17 2019-09-17 Micro-service upgrading method, electronic equipment and readable storage medium
PCT/CN2020/105877 WO2021052026A1 (en) 2019-09-17 2020-07-30 Micro-service upgrading method, electronic device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910874959.0A CN112527338A (en) 2019-09-17 2019-09-17 Micro-service upgrading method, electronic equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN112527338A true CN112527338A (en) 2021-03-19

Family

ID=74883954

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910874959.0A Pending CN112527338A (en) 2019-09-17 2019-09-17 Micro-service upgrading method, electronic equipment and readable storage medium

Country Status (2)

Country Link
CN (1) CN112527338A (en)
WO (1) WO2021052026A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113127039A (en) * 2021-04-22 2021-07-16 北京优奥创思科技发展有限公司 Automatic upgrading system for micro-service architecture product

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106506605A (en) * 2016-10-14 2017-03-15 华南理工大学 A kind of SaaS application construction methods based on micro services framework
CN108572845A (en) * 2018-03-15 2018-09-25 华为技术有限公司 The upgrade method and related system of distributed micro services cluster
CN109542537A (en) * 2018-11-15 2019-03-29 江苏东洲物联科技有限公司 A kind of edge calculations gateway based on micro services framework

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10348838B2 (en) * 2016-07-22 2019-07-09 Cisco Technology, Inc. Scaling service discovery in a micro-service environment
CN107704278A (en) * 2016-08-08 2018-02-16 北京京东尚科信息技术有限公司 Application upgrade method and apparatus
CN108733406B (en) * 2018-05-22 2021-12-21 山大地纬软件股份有限公司 Micro-service development management system and method supporting service upgrade version compatibility
CN109194760A (en) * 2018-09-14 2019-01-11 深圳市佰仟金融服务有限公司 Method for processing business, network system and server
CN110058864B (en) * 2019-04-18 2023-08-22 成都四方伟业软件股份有限公司 Micro-service deployment method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106506605A (en) * 2016-10-14 2017-03-15 华南理工大学 A kind of SaaS application construction methods based on micro services framework
CN108572845A (en) * 2018-03-15 2018-09-25 华为技术有限公司 The upgrade method and related system of distributed micro services cluster
CN109542537A (en) * 2018-11-15 2019-03-29 江苏东洲物联科技有限公司 A kind of edge calculations gateway based on micro services framework

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
不想当码农的程序员: "Spring Cloud微服务升级总结", pages 1 - 7, Retrieved from the Internet <URL:https://blog.csdn.net/chenjianandiyi/article/details/78621731> *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113127039A (en) * 2021-04-22 2021-07-16 北京优奥创思科技发展有限公司 Automatic upgrading system for micro-service architecture product

Also Published As

Publication number Publication date
WO2021052026A1 (en) 2021-03-25

Similar Documents

Publication Publication Date Title
CN110351325B (en) Data processing method and related equipment
CN111461887B (en) Block chain consensus processing method and device and electronic equipment
CN112398673A (en) Upgrading method, communication equipment and computer readable storage medium
CN110471746B (en) Distributed transaction callback method, device and system
CN108664343B (en) State calling method and device for micro-service
CN110351715A (en) AT command processing method, terminal adapter and computer readable storage medium
CN110955715A (en) ERP system, data conversion method and device of target platform and electronic equipment
CN112527338A (en) Micro-service upgrading method, electronic equipment and readable storage medium
CN108536447B (en) Operation and maintenance management method
CN112395339B (en) Intersystem data admission verification method, device, computer equipment and storage medium
CN117170822A (en) System model and code joint simulation system using distributed network middleware
CN115390939B (en) Service processing method and system
CN115729946B (en) Method, device, equipment and storage medium for processing distributed transaction
CN115695570A (en) Conversion method, device, equipment and storage medium of medical image scanning protocol
CN113077241B (en) Approval processing method, device, equipment and storage medium
CN115082038A (en) System integration method and device and electronic equipment
CN112711602B (en) Method and device for running stored procedure, database system and storage medium
CN109901933B (en) Operation method and device of business system, storage medium and electronic device
CN110389821A (en) More account processing methods, processing unit, application program and electronic device
CN112241276A (en) Equipment upgrading method and device
CN110647546A (en) Third-party rule engine generation method and device
CN111159311A (en) Data mapping integration method, device, equipment and storage medium
CN116560722B (en) Operation and maintenance flow processing method and device, electronic equipment and storage medium
JP6007916B2 (en) Verification device, verification method, and computer program
CN117075942B (en) Node Pod management method and system based on DaemonSet controller

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination