CN109471799A - A kind of dispositions method of demand environment, device, storage medium and terminal - Google Patents

A kind of dispositions method of demand environment, device, storage medium and terminal Download PDF

Info

Publication number
CN109471799A
CN109471799A CN201811268912.1A CN201811268912A CN109471799A CN 109471799 A CN109471799 A CN 109471799A CN 201811268912 A CN201811268912 A CN 201811268912A CN 109471799 A CN109471799 A CN 109471799A
Authority
CN
China
Prior art keywords
deployment
parameter preset
cluster
compressed package
services device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201811268912.1A
Other languages
Chinese (zh)
Other versions
CN109471799B (en
Inventor
仲亚齐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing City Network Neighbor Technology Co Ltd
Original Assignee
Beijing City Network Neighbor Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing City Network Neighbor Technology Co Ltd filed Critical Beijing City Network Neighbor Technology Co Ltd
Priority to CN201811268912.1A priority Critical patent/CN109471799B/en
Publication of CN109471799A publication Critical patent/CN109471799A/en
Application granted granted Critical
Publication of CN109471799B publication Critical patent/CN109471799B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3664Environments for testing or debugging software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Stored Programmes (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a kind of dispositions method of demand environment, device, storage medium and terminals, this method comprises: executing deployment script in deployment services device, and receive the parameter preset that user is passed into deployment script, wherein, parameter preset includes at least: the address File Transfer Protocol FTP, deployment file title;Whether format and the quantity for detecting parameter preset are correct;In the correct situation of format and quantity of parameter preset, the corresponding compressed package files of deployment file title are downloaded in the corresponding cluster in the address FTP extremely to deployment services device, and decompress compressed package files corresponding with deployment file name is executed.The present invention only needs to execute deployment script in the server, and without tester, deployment test environment saves time cost, and then shorten test period, improve testing efficiency on the basis of simplifying manual operation by hand.

Description

A kind of dispositions method of demand environment, device, storage medium and terminal
Technical field
The present invention relates to testing fields, more particularly to a kind of dispositions method of demand environment, device, storage medium and end End.
Background technique
As the function and business of current application program gradually increase, it is related to the online demand in rear end and also gradually increases, This demand need tester it is artificial dispose different upper line files respectively in test environment and sandbox environment, if disposing A certain operating procedure is omitted when environment or a certain operation is wrong, can be caused deployment to fail, need to be redeployed environment, cause to test Cycle stretch-out;And the personnel for not carrying out environment deployment are needed to carry out special training to deployment specific steps, it occupies artificial And time cost, cause testing efficiency low, and then the online of subsequent applications program may be influenced.
Summary of the invention
The present invention provides dispositions method, device, storage medium and the terminal of a kind of demand environment, to solve the prior art By manually disposing test environment it is possible that test period extends, the waste of artificial and time cost causes testing efficiency low Under, and then the online problem of subsequent applications program may be influenced.
In order to solve the above technical problems, on the one hand, the present invention provides a kind of dispositions method of demand environment, comprising: to Deployment script is executed in deployment services device, and receives the parameter preset that user is passed into the deployment script, wherein described pre- Setting parameter includes at least: the address File Transfer Protocol FTP, deployment file title;Detect the format and quantity of the parameter preset It is whether correct;In the correct situation of format and quantity of the parameter preset, downloaded in the corresponding cluster in the address FTP The corresponding compressed package files of the deployment file title, to deployment services device, and decompress and execute the deployment file name to described Claim corresponding compressed package files.
Further, the parameter preset further include: cluster name.
Further, described that the corresponding compressed package of the deployment file title is downloaded in the corresponding cluster in the address FTP File is to described to deployment services device, comprising: detects cluster name in the corresponding cluster in the address FTP and the parameter preset It is whether identical;In the corresponding cluster in the address FTP situation identical with cluster name in the parameter preset, described The corresponding compressed package files of the deployment file title are downloaded in the corresponding cluster in the address FTP to described to deployment services device.
Further, described that the corresponding compressed package of the deployment file title is downloaded in the corresponding cluster in the address FTP File is to described to deployment services device, comprising: detection is described to whether there is and the deployment file title in deployment services device Identical compressed package files;Described to there are compressed package files identical with the deployment file title in deployment services device In the case of, it deletes described to compressed package files identical with the deployment file title present in deployment services device;Described The corresponding compressed package files of the deployment file title are downloaded in the corresponding cluster in the address FTP to described to deployment services device.
On the other hand, the present invention also provides a kind of deployment devices of demand environment, comprising: receiving module, for portion Deployment script is executed in administration's server, and receives the parameter preset that user is passed into the deployment script, wherein is described default Parameter includes at least: the address File Transfer Protocol FTP, deployment file title;Detection module, for detecting the parameter preset Whether format and quantity are correct;Deployment module, under the format of the parameter preset and the correct situation of quantity, described The corresponding compressed package files of the deployment file title are downloaded in the corresponding cluster in the address FTP to described to deployment services device, and Decompress and execute the corresponding compressed package files of the deployment file title.
Further, the parameter preset further include: cluster name.
Further, the deployment module, is specifically used for: detecting the corresponding cluster in the address FTP and the parameter preset Whether middle cluster name is identical;The corresponding cluster situation identical as cluster name in the parameter preset in the address FTP Under, the corresponding compressed package files of the deployment file title are downloaded in the corresponding cluster in the address FTP to described wait dispose Server.
Further, the deployment module, is specifically used for: detection is described to whether there is and the deployment in deployment services device The identical compressed package files of file name;Described to there is compression identical with the deployment file title in deployment services device In the case where APMB package, delete described to the text of compressed package identical with the deployment file title present in deployment services device Part;The corresponding compressed package files of the deployment file title are downloaded in the corresponding cluster in the address FTP to described wait dispose Server.
On the other hand, the present invention also provides a kind of storage mediums, are stored with computer program, computer program is by processor The step of dispositions method of above-mentioned demand environment is realized when execution.
On the other hand, the present invention also provides a kind of terminals, include at least memory, processor, are stored with meter on memory Calculation machine program, processor realize the step of the dispositions method of above-mentioned demand environment when executing the computer program on memory Suddenly.
The present invention by deployed environment server execute automation deployment script, tester only need to pass through to The parameter preset of correct number and format is passed in deployment script, the server wait dispose test environment can pass through deployment script Automatically the downloading and decompression for carrying out corresponding deployment file execute, and complete the deployment process of test environment, are only needed by the above method Deployment script is executed in the server, and without tester, environment is tested in deployment by hand, is simplifying manually-operated basis On, time cost is saved, and then shorten test period, improves testing efficiency.
Detailed description of the invention
Fig. 1 is the flow chart of the dispositions method of demand environment in first embodiment of the invention;
Fig. 2 is the flow chart of the dispositions method of demand environment in second embodiment of the invention;
Fig. 3 is the flow chart of the dispositions method of demand environment in third embodiment of the invention;
Fig. 4 is the structural schematic diagram of the deployment device of demand environment into sixth embodiment of the present invention the 4th.
Specific embodiment
In order to solve the prior art by manually deployment test environment it is possible that test period extension, artificial and time Cost waste, causes testing efficiency low, and then may influence the online problem of subsequent applications program, the present invention provides one Dispositions method, device, storage medium and the terminal of kind demand environment carry out the present invention below in conjunction with attached drawing and embodiment It is further described.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, this hair is not limited It is bright.
First embodiment of the invention provides a kind of dispositions method of demand environment, is mainly used in test environment to be disposed Server in, flow chart as shown in Figure 1, mainly include step S101 to S103:
S101 executes deployment script in deployment services device, and receives the default ginseng that user is passed into deployment script Number.
Demand environment is broadly divided into test environment and sandbox environment, and tester is when carrying out environment deployment according to practical need It asks test environment or the corresponding deployment of sandbox environment on the server, to carry out subsequent test.Specifically, in the present embodiment In to deployment services device be usually increase income lightweight application server tomcat, be also possible to may be implemented and tomcat phase Other servers of congenerous, the present embodiment are not particularly limited.
Since script is that tester carries out compiled completion before environment deployment, portion is needed at any one The server of administration can execute the deployment script, have in synchronization multiple be performed simultaneously this to deployment services device in order to prevent Script can detect the operating condition of the deployment script before executing deployment script first, determine and hold without other servers In the case where row, then carry out by this server for needing to carry out environment deployment the execution of the deployment script.
After executing deployment script to deployment services device, the parameter preset being passed to from user into deployment script is received, this In user refer mainly to the tester for needing to carry out environment deployment, parameter preset includes at least the cluster pair where deployment file The title of the address FTP and deployment file answered.Specifically, all kinds of deployment files are stored in each cluster in the form of compressed package In, different types of deployment file can correspond to different demand environments, environment or sandbox environment such as be tested, in the same cluster In by different names to distinguish different types of deployment file, or by the way that different types of deployment file is placed on not It is distinguished in same cluster.It is saved it will be appreciated that specifically which cluster which deployment file is placed in, is It has just been completed before carrying out environment deployment by tester, tester should know that required deployment file is corresponding The address FTP, so as to when carrying out environment deployment, by with required deployment file the address FTP and the deployment file nominally Reach deployment script.
S102, whether format and the quantity for detecting parameter preset are correct, correct in the format and quantity of parameter preset In the case of, step S103 is executed, otherwise, interrupts and executes dispositions method.
S103 downloads the corresponding compressed package files of deployment file title to wait dispose clothes in the corresponding cluster in the address FTP Business device, and decompress compressed package files corresponding with deployment file name is executed.
Deployment script has fault-tolerant processing, to deployment services device after receiving the parameter preset that user is passed to, first Whether format and the quantity that parameter preset can be detected are correct, only under format and quantity all correct situation, can just hold Row subsequent step, if format is different from correct format is preset or user uploads number of parameters and default correctly ginseng Number quantity is different, then it is assumed that the parameter preset that user uploads is wrong, interrupts environment deployment at this time, and may remind the user that on again It passes parameter preset and re-execute the steps S102 after receiving the parameter preset that user uploads again.
Specifically, the format of parameter preset should meet specification and the test customized specification of user in corresponding industry, Such as the address FTP, format should be the combination of number and decimal point, and number should be the integer between 0 to 255, such as 192.168.0.1;Deployment file title is then should be to be made of characters such as English alphabet, underscore, slash, it is not possible to using such as Title of the spcial characters such as question mark, pound sign, branch as deployment file;The correct number of parameter preset is 2 in the present embodiment, That is the address FTP and deployment file title totally two parameters, that is to say, that the feelings that the quantity for the parameter preset that user uploads is 2 Under condition, then it is assumed that the quantity of parameter preset is correct.Further, in order to more easily be distinguished to different parameters, Ke Yi Prompt user is spaced between different parameters by space, branch, comma etc. when user is passed to parameter.
In the correct situation of format and quantity for the parameter preset that user is passed to, in the corresponding cluster in the address FTP The corresponding compressed package files of deployment file title are downloaded to deployment services device, and to the deployment file after downloading carry out decompression and It executes, makes the deployment for completing corresponding environment to deployment services device.It will be appreciated that in order to make deployment file to deployment services Correctly deployment executes in device, after decompression executes, should restart after deployment services device tomcat, then the portion on tomcat Demand after the test environment of administration number or sandbox environment China carry out is tested.
The present embodiment executes the deployment script of automation by the server to deployed environment, and tester only needs to pass through The parameter preset of correct number and format is passed into deployment script, the server wait dispose test environment can be by disposing foot This carries out the downloading of corresponding deployment file automatically and decompression executes, and completes the deployment process of test environment, only by the above method It needs to execute deployment script in the server, without tester, environment is tested in deployment by hand, is simplifying manually-operated base On plinth, time cost is saved, and then shorten test period, improve testing efficiency.
The second embodiment of the present invention provides a kind of dispositions method of demand environment, is mainly used in test wrapper to be disposed In the server in border, flow chart is as shown in Fig. 2, mainly include step S201 to S204:
S201 executes deployment script in deployment services device, and receives the default ginseng that user is passed into deployment script Number.
Since script is that tester carries out compiled completion before environment deployment, portion is needed at any one The server of administration can execute the deployment script, have in synchronization multiple be performed simultaneously this to deployment services device in order to prevent Script can detect the operating condition of the deployment script before executing deployment script first, determine and hold without other servers In the case where row, then carry out by this server for needing to carry out environment deployment the execution of the deployment script.
After executing deployment script to deployment services device, the parameter preset being passed to from user into deployment script is received, this In user refer mainly to the tester for needing to carry out environment deployment, parameter preset includes at least the cluster pair where deployment file The title of title, the address FTP and the deployment file answered.Specifically, cluster name is the name for preserving the cluster of deployment file Claim, and the cluster is accessed by the address FTP.It will be appreciated that specifically by which deployment file be placed in which cluster into Row saves, and has just been completed before carrying out environment deployment by tester, deployment text needed for tester should know The corresponding cluster name of part and the address FTP, so as to when carrying out environment deployment, by the title of the cluster with required deployment file Deployment script is uploaded to the title of the address FTP and the deployment file.
S202, whether format and the quantity for detecting parameter preset are correct, correct in the format and quantity of parameter preset In the case of, step S203 is executed, otherwise, interrupts and executes dispositions method.
S203, whether the corresponding cluster in the detection address FTP and cluster name in parameter preset are identical, in identical situation Under, step S204 is executed, otherwise, interrupts and executes dispositions method.
S204 downloads the corresponding compressed package files of deployment file title to wait dispose clothes in the corresponding cluster in the address FTP Business device, and decompress compressed package files corresponding with deployment file name is executed.
Deployment script has fault-tolerant processing, to deployment services device after receiving the parameter preset that user is passed to, first Whether format and the quantity that parameter preset can be detected are correct, only under format and quantity all correct situation, can just hold Row subsequent step, if format is different from correct format is preset or user uploads number of parameters and default correctly ginseng Number quantity are different, then it is assumed that the parameter preset that user uploads is wrong, and terminal executes the dispositions method of the present embodiment at this time, and can be with It reminds user to upload parameter preset again, after receiving the parameter preset that user uploads again, re-execute the steps S202.
Specifically, the format of parameter preset should meet specification and the test customized specification of user in corresponding industry, Such as the address FTP, format should be the combination of number and decimal point, and number should be the integer between 0 to 255;Deployment File name and cluster name are then should be to be made of characters such as English alphabet, underscore, slash, it is not possible to use such as question mark, Title of the spcial characters such as pound sign, branch as deployment file or cluster;The correct number of parameter preset is in the present embodiment 3, i.e. cluster name, the address FTP and deployment file title totally three parameters, that is to say, that the number for the parameter preset that user uploads In the case that amount is 3, then it is assumed that the quantity of parameter preset is correct.
In the correct situation of format and quantity for the parameter preset that user is passed to, in order to further guarantee deployment text Accuracy when part is downloaded, improves the serious forgiveness of deployment script, before downloading deployment file, detects the collection that user is passed to first Whether group's title actual cluster name corresponding with the address FTP is identical, under identical circumstances, carries out corresponding deployment file Downloading interrupt execution dispositions method if the two is different, and error situation is returned to user, to prevent user in mistake The deployment file that mistake is downloaded in cluster, influences test period.
The present embodiment ensure that service by comparing to the corresponding practical cluster name of cluster name and the address FTP Deployment file of the device when accessing downloading is the current desired correct deployment file of user, prevents user in the cluster of mistake The deployment file for downloading mistake, influences test period.
The third embodiment of the present invention provides a kind of dispositions method of demand environment, is mainly used in test wrapper to be disposed In the server in border, flow chart is as shown in figure 3, mainly include step S301 to S305:
S301 executes deployment script in deployment services device, and receives the default ginseng that user is passed into deployment script Number.
S302, whether format and the quantity for detecting parameter preset are correct, correct in the format and quantity of parameter preset In the case of, step S303 is executed, otherwise, interrupts and executes dispositions method.
S303, detection is to whether there is compressed package files identical with deployment file title in deployment services device, if it exists Compressed package files identical with deployment file title, then follow the steps S304, otherwise, directly execution step S305.
S304 is deleted to compressed package files identical with deployment file title present in deployment services device.
S305 downloads the corresponding compressed package files of deployment file title to wait dispose clothes in the corresponding cluster in the address FTP Business device.
In the present embodiment, step S301, step S101, S102 and S103 content in S302 and S305 and first embodiment Identical, details are not described herein, is only retouched in detail to the step S303 and S304 that do not record in first embodiment in the present embodiment It states.
In order to guarantee that the environment of this deployment is that latest configuration first determines whether currently before downloading deployment file to portion It affixes one's name to and whether there is compressed package files identical with deployment file title in server, and if it exists, then prove currently to deployment services Device once disposed corresponding demand environment, prevented occurring mistake in decompression and execution, deleted to original in deployment services device Compressed package files identical with deployment file title, and downloaded from the corresponding cluster in the address FTP after the completion of deletion newest The corresponding compressed package files of deployment file title to deployment services device.In the present embodiment, it shall be guaranteed that saved in cluster Deployment file be tester's latest configuration or modification, just may be implemented to wait for that deployment services device is available when downloading executes To newest deployment file.
It will be appreciated that the deployment file of this downloading can be deleted after each decompression executes deployment file, prevent Only conflict when subsequent environments are disposed.
The present embodiment is by judgement currently to whether there is compressed package identical with deployment file title in deployment services device File then deletes original deployment file if it exists, guarantees to only exist the deployment file of a latest edition in the same time, guarantees Environment deployment is only carried out according to the deployment file of this downloading, prevents mistake occur in decompression and execution.
The fourth embodiment of the present invention provides a kind of deployment device of demand environment, is mainly installed on test wrapper to be disposed In the server in border, structural schematic diagram is as shown in figure 4, specifically include that receiving module 10, for holding in deployment services device Row deployment script, and receive the parameter preset that user is passed into deployment script, wherein parameter preset includes at least: file passes The address defeated agreement FTP, deployment file title;Detection module 20 is coupled with receiving module 10, for detecting the format of parameter preset It is whether correct with quantity;Deployment module 30 is coupled with detection module 20, for the correct feelings of format and quantity in parameter preset Under condition, the corresponding compressed package files of deployment file title are downloaded in the corresponding cluster in the address FTP extremely to deployment services device, and solve Pressure compressed package files corresponding with deployment file name is executed.
Demand environment is broadly divided into test environment and sandbox environment, and tester is when carrying out environment deployment according to practical need It asks test environment or the corresponding deployment of sandbox environment on the server, to carry out subsequent test.Specifically, in the present embodiment In to deployment services device be usually increase income lightweight application server tomcat, be also possible to may be implemented and tomcat phase Other servers of congenerous, the present embodiment are not particularly limited.
Since script is that tester carries out compiled completion before environment deployment, portion is needed at any one The server of administration can execute the deployment script, have in synchronization multiple be performed simultaneously this to deployment services device in order to prevent Script can detect the operating condition of the deployment script before receiving module 10 executes deployment script first, determine without it In the case that his server executes, then carry out by this server for needing to carry out environment deployment the execution of the deployment script.
After receiving module 10 executes deployment script, the parameter preset being passed to from user into deployment script is received, here User refer mainly to the tester for needing to carry out environment deployment, the cluster where parameter preset includes at least deployment file is corresponding The address FTP and deployment file title.It will be appreciated that specifically by which deployment file be placed in which cluster into Row saves, and has just been completed before carrying out environment deployment by tester, deployment text needed for tester should know The corresponding address FTP of part, so as to when carrying out environment deployment, by with required deployment file the address FTP and the deployment file Title be uploaded to deployment script.
Deployment script have fault-tolerant processing, receiving module 10 after receiving the parameter preset that user is passed to, first by Whether the format and quantity of the detection parameter preset of detection module 20 are correct, only under format and quantity all correct situations, Just subsequent step can be executed by deployment module 30, if format is different from correct format is preset or the ginseng of user's upload Number quantity is different from correct number of parameters is preset, then it is assumed that the parameter preset that user uploads is wrong, and terminal executes this reality at this time The dispositions method of example is applied, and may remind the user that and upload parameter preset again, in the parameter preset for receiving user and uploading again Later, detection module 20 re-starts detection.
In the correct situation of format and quantity for the parameter preset that user is passed to, deployment module 30 is from the address pair FTP The corresponding compressed package files of deployment file title are downloaded in the cluster answered extremely to deployment services device, and to the deployment file after downloading It is decompressed and is executed, make the deployment for completing corresponding environment to deployment services device.It will be appreciated that in order to make deployment file exist It should restart after deployment services device tomcat after decompression execution to correctly deployment execution in deployment services device, then Demand test after deployed number test environment or sandbox environment China carry out on tomcat.
The present embodiment executes the deployment script of automation by the server to deployed environment, and tester only needs to pass through The parameter preset of correct number and format is passed into deployment script, the server wait dispose test environment can be by disposing foot This carries out the downloading of corresponding deployment file automatically and decompression executes, and completes the deployment process of test environment, only by the above method It needs to execute deployment script in the server, without tester, environment is tested in deployment by hand, is simplifying manually-operated base On plinth, time cost is saved, and then shorten test period, improve testing efficiency.
The fifth embodiment of the present invention provides a kind of deployment device of demand environment, is mainly installed on test wrapper to be disposed In the server in border, structural schematic diagram is as shown in figure 4, specifically include that receiving module 10, for holding in deployment services device Row deployment script, and receive the parameter preset that user is passed into deployment script, wherein parameter preset includes at least: file passes The address defeated agreement FTP, deployment file title, cluster name;Detection module 20 is coupled with receiving module 10, default for detecting Whether the format and quantity of parameter are correct;Deployment module 30 is coupled with detection module 20, for the format sum number in parameter preset It measures in correct situation, whether the corresponding cluster in the detection address FTP and cluster name in parameter preset are identical, in the address pair FTP In the cluster answered situation identical with cluster name in parameter preset, deployment file name is downloaded in the corresponding cluster in the address FTP Claim corresponding compressed package files extremely to deployment services device, and decompresses compressed package files corresponding with deployment file name is executed.
Since script is that tester carries out compiled completion before environment deployment, portion is needed at any one The server of administration can execute the deployment script, have in synchronization multiple be performed simultaneously this to deployment services device in order to prevent Script can detect the operating condition of the deployment script before receiving module 10 executes deployment script first, determine without it In the case that his server executes, then carry out by this server for needing to carry out environment deployment the execution of the deployment script.
After receiving module 10 executes deployment script, the parameter preset being passed to from user into deployment script is received, here User refer mainly to the tester for needing to carry out environment deployment, the cluster where parameter preset includes at least deployment file is corresponding Title, the title of the address FTP and deployment file.Specifically, cluster name is the title for preserving the cluster of deployment file, And the cluster is accessed by the address FTP.It is protected it will be appreciated that specifically which cluster which deployment file is placed in It deposits, is just to have been completed before carrying out environment deployment by tester, tester should know required deployment file pair The cluster name answered and the address FTP, so as to when carrying out environment deployment, by the title of the cluster with required deployment file and The title of the address FTP and the deployment file is uploaded to deployment script.
Deployment script have fault-tolerant processing, receiving module 10 after receiving the parameter preset that user is passed to, first by Whether the format and quantity of the detection parameter preset of detection module 20 are correct, only under format and quantity all correct situations, Just subsequent step can be executed by deployment module 30, if format is different from correct format is preset or the ginseng of user's upload Number quantity is different from correct number of parameters is preset, then it is assumed that and the parameter preset that user uploads is wrong, interrupts environment deployment at this time, And may remind the user that and upload parameter preset again, after receiving the parameter preset that user uploads again, detection module 20 Re-start detection.
Specifically, the format of parameter preset should meet specification and the test customized specification of user in corresponding industry, Such as the address FTP, format should be the combination of number and decimal point, and number should be the integer between 0 to 255;Deployment File name and cluster name are then should be to be made of characters such as English alphabet, underscore, slash, it is not possible to use such as question mark, Title of the spcial characters such as pound sign, branch as deployment file or cluster;The correct number of parameter preset is in the present embodiment 3, i.e. cluster name, the address FTP and deployment file title totally three parameters, that is to say, that the number for the parameter preset that user uploads In the case that amount is 3, then it is assumed that the quantity of parameter preset is correct.
In the correct situation of format and quantity for the parameter preset that user is passed to, in order to further guarantee deployment text Accuracy when part is downloaded, improves the serious forgiveness of deployment script, and before deployment module 30 downloads deployment file, detection user is passed Whether the cluster name entered actual cluster name corresponding with the address FTP is identical, under identical circumstances, then is corresponded to The downloading of deployment file interrupts deployment, and return to error situation to user, to prevent user in mistake if the two is different The deployment file that mistake is downloaded in cluster, influences test period.
The present embodiment ensure that service by comparing to the corresponding practical cluster name of cluster name and the address FTP Deployment file of the device when accessing downloading is the current desired correct deployment file of user, prevents user in the cluster of mistake The deployment file for downloading mistake, influences test period.
The sixth embodiment of the present invention provides a kind of deployment device of demand environment, is mainly installed on test wrapper to be disposed In the server in border, structural schematic diagram is as shown in figure 4, specifically include that receiving module 10, for holding in deployment services device Row deployment script, and receive the parameter preset that user is passed into deployment script, wherein parameter preset includes at least: file passes The address defeated agreement FTP, deployment file title;Detection module 20 is coupled with receiving module 10, for detecting the format of parameter preset It is whether correct with quantity;Deployment module 30 is coupled with detection module 20, for the correct feelings of format and quantity in parameter preset Under condition, detection is to whether there is compressed package files identical with deployment file title in deployment services device;To deployment services device In the case where middle presence compressed package files identical with deployment file title, delete to literary with deployment present in deployment services device The identical compressed package files of part title;The corresponding compressed package files of deployment file title are downloaded in the corresponding cluster in the address FTP Extremely to deployment services device, and decompress compressed package files corresponding with deployment file name is executed.
Receiving module 10 and detection in the function and fourth embodiment of receiving module 10 and detection module 20 in the present embodiment Module 20 is identical, and details are not described herein.
In order to guarantee that the environment of this deployment is that latest configuration is sentenced first before deployment module 30 downloads deployment file Break currently to whether there is compressed package files identical with deployment file title in deployment services device, and if it exists, then prove current Corresponding demand environment was once disposed to deployment services device, prevents occurring mistake in decompression and execution, deployment module 30 is deleted Except to compressed package files identical with deployment file title original in deployment services device, and from the address FTP after the completion of deletion The corresponding compressed package files of newest deployment file title are downloaded in corresponding cluster to deployment services device.In the present embodiment In, it shall be guaranteed that the deployment file saved in cluster is tester's latest configuration or modification, and downloading just may be implemented and execute When wait for that deployment services device is available to newest deployment file.
It will be appreciated that the deployment file of this downloading can be deleted after each decompression executes deployment file, prevent Only conflict when subsequent environments are disposed.
The present embodiment is by judgement currently to whether there is compressed package identical with deployment file title in deployment services device File then deletes original deployment file if it exists, guarantees to only exist the deployment file of a latest edition in the same time, guarantees Environment deployment is only carried out according to the deployment file of this downloading, prevents mistake occur in decompression and execution.
Seventh embodiment of the invention provides a kind of storage medium, is stored with computer program, and computer program is processed Following steps S11 to S13 is realized when device executes:
S11 executes deployment script in deployment services device, and receives the default ginseng that user is passed into deployment script Number, wherein parameter preset includes at least: the address File Transfer Protocol FTP, deployment file title;
Whether S12, format and the quantity for detecting parameter preset are correct;
S13 downloads deployment in the correct situation of format and quantity of parameter preset in the corresponding cluster in the address FTP The corresponding compressed package files of file name decompress compressed package text corresponding with deployment file name is executed extremely to deployment services device Part.
In the present embodiment, storage medium may be mounted in the server to deployed environment.Due in first embodiment In the specific steps of the dispositions method of demand environment are described in detail, therefore, repeat no more in the present embodiment.
Optionally, in the present embodiment, above-mentioned storage medium can include but is not limited to: USB flash disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), mobile hard disk, magnetic disk or light The various media that can store program code such as disk.Optionally, in the present embodiment, processor has been stored according in storage medium Program code execute above-described embodiment record method and step.Optionally, the specific example in the present embodiment can refer to upper Example described in embodiment and optional embodiment is stated, details are not described herein for the present embodiment.Obviously, those skilled in the art It should be understood that each module of the above invention or each step can be realized with general computing device, they can collect member In on single computing device, or be distributed over a network of multiple computing devices, optionally, they can use tricks The executable program code of device is calculated to realize, is performed by computing device it is thus possible to be stored in storage device, And in some cases, can be with the steps shown or described are performed in an order that is different from the one herein, or they are distinguished Each integrated circuit modules are fabricated to, or makes multiple modules or steps in them to single integrated circuit module and comes in fact It is existing.In this way, the present invention is not limited to any specific hardware and softwares to combine.
The eighth embodiment of the present invention provides a kind of terminal, includes at least memory, processor, is stored on memory Computer program, processor realize following steps S21 to S23 when executing the computer program on memory:
S21 executes deployment script in deployment services device, and receives the default ginseng that user is passed into deployment script Number, wherein parameter preset includes at least: the address File Transfer Protocol FTP, deployment file title;
Whether S22, format and the quantity for detecting parameter preset are correct;
S23 downloads deployment in the correct situation of format and quantity of parameter preset in the corresponding cluster in the address FTP The corresponding compressed package files of file name decompress compressed package text corresponding with deployment file name is executed extremely to deployment services device Part.
In the present embodiment, terminal can be the server apparatus to deployed environment.Due in the first embodiment The specific steps of the dispositions method of demand environment are described in detail, therefore, are repeated no more in the present embodiment.
Although for illustrative purposes, the preferred embodiment of the present invention has been disclosed, those skilled in the art will recognize It is various improve, increase and replace be also it is possible, therefore, the scope of the present invention should be not limited to the above embodiments.

Claims (10)

1. a kind of dispositions method of demand environment characterized by comprising
Deployment script is executed in deployment services device, and receives the parameter preset that user is passed into the deployment script, In, the parameter preset includes at least: the address File Transfer Protocol FTP, deployment file title;
Whether format and the quantity for detecting the parameter preset are correct;
In the correct situation of format and quantity of the parameter preset, in the corresponding cluster in the address FTP described in downloading The corresponding compressed package files of deployment file title to deployment services device, and decompress and execute the deployment file title pair to described The compressed package files answered.
2. dispositions method as described in claim 1, which is characterized in that the parameter preset further include: cluster name.
3. dispositions method as claimed in claim 2, which is characterized in that described to be downloaded in the corresponding cluster in the address FTP The corresponding compressed package files of the deployment file title are to described to deployment services device, comprising:
It detects the corresponding cluster in the address FTP and whether cluster name in the parameter preset is identical;
In the corresponding cluster in the address FTP situation identical with cluster name in the parameter preset, in the address FTP The corresponding compressed package files of the deployment file title are downloaded in corresponding cluster to described to deployment services device.
4. dispositions method as claimed any one in claims 1 to 3, which is characterized in that described corresponding in the address FTP The corresponding compressed package files of the deployment file title are downloaded in cluster to described to deployment services device, comprising:
Detection is described to whether there is compressed package files identical with the deployment file title in deployment services device;
It is described in deployment services device exist compressed package files identical with the deployment file title in the case where, delete institute It states to compressed package files identical with the deployment file title present in deployment services device;
The corresponding compressed package files of the deployment file title are downloaded in the corresponding cluster in the address FTP to described wait dispose Server.
5. a kind of deployment device of demand environment characterized by comprising
Receiving module for executing deployment script in deployment services device, and receives user and is passed into the deployment script Parameter preset, wherein the parameter preset includes at least: the address File Transfer Protocol FTP, deployment file title;
Whether detection module, the format and quantity for detecting the parameter preset are correct;
Deployment module, under the format of the parameter preset and the correct situation of quantity, in the corresponding collection in the address FTP The corresponding compressed package files of the deployment file title are downloaded in group to described to deployment services device, and decompress and execute the portion Affix one's name to the corresponding compressed package files of file name.
6. deployment device as claimed in claim 5, which is characterized in that the parameter preset further include: cluster name.
7. deployment device as claimed in claim 6, which is characterized in that the deployment module is specifically used for:
It detects the corresponding cluster in the address FTP and whether cluster name in the parameter preset is identical;
In the corresponding cluster in the address FTP situation identical with cluster name in the parameter preset, in the address FTP The corresponding compressed package files of the deployment file title are downloaded in corresponding cluster to described to deployment services device.
8. the deployment device as described in any one of claim 5 to 7, which is characterized in that the deployment module is specifically used for:
Detection is described to whether there is compressed package files identical with the deployment file title in deployment services device;
It is described in deployment services device exist compressed package files identical with the deployment file title in the case where, delete institute It states to compressed package files identical with the deployment file title present in deployment services device;
The corresponding compressed package files of the deployment file title are downloaded in the corresponding cluster in the address FTP to described wait dispose Server.
9. a kind of storage medium, is stored with computer program, which is characterized in that real when the computer program is executed by processor The step of dispositions method of existing demand environment described in any one of Claims 1-4.
10. a kind of terminal includes at least memory, processor, is stored with computer program on the memory, feature exists In the processor realizes need described in any one of Claims 1-4 when executing the computer program on the memory The step of seeking the dispositions method of environment.
CN201811268912.1A 2018-10-29 2018-10-29 Method, device, storage medium and terminal for deploying demand environment Active CN109471799B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811268912.1A CN109471799B (en) 2018-10-29 2018-10-29 Method, device, storage medium and terminal for deploying demand environment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811268912.1A CN109471799B (en) 2018-10-29 2018-10-29 Method, device, storage medium and terminal for deploying demand environment

Publications (2)

Publication Number Publication Date
CN109471799A true CN109471799A (en) 2019-03-15
CN109471799B CN109471799B (en) 2022-07-29

Family

ID=65666102

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811268912.1A Active CN109471799B (en) 2018-10-29 2018-10-29 Method, device, storage medium and terminal for deploying demand environment

Country Status (1)

Country Link
CN (1) CN109471799B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112749085A (en) * 2020-12-31 2021-05-04 北京知因智慧科技有限公司 Cross-cluster task issuing method and device, electronic equipment and storage medium
CN113568623A (en) * 2021-07-23 2021-10-29 上海淇玥信息技术有限公司 Application deployment method and device and electronic equipment
CN114443104A (en) * 2022-04-06 2022-05-06 北京闪马智建科技有限公司 Application deployment method and device, storage medium and electronic device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103167041A (en) * 2013-03-28 2013-06-19 广州中国科学院软件应用技术研究所 System and method for supporting cloud environment application cluster automation deployment
CN103412768A (en) * 2013-07-19 2013-11-27 蓝盾信息安全技术股份有限公司 Zookeeper cluster automatic-deployment method based on script program
CN103631623A (en) * 2013-11-29 2014-03-12 浪潮(北京)电子信息产业有限公司 Method and device for allocating application software in trunking system
CN104536899A (en) * 2015-01-20 2015-04-22 成都益联科创科技有限公司 Software deploying and maintaining method based on intelligent cluster
CN106357738A (en) * 2016-08-26 2017-01-25 北京奇虎科技有限公司 Automatic arrangement method for server cluster and device as well as system thereof

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103167041A (en) * 2013-03-28 2013-06-19 广州中国科学院软件应用技术研究所 System and method for supporting cloud environment application cluster automation deployment
CN103412768A (en) * 2013-07-19 2013-11-27 蓝盾信息安全技术股份有限公司 Zookeeper cluster automatic-deployment method based on script program
CN103631623A (en) * 2013-11-29 2014-03-12 浪潮(北京)电子信息产业有限公司 Method and device for allocating application software in trunking system
CN104536899A (en) * 2015-01-20 2015-04-22 成都益联科创科技有限公司 Software deploying and maintaining method based on intelligent cluster
CN106357738A (en) * 2016-08-26 2017-01-25 北京奇虎科技有限公司 Automatic arrangement method for server cluster and device as well as system thereof

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112749085A (en) * 2020-12-31 2021-05-04 北京知因智慧科技有限公司 Cross-cluster task issuing method and device, electronic equipment and storage medium
CN112749085B (en) * 2020-12-31 2023-10-24 北京知因智慧科技有限公司 Cross-cluster task publishing method and device, electronic equipment and storage medium
CN113568623A (en) * 2021-07-23 2021-10-29 上海淇玥信息技术有限公司 Application deployment method and device and electronic equipment
CN114443104A (en) * 2022-04-06 2022-05-06 北京闪马智建科技有限公司 Application deployment method and device, storage medium and electronic device
CN114443104B (en) * 2022-04-06 2022-07-05 北京闪马智建科技有限公司 Application deployment method and device, storage medium and electronic device

Also Published As

Publication number Publication date
CN109471799B (en) 2022-07-29

Similar Documents

Publication Publication Date Title
CN107729227B (en) Application program test range determining method, system, server and storage medium
CN107528718B (en) Method, device and system for acquiring resources
CN107133165B (en) Browser compatibility detection method and device
CN109800005B (en) Client hot update method and device
CN106843947B (en) Method and device for processing code defects
CN111078481B (en) Method, device, electronic equipment and storage medium for acquiring configuration checklist
CN113448862B (en) Software version testing method and device and computer equipment
CN112099800A (en) Code data processing method and device and server
CN113656107A (en) Mobile application loading method and device and electronic equipment
CN109471799A (en) A kind of dispositions method of demand environment, device, storage medium and terminal
CN112149035A (en) Website static resource processing method and device
CN106020917B (en) A kind of software installation method and device, user terminal
US20160277477A1 (en) Information processing apparatus, terminal device, information processing method, and non-transitory computer readable recording medium
CN111338964B (en) Ordered batch test method, system, terminal and storage medium
CN109739756B (en) Method and equipment for testing application of mobile terminal
CN115080114B (en) Application program transplanting processing method, device and medium
CN110889116A (en) Advertisement blocking method and device and electronic equipment
CN110532193A (en) A kind of method for analyzing performance, calculates equipment and storage medium at device
CN114416596A (en) Application testing method and device, computer equipment and storage medium
CN113031995A (en) Rule updating method and device, storage medium and electronic equipment
CN113656318A (en) Software version testing method and device and computer equipment
CN113760765B (en) Code testing method and device, electronic equipment and storage medium
CN112948254B (en) Channel package detection method, device, equipment and storage medium
CN115309642A (en) Code testing method and device, electronic equipment and storage medium
US9779011B2 (en) Testing system

Legal Events

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