Specific embodiment
Need to rely on many objects when using deployment, there are different versions for the object of dependence, dispose when apply
When, needing to detect the object of current version, detection could rely on object and carry out normally using deployment after passing through, such as
JDK, the object relied on when as application deployment, currently used start context is V, detects current version V in some time
JDK existing defects, then the JDK of current version V cannot be reused, and need to be upgraded to version V+1, to solve JDK existing defects
The problem of, and then JDK could be relied on and normally carried out using deployment.
Current application is in application server deployment, by the scanning plug-in unit being inserted into application, when scanning application deployment according to
The version of bad object, judges whether the version for the object being currently relied upon meets dependence rule built-in in the source code of application
Then, it if meeting dependent Rule, could normally carry out using deployment.As known from the above, due to applying in application server deployment
When dependent on scanning plug-in unit, when some time detecting the object existing defects relied on, then dependent Rule currently in use needs
It stops using, needs to change dependent Rule and be effective to application server in time, it is therefore desirable to will be built-in in the source code of application
Dependent Rule reconfigured, the dependent Rule before original corresponding change of scanning plug-in unit, in the source code that will be applied
In after built-in dependent Rule reconfigured, need user to go to upgrade corresponding scanning plug-in unit manually, this mode is non-
Normal is not flexible, and if user does not upgrade corresponding scanning plug-in unit in time, dependent Rule new in this way cannot be timely
It plays a role, it is possible to which the object existing defects relied on when causing using deployment cause using breaking down after deployment, in turn
It causes damages.
In view of the above-mentioned problems, this specification embodiment provides a kind of technical solution of application deployment, it is applied to Version Control
System, the system include regulation management platform and an at least application server, which includes with edition system
All application servers connection, wherein the connection schematic diagram of regulation management platform and application server is as shown in Figure 1.Wherein exist
In regulation management platform, the dependent Rule that can be configured dependent Rule in real time, and be configured is in real time effective from Version Control system
Any application server in system, it is meant that when some time detecting the object existing defects relied on, can be managed in rule
Platform configures dependent Rule in real time, and the dependent Rule configured can be in time effective from any application in version control system
Server.As known from the above, the operation of customer upgrade scanning plug-in unit is avoided, it can be ensured that pair for needing to rely on when application deployment
Normal object is liked, thus ensure that using that can operate normally after deployment, avoid the generation of loss.
Specifically, the technical solution that this specification embodiment provides is as follows:
Regulation management platform receive application server send the application server carry out using deployment when need according to
The version information of the object of the title and dependence of bad object;Regulation management platform in the dependent Rule of configuration, search with
The dependent Rule that the title matches;Regulation management platform carries out school to the version information according to the dependent Rule found
It tests;Check results are sent to application server by regulation management platform;Application server receives the check results, in the school
Testing result is to carry out in successful situation using deployment.
In order to make those skilled in the art more fully understand the technical solution in this specification embodiment, below in conjunction with this
Attached drawing in specification embodiment is described in detail the technical solution in this specification embodiment, it is clear that described
Embodiment is only a part of the embodiment of this specification, instead of all the embodiments.The embodiment of base in this manual,
Those of ordinary skill in the art's every other embodiment obtained, all should belong to the range of protection.
As shown in Fig. 2, regulation management platform and application service in the application dispositions method provided for this specification embodiment
The interaction figure of device, this method may comprise steps of:
S201, regulation management platform receive needing when the application server is carried out using deployment for application server transmission
The version information of the object of the title and dependence for the object to be relied on;
When applying when application server is disposed, the object relied on accordingly can be prepared by deployment script, and right
Some of objects, such as connection is compiled to executable jar file, after by above-mentioned steps, deployment script can be adopted
Collection applies the version information of the title for the object that needs rely in application server deployment and the object of dependence, is acquiring
It is reported to application server after above- mentioned information, the object for needing to rely on when being applied in local disposed by application server
Title and the version information of object of dependence be sent to regulation management platform, can specifically be asked by sending rule verification
It asks, the version of the object of the title and dependence of applying the object for needing to rely on when locally being disposed is carried in verification request
This information, regulation management platform receive the above- mentioned information carried in rule verification request.
As an example, when applying when application server is disposed, corresponding rely on is prepared by deployment script
Object, the object relied on here can be JDK, executable jar file, MySQL database etc., and by deployment script to can
It executes jar file and is compiled connection, wherein executable jar file may include the compiling file class set of JAVA open source,
Also it may include the compiling file class set of user's independent development and maintenance, after by above-mentioned steps, deployment script is adopted
Collection applies the title of needs rely in application server deployment object, i.e. JDK, jar file title, MySQL can be performed etc.,
And the version information of the object relied on, i.e. JDK8, the version 1.0.2 of executable jar file, MySQL database version
5.1.52 etc., after having acquired above- mentioned information, it is reported to application server, above- mentioned information are sent to rule by application server
Platform is then managed, regulation management platform receives above- mentioned information.
It is worth noting that, passing through deployment script acquisition applications needs when locally being disposed in this specification embodiment
The version information of the object of the title and dependence of the object of dependence, and the above- mentioned information of acquisition are reported to application server,
Above- mentioned information are sent to regulation management platform by application server, particularly for by deployment script acquisition applications local into
The version information of the object of the title and dependence for the object for needing to rely on when row deployment, only one of acquisition relies on for this
The implementation of the version information of the object of the title and dependence of object, this specification embodiment only realize one of which
Mode is illustrated, and is not to be defined to how acquiring.
S202, regulation management platform search the dependent Rule to match with the title in the dependent Rule of configuration;
Regulation management platform receive application server transmission apply when application server is disposed need according to
After the version information of the object of the title and dependence of bad object, in the dependent Rule of configuration, pair with dependence is searched
The dependent Rule that the title of elephant matches.Here the dependent Rule configured, i.e., the dependence configured in real time in regulation management platform
Rule in regulation management platform, can configure the dependent Rule of bottom running environment software, such as an example in real time
For the JDK of dependence, the JDK that the dependent Rule configured in real time relies on when can be using deployment is JDK8, and cannot be JDK7
And version below, the dependent Rule of executable jar file can be configured in real time, it is real such as the executable jar file of dependence
When the version of executable jar file that relies on when can be using deployment of the dependent Rule that configures be 1.0.3, and cannot be
1.0.2 version below.
Wherein in order to avoid being provided in regulation management platform with being intended to configure dependent Rule in real time in regulation management platform
Super keepe, administrator and observer with Role Management ability etc., super keepe can random configuration rule pipes
Dependent Rule in platform, administrator can configure the dependent Rule of oneself addition, and observer can only check that regulation management is flat
Dependent Rule in platform, and the dependent Rule being unable in configuration rule management platform.
During searching the dependent Rule to match with the title of the object relied on, conventional lookup method is to be based on
Keyword is searched, and as an example, is searched the dependent Rule to match with JDK, can configured using JDK as keyword
Dependent Rule in, search that there are the dependent Rules of keyword JDK, and then judge whether to match with JDK.
It is worth noting that, this specification embodiment illustrate to one of implementation for searching dependent Rule
It is bright, it is not to limit how to search dependent Rule.
S203, regulation management platform verify the version information according to the dependent Rule found;
Regulation management platform find with after the dependent Rule that matches of title of the object relied on, according to finding
Dependent Rule the version information of the object of dependence is verified, here verification refer to judgement rely on object version letter
Whether breath meets dependent Rule, as an example, finds the dependent Rule to match with JDK, this dependent Rule is application
The JDK relied on when deployment is JDK8, and cannot be JDK7 and version below, and the version information of the object of dependence is JDK7, then
It may determine that the version information of the object of dependence is unsatisfactory for dependent Rule, it is meant that verification failure.
Wherein, regulation management platform verifies the version information of the object of dependence according to the dependent Rule found
Before, judge that the white list is for exempting regular verification using whether in preset white list.For some special screnes,
In order to make certain application servers or using the verification for exempting rule, white list is preset in regulation management platform,
Application or application server in white list can exempt regular verification.
In addition, regulation management platform verifies the version information of the object of dependence according to the dependent Rule found
Before, judge whether found dependent Rule meets preset requirement.The dependence configured in real time in regulation management platform
Life cycle can be arranged for it in rule, i.e., in the life cycle of dependent Rule, the dependent Rule is effective, as an example
Son, the dependent Rule configured in real time in regulation management platform in 10 days effectively judge found dependent Rule here
Whether meet preset requirement can be judge found dependent Rule whether there is currently the times preset to have at its
It imitates in life cycle.Certainly, the dependent Rule configured in real time in regulation management platform, when can also configure the starting that it comes into force
Between, it is meant that after dependent Rule is completed in configuration, can just it come into force through the dependent Rule after a period of time, as an example,
It is configured in some day and completes dependent Rule, configuring the initial time that it comes into force is after 10 days, it is meant that the dependence after 10 days
Rule can just come into force, and judge whether found dependent Rule meets preset requirement and can be here and judge that current time is
It is no after the preconfigured initial time to come into force of the dependent Rule to be found.
Regulation management platform before being verified according to the dependent Rule that finds to the version information of the object of dependence,
It can only judge one of which as stated above, naturally it is also possible to first judge to apply whether in preset white list, if it is not,
Then further whether the found dependent Rule of judgement meets preset requirement, or first judges found dependent Rule
Whether preset requirement is met, if so, further judging using whether in preset white list.Wherein, first judge that application is
It is no in preset white list, if it is not, then further whether the found dependent Rule of judgement meets preset requirement, for this
The preferred embodiment of specification embodiment.
Check results are sent to application server by S204, regulation management platform;
Regulation management platform carries out verifying it according to version information of the dependent Rule found to the object of dependence
Afterwards, check results are sent to application server.If wherein verify successfully, mean to apply in application server carry out portion
The object relied on when administration meets dependent Rule;If verification failure, mean to apply when application server is disposed according to
Bad object is unsatisfactory for dependent Rule, specific verification failure information can be carried in check results, as an example, specifically
Verification failure information to can be JDK version too low, be unsatisfactory for dependent Rule.
S205, application server receive the check results, in the case where the check results are successful situation, are applied
Deployment.
For regulation management platform after check results are sent to application server, application server receives the verification knot
Fruit continues to execute deployment script in the case where the check results are successful situation, using deployment script application deployment, and starts and answers
With.In the case where the check results are failure, application deployment is terminated, and according to the failure information carried in check results,
Prompt user handles the object of corresponding dependence, as an example, it is specific verify failure information be JDK version too
It is low, it is unsatisfactory for dependent Rule, then needs to prompt the version of customer upgrade JDK, and prompts which version user can be upgraded to.?
After user handles the object of corresponding dependence, the deployment script in application server is continued to execute, is re-executed
The step of stating S201 to S204, application server receive check results, in the case where check results are successful situation, using can be just
Normal deployment simultaneously behaves.
On the basis of above-mentioned technical proposal, as shown in figure 3, this specification embodiment can with the following steps are included:
S206, regulation management platform to the version information of the title of the object of the dependence received and the object of dependence into
Row storage, behaviour in service and distribution situation for the object to the dependence count.
The behaviour in service and distribution situation of the object relied on when disposing for convenience to application count, and regulation management is flat
Platform is after the version information of the title for the object for receiving dependence and the object of dependence, to the object of the dependence received
The version information of title and the object of dependence is stored.As an example, as shown in figure 4, regulation management platform and three
Platform application server connection, application 1 need to rely on when application server 1 is disposed JDK9, jar file 1.0.3,
MySQL5.1.52, application 2 need to rely on when application server 2 is disposed JDK9, jar file 1.0.3,
MySQL5.1.52, application 3 need to rely on when application server 3 is disposed JDK9, jar file 1.0.3,
MySQL5.1.52, regulation management platform receive the title of the object of the dependence of every application server transmission and pair of dependence
The version information of elephant, and being stored, with this come count JDK9, jar file 1.0.3, MySQL5.1.52 behaviour in service and point
Cloth situation.
By the description of the above-mentioned technical solution to this specification embodiment, when applying when application server is disposed,
Regulation management platform receives the title for the object for needing to rely on when the application deployment that application server is sent and the object of dependence
Version information, in the dependent Rule of configuration, regulation management platform searches the dependence that matches of title with the object relied on
Rule, regulation management platform are verified according to version information of the dependent Rule found to the object of dependence, and will verification
As a result it is sent to application server, application server receives check results, in the case where check results are successful situation, is applied
Deployment.
Using the technical solution that this specification embodiment provides, the operation of customer upgrade scanning plug-in unit is avoided, it can be true
It is normal object that the object relied on is needed when protecting application deployment, and thus ensure that apply can normally transport after deployment
Row, avoids the generation of loss.
Relative to above method embodiment, this specification embodiment also provides a kind of application deployment device, is applied to rule
Platform is managed, as shown in figure 5, may include: receiving module 510, rule searching module 520, correction verification module 530, sending module
540。
Receiving module 510, for receiving needing when the application server is carried out using deployment for application server transmission
The version information of the object of the title and dependence for the object to be relied on;
Rule searching module 520 is advised in the dependent Rule of configuration, searching the dependence to match with the title
Then;
Correction verification module 530, for being verified according to the dependent Rule found to the version information;
Sending module 540, for check results to be sent to application server, so that application server receives the verification
As a result, carrying out in the case where the check results are successful situation using deployment.
This specification embodiment also provides a kind of application deployment system, which includes: that regulation management platform and application take
Business device;
Regulation management platform receive application server send the application server carry out using deployment when need according to
The version information of the object of the title and dependence of bad object;
Regulation management platform searches the dependent Rule to match with the title in the dependent Rule of configuration;
Regulation management platform verifies the version information according to the dependent Rule found;
Check results are sent to application server by regulation management platform;
Application server receives the check results, in the case where the check results are successful situation, carries out using deployment.
The function of modules and the realization process of effect are specifically detailed in the above method and correspond to step in above-mentioned apparatus
Realization process, details are not described herein.
By the description of the above-mentioned technical solution to this specification embodiment, when applying when application server is disposed,
Regulation management platform receives the title for the object for needing to rely on when the application deployment that application server is sent and the object of dependence
Version information, in the dependent Rule of configuration, regulation management platform searches the dependence that matches of title with the object relied on
Rule, regulation management platform are verified according to version information of the dependent Rule found to the object of dependence, and will verification
As a result it is sent to application server, application server receives check results, in the case where check results are successful situation, is applied
Deployment.
Using the technical solution that this specification embodiment provides, the operation of customer upgrade scanning plug-in unit is avoided, it can be true
It is normal object that the object relied on is needed when protecting application deployment, and thus ensure that apply can normally transport after deployment
Row, avoids the generation of loss.
This specification embodiment also provides a kind of computer equipment, as shown in fig. 6, the equipment may include: processor
610, memory 620, input/output interface 630, communication interface 640 and bus 650.Wherein processor 610, memory 620,
Input/output interface 630 and communication interface 640 pass through the communication connection between the realization of bus 650 inside equipment.
Processor 610 can use general CPU (Central Processing Unit, central processing unit), micro process
Device, application specific integrated circuit (Application Specific Integrated Circuit, ASIC) or one or
The modes such as multiple integrated circuits are realized, for executing relative program, to realize technical solution provided by this specification embodiment.
Memory 620 can use ROM (Read Only Memory, read-only memory), RAM (Random Access
Memory, random access memory), static storage device, the forms such as dynamic memory realize.Memory 620 can store
Operating system and other applications are realizing technical solution provided by this specification embodiment by software or firmware
When, relevant program code is stored in memory 620, and execution is called by processor 610.
Input/output interface 630 is for connecting input/output module, to realize information input and output.Input and output/
Module can be used as component Configuration (not shown) in a device, can also be external in equipment to provide corresponding function.Wherein
Input equipment may include keyboard, mouse, touch screen, microphone, various kinds of sensors etc., output equipment may include display,
Loudspeaker, vibrator, indicator light etc..
Communication interface 640 is used for connection communication module (not shown), to realize the communication of this equipment and other equipment
Interaction.Wherein communication module can be realized by wired mode (such as USB, cable etc.) and be communicated, can also be wirelessly
(such as mobile network, WIFI, bluetooth etc.) realizes communication.
Bus 650 includes an access, in various components (such as the processor 610, memory 620, input/output of equipment
Interface 630 and communication interface 640) between transmit information.
It should be noted that although above equipment illustrates only processor 610, memory 620, input/output interface
630, communication interface 640 and bus 650, but in the specific implementation process, which can also include realizing to operate normally
Necessary other assemblies.In addition, it will be appreciated by those skilled in the art that, it can also be only comprising realizing in above equipment
Component necessary to this specification example scheme, without including all components shown in figure.
This specification embodiment also provides a kind of computer readable storage medium, is stored thereon with computer program, the journey
It is realized when sequence is executed by processor above-mentioned using dispositions method.This method includes at least:
It is a kind of to apply dispositions method, it is applied to regulation management platform, this method comprises:
Receive the name for the object for needing to rely on when the application server is carried out using deployment that application server is sent
The version information of title and the object relied on;
In the dependent Rule of configuration, the dependent Rule to match with the title is searched;
The version information is verified according to the dependent Rule found;
Check results are sent to application server, so that application server receives the check results, in the verification
As a result it is disposed in successful situation, to carry out applying.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves
State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable
Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM),
Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices
Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates
Machine readable medium does not include temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
As seen through the above description of the embodiments, those skilled in the art can be understood that this specification
Embodiment can be realized by means of software and necessary general hardware platform.Based on this understanding, this specification is implemented
Substantially the part that contributes to existing technology can be embodied in the form of software products the technical solution of example in other words,
The computer software product can store in storage medium, such as ROM/RAM, magnetic disk, CD, including some instructions are to make
It is each to obtain computer equipment (can be personal computer, server or the network equipment etc.) execution this specification embodiment
Method described in certain parts of a embodiment or embodiment.
System, device, module or the unit that above-described embodiment illustrates can specifically realize by computer chip or entity,
Or it is realized by the product with certain function.A kind of typically to realize that equipment is computer, the concrete form of computer can
To be personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media play
In device, navigation equipment, E-mail receiver/send equipment, game console, tablet computer, wearable device or these equipment
The combination of any several equipment.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment
Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for device reality
For applying example, since it is substantially similar to the method embodiment, so describing fairly simple, related place is referring to embodiment of the method
Part explanation.The apparatus embodiments described above are merely exemplary, wherein described be used as separate part description
Module may or may not be physically separated, can be each module when implementing this specification example scheme
Function realize in the same or multiple software and or hardware.Can also select according to the actual needs part therein or
Person's whole module achieves the purpose of the solution of this embodiment.Those of ordinary skill in the art are not the case where making the creative labor
Under, it can it understands and implements.
The above is only the specific embodiment of this specification embodiment, it is noted that for the general of the art
For logical technical staff, under the premise of not departing from this specification embodiment principle, several improvements and modifications can also be made, this
A little improvements and modifications also should be regarded as the protection scope of this specification embodiment.