CN111813379A - Application deployment method and device, electronic equipment and computer readable storage medium - Google Patents

Application deployment method and device, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN111813379A
CN111813379A CN201910288370.2A CN201910288370A CN111813379A CN 111813379 A CN111813379 A CN 111813379A CN 201910288370 A CN201910288370 A CN 201910288370A CN 111813379 A CN111813379 A CN 111813379A
Authority
CN
China
Prior art keywords
branch
environment
application
build
source code
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910288370.2A
Other languages
Chinese (zh)
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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201910288370.2A priority Critical patent/CN111813379A/en
Publication of CN111813379A publication Critical patent/CN111813379A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/10Office automation; Time management
    • G06Q10/103Workflow collaboration or project management

Abstract

One or more embodiments of the present specification provide an application deployment method and apparatus, an electronic device, and a computer-readable storage medium, where the method may include: obtaining a build script from a build source repository, the build source repository being distinct from an application source repository; and deploying the application to the corresponding environment according to the construction script.

Description

Application deployment method and device, electronic equipment and computer readable storage medium
Technical Field
One or more embodiments of the present disclosure relate to the field of application deployment technologies, and in particular, to an application deployment method and apparatus, an electronic device, and a computer-readable storage medium.
Background
By adopting a DevOps (Development-Operations) product or solution, continuous integration and continuous delivery from code to application can be realized, thereby conveniently and rapidly performing function iteration and evolution on the product. For example, the cloud native application can be split and decoupled into different service components by modules, so that the characteristics of on-demand resource allocation, elastic computing and the like of cloud computing are fully utilized, and the overall agility and maintainability of the application can be improved; at present, more and more cloud native applications generate a large number of application components, and agile delivery frequency of each component is higher and higher, so that higher requirements are placed on design and management of application delivery.
Disclosure of Invention
In view of this, one or more embodiments of the present specification provide an application deployment method and apparatus, an electronic device, and a computer-readable storage medium.
To achieve the above object, one or more embodiments of the present disclosure provide the following technical solutions:
according to a first aspect of one or more embodiments of the present specification, there is provided an application deployment method, including:
obtaining a build script from a build source repository, the build source repository being distinct from an application source repository;
and deploying the application to the corresponding environment according to the construction script.
According to a second aspect of one or more embodiments of the present specification, there is provided an application deployment method, including:
acquiring a construction function from a construction source code storage space, wherein the construction source code storage space is different from an application source code storage space;
and deploying the application into the corresponding environment through the building function.
According to a third aspect of one or more embodiments of the present specification, there is provided an application deployment apparatus, comprising:
an acquisition unit that acquires a build script from a build source repository, the build source repository being distinct from an application source repository;
and the deployment unit is used for deploying the application to the corresponding environment according to the construction script.
According to a fourth aspect of one or more embodiments of the present specification, there is provided an application deployment apparatus, comprising:
an acquisition unit that acquires a build function from a build source code storage space that is different from an application source code storage space;
and the deployment unit is used for deploying the application to the corresponding environment through the building function.
According to a fifth aspect of one or more embodiments herein, there is provided an electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor implements the method of the first aspect by executing the executable instructions.
According to a sixth aspect of one or more embodiments of the present description, there is provided a computer readable storage medium having stored thereon computer instructions which, when executed by a processor, implement the steps of the method according to the first aspect.
Drawings
Fig. 1 is an architecture diagram of an application deployment system according to an exemplary embodiment.
FIG. 2A is a flowchart of a method for deploying an application, according to an example embodiment.
FIG. 2B is a flowchart of another application deployment method provided by an exemplary embodiment.
FIG. 3 is an interaction diagram of a secure deployment application provided by an exemplary embodiment.
Fig. 4 is a corresponding schematic diagram of the embodiment shown in fig. 3.
Fig. 5 is a schematic structural diagram of an apparatus according to an exemplary embodiment.
FIG. 6 is a block diagram of an application deployment apparatus provided in an exemplary embodiment.
FIG. 7 is a block diagram of another application deployment apparatus provided in an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with one or more embodiments of the present specification. Rather, they are merely examples of apparatus and methods consistent with certain aspects of one or more embodiments of the specification, as detailed in the claims which follow.
It should be noted that: in other embodiments, the steps of the corresponding methods are not necessarily performed in the order shown and described herein. In some other embodiments, the method may include more or fewer steps than those described herein. Moreover, a single step described in this specification may be broken down into multiple steps for description in other embodiments; multiple steps described in this specification may be combined into a single step in other embodiments.
Fig. 1 is an architecture diagram of an application deployment system according to an exemplary embodiment. As shown in fig. 1, the system may include a server 11, a network 12, a number of electronic devices such as a PC13 and a PC 14. In the running process, the server 11 may run a program on the server side of the application deployment system to implement processing functions such as continuous delivery; during the operation process, the PCs 13 and 14 may operate a client-side program of the application deployment system to implement functions such as related exhibition, human-computer interaction, and the like, so that developers submit new feature branches, administrators check verification results, and the like, and thus the application deployment system is cooperatively implemented between the server 11 and the PCs 13 and 14.
The server 11 may be a physical server including an independent host, or the server 11 may be a virtual server (i.e., a cloud server) carried by a host cluster. The electronic apparatus may include the following other types of apparatuses in addition to the above-described PC13, PC 14: a mobile phone, a tablet device, a notebook computer, a pda (personal digital assistants), a wearable device (such as smart glasses, a smart watch, etc.), etc., which are not limited by one or more embodiments of the present disclosure. And the network 12 for interaction between the PC13, the PC14, and the server 11 may include various types of wired or wireless networks.
FIG. 2A is a flowchart of a method for deploying an application, according to an example embodiment. As shown in fig. 2A, the method is applied to a server (e.g., the server 11 shown in fig. 1, etc.), and may include the following steps:
step 202A, a build script is obtained from a build source repository, which is distinct from an application source repository.
In an embodiment, by designing and using the application source code warehouse and the construction source code warehouse which are separated from each other, the application source code and the construction script can be separated from each other in the specification, that is, the application source code is stored in the application source code warehouse, and the construction script is stored in the construction source code warehouse, so that in the process of updating the version of the application by a developer, the developer only needs to access the application source code warehouse and does not relate to the construction source code warehouse, the developer is prevented from contacting the construction script in the construction source code warehouse, and the developer is prevented from modifying the construction script and the like.
In one embodiment, the level of authority required to access the build source code repository is higher than the developer's assigned level of authority. In other words, through the setting of the permission level, developers do not have access permission to the constructed source code warehouse, and the developers can be limited from contacting the constructed scripts stored in the constructed source code warehouse, so that the application source codes and the sensitive information related to the environment are effectively isolated, and the application deployment scheme with high security level is facilitated.
In one embodiment, the application source repository, the build source repository may be a Git code repository, or other types of code repositories may be employed, which is not limited in this specification.
In an embodiment, the different types of environments correspond to different build scripts, respectively. Different construction scripts can be stored in the same construction source code warehouse; alternatively, there may be a one-to-one corresponding build source repository for each type of environment, respectively, to store the build scripts corresponding to each type of environment, respectively.
And step 204A, deploying the application to a corresponding environment according to the construction script.
In an embodiment, an application can be automatically deployed into a corresponding environment according to a build script. The construction scripts corresponding to different environments are different, and the construction scripts needing to be called are determined according to actual conditions, so that the application is accurately deployed to the environments of corresponding types.
In an embodiment, the build script may be declarative, so that operations of source code building, testing, mirror image building and pushing, deployment to a corresponding environment, and the like are automatically realized based on the build script. Of course, the build script may take other forms, and this description is not intended to be limiting.
In one embodiment, a particular branch of the application may be deployed into an environment corresponding to the build script; wherein, the type of the specific branch and the type of the environment corresponding to the construction script conform to a predefined type mapping relation. In other words, in this specification, based on the predefined type mapping relationship, a branch type and an environment type may be bound in advance, so that based on the type mapping relationship and the type of the branch that needs to be deployed, the branch is accurately deployed into the corresponding type of environment, and in particular, an application that has not been verified and may have defects may be prevented from being deployed into a production environment, thereby preventing adverse effects.
In an embodiment, the build script corresponds to a preview environment when the particular branch is a new feature branch; in other words, the new property branch may be deployed into the preview environment so that the administrator can verify the behavior of the new property branch to prevent the defective new property branch from being merged into the most recent branch or the main branch. For example, after the new characteristic branch is deployed to the preview environment, a verification result for the new characteristic branch may be provided to an administrator, so that the administrator may look at the verification result to determine whether the new characteristic branch has a defect; if the new characteristic branch is not found, the new characteristic branch is sent back to the developer to be corrected, and if the new characteristic branch is verified, the administrator can send a merging confirmation message according to the verification result, so that the new characteristic branch can be merged to the latest branch based on the merging confirmation message.
In an embodiment, the build script corresponds to a simulation environment when the particular branch is a most recent branch; in other words, the nearest branch may be deployed into the simulation environment so that the administrator can verify the behavior of the nearest branch to prevent the defective nearest branch from being merged into the main branch. For example, after the most recent branch is deployed to the simulation environment, a verification result for the most recent branch may be provided to an administrator, so that the administrator may look at the verification result to determine whether the most recent branch has a defect; if there is a defect, the latest branch is taken back to the developer for correction (it may be that there is a problem in the new characteristic branch or that there is a problem in the latest branch before merging), and if the verification is passed, the administrator may issue a merge confirmation message for the verification result, so that the latest branch may be merged to the main branch based on the merge confirmation message.
In an embodiment, the build script corresponds to a production environment when the particular branch is a primary branch. Through the description of the above embodiment, it can be known that the administrator has verified the new property branch and the latest branch respectively, and only allows the new property branch to be merged to the latest branch and the latest branch to be merged to the main branch when the new property branch is verified in the preview environment and the latest branch is verified in the simulation environment, so that effective verification of the application of the new version is achieved as much as possible, and possible defects are eliminated, thereby ensuring that the main branch can normally operate in the production environment. Therefore, by binding the branch type and the environment type, the application defects can be effectively checked and eliminated, and the safety and the stability are improved in the process of updating the application version.
FIG. 2B is a flowchart of another application deployment method provided by an exemplary embodiment. As shown in fig. 2B, the method is applied to a server (e.g., the server 11 shown in fig. 1, etc.), and may include the following steps:
step 202B, obtaining a build function from a build source code storage space, the build source code storage space being different from the application source code storage space.
In one embodiment, the application source storage space is used for storing application source codes, for example, the application source storage space may be an application source repository in the embodiment shown in fig. 2A. The build source storage space is used to store build functions, such as the build source repository in the embodiment shown in fig. 2A.
In an embodiment, by designing and using mutually separated application source code storage spaces and construction source code storage spaces, application source codes and construction functions can be mutually separated in the specification, namely the application source codes are stored in the application source code storage spaces and the construction functions are stored in the construction source code storage spaces, so that in the process of updating versions for applications, developers only need to access the application source code storage spaces without involving the construction source code storage spaces, the developers are prevented from contacting the construction functions in the construction source code storage spaces, and the developers are prevented from modifying the construction functions.
In one embodiment, the level of authority required to access the build source code storage space is higher than the developer's assigned level of authority. In other words, through the setting of the permission level, developers do not have access permission to the constructed source code storage space, and the developers can be limited from contacting the constructed functions stored in the constructed source code storage space, so that the application source codes and the sensitive information related to the environment are effectively isolated, and the application deployment scheme with high security level is facilitated.
In an embodiment, the source code storage space may be a Git code storage space, or other types of code storage spaces may be used, and this description does not limit this.
In an embodiment, the different types of environments correspond to different build functions, respectively. Different construction functions can be stored in the same construction source code storage space; or, there may be a one-to-one corresponding building source storage space for each type of environment, so as to store the building function corresponding to each type of environment.
And step 204B, deploying the application to the corresponding environment through the building function.
In an embodiment, the application may be automatically deployed to the corresponding environment through a build function, for example, the build function may be implemented by a script, that is, the build function may be the build script in the embodiment shown in fig. 2A. The building functions corresponding to different environments are different, and the building functions needing to be called are determined according to actual conditions, so that the application is accurately deployed to the environments of corresponding types.
In an embodiment, the build function may be declarative, so that operations such as source code building, testing, mirror image building and pushing, deployment to a corresponding environment, and the like are automatically realized based on the build function. Of course, the building functions may also take other forms, and this description is not intended to be limiting.
In one embodiment, a particular branch of the application may be deployed to an environment corresponding to the build function; wherein, the type of the specific branch and the type of the environment corresponding to the building function conform to a predefined type mapping relation. In other words, in this specification, based on the predefined type mapping relationship, a branch type and an environment type may be bound in advance, so that based on the type mapping relationship and the type of the branch that needs to be deployed, the branch is accurately deployed into the corresponding type of environment, and in particular, an application that has not been verified and may have defects may be prevented from being deployed into a production environment, thereby preventing adverse effects.
In an embodiment, the build function corresponds to a preview environment when the particular branch is a new characteristic branch; in other words, the new property branch may be deployed into the preview environment so that the administrator can verify the behavior of the new property branch to prevent the defective new property branch from being merged into the most recent branch or the main branch. For example, after the new characteristic branch is deployed to the preview environment, a verification result for the new characteristic branch may be provided to an administrator, so that the administrator may look at the verification result to determine whether the new characteristic branch has a defect; if the new characteristic branch is not found, the new characteristic branch is sent back to the developer to be corrected, and if the new characteristic branch is verified, the administrator can send a merging confirmation message according to the verification result, so that the new characteristic branch can be merged to the latest branch based on the merging confirmation message.
In an embodiment, the build function corresponds to a simulated environment when the particular branch is the most recent branch; in other words, the nearest branch may be deployed into the simulation environment so that the administrator can verify the behavior of the nearest branch to prevent the defective nearest branch from being merged into the main branch. For example, after the most recent branch is deployed to the simulation environment, a verification result for the most recent branch may be provided to an administrator, so that the administrator may look at the verification result to determine whether the most recent branch has a defect; if there is a defect, the latest branch is taken back to the developer for correction (it may be that there is a problem in the new characteristic branch or that there is a problem in the latest branch before merging), and if the verification is passed, the administrator may issue a merge confirmation message for the verification result, so that the latest branch may be merged to the main branch based on the merge confirmation message.
In an embodiment, the build function corresponds to a production environment when the particular branch is a primary branch. Through the description of the above embodiment, it can be known that the administrator has verified the new property branch and the latest branch respectively, and only allows the new property branch to be merged to the latest branch and the latest branch to be merged to the main branch when the new property branch is verified in the preview environment and the latest branch is verified in the simulation environment, so that effective verification of the application of the new version is achieved as much as possible, and possible defects are eliminated, thereby ensuring that the main branch can normally operate in the production environment. Therefore, by binding the branch type and the environment type, the application defects can be effectively checked and eliminated, and the safety and the stability are improved in the process of updating the application version.
FIG. 3 is an interaction diagram of a secure deployment application provided by an exemplary embodiment; fig. 4 is a corresponding schematic diagram of the embodiment shown in fig. 3. In the embodiments shown in fig. 3-4, assuming that the application to be deployed is a cloud native application, the corresponding container application management service (for configuring and forming various types of environments) is provided by kubernets, and the related functions required by DevOps are provided by Jenkins, although the description is not limited thereto. The deployment process for the application may include the steps of:
in step 301, the application source repository obtains a new feature branch (labeled feature in fig. 4) submitted by the developer.
In an embodiment, the new property branch may be a new functionality developed by a developer for an application. Finally, the present specification can implement version update of the application and smooth use of the new feature branch by merging the source code of the new feature branch into the source code of the main branch and deploying into the production environment.
In one embodiment, the application source code repository may be a Git code repository and is hosted by a Git server.
In step 302, the application source code repository receives a Merge Request (MR for short) initiated by a developer.
In one embodiment, the developer aims to: the above-mentioned new property branch is requested to be merged to the latest branch (labeled latest in fig. 4), thereby being further merged to the master branch (labeled master in fig. 4) and deployed to the production environment.
In step 303, the MR automatically triggers the preview pipeline (labeled preview-pipeline in FIG. 4) defined in Jenkins.
In one embodiment, the preview pipeline is a predefined pipelined task in Jenkins. When the preview pipeline is triggered, the preview pipeline can automatically pull a source code item of the preview pipeline from a constructed source code warehouse, run source code compiling, testing, container mirror image constructing and pushing (pushing to a mirror image warehouse) and application deployment to a preview environment according to a declarative script (for example, Jenkins file can be recorded) in the source code item, and can also send a notification message to a pre-specified communication object (for example, send an instant communication message to a person or a group in the instant communication application, or send an email to a person mailbox or a group mailbox, or send a short message to a specified mobile phone number, and the like).
In the above embodiment, the association relationship between the MR and the preview pipeline is configured in advance, so that the preview pipeline in Jenkins can accurately respond to the MR initiated by a developer, and thus the new characteristic branch is automatically deployed to the preview environment, and is not deployed to other types of environments (that is, binding between the new characteristic branch and the preview environment) such as the simulation environment or the production environment, and the administrator is ensured to be able to inspect the new characteristic branch, and the defective new characteristic branch is prevented from causing adverse effects on the simulation environment or the production environment.
In the above embodiment, the application source code repository and the build source code repository are separated and isolated from each other, where a developer only has an access right for the application source code repository, but not an access right for the build source code repository, and only an administrator has an access right for the build source code repository, so that the developer can only submit, read, modify, and the like for application source codes in the application source code repository, and cannot access the build source code repository, that is, the developer cannot access the source code project of the preview pipeline, thereby avoiding the developer modifying the source code project and the like, and preventing the developer from influencing or interfering with the deployment process for the preview environment. The constructed source code repository may be a Git code repository and is specifically loaded at a Git server.
At step 304, Jenkins returns the verification results so that the verification results are passed to developers and administrators.
In one embodiment, the verification result is transmitted to the developer, so that when the verification result is failed, the developer can correct the new characteristic branch in time. And by transmitting the verification result to the administrator, the administrator can check and determine whether the new characteristic branch has defects or not according to the verification result, and whether the new characteristic branch is allowed to be merged into the latest branch or not.
And 305, after the new characteristic branch is confirmed to pass the verification, confirming that the new characteristic branch is merged into the latest branch by the application source code warehouse according to an instruction of receiving the MR, which is sent by an administrator.
At step 306, the operation of the administrator accepting the MR automatically triggers the building of a simulation pipeline (labeled as static-pipeline in FIG. 4) defined in Jenkins.
In one embodiment, the analog pipeline is a predefined pipelined task in Jenkins. When the simulation pipeline is triggered, the simulation pipeline can automatically pull a source code item of the simulation pipeline from a building source code warehouse, run source code compiling, testing, container mirror image building and pushing (pushing to a mirror image warehouse) according to a declarative script (for example, Jenkins file files can be recorded) in the source code item, deploy an application to a simulation environment, and send a notification message to a pre-specified communication object (for example, send an instant communication message to a person or a group in the instant communication application, or send an email to a person mailbox or a group mailbox, or send a short message to a specified mobile phone number, and the like).
In the above embodiment, the association relationship between the receiving operation of the administrator on the MR and the simulation pipeline is configured in advance, so that the simulation pipeline in Jenkins can accurately respond to the receiving operation of the administrator on the MR, and thus the latest branch (including the merged new characteristic branch) is automatically deployed to the simulation environment, but not deployed to other types of environments (equivalent to binding between the latest branch and the simulation environment) such as the production environment, and the administrator is ensured to be able to inspect the latest branch, thereby preventing the defective latest branch from causing adverse effects on the production environment.
In the above embodiment, the source code items of the preview pipeline and the source code items of the simulation pipeline may be stored in the same build source code repository; alternatively, the source code items of the preview pipeline and the source code items of the simulation pipeline may be stored in different building source code warehouses.
Step 307, Jenkins cleans up the preview environment.
And 308, the administrator verifies the operation condition of the latest branch in the simulation environment, and sends a confirmation message to the application source code warehouse after the verification is passed so as to confirm that the latest branch is merged to the main branch.
In step 309, the administrator automatically triggers the construction of the production pipeline (denoted as "product-pipeline" in fig. 4) defined in Jenkins for the confirmation message of the latest branch.
In one embodiment, the production pipeline is a predefined pipeline task in Jenkins. When the production pipeline is triggered, the production pipeline can automatically pull a source code item of the production pipeline from a constructed source code warehouse, run source code compiling, testing, container mirror image constructing and pushing (pushing to a mirror image warehouse) according to a declarative script (for example, Jenkins file files can be recorded) in the source code item, deploy an application to a production environment, and send a notification message to a pre-specified communication object (for example, send an instant communication message to a person or a group in the instant communication application, or send an email to a person mailbox or a group mailbox, or send a short message to a specified mobile phone number, and the like).
In the above embodiment, the relationship between the validation operation of the administrator on the validation result of the latest branch and the production pipeline is configured in advance, so that the production pipeline in Jenkins can accurately respond to the validation operation of the administrator on the validation result of the latest branch, and the main branch (including the merged latest branch, and the latest branch including the merged new characteristic branch) is automatically deployed to the production environment.
In the above embodiment, the source code items of the preview pipeline, the source code items of the simulation pipeline, and the source code items of the production pipeline may be stored in the same build source code repository; alternatively, the source code items of the preview pipeline, the source code items of the simulation pipeline, and the source code items of the production pipeline may be stored in different building source code warehouses, respectively.
To sum up, in this specification, the application source code repository and the build source code repository are separated from each other, and the authority of an ordinary developer can only create a new characteristic branch and submit the new characteristic branch to the application source code repository, initiate an MR to the application source code repository, and the like, but does not have access authority for the build source code repository, and only an administrator can access the build source code repository to be in charge of issuing control applied to a simulation environment and a production environment, management of a Jenkins build environment and a kubernets cluster environment, and the like, so that the developer can be ensured not to modify source code items stored in the build source code repository, and the influence on corresponding environment deployment is prevented. Meanwhile, by binding the branches of various types with the environment, the new characteristic branch can be ensured to be deployed to the preview environment, the latest branch is deployed to the simulation environment, and the main branch is deployed to the production environment, so that the new characteristic branch which may have defects is prevented from being deployed to the simulation environment or the production environment, or the latest branch is deployed to the production environment, and the safety and the stability in the application version upgrading process are ensured.
FIG. 5 is a schematic block diagram of an apparatus provided in an exemplary embodiment. Referring to fig. 5, at the hardware level, the apparatus includes a processor 502, an internal bus 504, a network interface 506, a memory 508 and a non-volatile memory 510, but may also include hardware required for other services. The processor 502 reads a corresponding computer program from the non-volatile memory 510 into the memory 508 and then runs, forming an application deployment apparatus on a logical level. Of course, besides software implementation, the one or more embodiments in this specification do not exclude other implementations, such as logic devices or combinations of software and hardware, and so on, that is, the execution subject of the following processing flow is not limited to each logic unit, and may also be hardware or logic devices.
Referring to fig. 6, in a software implementation, the application deployment apparatus may include:
an obtaining unit 61 that obtains a build script from a build source repository that is different from the application source repository;
and the deployment unit 62 is used for deploying the application to the corresponding environment according to the construction script.
Optionally, the permission level required for accessing the building source code repository is higher than the permission level assigned by the developer.
Optionally, the deployment unit 62 is specifically configured to:
deploying a specific branch of the application to an environment corresponding to the construction script; wherein, the type of the specific branch and the type of the environment corresponding to the construction script conform to a predefined type mapping relation.
Alternatively to this, the first and second parts may,
when the specific branch is a new characteristic branch, the build script corresponds to a preview environment;
when the particular branch is a most recent branch, the build script corresponds to a simulation environment;
the build script corresponds to a production environment when the particular branch is a primary branch.
Optionally, the method further includes:
a first providing unit 63, configured to provide a verification result for the new characteristic branch to an administrator after the new characteristic branch is deployed to the preview environment;
the first merging unit 64 merges the new characteristic branch to the latest branch according to a merge confirmation message issued by the administrator for the verification result.
Optionally, the method further includes:
a second providing unit 65, which provides the administrator with the verification result for the latest branch after the latest branch is deployed to the simulation environment;
the second merging unit 66 merges the latest branch to the main branch according to a merge confirmation message issued by the administrator for the verification result.
Referring to fig. 7, in another software implementation, the application deployment apparatus may include:
an obtaining unit 71 that obtains a build function from a build source code storage space that is different from the application source code storage space;
and a deployment unit 72 for deploying the application to the corresponding environment through the building function.
Optionally, the permission level required for accessing the constructed source code storage space is higher than the permission level allocated by the developer.
Optionally, the deployment unit 72 is specifically configured to:
deploying a specific branch of the application to an environment corresponding to the building function; wherein, the type of the specific branch and the type of the environment corresponding to the building function conform to a predefined type mapping relation.
Alternatively to this, the first and second parts may,
when the specific branch is a new characteristic branch, the build function corresponds to a preview environment;
when the particular branch is the most recent branch, the build function corresponds to a simulated environment;
the build function corresponds to a production environment when the particular branch is a primary branch.
Optionally, the method further includes:
a first providing unit 73 that provides an administrator with a verification result for the new characteristic branch after the new characteristic branch is deployed to the preview environment;
the first merging unit 74 merges the new characteristic branch to the latest branch according to a merge confirmation message issued by the administrator for the verification result.
Optionally, the method further includes:
a second providing unit 75, which provides the administrator with the verification result for the latest branch after the latest branch is deployed to the simulation environment;
the second merging unit 76 merges the latest branch to the main branch according to a merge confirmation message issued by the administrator for the verification result.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
In a typical configuration, a computer includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
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 computer storage media 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 disk storage, quantum memory, graphene-based storage media or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
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 an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The terminology used in the description of the one or more embodiments is for the purpose of describing the particular embodiments only and is not intended to be limiting of the description of the one or more embodiments. As used in one or more embodiments of the present specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used in one or more embodiments of the present description to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of one or more embodiments herein. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
The above description is only for the purpose of illustrating the preferred embodiments of the one or more embodiments of the present disclosure, and is not intended to limit the scope of the one or more embodiments of the present disclosure, and any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the one or more embodiments of the present disclosure should be included in the scope of the one or more embodiments of the present disclosure.

