Cross-platform DevOps engine template method and system

文档序号:7180 发布日期:2021-09-17 浏览:66次 中文

1. A cross-platform DevOps engine template method, the method applied to an engine template system, the engine template system comprising a plurality of platforms, the method comprising:

the method comprises the steps of obtaining a product task to be completed and a template corresponding to the product task, wherein the product task comprises a plurality of processing flows, and the template is used for indicating the completion of the plurality of processing flows;

for the processing flows needing to be executed by the first platform in the plurality of processing flows, the engine of the first platform calls a DevOps component configured on the first platform according to the template;

the DevOps component called on the first platform executes the processing flow of the product task in the first platform according to the template;

determining a second platform in which the rest of the plurality of processing flows are located when the processing flows in the first platform are detected to be executed completely;

the engine of the first platform sends the template to the engine of the second platform;

and the engine of the second platform calls a DevOps component configured on the second platform according to the template so as to complete the processing flow of the product task in the second platform through the called DevOps component.

2. The engine template method of claim 1, wherein the engine of the first platform sending the template to the engine of the second platform comprises:

taking the last DevOps component called on the first platform as a process starting point, and creating a template entry;

and the engine of the first platform acquires the instruction of the template to the next processing flow through the template inlet, and sends the template to the engine of the second platform according to the instruction.

3. The engine template method of claim 1, wherein upon the invoked DevOps component on the first platform executing the flow of the product task in the first platform according to the template, or upon the completion of the flow of the product task in the second platform by the invoked DevOps component, the method further comprises:

when the engine determines that the template indicates that the called next DevOps component is one of continuous delivery, continuous deployment and continuous release, configuring the product environment required by the product task according to the configuration information mounted in the template command; wherein the engine is an engine of a first platform or an engine of a second platform;

the configuration information includes at least one of: a product file required by the product environment, and an environment variable required by the current product environment.

4. The engine template method of claim 1, wherein upon the invoked DevOps component on the first platform executing the flow of the product task in the first platform according to the template, or upon the completion of the flow of the product task in the second platform by the invoked DevOps component, the method further comprises:

the DevOps component feeds back the information of the completion of the calling of the DevOps component to an engine of a platform when the process of the product task in the component is completed according to the indication of the template; wherein the DevOps component is a DevOps component of a first platform or a DevOps component of a second platform;

and the engine feeds the information back to a front-end page.

5. The system engine template method of claim 1, wherein in the event that there are multiple process flows in the plurality of process flows that require execution by a first platform, the DevOps component invoked on the first platform executes the process flow of the product task in the first platform according to the template, comprising:

grouping the plurality of processing flows according to the execution sequence of the plurality of processing flows executed on the first platform to obtain at least one flow group, wherein each flow group comprises a plurality of processing flows;

the DevOps component invoked on the first platform executes the process flows in the at least one flow group in parallel according to the template.

6. The system engine template method of claim 1, wherein there are a plurality of said second platforms; determining a second platform on which remaining ones of the plurality of process flows are located, comprising:

determining an execution sequence for a plurality of second platforms, comprising: determining a second platform to be executed in parallel with the first platform and a second platform to be executed in series with the first platform;

the engine of the second platform calls a DevOps component configured on the second platform according to the template, and the DevOps component comprises:

an engine of a second platform executing in parallel with the first platform calls a DevOps component configured on the second platform in parallel with the first platform according to the template so as to execute processing flows on the first platform and the second platform in parallel;

and calling a DevOps component configured on a second platform in series with the first platform by an engine of the second platform in series with the first platform according to the template so as to execute the processing flow on the second platform when the processing flow on the first platform is executed and the processing flow on the second platform in parallel with the first platform is executed.

7. A cross-platform DevOps engine template system, the engine template system comprising a plurality of platforms, wherein on a first platform comprises the following modules:

the system comprises a template acquisition engine first module, a template acquisition engine second module and a template processing module, wherein the template acquisition engine first module is used for acquiring a product task to be completed and a template corresponding to the product task, the product task comprises a plurality of processing flows, and the template is used for indicating the completion of the plurality of processing flows;

a component calling engine first module, configured to control an engine of the first platform to call a DevOps component configured on the first platform according to the template for a processing flow that needs to be executed by the first platform among the plurality of processing flows; the first platform is a platform where a first module of the component call engine is located;

the component execution first module is used for controlling the DevOps component called on the first platform to execute the processing flow of the product task in the first platform according to the template;

the cross-platform engine prepares a first module, which is used for determining a second platform where the rest of the processing flows in the plurality of processing flows are located when the processing flows in the first platform are detected to be executed completely;

executing a first module by a cross-platform engine, wherein the first module is used for controlling the engine of the first platform to send the template to the engine of the second platform;

on the second platform the following modules are included:

the component calling engine second module is used for controlling an engine of the second platform to call a DevOps component configured on the second platform according to the template so as to complete the processing flow of the product task in the second platform through the called DevOps component; and the second platform is the platform where the second module of the component call engine is located.

8. The engine template system of claim 7, wherein the first platform further comprises the following modules:

the component starting first module is used for taking the last DevOps component called on the first platform as a flow starting point and creating a template inlet;

the cross-platform engine executes a first module comprising: and the cross-platform engine executes a first sub-module, and the first sub-module is used for the engine of the first platform to obtain the instruction of the template to the next processing flow through the template inlet and send the template to the engine of the second platform according to the instruction.

