CN114356343A - Method, device and equipment for quickly deploying micro-service product and readable storage medium - Google Patents
Method, device and equipment for quickly deploying micro-service product and readable storage medium Download PDFInfo
- Publication number
- CN114356343A CN114356343A CN202111576401.8A CN202111576401A CN114356343A CN 114356343 A CN114356343 A CN 114356343A CN 202111576401 A CN202111576401 A CN 202111576401A CN 114356343 A CN114356343 A CN 114356343A
- Authority
- CN
- China
- Prior art keywords
- file
- micro
- product
- deployment
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 56
- 230000008520 organization Effects 0.000 claims abstract description 82
- 238000004806 packaging method and process Methods 0.000 claims description 36
- 230000001419 dependent effect Effects 0.000 claims description 9
- 238000009877 rendering Methods 0.000 claims description 5
- 230000008569 process Effects 0.000 description 9
- 238000004891 communication Methods 0.000 description 5
- 238000013461 design Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 238000012360 testing method Methods 0.000 description 4
- 238000012856 packing Methods 0.000 description 3
- 230000006978 adaptation Effects 0.000 description 2
- 238000001514 detection method Methods 0.000 description 2
- 238000007726 management method Methods 0.000 description 2
- 238000004519 manufacturing process Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- GNFTZDOKVXKIBK-UHFFFAOYSA-N 3-(2-methoxyethoxy)benzohydrazide Chemical compound COCCOC1=CC=CC(C(=O)NN)=C1 GNFTZDOKVXKIBK-UHFFFAOYSA-N 0.000 description 1
- 230000002159 abnormal effect Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Images
Landscapes
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention discloses a method, a device and equipment for quickly deploying micro-service products and a readable storage medium, and belongs to the technical field of micro-services. According to the method, the preset basic file is obtained, the organization product file associated with the micro-service product is determined, the basic file and the deployment reference are provided for the micro-service product deployment, the target basic file in the basic file is determined according to the organization product file, the target basic file is pulled from the public network to the private warehouse to be stored, the target basic file is obtained and stored simultaneously, so that on the basis of obtaining the micro-service product deployment file, a file basis can be provided for the subsequent micro-service product deployment, the target basic file is obtained from the private warehouse through the preset deployment script, the micro-service product deployment is completed on the basis of the organization product file and the target basic file, the preset deployment script is used for replacing manual operation, the deployment cost is reduced, and the deployment efficiency is effectively improved.
Description
Technical Field
The invention relates to the technical field of micro-services, in particular to a method, a device and equipment for quickly deploying micro-service products and a readable storage medium.
Background
The micro-service architecture is a fine-grained software architecture, a software system is divided into a plurality of micro-service applications with smaller individual quantity according to business needs, and each micro-service application is started and operated independently, so that the deployment workload of micro-service products is multiplied, and how to deploy the micro-service products is difficult to face by operation and maintenance personnel for micro-service management. In the traditional scheme, manual mode is usually utilized for packaging and online deployment, but because the micro-service architecture has numerous engineering data and large application quantity of the micro-service, the workload is huge and mistakes are easy to make by manual deployment, the deployment cost is high and the efficiency is low.
Disclosure of Invention
The invention mainly aims to provide a method, a device, equipment and a readable storage medium for quickly deploying micro-service products, and aims to solve the technical problem of improving the deployment efficiency of the micro-service products.
In order to achieve the above object, the present invention provides a method for rapidly deploying a microservice product, which comprises the following steps:
acquiring a preset basic file, and determining an organization product file associated with the micro-service product;
determining a target basic file in the basic files according to the organization product files, and pulling the target basic file from a public network to a private warehouse for storage;
and acquiring the target basic file from the private warehouse through a preset deployment script, and completing the deployment of the micro-service product based on the organization product file and the target basic file.
Optionally, before the step of obtaining the preset basic file and determining the organization product file associated with the micro service product, the method further includes:
constructing a dependency package file and a template file corresponding to the micro-service, and acquiring a preset package script;
and taking the dependent package file, the template file and the preset package script as basic files.
Optionally, the organizing the product file includes an organizing file, and before the step of obtaining the organizing the product file, the method further includes:
determining micro service characteristics corresponding to micro service products, and recording the micro service characteristics into a first characteristic file;
acquiring a target micro-service name matched with the micro-service characteristics in the input micro-service names, determining a basic file corresponding to the target micro-service name, recording the basic file and the target micro-service name in a second characteristic file in an associated manner, and taking the first characteristic file and the second characteristic file as organization files.
Optionally, the organizing product file includes a technical configuration file, and before the step of obtaining the organizing product file, the method further includes:
determining the environment variable characteristics corresponding to the micro-service product;
and converting the environment variable characteristics according to a preset configuration rule to generate a technical configuration file.
Optionally, the step of completing the deployment of the microservice product based on the organization product file and the base file by using a preset deployment script includes:
determining an organization file in the organization product file, and determining a target basic file in the basic file, which is associated with a micro-service name in the organization file, through a preset deployment script;
determining a target dependency package file in the target basic file, and acquiring a target dependency package corresponding to the target dependency package file;
acquiring a preset packaging script in the target basic file, and packaging the target dependent packet and a target template file in the target basic file through the preset packaging script to obtain a basic packaging file;
and finishing the deployment of the micro-service product based on the basic packaging file and the technical configuration file in the organization product file through a preset deployment script.
Optionally, the step of completing the deployment of the microservice product based on the basic packaging file and the technical configuration file in the organization product file by using a preset deployment script includes:
rendering a target template file in the basic packaging file according to a technical configuration file in the organization product file through a preset deployment script to obtain a target mirror image;
and deploying the target mirror image on line through the preset deployment script to complete the deployment of the micro-service product.
Optionally, after the step of completing the deployment of the micro service product based on the organization product file and the target base file, the method further includes:
if the completion time of the micro-service deployment meets a preset time threshold, triggering to execute a preset filing script;
and deleting the organization product file through the filing script, identifying the version number of the deployed micro service product, and filing and storing the micro service product according to the version number identification.
In addition, to achieve the above object, the present invention further provides a device for rapidly deploying a microservice product, where the device for rapidly deploying a microservice product includes:
the file acquisition module is used for acquiring a preset basic file and determining an organization product file associated with the micro-service product;
the file storage module is used for determining a target basic file in the basic files according to the organization product files and pulling the target basic file from a public network to a private warehouse for storage;
and the product deployment module is used for acquiring the target basic file from the private warehouse through a preset deployment script and finishing micro-service product deployment based on the organization product file and the target basic file.
In addition, to achieve the above object, the present invention further provides a microservice product rapid deployment apparatus, including a memory, a processor, and a microservice product rapid deployment program stored in the memory and executable on the processor, wherein: the micro service product rapid deployment program realizes the steps of the micro service product rapid deployment method when being executed by the processor.
In addition, to achieve the above object, the present invention further provides a readable storage medium, on which a micro service product rapid deployment program is stored, and when the micro service product rapid deployment program is executed by a processor, the micro service product rapid deployment program implements the steps of the micro service product rapid deployment method as described above.
The invention provides a method, a device, equipment and a readable storage medium for rapidly deploying micro-service products, which are used for acquiring a preset basic file, determining an organization product file associated with the micro service product, providing a basic file and a deployment reference for the deployment of the micro service product, determining a target basic file in the basic file according to the organization product file, pulling the target basic file from a public network to a private warehouse for storage, the target basic file is acquired and stored simultaneously, so that on the basis of acquiring the deployment file of the micro service product, a file basis can be provided for the subsequent deployment of the micro service product, therefore, the target basic file is obtained from the private warehouse through the preset deployment script, the micro-service product deployment is completed based on the organization product file and the target basic file, the preset deployment script is used for replacing manual operation, the deployment cost is reduced, and the deployment efficiency is effectively improved.
Drawings
Fig. 1 is a schematic structural diagram of a microservice product rapid deployment device of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart illustrating a method for rapidly deploying a microservice product according to a first embodiment of the present invention;
fig. 3 is a schematic structural diagram of a quick deployment device for microservice products according to the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a microservice product rapid deployment device in a hardware operating environment according to an embodiment of the present invention.
As shown in fig. 1, the microservice product rapid deployment apparatus may include: a processor 1001, such as a Central Processing Unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a WIreless interface (e.g., a WIreless-FIdelity (WI-FI) interface). The Memory 1005 may be a Random Access Memory (RAM) Memory, or may be a Non-Volatile Memory (NVM), such as a disk Memory. The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the configuration shown in FIG. 1 does not constitute a limitation of the microservice product rapid deployment apparatus and may include more or fewer components than shown, or some components in combination, or a different arrangement of components.
As shown in fig. 1, the memory 1005, which is a readable storage medium, may include therein an operating system, a data storage module, a network communication module, a user interface module, and a micro service product rapid deployment program.
In the microservice product rapid deployment device shown in fig. 1, the network interface 1004 is mainly used for data communication with other devices; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 of the apparatus for rapid deployment of a microservice product of the present invention may be disposed in the apparatus for rapid deployment of a microservice product, and the apparatus for rapid deployment of a microservice product invokes a program for rapid deployment of a microservice product stored in the memory 1005 through the processor 1001, and executes the method for rapid deployment of a microservice product provided by the embodiment of the present invention.
An embodiment of the present invention provides a method for quickly deploying a micro service product, and referring to fig. 2, fig. 2 is a schematic flow diagram of a first embodiment of the method for quickly deploying a micro service product according to the present invention.
In this embodiment, the method for rapidly deploying a microservice product includes:
step S100, acquiring a preset basic file, and determining an organization product file associated with the micro service product;
in this embodiment, it should be noted that, when a micro service product is deployed, a base file needs to be acquired, and the generation of the base file may be performed by performing micro service design in advance, where the micro service design refers to determining each required dependency package file corresponding to a current micro service product, making a mirror image template file, and performing a deployment template file for deployment. The method comprises the steps of preparing a plurality of image template files, wherein the image template files which are prepared in advance are multiple, and the image template files which are specifically needed in the image template files are determined according to deployment template files. The organization product file refers to a file for recording related information of the currently deployed micro-service product, and the organization product file includes information such as which micro-services required by the current micro-service product are, an original path corresponding to the required micro-services, and a deployment mode of the required micro-services. And after the organization product file is obtained, determining which basic files required by the current deployment of the microservice product in the basic files and how the required basic files are deployed.
Step S200, determining a target basic file in the basic files according to the organization product file, and pulling the target basic file from a public network to a private warehouse for storage;
in this embodiment, it should be noted that the private warehouse refers to a warehouse for storing files related to the microservice product, and the private warehouse is private to the user and is not shared with the outside. For example a private neuxs warehouse. Because the organization product file comprises the related information of the micro service product which is deployed before, the basic file, namely the target basic file, required by the current micro service product in the basic file can be obtained based on the organization product file. The target basic files are stored in the third-party public library, after the target basic files are determined, the target basic files are pulled to the private warehouse for storage by connecting the private warehouse with the public network, namely the private warehouse already has the required basic files, and the target basic files do not need to be acquired from the third-party public library subsequently.
And step S300, acquiring the target basic file from the private warehouse through a preset deployment script, and completing the deployment of the micro-service product based on the organization product file and the target basic file.
In this embodiment, it should be noted that the preset deployment script refers to a pre-designed script for deploying the micro service product, where the preset deployment script includes a plurality of deployment commands, for example, related commands for deploying the micro service product, such as a source code pull command, a dependent package packing command, a mirror image packing command, and a deployment packing command, and an automated deployment process may be controlled according to the deployment script. Specifically, the target basic file is obtained from the private warehouse through the preset deployment script, and the target basic file is processed according to the organization product file through the preset deployment script, so that the deployment of the micro-service product is completed.
In the embodiment of the invention, a preset basic file is obtained, an organization product file associated with a micro-service product is determined, the basic file and a deployment reference are provided for the deployment of the micro-service product, a target basic file in the basic file is determined according to the organization product file, the target basic file is pulled from a public network to a private warehouse for storage, the target basic file is obtained and stored simultaneously, so that on the basis of obtaining the deployment file of the micro-service product, a file basis can be provided for the subsequent deployment of the micro-service product, the target basic file is obtained from the private warehouse through a preset deployment script, the deployment of the micro-service product is completed on the basis of the organization product file and the target basic file, the preset deployment script is used for replacing manual operation, the deployment cost is reduced, and the deployment efficiency is effectively improved.
Further, based on the first embodiment of the method for rapidly deploying a micro service product of the present invention, a second embodiment of the method for rapidly deploying a micro service product of the present invention is proposed, where before the step of obtaining the preset basic file and determining the organization product file associated with the micro service product in step S100, the method further includes:
step a, constructing a dependency package file and a template file corresponding to the micro-service, and acquiring a preset package script;
and b, taking the dependent package file, the template file and the preset package script as basic files.
In this embodiment, it should be noted that, the basic file is used as a basis for deploying the microservice product, and a design needs to be performed between implementation and deployment operations of the microservice product. Before the micro-service product is deployed, micro-service design is carried out on each micro-service, the micro-service product is deployed, on the basis of a product file of the micro-service product, the micro-service product is operated and some software packages, namely dependency packages, are required to be relied on, a dependency package file corresponding to the micro-service is constructed on the basis of the current micro-service, information such as the software packages depended on by the current micro-service and the versions of the software packages is recorded in the dependency package file, a template file is manufactured on the basis of the current micro-service, the template file comprises a mirror image template file and a deployment template file, the mirror image template file is the basis for manufacturing mirror images, for example, a template file of kubenetes mirror images, the mirror image template files are multiple, and the target mirror image template files needed in the multiple mirror image template files can be determined through the deployment template file. The preset packaging script is a script for packaging the dependence package, the corresponding dependence package can be determined based on the dependence package file, the dependence package and the file package of the micro-service product can be packaged through the preset packaging script, and an executable file is generated. Specifically, a corresponding dependency package file and a template file are constructed for the micro-service, and a corresponding preset package file is determined to obtain a basic file.
In the embodiment, the dependency package file, the preset package file and the template file corresponding to each micro service are obtained by designing each micro service, a file basis is provided for subsequent micro service product deployment, and by designing the template in advance, the target file can be obtained by directly rendering the template in the follow-up process, so that the operation efficiency is improved.
Further, organizing the product file includes organizing the file, and before the step of obtaining the organized product file, the method further includes:
step c, determining micro service characteristics corresponding to micro service products, and recording the micro service characteristics into a first characteristic file;
and d, acquiring a target micro-service name matched with the micro-service characteristics in the input micro-service names, determining a basic file corresponding to the target micro-service name, recording the basic file and the target micro-service name into a second characteristic file in an associated manner, and taking the first characteristic file and the second characteristic file as organization files.
In this embodiment, it should be noted that the first feature file and the second feature file are used to record files of related information of the micro service product, the first feature file is used to record micro service features of the micro service product, and the second feature file is used to record a target micro service name and a basic file associated with the target micro service name. The micro-services exist in a plurality of types, and the types and the number of the micro-services required by each micro-service product are different, so that the required micro-service information is determined according to the micro-service products which need to be deployed. The micro-service product has its own features, such as functions of the micro-service product, whether the micro-service required by the micro-service product belongs to a micro-service of a platform layer or a micro-service of a business layer, a corresponding source code path of the micro-service, and the like, the micro-service feature corresponding to the micro-service product is determined, the micro-service feature is recorded into a first feature file, an input micro-service name is obtained, a target micro-service name of the micro-service matched with the micro-service feature in the first feature file is organized through a table document, a base file corresponding to the micro-service name is obtained, the base file and the micro-service name are recorded into a second feature file in an associated manner, and specifically, the base file and the micro-service name can be associated through an address stored in the base file. For example, the name of the micro-service required for deploying the micro-service product is organized in an Excel manner, for example, product a requires micro-services w1, w2, w3, and the name of the micro-service and the git warehouse address corresponding to the micro-service are filled in the Excel. And taking the first characteristic file and the second characteristic file as organization files.
In the embodiment, the micro-service names corresponding to the micro-service features are organized, and the corresponding basic files are recorded, so that the operation reference is provided for the micro-service product deployment, and the efficiency of the micro-service deployment is effectively improved.
Further, organizing the product file includes a technical configuration file, and before the step of obtaining the organized product file, the method further includes:
step e, determining the environment variable characteristics corresponding to the micro service product;
and f, converting the environment variable characteristics according to a preset configuration rule to generate a technical configuration file.
In this embodiment, when deploying a micro service, it is necessary to configure environment variables, for example, information such as a basic mirroring layer used to create a mirror, a domain name of a deployment environment, a port, a cluster relationship between servers, an IP address of a master server, and an IP address of a slave server. And determining the environment variable characteristics corresponding to the current micro-service product. The preset configuration rule refers to a rule for summarizing the environment variable characteristics into a configuration file, and a technical configuration file is generated according to the environment variable characteristics according to the preset configuration rule.
In this embodiment, a technical configuration file is generated for a microservice product, so as to ensure the quality of deployment of the microservice product.
Further, the step of completing the deployment of the microservice product based on the organization product file and the base file by a preset deployment script comprises:
step g, determining an organization file in the organization product file, and determining a target basic file in the basic file, which is associated with the micro-service name in the organization file, through a preset deployment script;
h, determining a target dependency package file in the target basic file, and acquiring a target dependency package corresponding to the target dependency package file;
step i, acquiring a preset packaging script in the target basic file, and packaging the target dependent packet and a target template file in the target basic file through the preset packaging script to obtain a basic packaging file;
and j, finishing the deployment of the micro-service product based on the basic packaging file and the technical configuration file in the organization product file through a preset deployment script.
In this embodiment, it should be noted that, when micro service product deployment is executed, the execution step is controlled by a preset deployment script, specifically, an organization file in an organization product file is determined, where the organization file includes a name of a micro service required for current micro service deployment and a target basic file associated with the name of the micro service, and the target basic file is obtained. The target basic file comprises a target dependency package file, a target template file and a preset package script, the target dependency package file is obtained, a corresponding target dependency package is obtained according to the target dependency package file, and then the target dependency package and the target template file are packaged through the preset package script, so that the basic package file is obtained. When the package is carried out, a private warehouse is connected, such as a private neuxs warehouse, the private warehouse is connected with a public network, and all the required dependency packages are stored in the private warehouse after the package is finished, so that the package is convenient for subsequent use. And determining a technical configuration file in the organization file, and finishing the deployment of the micro-service product according to the technical configuration file and the basic packaging file through a preset deployment script.
In the embodiment, the micro-service deployment is performed through the preset deployment script instead of manual operation, and the life cycle management of the software is realized in an automatic mode from the source code of the micro-service to the compiling and mirror image manufacturing of the micro-service until the cluster of the micro-service is online, so that more stable software can be delivered more quickly.
Further, the step of completing the deployment of the microservice product based on the basic packaging file and the technical configuration file in the organization product file through a preset deployment script comprises:
step k, rendering a target template file in the basic packaging file according to a technical configuration file in the organization product file through a preset deployment script to obtain a target mirror image;
and step l, deploying the target mirror image on line through the preset deployment script, and finishing deployment of the micro-service product.
In this embodiment, it should be noted that, after the target template file is determined, relevant variables in the template file need to be replaced, so as to implement adaptation to the current microservice product. Specifically, a technical configuration file in an organization product file is determined, a target template file in a basic packaging file is rendered according to the technical configuration file through a preset deployment script, a mirror image template and a deployment target in the target template file in the basic packaging file are rendered according to the technical configuration file through the preset deployment script, the rendered mirror image template is packaged to obtain a target mirror image, the rendered deployment template is packaged through the preset deployment script, the target mirror image is deployed on line, and micro-service deployment is completed. For example, a mirror image packaging file is executed through a script, a packaged microservice is made into a docker mirror image, the packaging file is executed through the script, and the service is deployed into kubenetes to complete online.
In the embodiment, the target template file is rendered through the technical configuration file so as to realize the adaptation of the micro service product and ensure the operation quality of the deployed micro service product.
Further, after the step of completing the deployment of the micro service product based on the organization product file and the target base file, the method further comprises the following steps:
step m, if the completion time of the micro-service deployment meets a preset time threshold, triggering to execute a preset filing script;
and n, deleting the organization product file through the filing script, identifying the version number of the deployed micro service product, and filing and storing the micro service product according to the version number identification.
In this embodiment, it should be noted that, after the micro service product is deployed and on-line for a period of time, the version of the micro service product may be completely archived by the archive script, and in order to reduce the size of the archive software package, the file in the intermediate step of the micro service product deployment may be deleted. The preset time threshold refers to the time for archiving the microservice product determined according to the actual demand, and the fault-tolerant time for deploying the microservice can be provided by the preset time threshold, for example, two weeks. And in a time period corresponding to the preset time threshold, if the micro service product is abnormal in operation, the deploying step can be executed again. Specifically, the time for completing the micro-service deployment is determined, and if the time for completing the micro-service deployment meets a preset time threshold, a filing script is triggered to execute filing operation, wherein the organization product file in the middle step is deleted through the filing script, the version number of the micro-service product identifier after the deployment is used as a distinguishing feature, and the micro-service is filed and stored according to the version number identifier.
In the embodiment, after the online is finished for a period of time, the generated file in the middle step is deleted through the filing script, so that the occupation of the storage space is reduced, the version is completely filed for later use, and the reutilization rate of the micro-service product is improved.
In addition, in an embodiment, a test script can be preset, the micro service product is tested based on the test script, the test file is automatically executed for detection, and if the execution is completed correctly, the server is indicated to have correctly executed the deployment and configuration process according to the deployment file and the configuration file; if errors occur in the execution process, triggering a preset deployment script to initialize the server with the errors, re-executing the deployment and configuration process until the automatic detection passes or exceeds the maximum retry number, and ensuring the deployment quality of the microservice product through the setting of the test script.
In addition, referring to fig. 3, the present invention further provides a micro service product rapid deployment apparatus, including:
the file acquiring module 2001 is configured to acquire a preset basic file and determine an organization product file associated with the micro service product;
a file storage module 2002, configured to determine a target basic file in the basic files according to the organization product file, and pull the target basic file from a public network to a private warehouse for storage;
and the product deployment module 2003 is configured to acquire the target basic file from the private warehouse through a preset deployment script, and complete micro-service product deployment based on the organization product file and the target basic file.
Optionally, the file obtaining module 2001 is further configured to:
constructing a dependency package file and a template file corresponding to the micro-service, and acquiring a preset package script;
and taking the dependent package file, the template file and the preset package script as basic files.
Optionally, the file obtaining module 2001 is further configured to:
determining micro service characteristics corresponding to micro service products, and recording the micro service characteristics into a first characteristic file;
acquiring a target micro-service name matched with the micro-service characteristics in the input micro-service names, determining a basic file corresponding to the target micro-service name, recording the basic file and the target micro-service name in a second characteristic file in an associated manner, and taking the first characteristic file and the second characteristic file as organization files.
Optionally, the file obtaining module 2001 is further configured to:
determining the environment variable characteristics corresponding to the micro-service product;
and converting the environment variable characteristics according to a preset configuration rule to generate a technical configuration file.
Optionally, the product deployment module 2003 is further configured to:
determining an organization file in the organization product file, and determining a target basic file in the basic file, which is associated with a micro-service name in the organization file, through a preset deployment script;
determining a target dependency package file in the target basic file, and acquiring a target dependency package corresponding to the target dependency package file;
acquiring a preset packaging script in the target basic file, and packaging the target dependent packet and a target template file in the target basic file through the preset packaging script to obtain a basic packaging file;
and finishing the deployment of the micro-service product based on the basic packaging file and the technical configuration file in the organization product file through a preset deployment script.
Optionally, the product deployment module 2003 is further configured to:
rendering a target template file in the basic packaging file according to a technical configuration file in the organization product file through a preset deployment script to obtain a target mirror image;
and deploying the target mirror image on line through the preset deployment script to complete the deployment of the micro-service product.
Optionally, the product deployment module 2003 is further configured to:
if the completion time of the micro-service deployment meets a preset time threshold, triggering to execute a preset filing script;
and deleting the organization product file through the filing script, identifying the version number of the deployed micro service product, and filing and storing the micro service product according to the version number identification.
The specific implementation manner of the quick deployment device for micro-service products of the present invention is basically the same as that of each embodiment of the quick deployment method for micro-service products, and is not described herein again.
In addition, the present invention further provides a microservice product rapid deployment apparatus, which is characterized in that the microservice product rapid deployment apparatus includes a memory, a processor, and a microservice product rapid deployment program stored in the memory and operable on the processor, wherein: when executed by the processor, the micro-service product rapid deployment program implements the micro-service product rapid deployment method according to the embodiments of the present invention.
In addition, the invention also provides a readable storage medium, on which the micro-service product rapid deployment program is stored. The readable storage medium may be the Memory 20 in the terminal in fig. 1, and may also be at least one of a ROM (Read-Only Memory)/RAM (Random Access Memory), a magnetic disk, and an optical disk, where the readable storage medium includes several instructions to enable a microservice rapid deployment device with a processor to execute the microservice rapid deployment method according to the embodiments of the present invention.
It is to be understood that throughout the description of the present specification, reference to the term "one embodiment", "another embodiment", "other embodiments", or "first through nth embodiments", etc., is intended to mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a readable storage medium (such as ROM/RAM, magnetic disk, optical disk) as described above, and includes several instructions for enabling a terminal device (which may be a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.
Claims (10)
1. A quick deployment method of micro-service products is characterized by comprising the following steps:
acquiring a preset basic file, and determining an organization product file associated with the micro-service product;
determining a target basic file in the basic files according to the organization product files, and pulling the target basic file from a public network to a private warehouse for storage;
and acquiring the target basic file from the private warehouse through a preset deployment script, and completing the deployment of the micro-service product based on the organization product file and the target basic file.
2. The method for rapid deployment of microservice products according to claim 1, wherein before the step of obtaining the preset basic file and determining the organization product file associated with the microservice product, the method further comprises:
constructing a dependency package file and a template file corresponding to the micro-service, and acquiring a preset package script;
and taking the dependent package file, the template file and the preset package script as basic files.
3. The method for rapid deployment of microservice products according to claim 1, wherein the organizing product file comprises an organizing file, and before the step of obtaining the preset basic file and determining the organizing product file associated with the microservice product, the method further comprises:
determining micro service characteristics corresponding to micro service products, and recording the micro service characteristics into a first characteristic file;
acquiring a target micro-service name matched with the micro-service characteristics in the input micro-service names, determining a basic file corresponding to the target micro-service name, recording the basic file and the target micro-service name in a second characteristic file in an associated manner, and taking the first characteristic file and the second characteristic file as organization files.
4. The method for rapid deployment of microservice products according to claim 1, wherein the organization product file comprises a technical configuration file, and before the step of obtaining the preset base file and determining the organization product file associated with the microservice product, the method further comprises:
determining the environment variable characteristics corresponding to the micro-service product;
and converting the environment variable characteristics according to a preset configuration rule to generate a technical configuration file.
5. The method for rapidly deploying microservice products according to claim 1, wherein the step of completing the deployment of microservice products based on the organization product file and the base file by a preset deployment script comprises:
determining an organization file in the organization product file, and determining a target basic file in the basic file, which is associated with a micro-service name in the organization file, through a preset deployment script;
determining a target dependency package file in the target basic file, and acquiring a target dependency package corresponding to the target dependency package file;
acquiring a preset packaging script in the target basic file, and packaging the target dependent packet and a target template file in the target basic file through the preset packaging script to obtain a basic packaging file;
and finishing the deployment of the micro-service product based on the basic packaging file and the technical configuration file in the organization product file through a preset deployment script.
6. The method for rapidly deploying micro-service products according to claim 1, wherein the step of completing the deployment of the micro-service products based on the basic packaging file and the technical configuration file in the organization product file through a preset deployment script comprises the following steps:
rendering a target template file in the basic packaging file according to a technical configuration file in the organization product file through a preset deployment script to obtain a target mirror image;
and deploying the target mirror image on line through the preset deployment script to complete the deployment of the micro-service product.
7. The method for rapid deployment of microservice products according to claim 1, wherein after the step of completing the deployment of microservice products based on the organization product file and the target base file, the method further comprises:
if the completion time of the micro-service deployment meets a preset time threshold, triggering to execute a preset filing script;
and deleting the organization product file through the filing script, identifying the version number of the deployed micro service product, and filing and storing the micro service product according to the version number identification.
8. A quick deployment device for micro-service products is characterized by comprising:
the file acquisition module is used for acquiring a preset basic file and determining an organization product file associated with the micro-service product;
the file storage module is used for determining a target basic file in the basic files according to the organization product files and pulling the target basic file from a public network to a private warehouse for storage;
and the product deployment module is used for acquiring the target basic file from the private warehouse through a preset deployment script and finishing micro-service product deployment based on the organization product file and the target basic file.
9. A micro-service product rapid deployment device is characterized by comprising: a memory, a processor and a microservice product rapid deployment program stored on the memory and executable on the processor, the microservice product rapid deployment program being configured to implement the steps of the microservice product rapid deployment method according to any one of claims 1 to 7.
10. A readable storage medium, wherein the readable storage medium stores thereon a micro service product rapid deployment program, and the micro service product rapid deployment program, when executed by a processor, implements the steps of the micro service product rapid deployment method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111576401.8A CN114356343A (en) | 2021-12-21 | 2021-12-21 | Method, device and equipment for quickly deploying micro-service product and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111576401.8A CN114356343A (en) | 2021-12-21 | 2021-12-21 | Method, device and equipment for quickly deploying micro-service product and readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114356343A true CN114356343A (en) | 2022-04-15 |
Family
ID=81102179
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111576401.8A Pending CN114356343A (en) | 2021-12-21 | 2021-12-21 | Method, device and equipment for quickly deploying micro-service product and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114356343A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109597605A (en) * | 2018-10-22 | 2019-04-09 | 平安科技(深圳)有限公司 | Using micro services dispositions method, device, storage medium and terminal device |
CN112181587A (en) * | 2020-09-18 | 2021-01-05 | 烽火通信科技股份有限公司 | Software product deployment method and system based on docker technology |
CN113094151A (en) * | 2021-04-23 | 2021-07-09 | 汇能云科技(宁波)有限公司 | Helm-based micro-service application deployment system and method |
WO2021217871A1 (en) * | 2020-04-28 | 2021-11-04 | 平安科技(深圳)有限公司 | Method and apparatus for deploying micro service cluster, computer device and storage medium |
CN113741909A (en) * | 2021-08-31 | 2021-12-03 | 平安国际智慧城市科技股份有限公司 | Micro-service deployment method, device, electronic equipment and storage medium |
-
2021
- 2021-12-21 CN CN202111576401.8A patent/CN114356343A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109597605A (en) * | 2018-10-22 | 2019-04-09 | 平安科技(深圳)有限公司 | Using micro services dispositions method, device, storage medium and terminal device |
WO2021217871A1 (en) * | 2020-04-28 | 2021-11-04 | 平安科技(深圳)有限公司 | Method and apparatus for deploying micro service cluster, computer device and storage medium |
CN112181587A (en) * | 2020-09-18 | 2021-01-05 | 烽火通信科技股份有限公司 | Software product deployment method and system based on docker technology |
CN113094151A (en) * | 2021-04-23 | 2021-07-09 | 汇能云科技(宁波)有限公司 | Helm-based micro-service application deployment system and method |
CN113741909A (en) * | 2021-08-31 | 2021-12-03 | 平安国际智慧城市科技股份有限公司 | Micro-service deployment method, device, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108876121B (en) | Work order processing method and device, computer equipment and storage medium | |
TWI582616B (en) | Formatting data by example | |
CN109783388B (en) | UI (user interface) automatic testing method and device and electronic equipment | |
CN110956269A (en) | Data model generation method, device, equipment and computer storage medium | |
CN114064213A (en) | Kubernets container environment-based rapid arranging service method and system | |
CN114465937A (en) | Network card testing method, device, server, medium, and computer program product | |
WO2023155819A1 (en) | Application deployment method and system | |
CN115617780A (en) | Data import method, device, equipment and storage medium | |
CN116644250B (en) | Page detection method, page detection device, computer equipment and storage medium | |
CN110806891B (en) | Method and device for generating software version of embedded device | |
CN114356343A (en) | Method, device and equipment for quickly deploying micro-service product and readable storage medium | |
CN111459530B (en) | Patching method, device and storage medium | |
CN109582319B (en) | Service code deployment method and device | |
CN110244934B (en) | Method and device for generating product demand document and test information | |
CN110727570A (en) | Concurrent pressure measurement method and related device | |
CN111045928A (en) | Interface data testing method, device, terminal and storage medium | |
CN114500268A (en) | Deployment method, device, server and storage medium of chart resource | |
CN114936152A (en) | Application testing method and device | |
CN115168840A (en) | Fault injection method and device and computer readable storage medium | |
CN114330244A (en) | Method, system, device and medium for arranging files | |
CN108762736B (en) | Project branch management method, device and equipment and computer readable storage medium | |
US20240248688A1 (en) | Package generation for configuring a working environment on a server instance | |
CN104834277A (en) | Management method, management device, and management system | |
CN114385483B (en) | Database interface testing method, device, equipment and storage medium | |
CN109167826A (en) | The restocking method, apparatus and system of WEB application |
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 |