Claims (16)

1. An application deployment method, comprising:
obtaining a build script from a build source repository, the build source repository being distinct from an application source repository;
and deploying the application to the corresponding environment according to the construction script.
2. The method of claim 1, wherein a level of authority required to access the build source code repository is higher than a developer's assigned level of authority.
3. The method of claim 1, wherein deploying the application into the respective environment according to the build script comprises:
deploying a specific branch of the application to an environment corresponding to the construction script; wherein, the type of the specific branch and the type of the environment corresponding to the construction script conform to a predefined type mapping relation.
4. The method of claim 3,
when the specific branch is a new characteristic branch, the build script corresponds to a preview environment;
when the particular branch is a most recent branch, the build script corresponds to a simulation environment;
the build script corresponds to a production environment when the particular branch is a primary branch.
5. The method of claim 4, further comprising:
after deploying the new characteristic branch to the preview environment, providing a verification result for the new characteristic branch to an administrator;
and merging the new characteristic branch to the latest branch according to a merging confirmation message sent by the administrator aiming at the verification result.
6. The method of claim 4, further comprising:
after deploying the recent branch to the simulation environment, providing a verification result for the recent branch to an administrator;
and merging the latest branch to the main branch according to a merging confirmation message sent by the administrator aiming at the verification result.
7. An application deployment method, comprising:
acquiring a construction function from a construction source code storage space, wherein the construction source code storage space is different from an application source code storage space;
and deploying the application into the corresponding environment through the building function.
8. An application deployment apparatus, comprising:
an acquisition unit that acquires a build script from a build source repository, the build source repository being distinct from an application source repository;
and the deployment unit is used for deploying the application to the corresponding environment according to the construction script.
9. The apparatus of claim 8, wherein a level of authority required to access the build source code repository is higher than a developer assigned level of authority.
10. The apparatus according to claim 8, wherein the deployment unit is specifically configured to:
deploying a specific branch of the application to an environment corresponding to the construction script; wherein, the type of the specific branch and the type of the environment corresponding to the construction script conform to a predefined type mapping relation.
11. The apparatus of claim 10,
when the specific branch is a new characteristic branch, the build script corresponds to a preview environment;
when the particular branch is a most recent branch, the build script corresponds to a simulation environment;
the build script corresponds to a production environment when the particular branch is a primary branch.
12. The apparatus of claim 11, further comprising:
a first providing unit, configured to provide a verification result for the new characteristic branch to an administrator after the new characteristic branch is deployed to the preview environment;
and the first merging unit merges the new characteristic branch to the latest branch according to a merging confirmation message sent by the administrator aiming at the verification result.
13. The apparatus of claim 11, further comprising:
a second providing unit that provides an administrator with a verification result for the latest branch after the latest branch is deployed to the simulation environment;
and the second merging unit merges the latest branch to the main branch according to a merging confirmation message sent by the administrator for the verification result.
14. An application deployment apparatus, comprising:
an acquisition unit that acquires a build function from a build source code storage space that is different from an application source code storage space;
and the deployment unit is used for deploying the application to the corresponding environment through the building function.
15. An electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor implements the method of any one of claims 1-7 by executing the executable instructions.
16. A computer-readable storage medium having stored thereon computer instructions, which when executed by a processor, perform the steps of the method according to any one of claims 1-7.
CN201910288370.2A 2019-04-11 2019-04-11 Application deployment method and device, electronic equipment and computer readable storage medium Pending CN111813379A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910288370.2A CN111813379A (en) 2019-04-11 2019-04-11 Application deployment method and device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910288370.2A CN111813379A (en) 2019-04-11 2019-04-11 Application deployment method and device, electronic equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN111813379A true CN111813379A (en) 2020-10-23