9. The system engine template system of claim 1, wherein the component executes a first module in the event that there are multiple process flows of the plurality of process flows that require execution by a first platform, comprising:

a flow grouping first module, configured to group multiple processing flows according to an execution sequence of the multiple processing flows executed on the first platform, so as to obtain at least one flow group, where each flow group includes multiple processing flows;

the component parallel execution first module is used for controlling the DevOps component called on the first platform to execute the processing flow in the at least one flow group in parallel according to the template.

10. The system engine template system of claim 1, wherein there are a plurality of said second platforms; the cross-platform engine prepares a first module comprising:

the cross-platform engine prepares a first submodule for determining an execution sequence of a plurality of second platforms, comprising: determining a second platform to be executed in parallel with the first platform and a second platform to be executed in series with the first platform;

the component invocation engine second module comprising:

the parallel platform component calling engine module is used for controlling an engine of a second platform which is executed in parallel with the first platform to call a DevOps component which is configured on the second platform and is in parallel with the first platform according to the template so as to execute processing flows on the first platform and the second platform in parallel;

and the serial platform component calling engine module is used for controlling an engine of a second platform executing in series with the first platform to call a DevOps component configured on the second platform in series with the first platform according to the template so as to execute the processing flow on the first platform and execute the processing flow on the second platform when the processing flow on the second platform executing in parallel with the first platform is executed.

Background

The automatic operation and maintenance is to transfer the periodic, repetitive and regular work to a tool to carry out, automate a great amount of daily repetitive work in the IT operation and maintenance, and replace manual operation with automatic operation. The automatic operation and maintenance depends on an intelligent management platform developed in advance, the daily operation and maintenance problem of a user in IT management is automatically solved, and the operation and maintenance efficiency is further improved.

DevOps (compound words for developing Development and operation and maintenance Operations) is a general term of a group of processes, methods and systems, and is used for promoting Development of application programs/software engineering, communication, cooperation and integration between technical operation and quality assurance departments, promoting communication and cooperation between software developers (Dev) and IT operation and maintenance technical personnel (Ops), and helping all the personnel to automatically complete a series of processes such as software Development, test, deployment, operation and maintenance in the Development, operation and maintenance process in the form of an intelligent management platform.

At present, each module component integrated and packaged in various DevOps tools can be called through hard association of data, technicians usually integrate a third-party open-source tool component according to a specific technical framework to call so as to achieve an approximately automatic effect, however, the calling is only to trigger the effective operation through a logic set on a program, source information needs to be repeatedly input and continuous manual trial and error are needed in the integrating and debugging process, the components can only be called according to a fixed flow sequence after the debugging is completed, the realized functions are very limited, and the expansibility is very poor.

In practice, the development, operation and maintenance process generally involves multiple environments, and each person completes work in each environment and platform. Considering the difference between the environment and the platform, the current environment and the platform need to be configured and debugged separately, so that the consumption of a large amount of manpower and material resources is increased, the functions of the platform are further limited, and the development, operation and maintenance work of the software is adversely affected.

Disclosure of Invention

In view of the above, embodiments of the present invention propose a cross-platform DevOps engine template method and a cross-platform DevOps engine template system that overcome or at least partially solve the above problems.

In order to solve the above problem, an embodiment of the present invention provides a cross-platform DevOps engine template method, which is applied to an engine template system, the engine template system including a plurality of platforms, the method including:

the method comprises the steps of obtaining a product task to be completed and a template corresponding to the product task, wherein the product task comprises a plurality of processing flows, and the template is used for indicating the completion of the plurality of processing flows;

for the processing flows needing to be executed by the first platform in the plurality of processing flows, the engine of the first platform calls a DevOps component configured on the first platform according to the template;

the DevOps component called on the first platform executes the processing flow of the product task in the first platform according to the template;

determining a second platform in which the rest of the plurality of processing flows are located when the processing flows in the first platform are detected to be executed completely;

the engine of the first platform sends the template to the engine of the second platform;

and the engine of the second platform calls a DevOps component configured on the second platform according to the template so as to complete the processing flow of the product task in the second platform through the called DevOps component.

Optionally, the sending, by the engine of the first platform, the template to the engine of the second platform includes:

taking the last DevOps component called on the first platform as a process starting point, and creating a template entry;

and the engine of the first platform acquires the instruction of the template to the next processing flow through the template inlet, and sends the template to the engine of the second platform according to the instruction.

Optionally, when the invoked DevOps component on the first platform executes the flow of the product task in the first platform according to the template, or the flow of the product task in the second platform is completed by the invoked DevOps component, the method further comprises:

when the engine determines that the template indicates that the called next DevOps component is one of continuous delivery, continuous deployment and continuous release, configuring the product environment required by the product task according to the configuration information mounted in the template command; wherein the engine is an engine of a first platform or an engine of a second platform;

the configuration information includes at least one of: a product file required by the product environment, and an environment variable required by the current product environment.

Optionally, when the invoked DevOps component on the first platform executes the flow of the product task in the first platform according to the template, or the flow of the product task in the second platform is completed by the invoked DevOps component, the method further comprises:

the DevOps component feeds back the information of the completion of the calling of the DevOps component to an engine of a platform when the process of the product task in the component is completed according to the indication of the template; wherein the DevOps component is a DevOps component of a first platform or a DevOps component of a second platform;

