Disclosure of Invention
In order to solve the problems, the application provides a business development method based on a water conservancy cloud primary integrated machine, which comprises the following steps:
determining a core component required for realizing the development requirement of water conservancy service, wherein the core component comprises a micro-service framework, a cloud operating system, a container management platform and an automatic operation and maintenance tool;
determining a hardware platform for constructing the water conservancy cloud primary integrated machine, and deploying the core component into the hardware platform to obtain the deployed water conservancy cloud primary integrated machine;
When delivering a water conservancy project through the water conservancy cloud primary integrated machine, determining a water conservancy service requirement corresponding to the water conservancy project, and determining whether a core component integrated in the water conservancy cloud primary integrated machine supports the water conservancy service requirement;
if not, based on the water conservancy cloud primary integrated machine, the core component is deployed and upgraded according to the water conservancy business requirement, so that the expansion development of the water conservancy project is realized.
In one implementation manner of the present application, deployment and upgrading are performed on the core component according to the water conservancy service requirement, so as to realize expansion development of the water conservancy project, and the implementation manner specifically includes:
dividing the deployment upgrading flow of the water conservancy cloud primary integrated machine into a plurality of stages, wherein the stages comprise a development stage, a deployment stage and a production stage;
Based on the development stage, a warehouse address corresponding to the water conservancy project is created in a remote code warehouse, and project codes corresponding to the water conservancy project are obtained from the remote code warehouse, so that development of the water conservancy business requirements is carried out through the project codes, and a local engineering code is obtained;
Dividing a local engineering code into a plurality of code branches based on the deployment stage, mirror-image packaging the code branches based on a cloud deployment environment where the code branches are located, deploying and upgrading the project instance of the water conservancy project according to the obtained mirror-image product, and uploading the mirror-image product to a mirror-image warehouse under the condition that the deployed and upgraded project instance passes the mirror-image function test in the cloud deployment environment;
And acquiring a specified mirror image product from the mirror image warehouse based on the production stage, and performing deployment upgrading on the core component based on the specified mirror image product so as to realize the expansion development of the water conservancy project.
In one implementation manner of the present application, based on a cloud deployment environment where the code branches are located, the code branches are mirror-packaged, so as to deploy and upgrade project instances of the water conservancy project according to the obtained mirror-image product, which specifically includes:
The code branches comprise development branches, test branches and formal branches, and the cloud deployment environment comprises a development environment, a test environment and an integrated demonstration environment;
Triggering mirror image packaging operation aiming at the development branch according to code submitting operation carried out by the development branch in the development stage based on the development environment where the development branch is positioned, and obtaining a first mirror image product corresponding to the development environment;
According to the first mirror image product, carrying out deployment upgrading on the project instance of the water conservancy project, and carrying out mirror image function test on the deployed and upgraded first project instance;
Under the condition that the first project instance passes the mirror image function test, performing a first merging operation on the development branch and the test branch, and triggering a mirror image packing operation for the test branch based on the first merging operation to obtain a second mirror image product corresponding to the test environment;
according to the second mirror image product, carrying out deployment upgrading on the project instance of the water conservancy project, and carrying out mirror image function test on the deployed and upgraded second project instance;
under the condition that the second project instance passes the mirror image function test, performing a second merging operation on the test branch and the formal branch, and triggering a mirror image packing operation for the formal branch based on the second merging operation to obtain a third mirror image product corresponding to the integrated demonstration environment;
And carrying out deployment upgrading on the project examples of the water conservancy project according to the third mirror image product, and carrying out mirror image function test on the third project examples after deployment upgrading.
In one implementation manner of the present application, the mirror image warehouse includes a private product warehouse and a public network mirror image warehouse, and in the case that the project instance after deployment and upgrading passes the mirror image function test in the cloud deployment environment, the mirror image product is uploaded to the mirror image warehouse, which specifically includes:
uploading the first mirrored artifact and the second mirrored artifact to a private artifact warehouse if the first project instance and the second project instance pass mirrored functional tests in the development environment and the test environment, respectively;
And uploading the third mirror image product to a public network mirror image warehouse under the condition that the third project example passes the mirror image function test in the integrated demonstration environment, acquiring helm application packages generated by the formal branches, and uploading the helm application packages to an application warehouse under the public network mirror image warehouse.
In one implementation of the present application, before the specified mirror product is obtained from the mirror warehouse, the method further includes:
determining a project environment corresponding to the water conservancy project, wherein the project environment comprises a networking state and a network disconnection state;
And acquiring the appointed mirror image product from the mirror image warehouse based on the project environment, wherein the appointed mirror image product is a third mirror image product.
In one implementation of the present application, based on the project environment, the obtaining the specified mirror product from the mirror warehouse specifically includes:
pulling the third mirror image product from a public network mirror image warehouse under the condition that the project environment is in the networking state;
and under the condition that the project environment is in the network disconnection state, instantiating a third mirror image product in the public network mirror image warehouse, and copying the instantiated third mirror image product to the project environment through a preset transmission medium.
In one implementation manner of the present application, the development of the water conservancy service requirement is performed through the project code to obtain a local engineering code, which specifically includes:
Determining whether dependence exists in realizing the water conservancy service requirements when the development of the water conservancy service requirements is carried out;
If yes, pulling the dependency from a preset Maven product dependency library, and completing development of the project code through the dependency to obtain a local project code.
In one implementation manner of the present application, after deployment and upgrading of the project instance of the water conservancy project according to the obtained mirror image product, the method further includes:
Under the condition that the project example after deployment and upgrading does not pass the mirror image function test in the cloud deployment environment, performing function optimization on the corresponding code branch, and based on the optimized code branch, re-performing mirror image packaging on the code branch and performing deployment and upgrading on the project example until the project example passes the mirror image function test in the cloud deployment environment.
The embodiment of the application provides service development equipment based on a water conservancy cloud primary integrated machine, which comprises the following components:
at least one processor;
And a memory communicatively coupled to the at least one processor;
The memory stores instructions executable by the at least one processor to enable the at least one processor to perform a business development method based on a water conservancy cloud primary machine as set forth in any one of the above.
Embodiments of the present application provide a non-volatile computer storage medium storing computer-executable instructions configured to:
the business development method based on the water conservancy cloud primary integrated machine.
The business development method based on the water conservancy cloud primary integrated machine provided by the application has the following beneficial effects:
through integrating a plurality of core components, the water conservancy cloud primary integrated machine realizes the whole optimization from development to deployment, and the integrated design greatly simplifies the deployment flow and shortens the system on-line time, thereby improving the overall efficiency of water conservancy service development.
The micro-service architecture and the containerization technology enable the water conservancy cloud primary integrated machine to be expanded as required, flexibly cope with the change of water conservancy business, and ensure the continuity and stability of the water conservancy business.
The water conservancy cloud primary all-in-one machine supports direct deployment in a professional machine room or a common indoor environment, so that the convenience of plug-and-play is realized, the deployment threshold is reduced, and the operation and maintenance work is more efficient and flexible.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be clearly and completely described below with reference to specific embodiments of the present application and corresponding drawings. It will be apparent that the described embodiments are only some, but not all, embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The following describes in detail the technical solutions provided by the embodiments of the present application with reference to the accompanying drawings.
As shown in fig. 1, the service development method based on the water conservancy cloud primary integrated machine provided by the embodiment of the application includes:
And S101, determining a core component required for realizing the development requirement of the water conservancy service, wherein the core component comprises a micro-service framework, a cloud operating system, a container management platform and an automatic operation and maintenance tool.
The embodiment of the application aims to solve the problems of system dispersion, complex operation and maintenance, poor expansibility and the like in water conservancy informatization construction, and provides a water conservancy cloud primary integrated machine system which is high in integration level and easy to deploy and operate and maintain.
The cooperation among the core components can realize the development requirement of water conservancy service, and mainly comprises a micro-service framework, a cloud operating system, a container management platform and an automatic operation and maintenance tool. The micro service framework is used for splitting the water conservancy service system into a plurality of independent service modules according to a micro service architecture principle, interacting through a lightweight communication protocol, improving flexibility and expandability of the system, splitting the water conservancy service system into the micro service modules, and deploying the micro service modules into a container through a CI/CD pipeline after development is completed. The cloud operating system is constructed based on a virtualization technology, and provides functions of resource pooling, dynamic scheduling, isolation protection and the like, so that stable operation of the cloud native application is ensured. And the container management platform adopts a main stream container arrangement tool such as Kubernetes and the like to realize automatic deployment, management and expansion of containers and support rapid iteration and continuous delivery of micro services. And the automatic operation and maintenance tool integrates functions of CI/CD assembly line, log collection and analysis, monitoring alarm and the like, realizes automation and intellectualization of operation and maintenance work, reduces operation and maintenance cost and improves operation and maintenance efficiency.
S102, determining a hardware platform for constructing the water conservancy cloud primary integrated machine, and deploying the core component into the hardware platform to obtain the deployed water conservancy cloud primary integrated machine.
The cloud primary integrated machine is realized by not only requiring the core components to support the processing and running of water conservancy services, but also requiring hardware resources to provide corresponding hardware support for cloud primary application. Therefore, when the water conservancy cloud primary integrated machine is constructed, a hardware platform is required to be determined at first, and generally, the hardware platform can adopt a high-performance server cluster, and then a core component is deployed into the hardware platform, so that the water conservancy cloud primary integrated machine implemented by soft and hard integration is obtained. The hydraulic cloud primary integrated machine can realize quick response of hydraulic service and has higher expandability.
And S103, when the water conservancy project is delivered through the water conservancy cloud primary integrated machine, determining the water conservancy business requirement corresponding to the water conservancy project, and determining whether the core component integrated in the water conservancy cloud primary integrated machine supports the water conservancy business requirement.
The embodiment of the application is different from the traditional water conservancy project delivery process in that the traditional project delivery needs to sequentially deploy core components on a project site, code configuration is needed to be carried out again in the deployment process, the efficiency is low, the water conservancy cloud primary integrated machine integrates various core components, packaging delivery of the components is realized, quick response of water conservancy business can be realized only by plug-in components of the water conservancy cloud primary integrated machine, site deployment is not needed, and technical bottlenecks caused by site environment differences are avoided. It should be noted that, the hydraulic cloud primary integrated machine supports the function expansion of the hydraulic service, so when the hydraulic project delivery is performed, it is first required to determine whether the hydraulic cloud primary integrated machine can support the hydraulic service requirement required by the current project.
And S104, if not, based on the water conservancy cloud primary integrated machine, carrying out deployment and upgrading on the core component according to water conservancy business requirements so as to realize expansion development of water conservancy projects.
If in the delivery process of water conservancy projects, the core component integrated by the current water conservancy cloud primary integrated machine can not completely support all water conservancy business requirements set forth by the water conservancy projects, at the moment, the integrated core component can be deployed and upgraded based on the water conservancy cloud primary integrated machine, business changes can be flexibly dealt with through on-demand expansion of business requirements, and the expandability of the water conservancy business is improved.
In one embodiment, the deployment upgrade process of the water conservancy cloud primary integrated machine is divided into a plurality of stages, including a development stage, a deployment stage and a production stage. The method mainly comprises the steps of developing a local functional code in a development stage, performing corresponding deployment upgrading and test verification based on the local engineering code in a deployment stage, performing deployment upgrading on a core component according to a mirror image product passing verification in a production stage, and finally obtaining an upgraded project intranet container management platform. The project intranet container management platform is a platform obtained by the water conservancy cloud primary integrated machine after function expansion.
As shown in fig. 2, in the early stage of the creation of the water conservancy project, at this time, in a development stage, a warehouse address corresponding to the water conservancy project needs to be created in a remote code warehouse (such as a git), and a project code corresponding to the water conservancy project is obtained from the remote code warehouse, so that development of water conservancy business requirements is performed through the project code, and a local engineering code is obtained. When development of water conservancy service requirements is carried out, whether the requirements for realizing the water conservancy service are dependent or not needs to be determined, if the requirements for realizing the water conservancy service are dependent on package codes of other projects, the dependence which needs to be used needs to be pulled from a preset Maven product dependence library, and further development of project codes is completed through the dependence, so that local project codes are obtained. With the development staff continuously perfecting project functions, local engineering codes can be pushed to a remote code warehouse, and the local other development staff can acquire the latest version of the code warehouse in real time when carrying out pulling operation. When the local hydraulic engineering is developed to a certain stage and the version can be released, the local engineering can be pushed to a remote Maven product warehouse for management and use.
In the deployment stage, the local engineering code is divided into a plurality of code branches, each code branch comprises a development branch (develop), a test branch (release) and a formal branch (master), each code branch is in different cloud deployment environments, each cloud deployment environment comprises a development environment, a test environment and an integrated demonstration environment, and the development branches, the test branches and the formal branches are respectively corresponding to each other. Based on the cloud deployment environment where the code branches are located, after the code branches submit codes, the server can carry out mirror image packaging on the code branches, and deployment upgrading is carried out on project instances of water conservancy projects according to the obtained mirror image products. If the project example after the deployment upgrade passes the image function test in the cloud deployment environment, the image product can be uploaded to an image warehouse. If the program fails the mirror image function test, the corresponding code branches are required to be subjected to function optimization, the code branches are subjected to mirror image packaging again based on the optimized code branches, and project instances are subjected to deployment and upgrading until the project instances pass the mirror image function test in the cloud deployment environment.
Specifically, based on a development environment where a development branch is located, according to code submitting operation performed through the development branch in a development stage, mirror image packaging operation aiming at the development branch is triggered, and a first mirror image product corresponding to the development environment is obtained. According to the first mirror image product, deployment upgrading is carried out on project examples of the water conservancy project, and mirror image function testing is carried out on the first project examples after deployment upgrading.
After the mirror image function test of the development environment passes, that is, the first project example passes the mirror image function test, a first merging operation needs to be performed on the development branch and the test branch, and a mirror image packing operation for the test branch is triggered based on the first merging operation to obtain a second mirror image product corresponding to the test environment. And according to the second mirror image product, carrying out deployment upgrading on the project instance of the water conservancy project, and carrying out mirror image function test on the deployed and upgraded second project instance.
And after the mirror image function test of the test environment is completed, namely, under the condition that the second project instance passes the mirror image function test, performing a second merging operation on the test branch and the formal branch, and triggering a mirror image packing operation on the formal branch based on the second merging operation to obtain a third mirror image product corresponding to the integrated demonstration environment. And according to the third mirror image product, carrying out deployment upgrading on the project instance of the water conservancy project, and carrying out mirror image function test on the third project instance after deployment upgrading.
It should be noted that the mirror image warehouse is divided into a private product warehouse and a public network mirror image warehouse, mirror image products of the develop branch and the release branch are stored in the private product warehouse, and mirror image products of the master branch are stored in the public network mirror image warehouse. Thus, in the event that the first project instance and the second project instance pass the mirror function test in the development environment and the test environment, respectively, the first mirror artifact and the second mirror artifact are uploaded to the private artifact repository. And uploading the third mirror image product to a public network mirror image warehouse under the condition that the third project example passes the mirror image function test in the integrated demonstration environment, acquiring helm application packages generated by formal branches, and uploading helm application packages to an application warehouse under the public network mirror image warehouse.
In the production stage of the water conservancy project, deployment upgrading is carried out on the core component based on the mirror image product developed by expansion, so that the expansion development of the water conservancy project is completed. The acquisition modes of the mirror image products are distinguished according to project environments, wherein one is in a networking state, and the other is in a broken network state. The manner in which the server obtains the designated mirror image artifact, referred to herein as the third mirror image artifact, from the mirror image repository varies based on the different project environments.
Specifically, under the condition that the project environment is in the networking state, the third mirror image product is pulled from the public network mirror image warehouse through a public network container management platform or a cloud pass platform of the project site. Under the condition that the project environment is in a broken network state, the project environment cannot be connected to the public network mirror image warehouse, therefore, instantiation of a third mirror image product in the public network mirror image warehouse is needed, and then the instantiated third mirror image product is copied to the project environment through a preset transmission medium to carry out deployment upgrading operation. The transmission medium herein refers to a carrier, such as a U-disc, optical disc, etc., that can store the third mirrored product.
After the deployment upgrading flow is finished, the water conservancy cloud primary integrated machine finishes function upgrading according to the service requirements of actual water conservancy projects, and the process does not need to redeploy core components on site, but can be extended on the basis of the existing integrated machine, so that development efficiency is greatly improved.
After the local engineering code is obtained based on the development stage, after the developer submits the code on the develop branch of the local engineering, the developer triggers the pipeline mirror image packaging operation of the corresponding branch of the engineering to obtain the first mirror image product of the development environment, and the mirror image product can be uploaded to the mirror image warehouse to be convenient for management and use, and the project deployment personnel pulls the mirror image in the development environment to carry out project deployment building or upgrading operation. When the testing personnel test the functions of the version in the development environment and do not meet the expectations, the project developer is informed to perform function optimization, and the operation of the stage is repeated until the function test passes.
After the function test of the cloud development environment is passed, the code of develop branches is combined to a release branch to carry out packaging, pushing, deploying, upgrading and testing work of develop branches, if the function verification of the test environment is not passed, a developer is informed to carry out function optimization on develop branches, and the process is repeated until the mirror image function test of the version of the cloud development environment is passed.
When the function test of the cloud test environment is passed, the code of the release branch is merged into the master branch, and the master branch mirror image packaging flow is triggered to obtain the project mirror image for deployment upgrading. Note that at this point the image deployed to the presentation environment that the functional test passed is not being presented is also uploaded to the image private library. And when the functional test of the integrated demonstration environment fails, notifying a developer to perform functional optimization on the develop branch to repeat the flow until the mirror image functional test of the version of the integrated demonstration environment passes.
When the version function of the integrated demonstration environment passes verification (the availability of a master branch is verified), public network mirror image packaging operation of the water conservancy project is triggered, at the moment, the private mirror image of the project which passes the latest verification on the integrated demonstration environment is replaced by a newly packaged public network mirror image, and meanwhile, a mirror image pipeline can upload the latest public network mirror image and the latest helm package of the project to an application warehouse under the public network mirror image warehouse for storage and management.
The above is a method embodiment of the present application. Based on the same thought, some embodiments of the present application also provide a device and a non-volatile computer storage medium corresponding to the above method.
Fig. 3 is a schematic structural diagram of a service development device based on a water conservancy cloud primary integrated machine according to an embodiment of the present application. As shown in fig. 3, includes:
at least one processor, and
At least one processor, wherein,
The memory stores instructions executable by the at least one processor to enable the at least one processor to perform a business development method based on a water conservancy cloud native all-in-one machine as set forth in any one of the above.
The embodiment of the application provides a nonvolatile computer storage medium, which stores computer executable instructions, wherein the computer executable instructions are configured to:
the business development method based on the water conservancy cloud primary integrated machine.
The embodiments of the present application are described in a progressive manner, and the same and similar parts of the embodiments are all referred to each other, and each embodiment is mainly described in the differences from the other embodiments. In particular, for the apparatus and medium embodiments, the description is relatively simple, as it is substantially similar to the method embodiments, with reference to the section of the method embodiments being relevant.
The devices and media provided in the embodiments of the present application are in one-to-one correspondence with the methods, so that the devices and media also have similar beneficial technical effects as the corresponding methods, and since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media are not repeated here.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus 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 apparatus. Without further limitation, an element defined by the phrase "comprising one does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises an element.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and variations of the present application will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. which come within the spirit and principles of the application are to be included in the scope of the claims of the present application.