Family

ID=72843753

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910288370.2A Pending CN111813379A (en) 2019-04-11 2019-04-11 Application deployment method and device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111813379A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113590114A (en) * 2021-08-12 2021-11-02 北京滴普科技有限公司 Assembly line arranging method and device and computer equipment
WO2022121971A1 (en) * 2020-12-10 2022-06-16 百果园技术(新加坡)有限公司 Front-end project processing method and apparatus, device, management system, and storage medium
CN116301932A (en) * 2022-12-21 2023-06-23 山东未来网络研究院(紫金山实验室工业互联网创新应用基地) Rapid deployment method for large project in kubernetes environment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050044531A1 (en) * 2003-06-09 2005-02-24 Erc-Ip, Llc Methods and systems for deploying computer source code
CN104536744A (en) * 2014-12-19 2015-04-22 微梦创科网络科技(中国)有限公司 Method and server for automatically building and deploying codes
US20160378449A1 (en) * 2015-06-24 2016-12-29 Vmware, Inc. Artifact manager for release automation
CN107229482A (en) * 2017-08-04 2017-10-03 郑州云海信息技术有限公司 A kind of method and system for software system development
CN107515766A (en) * 2017-08-24 2017-12-26 北京锐安科技有限公司 Generation method, deployment installation method and the device of database deployment file
CN108073400A (en) * 2017-12-07 2018-05-25 湖北三新文化传媒有限公司 Software automation construction method, server and storage medium
CN109597644A (en) * 2018-12-05 2019-04-09 江苏风云科技服务有限公司 Project dispositions method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050044531A1 (en) * 2003-06-09 2005-02-24 Erc-Ip, Llc Methods and systems for deploying computer source code
CN104536744A (en) * 2014-12-19 2015-04-22 微梦创科网络科技(中国)有限公司 Method and server for automatically building and deploying codes
US20160378449A1 (en) * 2015-06-24 2016-12-29 Vmware, Inc. Artifact manager for release automation
CN107229482A (en) * 2017-08-04 2017-10-03 郑州云海信息技术有限公司 A kind of method and system for software system development
CN107515766A (en) * 2017-08-24 2017-12-26 北京锐安科技有限公司 Generation method, deployment installation method and the device of database deployment file
CN108073400A (en) * 2017-12-07 2018-05-25 湖北三新文化传媒有限公司 Software automation construction method, server and storage medium
CN109597644A (en) * 2018-12-05 2019-04-09 江苏风云科技服务有限公司 Project dispositions method and device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022121971A1 (en) * 2020-12-10 2022-06-16 百果园技术(新加坡)有限公司 Front-end project processing method and apparatus, device, management system, and storage medium
CN113590114A (en) * 2021-08-12 2021-11-02 北京滴普科技有限公司 Assembly line arranging method and device and computer equipment
CN116301932A (en) * 2022-12-21 2023-06-23 山东未来网络研究院(紫金山实验室工业互联网创新应用基地) Rapid deployment method for large project in kubernetes environment
CN116301932B (en) * 2022-12-21 2023-09-29 山东未来网络研究院(紫金山实验室工业互联网创新应用基地) Rapid deployment method for large project in kubernetes environment