and the engine feeds the information back to a front-end page.

Optionally, in a case that there are a plurality of process flows that need to be executed by the first platform in the plurality of process flows, the DevOps component invoked on the first platform executes the process flow of the product task in the first platform according to the template, including:

grouping the plurality of processing flows according to the execution sequence of the plurality of processing flows executed on the first platform to obtain at least one flow group, wherein each flow group comprises a plurality of processing flows;

the DevOps component invoked on the first platform executes the process flows in the at least one flow group in parallel according to the template.

Optionally, there are a plurality of said second platforms; determining a second platform on which remaining ones of the plurality of process flows are located, comprising:

determining an execution sequence for a plurality of second platforms, comprising: determining a second platform to be executed in parallel with the first platform and a second platform to be executed in series with the first platform;

the engine of the second platform calls a DevOps component configured on the second platform according to the template, and the DevOps component comprises:

an engine of a second platform executing in parallel with the first platform calls a DevOps component configured on the second platform in parallel with the first platform according to the template so as to execute processing flows on the first platform and the second platform in parallel;

and calling a DevOps component configured on a second platform in series with the first platform by an engine of the second platform in series with the first platform according to the template so as to execute the processing flow on the second platform when the processing flow on the first platform is executed and the processing flow on the second platform in parallel with the first platform is executed.

The embodiment of the invention also provides a cross-platform DevOps engine template system, which comprises a plurality of platforms, wherein the first platform comprises the following modules:

the system comprises a template acquisition engine first module, a template acquisition engine second module and a template processing module, wherein the template acquisition engine first module is used for acquiring a product task to be completed and a template corresponding to the product task, the product task comprises a plurality of processing flows, and the template is used for indicating the completion of the plurality of processing flows;

a component calling engine first module, configured to control an engine of the first platform to call a DevOps component configured on the first platform according to the template for a processing flow that needs to be executed by the first platform among the plurality of processing flows; the first platform is a platform where a first module of the component call engine is located;

the component execution first module is used for controlling the DevOps component called on the first platform to execute the processing flow of the product task in the first platform according to the template;

the cross-platform engine prepares a first module, which is used for determining a second platform where the rest of the processing flows in the plurality of processing flows are located when the processing flows in the first platform are detected to be executed completely;

executing a first module by a cross-platform engine, wherein the first module is used for controlling the engine of the first platform to send the template to the engine of the second platform;

on the second platform the following modules are included:

the component calling engine second module is used for controlling an engine of the second platform to call a DevOps component configured on the second platform according to the template so as to complete the processing flow of the product task in the second platform through the called DevOps component; and the second platform is the platform where the second module of the component call engine is located.

Optionally, the first platform further comprises the following modules:

the component starting first module is used for taking the last DevOps component called on the first platform as a flow starting point and creating a template inlet;

the cross-platform engine executes a first module comprising: and the cross-platform engine executes a first sub-module, and the first sub-module is used for the engine of the first platform to obtain the instruction of the template to the next processing flow through the template inlet and send the template to the engine of the second platform according to the instruction.

Optionally, in a case that there are a plurality of process flows that need to be executed by the first platform in the plurality of process flows, the component executes the first module, including:

a flow grouping first module, configured to group multiple processing flows according to an execution sequence of the multiple processing flows executed on the first platform, so as to obtain at least one flow group, where each flow group includes multiple processing flows;

the component parallel execution first module is used for controlling the DevOps component called on the first platform to execute the processing flow in the at least one flow group in parallel according to the template.

Optionally, there are a plurality of said second platforms; the cross-platform engine prepares a first module comprising:

the cross-platform engine prepares a first submodule for determining an execution sequence of a plurality of second platforms, comprising: determining a second platform to be executed in parallel with the first platform and a second platform to be executed in series with the first platform;

the component invocation engine second module comprising:

the parallel platform component calling engine module is used for controlling an engine of a second platform which is executed in parallel with the first platform to call a DevOps component which is configured on the second platform and is in parallel with the first platform according to the template so as to execute processing flows on the first platform and the second platform in parallel;

and the serial platform component calling engine module is used for controlling an engine of a second platform executing in series with the first platform to call a DevOps component configured on the second platform in series with the first platform according to the template so as to execute the processing flow on the first platform and execute the processing flow on the second platform when the processing flow on the second platform executing in parallel with the first platform is executed.

It can be seen from the foregoing technical solutions that the embodiments of the present invention provide a cross-platform DevOps engine template method and a cross-platform DevOps engine template system, which take into account the situations of low data hard association degree of freedom, high debugging difficulty, and low automation operation and maintenance efficiency of the existing DevOps tool assembly, call a DevOps assembly in a DevOps platform by an external engine according to the instruction of a command template, and implement template free configuration and cross-platform DevOps automation operation and maintenance by using the inter-platform engine intercommunication, thereby meeting the requirements of cross-environment and cross-platform development operation and maintenance, and improving the functional flexibility and automation degree of the DevOps tool.

Drawings

FIG. 1 is a flow chart of the steps of a cross-platform DevOps engine template method provided by an embodiment of the present invention;

FIG. 2 is a diagram of an exemplary structure of a cross-platform DevOps engine template system according to an embodiment of the present invention;

FIG. 3 is a flowchart illustrating steps of a method for executing a process flow in parallel in a platform according to an embodiment of the present invention;

FIG. 4 is an exemplary diagram of a cross-platform environment for parallel execution of processing flows within a platform according to an embodiment of the present invention;

FIG. 5 is a flowchart illustrating steps of a method for processing a multi-platform parallel execution flow according to an embodiment of the present invention;

FIG. 6 is a diagram illustrating an example of a cross-platform environment for performing a processing flow in parallel on multiple platforms according to an embodiment of the present invention;

fig. 7 is a block diagram of a cross-platform DevOps engine template system according to an embodiment of the present invention.

Detailed Description

The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

A series of DevOps tools have appeared in the related art, and all the tools are designed to provide fully automatic operation support for software development, testing, deployment, operation and maintenance. The current DevOps tool integrates and encapsulates modules of project management, code management, CI (Continuous Integration), CD (Continuous Deployment of.

Aiming at various increasingly enriched DevOps tools, technical personnel integrate third-party open-source tool components to call in a specific sequence according to a specific technical framework, and finally only one function of debugging, configuration and sizing can be used correspondingly, but the method is not suitable for different use scenes and operation and maintenance requirements. Considering again that development and maintenance usually involve multiple environments and platforms. The environment includes a development environment, a test environment, a regression environment, a pre-release environment, a production environment, and the like, and the platforms include, for example: saas, codo, bigops, and the like. Illustratively, the same software may be developed and tested on a DevOps platform in an intranet environment, and then packaged to enter a DevOps platform in a public network environment to complete delivery and deployment, the types of the DevOps platforms in the environments on two sides may also have differences, and the versions of the DevOps platforms may also have differences, thereby further hindering the implementation of cross-platform software automation operation and maintenance and increasing difficulty.

Therefore, the embodiment of the invention provides a cross-platform DevOps engine template method and system, which take the rigor of component calling in a DevOps platform in the related technology into consideration and are difficult to realize cross-platform automatic operation and maintenance, can externally connect an engine through an API (application programming interface), call the template by the engine, call the DevOps component in the DevOps platform according to the indication of the template, realize the transmission of template processes and the relay of the DevOps component calling by utilizing the intercommunication of the engines among the platforms, realize the cross-platform DevOps automatic operation and maintenance with freely configured templates, meet the requirements of cross-environment and cross-platform development operation and maintenance, and improve the functional flexibility and the automation degree of a DevOps tool.

The following describes embodiments of the present invention with reference to the drawings.

Referring to fig. 1, fig. 1 is a flowchart illustrating steps of a cross-platform DevOps engine template method according to an embodiment of the present invention. As shown in FIG. 1, an embodiment of the present invention provides a cross-platform DevOps engine template method, which is applied to an engine template system.

Referring to fig. 2, fig. 2 is a diagram illustrating a structure of a cross-platform DevOps engine template system according to an embodiment of the present invention. As shown in fig. 2, the engine template system includes a plurality of platforms including at least: a first platform and a second platform.

As shown in fig. 2, in an example provided by the present invention, each platform of the Engine template system includes components such as project management, code hosting, CI, testing, CD, and product management, and each component can actively create a template entry through the Engine, receive a template command, and execute an execution sequence set by a step template. The system comprises a first platform, a second platform and the like, wherein the first platform, the second platform and the like can execute a plurality of steps in parallel on the platforms; the first platform, the second platform and other platforms can extend the task processing flow of the product, and cross-platform automatic operation and maintenance is realized.

As shown in fig. 2, the first platform sequentially executes the following step templates in the first product task pipeline: step1 → Step2 → Step 3; and executing the following step templates in parallel with the first product task pipeline by the first platform in the second product task pipeline in sequence: step1 → Step2 → Step 3. The extension of the first product task pipeline in the second platform is as follows: step4 → Step5, the second platform sequentially executes the following Step templates in the first product task pipeline: step4 → Step5, the first platform and the second platform together complete the processing flow of the product task: step1 → Step2 → Step3 → Step4 → Step 5. In addition, the second platform sequentially executes the following step templates in the third product task pipeline in parallel with the first product task pipeline: step1 → Step2 → Step 3.

The cross-platform DevOps engine template method specifically comprises the following steps:

s31, obtaining a product task to be completed and a template corresponding to the product task, wherein the product task comprises a plurality of processing flows, and the template is used for indicating the completion of the plurality of processing flows.

Specifically, a platform for executing a first processing flow of a product task may be set as the first platform, and an engine of the first platform obtains the product task to be completed and a template corresponding to the product task. Illustratively, when the first process flow of the product task is "project management", the platform performing the "project management" may be taken as the first platform.

The engine of the platform can communicate and call with a DevOps component in the platform in a serial port communication mode, for example: API application programming interfaces.

The product task may be a task in a software development operation and maintenance process, and the product task may include: project management, code hosting, persistent integration, testing, persistent delivery, persistent deployment, persistent publishing, and the like. The template corresponding to the product task is a command-type template, and indicates the execution sequence of a plurality of processing flows, the platform corresponding to each processing flow and the component corresponding to each processing flow included in the product task, namely, which component of which platform executes each processing flow, which processing flow is completed first and which processing flow is completed later.

In this embodiment, the template may be configured by self-defining according to the requirements of the user, and the template indicates that the sequence of the multiple processing flows and the platform are not particularly limited, so that any collocation may be implemented. For example, the execution sequence of the processing flow of the first platform may be: step1, project management, step2, code hosting and step3, continuous integration, wherein the execution sequence of the processing flow of the second platform may be: and 4, continuously deploying the step5 after the step4 of testing. The execution sequence of the processing flow of the first platform may also be: step1, project management, step2, continuous integration, step3, testing, and the execution sequence of the processing flow of the second platform may also be: and 4, testing.

According to the embodiment, all commands are delivered to the engine through the template to be executed, namely, all the flow matters are delivered to the engine deployed by the platform, the relevant configuration before the components is not required to be emphasized, the workload of operation and maintenance personnel can be effectively reduced, and the expandability and the flexibility of the platform functions are improved. Meanwhile, each component is not limited by fixed associated configuration any more, and more value spaces for deepening the function direction of the component are provided.

S32, for a processing flow that needs to be executed by the first platform in the plurality of processing flows, the engine of the first platform calls the DevOps component configured on the first platform according to the template.

In this embodiment, the processing flow that the first platform needs to execute is determined according to the template, and is a flow that needs to be completed first in the first platform and is executed in the multiple processing flows of the product task executed across platforms.

Specifically, the engine of the first platform analyzes the command-type template, and obtains command information such as the execution order of the plurality of processing flows in the template, the platform corresponding to each processing flow, and the component corresponding to each processing flow. The command information includes first command information, and the first command information at least includes: the execution sequence of the processing flow required to be executed by the first platform and the components corresponding to each processing flow required to be executed by the first platform are used, so that the engine of the first platform correspondingly calls the DevOps components configured on the first platform according to the first command information.

Illustratively, when the engine of the first platform resolves to the execution sequence of the processing flow of the first platform indicated by the current template, the execution sequence is: step1, project management, step2, code hosting and step3, continuous integration; and correspondingly, the engine of the first platform calls the project management component of the first platform, the code conduit component of the first platform and the continuous integration component of the first platform in sequence.

S33, the DevOps component called on the first platform executes the processing flow of the product task in the first platform according to the template.

In this embodiment, after the previous processing flow indicated by the template is completed, the engine of the first platform may invoke the next component to execute the next processing flow, and sequentially complete the processing flows of the product tasks in the first platform.

For example, the execution order of the processing flow of the first platform indicated by the template may be: step1, project management, step2, code hosting and step3, continuous integration; accordingly, after calling the project management component of the first platform to complete the step1, namely the execution of the project management according to the command information of the template, the engine of the first platform calls the code hosting component of the first platform to complete the step2, namely the execution of the code hosting, and finally calls the continuous integration component of the first platform to complete the step3, namely the execution of the continuous integration.

S34, when it is detected that the execution of the process flow in the first platform is completed, determining a second platform in which the remaining process flows in the plurality of process flows are located.

Specifically, when it is detected that the processing flow that needs to be executed last in the first platform is executed completely, the engine of the first platform needs to determine, according to the command information of the template, the second platform where the remaining processing flows in the plurality of processing flows are located.

Illustratively, when the persistent integration component of the first platform completes step3, the execution of persistent integration, the next step may be further executed by the component of the second platform: and 4. step 4.

Wherein the remaining process flows are process flows that need to be completed in the second platform.

S35, the engine of the first platform sends the template to the engine of the second platform.

Specifically, the embodiment may configure a hardware network in advance, so as to implement physical network connection between the cross-platform engines; after the template is analyzed, the engine of the first platform may acquire a correspondence between the remaining processing flows in the command information of the template and the components in the second platform, and establish a communication connection with the engine of the second platform.

To facilitate the intercommunication between the engines, the engines of the platforms in this embodiment may be the same type of engine. The optional engine types include: jenkins-pipeline, Azure-yaml, xml, json.

In this embodiment, the first platform further needs to establish a communication connection with the second platform, and after determining the second platform where the remaining processing flows in the plurality of processing flows are located in step S34, the first platform packages the relevant files of the product task that has been completed by the DevOps component executing the last step in the first platform into a file package, and sends the file package to the second platform; the second platform receives the file packet and carries out security test on the file packet; after the engine of the second platform completes the analysis of the template, the second platform sends the execution file package to a DevOps component in the second platform for executing the first step. Wherein the DevOps component in the first platform that performs the last step, i.e., the last DevOps component invoked on the first platform; the DevOps component in the second platform that performs the first step, i.e., the first DevOps component invoked on the second platform.

In this embodiment, when the execution of the processing flow in the first platform is completed, the engine of the first platform determines the second platform, and sends the template to the engine of the second platform, so that the engine relay can be completed naturally without considering the speed of the first platform in executing the processing flow, and the seamless connection of the calling between the platform components is realized.

S36, the engine of the second platform calls the DevOps component configured on the second platform according to the template, so as to complete the processing flow of the product task in the second platform through the called DevOps component.

In this embodiment, after the engine of the second platform acquires the template, the template is also analyzed to acquire command information such as the execution sequence of the plurality of process flows, the platform corresponding to each process flow, and the component corresponding to each process flow in the template. The command information includes second command information including at least: and the execution sequence of the processing flow required to be executed by the second platform and the components corresponding to the processing flows required to be executed by the second platform are used for enabling the engine of the second platform to correspondingly call the DevOps components configured on the second platform according to the second command information.

Illustratively, the execution order of the processing flow that the engine of the second platform resolves to the template indicating that the second platform needs to complete is: step4, testing, step5, continuously deploying; and correspondingly, the engine of the second platform calls the test component of the second platform and the continuous deployment component of the second platform in sequence.

Through the embodiment, the configuration engine can call the DevOps component in the DevOps platform according to the instruction of the template by a plurality of platforms with different environments, different types and different versions, the transmission of the template process and the relay of the calling of the DevOps component are realized by utilizing the intercommunication of the engines among the platforms and the intercommunication among the platforms, the processing process of the product task can be executed according to the template cross-network environment, the template realizes the calling of the cross-network environment, thereby achieving the effect of template transmission and realizing the automatic operation and maintenance of the template freely configured and cross-platform DevOps.

In an alternative embodiment, the DevOps components may be deployed based on docker containerization in advance, that is, the DevOps components in each platform are deployed in a docker container individually, so as to facilitate the call and management among the components. Illustratively, the deployment may be based on a docker container of the K8S microservice architecture.

Considering that the barriers of cross-environment and cross-platform component calling are deepened when DevOps components in the related technology are started based on data hard association, if an engine is simply used as a starting point of cross-platform operation, the cross-platform calling is difficult to relay due to a small fault of the engine, and in order to further improve the flexibility of mutual calling of the components according to an engine template and improve the success rate of cross-platform, the invention also provides a method for actively calling the components, which specifically comprises the following steps:

taking the last DevOps component called on the first platform as a process starting point, and creating a template entry;

and the engine of the first platform acquires the instruction of the template to the next processing flow through the template inlet, and sends the template to the engine of the second platform according to the instruction.

The flow starting point is the central starting point of the flow processing, the last DevOps component called on the first platform performs the flow operation by taking the DevOps component as the center, namely, the starting point of the flow is reset in the whole flow calling, and the software bugs possibly existing in the previous flow are reset, so that the running errors occurring in the whole processing flow of the product task are reduced.

The template entry is an entry of a current DevOps component calling the template through the engine, when the DevOps component is taken as a flow starting point, the DevOps component calls the template through the engine, the engine calls the next component according to the indication of the template, and the realized effect is equivalent to that the DevOps component directly calls the template and calls the next component according to the indication of the template.

Illustratively, if the last called DevOps component on the first platform is a persistent integration component, step3 — persistent integration is performed, after the persistent integration component completes the execution of step3, a template entry is created, so that the persistent integration component calls the template through the engine of the first platform, and then the engine of the first platform performs cross-platform operation according to the instruction of the template, and sends the template to the engine of the second platform.

Through the embodiment, the last component called by the first platform is used as a central starting point to complete the cross-platform operation, so that the flexibility of cross-platform calling among the components is improved, and the failure rate of the cross-platform operation can be effectively reduced.

In an optional implementation manner, an interface may be configured for each component in a plurality of platforms in advance, so that each component has a capability of creating a template entry, each component may be a central starting point, the components may be centered on themselves, and a template is called by an engine, so that a flow process of starting point resetting is realized, flexibility of calling between the components is increased, and a failure rate of calling operation can be effectively reduced.

Through the embodiment, the components in the platform can be operated in series and/or in parallel, no barrier exists among the platform components, all operation modes are operated and started based on the template commands, any steps and flow can be customized, the instantiation of the template is not strongly associated with the coding language, and the template can freely run in various language environments to realize the operation which is used and desired.

In the related art, in the process of automatic operation and maintenance, tasks such as delivery, deployment, release and the like of a product need to be operated for the product, and the invention considers that configuration information is mounted by using a template and related product files and environment configuration variables are provided, so that the embodiment of the invention also provides a method for mounting the configuration information, which comprises the following steps:

when the engine determines that the template indicates that the called next DevOps component is one of continuous delivery, continuous deployment and continuous release, configuring the product environment required by the product task according to the configuration information mounted in the template command; wherein the engine is an engine of a first platform or an engine of a second platform;

the configuration information includes at least one of: a product file required by the product environment, and an environment variable required by the current product environment.

The engine of the platform can analyze the configuration information mounted in the template command before calling the corresponding component to execute one of the processing flows of continuous delivery, continuous deployment and continuous release according to the specific configuration of the template, configure the environment according to the environment variables required by the current product environment in the configuration information, and send the product files required by the product environment to the corresponding component. Wherein the corresponding component is one of a continuous delivery component, a continuous deployment component, and a continuous publishing component corresponding to the process flow.

Similarly, the above scheme can also be applied to the cross-platform calling process to simplify the communication transmission operation between the platforms.

Considering that a user needs to intuitively know the execution progress of the processing flow of the product task, the invention also provides a method for feeding back flow execution information, which comprises the following steps:

the DevOps component feeds back the information of the completion of the calling of the DevOps component to an engine of a platform when the process of the product task in the component is completed according to the indication of the template; wherein the DevOps component is a DevOps component of a first platform or a DevOps component of a second platform;

and the engine feeds the information back to a front-end page.

Specifically, in this embodiment, by presetting a callback function, in whichever platform, after the current DevOps component executes the processing flow of the product task in the component, the callback function is called, and the called information of the DevOps component is fed back to the engine of the platform where the DevOps component is located, so that the engine feeds back the information to the front-end page, and then the user can check to which step the product task is specifically executed through the front-end page.

Optionally, when an error occurs in the execution of the product task, the engine may also feed back execution error information to the front-end page, and alert the user so that the user performs a targeted error correction operation.

Referring to fig. 3, fig. 3 is a flowchart illustrating steps of a method for executing a processing flow in parallel in a platform according to an embodiment of the present invention. Based on the above technical solution, as shown in fig. 3, the present invention further provides a method for executing processing flows in parallel in a platform, where there are multiple processing flows that need to be executed by a first platform in the multiple processing flows, the method specifically includes:

s41, grouping the plurality of processing flows according to the execution sequence of the plurality of processing flows executed on the first platform to obtain at least one flow group, wherein each flow group comprises a plurality of processing flows;

s42, the DevOps component called on the first platform executes the processing flow in the at least one flow group in parallel according to the template.

Referring to fig. 4, fig. 4 is a diagram illustrating an example of a cross-platform environment for parallel execution of processing flows in a platform according to an embodiment of the present invention. As shown in fig. 4, a user may define a template command in advance, the first platform engine divides a processing flow that a product task needs to be executed by the first platform into a plurality of flow groups according to the template, executes the flow groups in parallel, and performs a cross-platform operation after the processing flows of all the flow groups in the first platform are executed, so as to execute the processing flow in the second platform. The parallel execution does not emphasize the parallel of time sequence, but means the parallel of the processing flows of the respective product tasks, so as to realize the summary of the processing flows of the product tasks.

This is illustrated by way of example with reference to fig. 4: the user can define the template command in advance, so that after the engine analyzes the template command, the processing flow of the product task, which needs to be executed by the first platform, is divided into a flow group 1 and a flow group 2, wherein the flow group 1 comprises: step1 → step2 → step3, scheme group 2 comprises: step2 → step 3. The first platform executes the process group 1 and the process group 2 in parallel, after the execution of the processing processes of all the process groups in the first platform is completed, task results executed by the two process groups, such as code file packets, are collected and sent to the second platform, the engine of the first platform sends the template to the engine of the second platform, the cross-platform operation is completed, and the remaining processing processes in the second platform are executed: step4 → step5 → step 6.

According to the embodiment, the template flow can be configured according to a stepped thought aiming at specific requirements of a special scene and a product task, for example, under the condition that multiple departments are required to respectively finish partial tasks of the same processing flow of the product task in the same platform, the processing flow of the product task is executed in parallel in the platform, and finally the next processing flow is summarized for continuous execution, so that the efficiency of automatic product development, operation and maintenance is improved.

Referring to fig. 5, fig. 5 is a flowchart illustrating steps of a method for processing a flow of parallel execution of multiple platforms according to an embodiment of the present invention. Through the above embodiments, a technical solution for implementing free configuration of templates is provided, and a functional combination of a platform can be flexibly and automatically implemented based on a command-type template, and based on this, specific requirements of other special scenes and product tasks are further considered, as shown in fig. 5, the present invention further provides a method for executing a processing flow in parallel by multiple platforms, where there are multiple second platforms, and the method specifically includes the following steps:

determining an execution sequence for a plurality of second platforms, comprising: a second platform is determined that executes in parallel with the first platform and a second platform that executes in series with the first platform.

In this embodiment, when it is detected that the processing flow in the first platform is executed completely, determining a second platform on which the remaining processing flows in the plurality of processing flows are located, and determining an execution sequence of the plurality of second platforms; thereafter, the engine of the first platform sends the template to an engine of a second platform executing in parallel with the first platform.

The engine can determine a second platform executed in parallel with the first platform and a second platform executed in series with the first platform by analyzing the platform sequence marks of the product tasks in the template.

The engine of the second platform calls a DevOps component configured on the second platform according to the template, and the DevOps component comprises:

s51, the engine of the second platform executing in parallel with the first platform calls the DevOps component configured on the second platform in parallel with the first platform according to the template, so as to execute the processing flow on the first platform and the second platform in parallel.

In this embodiment, after the engine of the first platform sends the template to the engine of the second platform executing in parallel with the first platform, the second platform executing in parallel with the first platform executes the processing flow of the product task in parallel with the first platform. The parallel execution does not fully emphasize the parallel of the time sequence, but means the parallel of the processing flows of the respective product tasks, so as to realize the summary of the processing flows of the product tasks.

And S52, the engine of the second platform executing in series with the first platform calls a DevOps component configured on the second platform in series with the first platform according to the template, so as to execute the processing flow on the second platform when the processing flow on the first platform is executed and the processing flow on the second platform executing in parallel with the first platform is executed.

Specifically, due to the parallel execution of the product task processing flow, a second platform that executes in series with the first platform, i.e., a second platform that also executes in parallel with the first platform, executes in series.

Referring to fig. 6, fig. 6 is a diagram illustrating an example of a cross-platform environment in which multiple platforms execute processing flows in parallel according to an embodiment of the present invention. As shown in fig. 6, a user may define a template command in advance, and the first platform engine processes a flow in parallel by the first platform and the second platform executed in parallel with the first platform according to the template, and then executes the remaining flow by the second platform executed in series with the first platform. The parallel execution does not emphasize the parallel of time sequence, but means the parallel of the processing flows of the respective product tasks, so as to realize the summary of the processing flows of the product tasks.

Exemplary description is made with reference to fig. 6: the user can define the template command in advance, so that after the engine of the first platform analyzes the template command, the processing flow of the product task which needs to be executed by the first platform is obtained as follows: step1 → step2 → step3, the processing flow executed by the second platform for obtaining the product task to be executed in parallel with the first platform is as follows: step1 → step2 → step3, namely the template can be sent to the second platform executed in parallel with the first platform, the engine of the second platform executed in parallel with the first platform calls the components in the platform according to the template, and the second platform is executed in parallel with the first platform, after the execution of the processing flow of the first platform and the second platform executed in parallel with the first platform is completed, the task results executed by the two platforms, such as the code file packet, are sent to the second platform executed in series with the first platform, the first platform sends the template to the second platform executed in series with the first platform, the cross-platform operation is completed, and the rest processing flow in the second platform executed in series with the first platform is executed: step4 → step5 → step 6.

Through the embodiment, based on the flexible configurability of the cross-platform automatic operation and maintenance, namely, the flow of the template is directly configured according to the idea and thought of the user, so that the used and desired state is achieved, the specific requirements of special scenes and product tasks can be further realized, for example, under the condition that a plurality of enterprises under different network environments are required to respectively complete partial tasks of the same processing flow of the product tasks in different platforms, the processing flow of the product tasks can be executed in parallel by multiple platforms, the processing flow in the next platform is finally summarized and continuously executed, the requirements of all parties are easily met, and the efficiency of the automatic operation and maintenance is further improved.

Referring to fig. 7, fig. 7 is a block diagram illustrating a structure of a cross-platform DevOps engine template system according to an embodiment of the present invention. As shown in fig. 7, based on the same inventive concept, an embodiment of the present invention further provides a cross-platform DevOps engine template system, which includes a plurality of platforms, wherein the first platform includes the following modules:

a template obtaining engine first module 61, configured to obtain a product task to be completed and a template corresponding to the product task, where the product task includes multiple processing flows, and the template is used to instruct to complete the multiple processing flows;

a component calling engine first module 62, configured to control an engine of the first platform to call a DevOps component configured on the first platform according to the template for a processing flow that needs to be executed by the first platform among the plurality of processing flows; the first platform is a platform where a first module of the component call engine is located;

the component execution first module 63 is used for controlling the DevOps component called on the first platform to execute the processing flow of the product task in the first platform according to the template;

a cross-platform engine preparation first module 64 for determining a second platform on which the remaining processing flows of the plurality of processing flows are located when detecting that the processing flows in the first platform are executed;

executing a first module 65 across platform engines for controlling the engine of the first platform to send the template to the engine of the second platform;

on the second platform the following modules are included:

a component calling engine second module 66, configured to control an engine of the second platform to call a DevOps component configured on the second platform according to the template, so as to complete a processing flow of the product task in the second platform through the called DevOps component; and the second platform is the platform where the second module of the component call engine is located.

Optionally, the second platform also has the same function as the first platform, and for this purpose, the second platform may further include the following modules: the system comprises a template acquisition engine second module, a component calling engine second module, a component execution second module, a cross-platform engine preparation second module and a cross-platform engine execution second module. The functions of the modules are the same as or similar to those of the corresponding modules in the first platform, so that the second platform calls the components through the engine of the platform according to the template, the subsequent flow of the product task processing flow executed in the first platform is extended and executed, and the rest processing flows which are not processed and finished by the first platform and the second platform are handed over to the third platform for processing.

By analogy, the engine template system may further include a third platform, a fourth platform, a fifth platform, and so forth.

Optionally, the first platform further comprises the following modules:

the component starting first module is used for taking the last DevOps component called on the first platform as a flow starting point and creating a template inlet;

the cross-platform engine executes a first module comprising: and the cross-platform engine executes a first sub-module, and the first sub-module is used for the engine of the first platform to obtain the instruction of the template to the next processing flow through the template inlet and send the template to the engine of the second platform according to the instruction.

Optionally, in a case that there are a plurality of process flows that need to be executed by the first platform in the plurality of process flows, the component executes the first module, including:

a flow grouping first module, configured to group multiple processing flows according to an execution sequence of the multiple processing flows executed on the first platform, so as to obtain at least one flow group, where each flow group includes multiple processing flows;

the component parallel execution first module is used for controlling the DevOps component called on the first platform to execute the processing flow in the at least one flow group in parallel according to the template.

Optionally, there are a plurality of said second platforms; the cross-platform engine prepares a first module comprising:

the cross-platform engine prepares a first submodule for determining an execution sequence of a plurality of second platforms, comprising: determining a second platform to be executed in parallel with the first platform and a second platform to be executed in series with the first platform;

the component invocation engine second module comprising:

the parallel platform component calling engine module is used for controlling an engine of a second platform which is executed in parallel with the first platform to call a DevOps component which is configured on the second platform and is in parallel with the first platform according to the template so as to execute processing flows on the first platform and the second platform in parallel;

and the serial platform component calling engine module is used for controlling an engine of a second platform executing in series with the first platform to call a DevOps component configured on the second platform in series with the first platform according to the template so as to execute the processing flow on the first platform and execute the processing flow on the second platform when the processing flow on the second platform executing in parallel with the first platform is executed.

The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.

While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.

Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal 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 terminal. 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 terminal that comprises the element.

The present invention provides a cross-platform DevOps engine template method and a cross-platform DevOps engine template system, which are introduced in detail above, and specific examples are applied herein to illustrate the principles and embodiments of the present invention, and the above description of the embodiments is only used to help understanding the method and the core ideas of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

完整详细技术资料下载
上一篇:石墨接头机器人自动装卡簧、装栓机
下一篇:信息处理装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!