Similar Documents

Publication Publication Date Title
US20200264902A1 (en) Configuration for Application Using Microservices
US10732962B1 (en) End-to-end deployment infrastructure
US10936293B2 (en) Container image layer reordering
US11093232B2 (en) Microservice update system
US11385903B2 (en) Firmware update patch
US10356213B2 (en) Automatic interdependency resolution for micro-service deployments
US20170192773A1 (en) Mobile applications
US10338910B2 (en) Multi-tenant upgrading
US9542173B2 (en) Dependency handling for software extensions
CN111813379A (en) Application deployment method and device, electronic equipment and computer readable storage medium
CN109753300B (en) Algorithm upgrading method, calculation task sending method and related device
US10678626B2 (en) Distributed product deployment validation
CN104346206A (en) Method and system for recovering installation of unloaded software
US10162619B1 (en) Fleet-wide management of software packages
US20180314548A1 (en) Work item management in content management systems
US10990507B2 (en) System and method for provisioning a virtual machine test environment
CN112162761A (en) Method, system and equipment for automatically deploying project to public cloud containerization platform
US11544050B1 (en) Software patch automation
US9760364B2 (en) Checks for software extensions
CN110083366B (en) Application running environment generation method and device, computing equipment and storage medium
CN110471828B (en) Operating system testing method, device and equipment thereof
CN115174158B (en) Cloud product configuration checking method based on multi-cloud management platform
WO2022053048A1 (en) Ensuring secure provisioning of blockchain infrastructure
CN114253599A (en) Version deployment method, version deployment device, electronic device and storage medium
CN110297625B (en) Application processing method and device

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