WO2017071494A1 - 一种应用部署方法和装置 - Google Patents

一种应用部署方法和装置 Download PDF

Info

Publication number
WO2017071494A1
WO2017071494A1 PCT/CN2016/102299 CN2016102299W WO2017071494A1 WO 2017071494 A1 WO2017071494 A1 WO 2017071494A1 CN 2016102299 W CN2016102299 W CN 2016102299W WO 2017071494 A1 WO2017071494 A1 WO 2017071494A1
Authority
WO
WIPO (PCT)
Prior art keywords
configuration
file package
package
running
application
Prior art date
Application number
PCT/CN2016/102299
Other languages
English (en)
French (fr)
Inventor
周焕盛
Original Assignee
阿里巴巴集团控股有限公司
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 阿里巴巴集团控股有限公司 filed Critical 阿里巴巴集团控股有限公司
Publication of WO2017071494A1 publication Critical patent/WO2017071494A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating

Definitions

  • the present application relates to the field of information technology, and in particular, to an application deployment method and an application deployment device.
  • Modern software systems often have a lot of dependencies, especially in a cloud environment where an application relies on the underlying runtime environment and many third-party libraries, peripheral systems such as language runtime environments, databases, web servers, and distributed storage.
  • the application itself has a number of configuration files to manage these dependencies, such as library file runtime parameters, database connection configuration, web server configuration, and its own startup parameters. During the deployment process, you need to write these configuration information first, then load the relevant dependencies, and finally start the application.
  • the application deployment method of the system includes: the deployment management module sends the deployment command and the deployment information to the execution module, where the deployment information includes the server and component information that needs to be deployed in the production environment; the execution module receives the deployment command and the deployment information, and according to the deployment information, The version information of the component to be deployed is obtained in the database, and the version information is sent to the client on the server to be deployed.
  • the client downloads the version file from the SVN server according to the version information, and runs the corresponding version file according to the script file to complete the current deploy.
  • different middleware clusters usually have different configuration parameters (such as database connection information, startup parameters, cluster configuration, etc.) to adapt to the operational requirements of different upper-layer business applications.
  • configuration parameters such as database connection information, startup parameters, cluster configuration, etc.
  • the above application deployment method can only use the same configuration for all deployments applied at deployment time, and the parameters of the application deployment cannot be dynamically configurable.
  • An object of the present invention is to provide an application deployment method, which can implement dynamic parameter configurability when an application is deployed.
  • the embodiment of the present application further provides an application deployment device to ensure implementation and application of the foregoing method.
  • an application deployment method including:
  • the running file package and the modified configuration file package are distributed to the server where the application client is located according to the preset application deployment process, and the installation process of the application is executed.
  • the obtaining the running file package and the configuration file package of the application includes:
  • downloading and obtaining the running file package and the configuration file package from the cloud storage repository according to the cloud storage address of the running file package and the cloud storage address of the configuration file package include:
  • the running file package and the modified configuration file package are distributed to the server where the application client is located according to the preset application deployment process, and the method further includes:
  • modifying the configuration file package according to the configuration information includes:
  • the default running configuration parameters in the configuration file package are corrected by using the configuration parameter values.
  • the method further includes:
  • the running file package and the configuration file package are separately stored in the cloud storage address corresponding to the storage warehouse according to the version baseline information.
  • running file package and the modified configuration file package are distributed to the server where the application client is located, including:
  • the running file package and the modified configuration file package are distributed in batches to the server where the application client is located in an asynchronous manner.
  • the configuration information is an ini file.
  • the application also discloses an application deployment device, including:
  • An obtaining unit configured to acquire a running file package and a configuration file package of the application
  • a correction unit configured to acquire pre-generated configuration information, and modify the configuration file package according to the configuration information
  • the execution unit is configured to distribute the running file package and the modified configuration file package to the server where the application client is located according to the preset application deployment process, and execute the installation process of the application.
  • the obtaining unit includes:
  • An information obtaining subunit configured to acquire, in a version baseline database, version baseline information of the running file package of the application and version baseline information of the configuration file package;
  • the address obtaining sub-unit is configured to obtain, according to a correspondence between the version baseline information and the cloud storage address, a cloud storage address of the running file package and a cloud storage address of the configuration file package;
  • the downloading sub-unit is configured to download and obtain the running file package and the configuration file package from the cloud storage repository according to the cloud storage address of the running file package and the cloud storage address of the configuration file package.
  • the downloading subunit is configured to download and obtain the running file package and the slave configuration from the running package cloud storage warehouse according to the cloud storage address of the running file package and the cloud storage address of the configuration file package.
  • the configuration file package is obtained by downloading in the cloud storage repository.
  • the device further includes:
  • a loading unit configured to distribute the running file package and the modified configuration file package to a server where the application client is located according to a preset application deployment process, before executing the installation process of the application And loading an application deployment process template corresponding to the application.
  • correction unit includes:
  • a parameter parsing subunit configured to parse the configuration information to obtain a configuration parameter value
  • a parameter correction subunit configured to use the configuration parameter value to configure a default operation in the configuration file package Set the parameters to correct.
  • a separation unit configured to separate a running file and a configuration file from the software package; configure a default running configuration parameter for the configuration file; generate a running file package for the running file configuration version baseline information, and configure the running file package Configure version baseline information to generate a configuration file package;
  • the storage unit is configured to store the running file package and the configuration file package in a cloud storage address corresponding to the storage warehouse according to the version baseline information.
  • execution unit is configured to batch distribute the running file package and the modified configuration file package to the server where the application client is located in an asynchronous manner.
  • the configuration information is an ini file.
  • the embodiments of the present application include the following advantages:
  • the embodiment of the present application separates the software packages of the application and the installation packages of the running runtime environment into the running file package and the configuration file package, and generates configuration information for different running environments in advance, thereby enabling the application deployment.
  • the configuration file package can be modified by using the configuration information in different operating environments, thereby changing the situation that all the deployments of the existing application can only use the same configuration, and the parameters of the application deployment are dynamically configurable, thereby realizing the construction.
  • Different application clusters can specify different runtime configuration parameters to suit different business needs. This method enables application deployment flexibility and dynamic customizability.
  • FIG. 2 is a flow chart showing the steps of an embodiment of a method for separating and storing a software package in the present application
  • FIG. 3 is a flow chart of steps of an embodiment of a method for obtaining an application file package and a configuration file package of an application in the present application;
  • FIG. 4 is a schematic diagram of association between a version baseline database and a running package cloud storage and configuration package cloud storage in the present application
  • FIG. 6 is a schematic diagram of a system architecture of application deployment in the present application.
  • FIG. 7 is a structural block diagram of an embodiment of an application deployment apparatus of the present application.
  • FIG. 8 is a block diagram showing the structure of an acquisition unit in the present application.
  • FIG. 9 is a structural block diagram of another embodiment of an application deployment device of the present application.
  • Figure 10 is a block diagram showing the structure of a correction unit in the present application.
  • FIG. 11 is a structural block diagram of still another embodiment of an application deployment apparatus of the present application.
  • FIG. 1 a flow chart of steps of an application deployment method embodiment of the present application is shown, which may specifically include the following steps:
  • step 101 the running file package and the configuration file package of the application are obtained.
  • the device or system for application deployment (hereinafter referred to as the device) separately separates each software package of the application and the installation package of the runtime environment that it depends on, and divides it into a running file package and a configuration file package. .
  • the configuration file package may be a file package in which the configuration parameters in the file package may be changed or modified in different running environments.
  • different middleware clusters usually have different configuration parameters (such as database connection). Information, startup parameters, cluster configuration, etc.) to adapt to the operational requirements of different upper-layer business applications.
  • the configuration parameters and the like in the configuration package can be preset to default values.
  • the data content in the running package is generally relatively fixed in different operating environments.
  • the application's running file package and configuration file package can be stored in the same database, stored separately, or stored in a cloud storage warehouse.
  • the device When the device deploys the application, it first obtains the running file package and configuration file package of the application.
  • Step 102 Acquire pre-generated configuration information, and modify the configuration file package according to the configuration information.
  • the device generates different configuration information in advance for different operating environments of the application, and the configuration information may include a machine list and various configuration parameter values, and may mainly include a machine list segment [deploy-servers], where the machine to be deployed is listed.
  • the configuration information can be an ini file.
  • the ini file parsing process is simple.
  • modifying the configuration file package according to the configuration information includes: parsing the configuration information to obtain a configuration parameter value; and using the configuration parameter value to the configuration file package The default running configuration parameters are corrected.
  • the device may first decompress the configuration file package to obtain the configuration file therein, and the running configuration parameters in the configuration file.
  • the configuration has a default value.
  • the ini file of the configuration information is parsed, and the configuration parameter value in the configuration information is obtained, and the default running configuration parameter in the configuration file is corrected by using the configuration parameter value, that is, the configuration parameter value is inserted or replaced into the configuration file package.
  • the default value of the running configuration parameter in the configuration file package so that the application can dynamically adjust the runtime configuration parameter value according to the cluster environment and business needs during deployment, without having to log in to the machine after the application is deployed.
  • the flexibility and dynamic customizability of application deployment is achieved.
  • Step 103 Distribute the running file package and the modified configuration file package to the server where the application client is located according to the preset application deployment process, and execute the application installation process.
  • the device can distribute the running file package and the modified configuration file package to each server where the application client is located according to the application deployment process, and respectively execute the application installation process.
  • the embodiment of the present application separates the software packages of the application and the installation packages of the running runtime environment into the running file package and the configuration file package, and generates configuration information for different running environments in advance, thereby enabling the application deployment.
  • the configuration file package can be modified by using the configuration information in different operating environments, thereby changing the situation that all the deployments of the existing application can only use the same configuration, and the parameters of the application deployment are dynamically configurable, thereby realizing the construction.
  • Different application clusters can specify different runtime configuration parameters to suit different business needs. This method enables application deployment flexibility and dynamic customizability.
  • the separation and storage of the software package may be specifically as shown in FIG. 2, including:
  • step 201 the running file and the configuration file are separated from the software package.
  • Step 202 Configure default running configuration parameters for the configuration file.
  • the software package of the application and the installation package of the runtime environment that it depends on are collectively referred to as a software package.
  • the configuration-related data and the operation-related data are searched from the software package in advance. Separate run files and configuration files.
  • the configuration file is modularized, that is, a standardized configuration file is generated, and each running configuration parameter in the configuration file is in the corresponding module, and a default running configuration parameter is generated for each running configuration parameter configuration default value.
  • Step 203 Generate a running file package for the running file configuration version baseline information, and generate a configuration file package for the configuration file to configure version baseline information.
  • Step 204 Store the running file package and the configuration file package in a cloud storage address corresponding to the storage warehouse according to the version baseline information.
  • a running file package can be generated for the running file configuration version baseline information
  • a configuration file package is generated for the configuration file to configure version baseline information.
  • the device uses a version baseline database to uniformly manage the running file package of the application and the version baseline information of the configuration file package.
  • the version baseline database includes version baseline information of each running file package and configuration file package, and a storage address of each version file package. Without storing each file package.
  • Each version of the running file package and configuration file package can be stored in the cloud storage repository and accessed through the HTTP URL.
  • the cloud storage address of the running file package and the configuration file package may be separately determined according to the version baseline information, where the cloud storage address is the address information of the data file stored in the cloud storage warehouse, so the running file package and the configuration file package may be separately Stored in the cloud storage address corresponding to the storage warehouse.
  • the storage space of the database can be saved, and each file package can be conveniently downloaded from the cloud storage.
  • one version of each file package corresponds to a baseline, and the version of the baseline information management method facilitates upgrading the application on the cluster. All configuration files are packaged and stored, unified management, and avoid downloading and copying a large number of small files.
  • the process of obtaining the running file package and the configuration file package of the application may be specifically as shown in FIG. 3, including:
  • Step 301 Obtain version baseline information of the running file package of the application and version baseline information of the configuration file package in the version baseline database.
  • the device When obtaining the running file package and configuration file package of the application, the device first determines the version baseline information of the running file package and the version baseline information of the configuration file package in the version baseline database.
  • Step 302 Obtain a cloud storage address of the running file package and a cloud storage address of the configuration file package according to the correspondence between the version baseline information and the cloud storage address.
  • the device determines the cloud storage address of the running file package and the cloud storage address of the configuration file package according to the correspondence between the version baseline information of each file package in the version baseline database and the cloud storage address.
  • Step 303 Download and obtain a running file package and a configuration file package from the cloud storage warehouse according to the cloud storage address of the running file package and the cloud storage address of the configuration file package.
  • the device can download the running file package and configuration file package of the application from the cloud storage repository.
  • the running file package and the configuration file package may be stored in different cloud storage warehouses respectively, as shown in FIG. 4, the version baseline database.
  • the version baseline information of the package corresponds to the address in the configuration package cloud storage repository.
  • the running file package is obtained and downloaded from the cloud storage repository.
  • the process of configuring a file package can be:
  • the running file package is downloaded and downloaded from the running package cloud storage warehouse in parallel, and the configuration file package is obtained by downloading from the configuration package cloud storage warehouse.
  • the download process can use asynchronous I/O to increase download speed.
  • you can distribute packages in a centralized, batch, and parallel manner for fast, large-scale cluster deployment.
  • the running file package and the modified configuration file package are distributed to the server where the application client is located according to the preset application deployment process, and the application installation process is performed, as shown in FIG. 5 .
  • the method may further include:
  • Step 501 Load an application deployment process template corresponding to the application.
  • the device does not use a unified or fixed application deployment process, but multiple application deployment process templates may be established in advance, and different application deployment processes correspond to different deployment process templates.
  • the deployment process template mainly includes creating an installation directory on the target machine, distributing the application and its dependent application running package and configuration package to the target machine through the download module, decompressing the package, copying the configuration file, copying the running file, and detecting the application service. Whether the process exists, if it exists, it stops, starts a new application service, checks whether the service is started successfully, and so on. Different applications have different deployment process templates according to their own characteristics.
  • the application deployment process template can be yaml.
  • the running file package and the modified configuration file package may be distributed to the server where the application client is located according to the loaded application deployment process, and executed.
  • the distributing the running file package and the modified configuration file package to the server where the application client is located includes: distributing the running file package and the modified configuration file package to the application in an asynchronous manner.
  • the server where the client is located that is, the asynchronous I/O mode can be used in the distribution process, and the running file package and the modified configuration file package are distributed in parallel, and the running file package and the modified configuration file package are distributed in batches, and the file package and the configuration file are run.
  • the cloud storage and version baseline management of the package enables centralized, batch, and parallel distribution of software packages for rapid large-scale cluster deployment.
  • the server where the application client is located can perform the installation process according to the deployment of the deployment process template, for example, creating a corresponding installation directory, decompressing the installation package, running the file package and the modified configuration file package, copying the configuration file, and copying the running file. Then, it is detected whether the service process of the application exists, if it exists, stops, starts a new application service, checks whether the service is successfully started, etc., and installs the application.
  • This method can make the deployment process of different applications be customized.
  • the application deployment process changes, it is only necessary to update the process template, and there is no need to update the deployment module or the deployment device.
  • Process orchestration can be achieved through different deployment process templates.
  • the entire system architecture can be as shown in FIG. 6.
  • the device first obtains version information and storage address of the running file package and the configuration file package from the version baseline database, and then runs the package cloud storage warehouse and configures the package cloud storage.
  • the running file package and the configuration file package of the application are obtained in parallel in the warehouse, and then the configuration file package is corrected by using the pre-generated configuration information.
  • the application deployment process template is determined to correspond to the application.
  • the application deployment process template and load the deployment process template, and then distribute the running package and the modified configuration file package to each server where the application client is located according to the deployment process template, and execute the application installation process.
  • the underlying uses asynchronous I/O to distribute each installation package, which not only realizes the batch distribution of the installation package to the target machine, but also parallelizes the distribution of the running package and the configuration package for each machine, thereby speeding up the batch distribution of the installation package. .
  • FIG. 7 a structural block diagram of an embodiment of an application deployment apparatus of the present application is shown, which may specifically include the following units:
  • the obtaining unit 701 is configured to acquire a running file package and a configuration file package of the application.
  • the correcting unit 702 is configured to acquire pre-generated configuration information, and modify the configuration file package according to the configuration information.
  • the executing unit 703 is configured to distribute the running file package and the modified configuration file package to the server where the application client is located according to the preset application deployment process, and execute the installation process of the application.
  • the embodiments of the present application separate the application packages of the application and the installation packages of the runtime environments that are dependent on them by the foregoing units, and divide them into running file packages and configuration file packages, and generate configuration information for different running environments in advance, thereby enabling When the application is deployed, the configuration file package can be modified by using the configuration information in different running environments. This changes the configuration of all the existing applications and can only use the same configuration.
  • the parameters of the application deployment are dynamically configurable. By setting up different application clusters, different runtime configuration parameters can be specified to adapt to different business requirements.
  • the device realizes application deployment flexibility and dynamic customizability.
  • the obtaining unit 701 may further include:
  • the information acquisition sub-unit 801 is configured to acquire version baseline information of the running file package of the application and version baseline information of the configuration file package in a version baseline database.
  • the address obtaining sub-unit 802 is configured to obtain a cloud storage address of the running file package and a cloud storage address of the configuration file package according to a correspondence between the version baseline information and the cloud storage address.
  • the downloading sub-unit 803 is configured to download and obtain the running file package and the configuration file package from the cloud storage repository according to the cloud storage address of the running file package and the cloud storage address of the configuration file package.
  • the downloading sub-unit 803 may be configured to download and obtain the running file package and the slave device from the running package cloud storage warehouse according to the cloud storage address of the running file package and the cloud storage address of the configuration file package. Configure the package cloud storage repository to download the configuration file package.
  • the apparatus may further include:
  • the loading unit 901 is configured to, after the execution unit 703 distributes the running file package and the modified configuration file package to the server where the application client is located, according to the preset application deployment process, before executing the installation process of the application. And loading an application deployment process template corresponding to the application.
  • the correction unit 702 includes:
  • the parameter analysis subunit 1001 is configured to parse the configuration information to obtain a configuration parameter value
  • the parameter correction subunit 1002 is configured to correct the default operational configuration parameters in the configuration file package by using the configuration parameter values.
  • the device further includes:
  • the separating unit 1101 is configured to separate the running file and the configuration file from the software package; configure a default running configuration parameter for the configuration file; generate a running file package for the running file configuration version baseline information, and configure the file for the running file File configuration version baseline information generation configuration file package;
  • the storage unit 1102 is configured to separately store the running file package and the configuration file package into a cloud storage address corresponding to the storage warehouse according to the version baseline information.
  • the executing unit 703 is configured to batch distribute the running file package and the modified configuration file package to the server where the application client is located in an asynchronous manner.
  • the above configuration information can be an ini file.
  • the embodiment of the present application further provides an electronic device, including a memory and a processor.
  • the processor and the memory are connected to each other through a bus; the bus may be an ISA bus, a PCI bus, or an EISA bus.
  • the bus can be divided into an address bus, a data bus, a control bus, and the like.
  • the memory is used to store a program, and specifically, the program may include program code, and the program code includes computer operation instructions.
  • the memory may include a high speed RAM memory and may also include a non-volatile memory such as at least one disk memory.
  • the processor is used to read the program code in the memory and perform the following steps:
  • the running file package and the modified configuration file package are distributed to the server where the application client is located according to the preset application deployment process, and the installation process of the application is executed.
  • the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
  • embodiments of the embodiments of the present application can be provided as a method, apparatus, or computer program product. Therefore, the embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Moreover, embodiments of the present application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • the computer device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
  • the memory may include non-persistent memory, random access memory (RAM), and/or non-volatile memory in a computer readable medium, such as read only memory (ROM) or flash memory.
  • RAM random access memory
  • ROM read only memory
  • Memory is an example of a computer readable medium.
  • Computer readable media includes both permanent and non-persistent, removable and non-removable media.
  • Information storage can be implemented by any method or technology. The information can be computer readable instructions, data structures, modules of programs, 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 disk read only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, Magnetic cassette tape, magnetic tape storage or other magnetic storage device or any other non-transmission medium available Stores information that can be accessed by the computing device.
  • computer readable media does not include non-persistent computer readable media, such as modulated data signals and carrier waves.
  • Embodiments of the present application are described with reference to flowcharts and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the present application. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG.
  • These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing terminal device to produce a machine such that instructions are executed by a processor of a computer or other programmable data processing terminal device
  • Means are provided for implementing the functions specified in one or more of the flow or in one or more blocks of the flow chart.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the instruction device implements the functions specified in one or more blocks of the flowchart or in a flow or block of the flowchart.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

一种应用部署方法和装置,该应用部署方法包括:获取应用的运行文件包和配置文件包(101);获取预先生成的配置信息,并根据所述配置信息修正所述配置文件包(102);按照预先设置的应用部署流程,将所述运行文件包及修正后的所述配置文件包分发到应用客户端所在服务器,执行所述应用的安装过程(103)。该方法通过将应用的各个软件包及其依赖的运行时环境的安装包进行分离,划分为运行文件包和配置文件包,并预先针对不同的运行环境生成配置信息,从而使得在应用部署时可以利用不同运行环境下的配置信息对配置文件包进行修正,实现了应用部署时的参数动态可配置,该方法实现了应用部署的灵活性和动态可定制性。

Description

一种应用部署方法和装置
本申请要求2015年10月26日递交的申请号为201510702384.6、发明名称为“一种应用部署方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及信息技术领域,特别是涉及一种应用部署方法和一种应用部署装置。
背景技术
现代软件系统通常有很多依赖,特别是在云环境中,一个应用会依赖底层的运行时环境和很多第三方库、周边的系统,比如语言运行时环境、数据库、Web服务器、分布式存储。应用本身有很多的配置文件来管理这些依赖,比如库文件运行时参数、数据库连接配置、Web服务器配置、自身的启动参数。在部署过程中,需要先写入这些配置信息,然后加载相关依赖,最后启动应用。
为了做到从准备好安装包到应用正确启动的自动化应用部署,必须定制每个应用的部署流程,解决部署过程中的依赖问题、配置管理和可根据部署需要进行动态定制的问题,以便在部署的末尾能正确地启动应用。
现有的应用部署系统包括部署管理模块、执行模块、SVN服务器、数据库和客户端。该系统下的应用部署方法包括:部署管理模块向执行模块发送部署命令及部署信息,部署信息包括生产环境中需要部署的服务器及组件信息;执行模块接收部署命令及部署信息,并根据部署信息从数据库中获取需要部署的组件的版本信息,将版本信息发送给需要部署的服务器上的客户端;客户端根据该版本信息从SVN服务器下载版本文件,并根据脚本文件运行对应版本文件,完成本次部署。
对于某些应用部署场景,例如考虑中间件的部署场景,不同的中间件集群通常有不同的配置参数(如数据库连接信息、启动参数、集群配置等),以适配上层不同业务应用的运行要求,然而,上述应用部署方法在部署时应用的所有部署都只能使用一样的配置,无法实现应用部署时的参数动态可配置。
发明内容
本申请实施例的发明目的在于提供一种应用部署方法,能够实现应用部署时的参数动态可配置。
相应的,本申请实施例还提供了一种应用部署装置,用以保证上述方法的实现及应用。
为了解决上述问题,本申请公开了一种应用部署方法,包括:
获取应用的运行文件包和配置文件包;
获取预先生成的配置信息,并根据所述配置信息修正所述配置文件包;
按照预先设置的应用部署流程,将所述运行文件包及修正后的所述配置文件包分发到应用客户端所在服务器,执行所述应用的安装过程。
进一步,所述获取应用的运行文件包和配置文件包,包括:
在版本基线数据库中获取所述应用的所述运行文件包的版本基线信息和所述配置文件包的版本基线信息;
根据版本基线信息与云存储地址之间的对应关系,获得所述运行文件包的云存储地址及所述配置文件包的云存储地址;
根据所述运行文件包的云存储地址及所述配置文件包的云存储地址,从云存储仓库中下载获得所述运行文件包和所述配置文件包。
进一步,所述根据所述运行文件包的云存储地址及所述配置文件包的云存储地址,从云存储仓库中下载获得所述运行文件包和所述配置文件包,包括:
根据所述运行文件包的云存储地址及所述配置文件包的云存储地址,并行从运行包云存储仓库中下载获得所述运行文件包及从配置包云存储仓库中下载获得所述配置文件包。
进一步,在所述按照预先设置的应用部署流程,将所述运行文件包及修正后的所述配置文件包分发到应用客户端所在服务器,执行所述应用的安装过程之前,还包括:
加载与所述应用对应的应用部署流程模板。
进一步,根据所述配置信息修正所述配置文件包,包括:
对所述配置信息进行解析,获取配置参数值;
采用所述配置参数值对所述配置文件包中默认的运行配置参数进行修正。
进一步,所述方法还包括:
从软件包中分离出运行文件和配置文件;
为所述配置文件配置默认的运行配置参数;
为所述运行文件配置版本基线信息生成运行文件包,并为所述配置文件配置版本基线信息生成配置文件包;
依据版本基线信息将所述运行文件包和配置文件包分别存储到存储仓库对应的云存储地址中。
进一步,将所述运行文件包及修正后的所述配置文件包分发到应用客户端所在服务器,包括:
通过异步方式,将所述运行文件包及修正后的所述配置文件包批量分发到应用客户端所在服务器。
进一步,所述配置信息为ini文件。
本申请还公开了一种应用部署装置,包括:
获取单元,被配置为获取应用的运行文件包和配置文件包;
修正单元,被配置为获取预先生成的配置信息,并根据所述配置信息修正所述配置文件包;
执行单元,被配置为按照预先设置的应用部署流程,将所述运行文件包及修正后的所述配置文件包分发到应用客户端所在服务器,执行所述应用的安装过程。
进一步,所述获取单元包括:
信息获取子单元,被配置为在版本基线数据库中获取所述应用的所述运行文件包的版本基线信息和所述配置文件包的版本基线信息;
地址获取子单元,被配置为根据版本基线信息与云存储地址之间的对应关系,获得所述运行文件包的云存储地址及所述配置文件包的云存储地址;
下载子单元,被配置为根据所述运行文件包的云存储地址及所述配置文件包的云存储地址,从云存储仓库中下载获得所述运行文件包和所述配置文件包。
进一步,所述下载子单元,被配置为根据所述运行文件包的云存储地址及所述配置文件包的云存储地址,并行从运行包云存储仓库中下载获得所述运行文件包及从配置包云存储仓库中下载获得所述配置文件包。
进一步,所述装置还包括:
加载单元,被配置为在所述执行单元按照预先设置的应用部署流程,将所述运行文件包及修正后的所述配置文件包分发到应用客户端所在服务器,执行所述应用的安装过程之前,加载与所述应用对应的应用部署流程模板。
进一步,所述修正单元包括:
参数解析子单元,被配置为对所述配置信息进行解析,获取配置参数值;
参数修正子单元,被配置为采用所述配置参数值对所述配置文件包中默认的运行配 置参数进行修正。
进一步,还包括:
分离单元,被配置为从软件包中分离出运行文件和配置文件;为所述配置文件配置默认的运行配置参数;为所述运行文件配置版本基线信息生成运行文件包,并为所述配置文件配置版本基线信息生成配置文件包;
存储单元,被配置为依据版本基线信息将所述运行文件包和配置文件包分别存储到存储仓库对应的云存储地址中。
进一步,所述执行单元,被配置为通过异步方式,将所述运行文件包及修正后的所述配置文件包批量分发到应用客户端所在服务器。
进一步,所述配置信息为ini文件。
与现有技术相比,本申请实施例包括以下优点:
本申请实施例通过将应用的各个软件包及其依赖的运行时环境的安装包进行分离,划分为运行文件包和配置文件包,并预先针对不同的运行环境生成配置信息,从而使得在应用部署时可以利用不同运行环境下的配置信息对配置文件包进行修正,从而改变了现有应用的所有部署都只能使用同一配置的情况,实现了应用部署时的参数动态可配置,进而实现了搭建不同应用集群可以指定不同的运行时配置参数,以适应不同的业务需求,该方法实现了应用部署的灵活性和动态可定制性。
附图说明
图1是本申请的一种应用部署方法实施例的步骤流程图;
图2是本申请中的一种软件包的分离和存储的方法实施例的步骤流程图;
图3是本申请中的一种获取应用的运行文件包和配置文件包的方法实施例的步骤流程图;
图4是本申请中的版本基线数据库与运行包云存储和配置包云存储之间的关联示意图;
图5是本申请的另一种应用部署方法实施例的步骤流程图;
图6是本申请中的应用部署的一种系统架构示意图;
图7是本申请的一种应用部署装置实施例的结构框图;
图8是本申请中的一种获取单元的结构框图;
图9是本申请的另一种应用部署装置实施例的结构框图;
图10是本申请中的一种修正单元的结构框图;
图11是本申请的又一种应用部署装置实施例的结构框图。
具体实施方式
为使本申请的上述目的、特征和优点能够更加明显易懂,下面结合附图和具体实施方式对本申请作进一步详细的说明。
参照图1,示出了本申请的一种应用部署方法实施例的步骤流程图,具体可以包括如下步骤:
步骤101,获取应用的运行文件包和配置文件包。
本申请实施例中,用于应用部署的装置或系统(以下简称该装置)预先将应用的各个软件包,及其依赖的运行时环境的安装包进行分离,划分为运行文件包和配置文件包。
其中,配置文件包可以为不同运行环境下文件包内的配置参数会发生变化或需要修改的文件包,例如中间件的部署场景中,不同的中间件集群通常有不同的配置参数(如数据库连接信息、启动参数、集群配置等),以适配上层不同业务应用的运行要求。该配置文件包中的配置参数等可以预先设置为默认值。而运行文件包中的数据内容在不同的运行环境中一般相对固定。
另外,应用的运行文件包和配置文件包可以存储在同一数据库中,也可以分开存储,还可以存储在云存储仓库中等。
该装置在对应用进行部署时,首先获得该应用的运行文件包和配置文件包。
步骤102,获取预先生成的配置信息,并根据配置信息修正配置文件包。
该装置预先针对应用的不同运行环境生成有不同的配置信息,该配置信息可以包括机器列表和各配置参数值,主要可以包括要机器列表段[deploy-servers],其中列出要部署集群的机器IP列表,以及配置参数段[deploy-configs],其中列出适用于这个集群的的应用部署配置参数值。
该配置信息可以为ini文件。ini文件解析过程简单。
在该装置上步骤获得配置文件包后,在本步骤中即可调取预先生成的配置信息,然后根据该配置信息对配置文件包中的配置参数进行修正。因此,本申请一个可选实施例中,根据所述配置信息修正所述配置文件包,包括:对所述配置信息进行解析,获取配置参数值;采用所述配置参数值对所述配置文件包中默认的运行配置参数进行修正。
该装置可以首先解压配置文件包获取其中的配置文件,配置文件中的运行配置参数 配置有默认值。解析配置信息的ini文件,然后获取配置信息中的配置参数值,采用所述配置参数值对所述配置文件中默认的运行配置参数进行修正,即采用配置参数值插入或替换到配置文件包中的对应文件中,以修改配置文件包中的运行配置参数的默认值,从而让应用在部署时可以根据集群环境、业务需要动态调整运行时的配置参数值,无需在应用部署完之后登录到机器来修改配置参数,实现了应用部署的灵活性和动态可定制性。
在将配置信息中的配置参数值插入或替换到配置文件包中的对应文件中去的过程中,如果插入或替换操作产生冲突或者没有成功,则修正失败,可以直接使用配置文件包的默认参数,即直接使用各运行配置参数的默认值。
步骤103,按照预先设置的应用部署流程,将运行文件包及修正后的配置文件包分发到应用客户端所在服务器,执行应用的安装过程。
在完成对配置文件包的修正后,该装置即可根据应用部署流程,将运行文件包及修正后的配置文件包分发到应用客户端所在各服务器,分别执行应用的安装过程。
本申请实施例通过将应用的各个软件包及其依赖的运行时环境的安装包进行分离,划分为运行文件包和配置文件包,并预先针对不同的运行环境生成配置信息,从而使得在应用部署时可以利用不同运行环境下的配置信息对配置文件包进行修正,从而改变了现有应用的所有部署都只能使用同一配置的情况,实现了应用部署时的参数动态可配置,进而实现了搭建不同应用集群可以指定不同的运行时配置参数,以适应不同的业务需求,该方法实现了应用部署的灵活性和动态可定制性。
在本申请的另一可选实施例中,软件包的分离和存储,具体可以如图2所示,包括:
步骤201,从软件包中分离出运行文件和配置文件。
步骤202,为所述配置文件配置默认的运行配置参数。
本实施例中,将应用的软件包,及其依赖的运行时环境的安装包统称为软件包,为了能够动态定制、部署应用,预先从软件包中查找配置相关的数据和运行相关的数据,分离出运行文件和配置文件。然后将配置文件进行模块化处理,即生成标准化的配置文件,配置文件中的各运行配置参数均在相应的模块,为各运行配置参数配置默认值生成默认的运行配置参数。
步骤203,为所述运行文件配置版本基线信息生成运行文件包,并为所述配置文件配置版本基线信息生成配置文件包。
步骤204,依据版本基线信息将所述运行文件包和配置文件包分别存储到存储仓库对应的云存储地址中。
本申请实施例中,一个应用的安装包会有多个版本,运行文件包和配置文件包也可能会有多个版本,一个版本表示一个基线。因此可以为所述运行文件配置版本基线信息生成运行文件包,并为所述配置文件配置版本基线信息生成配置文件包。该装置采用版本基线数据库对应用的运行文件包及配置文件包的版本基线信息进行统一管理,该版本基线数据库中包含各运行文件包及配置文件包的版本基线信息以及各版本文件包的存储地址,而不存储各文件包。各版本的运行文件包及配置文件包可以统一存储在云存储仓库中,通过HTTP URL来访问。因此可以依据版本基线信息分别确定运行文件包和配置文件包的云存储地址,该云存储地址即为云存储仓库中存储数据文件的地址信息,因此可以将所述运行文件包和配置文件包分别存储到存储仓库对应的云存储地址中。
通过版本基线数据库来统一管理版本基线信息和包的云存储地址而将各文件包存放在云存储中,可以节省数据库的存储空间,并且各文件包可以从云存储中方便的下载。另外,各文件包的一个版本对应一个基线,该版本基线信息管理方法方便升级集群上的应用。所有配置文件打包存储,统一管理,也避免了下载和拷贝大量的小文件。
在本申请的另一实施例中,上述获取应用的运行文件包和配置文件包的过程,具体可以如图3所示,包括:
步骤301,在版本基线数据库中获取应用的运行文件包的版本基线信息和配置文件包的版本基线信息。
该装置在获得应用的运行文件包和配置文件包时,首先在版本基线数据库中确定运行文件包的版本基线信息和配置文件包的版本基线信息。
步骤302,根据版本基线信息与云存储地址之间的对应关系,获得运行文件包的云存储地址及配置文件包的云存储地址。
在本步骤中,该装置再根据版本基线数据库中各文件包的版本基线信息与云存储地址之间的对应关系,确定出运行文件包的云存储地址及配置文件包的云存储地址。
步骤303,根据运行文件包的云存储地址及配置文件包的云存储地址,从云存储仓库中下载获得运行文件包和配置文件包。
在获得云存储地址后,该装置即可从云存储仓库中下载获得该应用的运行文件包和配置文件包。
在另一实施例中,为了加快应用的运行文件包和配置文件包的下载速度,可以将运行文件包及配置文件包分别存储在不同的云存储仓库中,如图4所示,版本基线数据库中存储了运行文件包的版本基线信息对应的在运行包云存储仓库中的地址,以及配置文 件包的版本基线信息对应的在配置包云存储仓库中的地址,那么,根据运行文件包的云存储地址及配置文件包的云存储地址,从云存储仓库中下载获得运行文件包和所述配置文件包的过程,具体可以是:
根据运行文件包的云存储地址及配置文件包的云存储地址,并行从运行包云存储仓库中下载获得运行文件包及从配置包云存储仓库中下载获得所述配置文件包。
该下载过程可以使用异步I/O,从而提高下载速度。通过运行文件包和配置文件包的云存储和版本基线管理,可以实现集中、批量、并行地分发软件包,从而可以进行快速的大规模集群部署。
在本申请的另一实施例中,在按照预先设置的应用部署流程,将运行文件包及修正后的配置文件包分发到应用客户端所在服务器,执行应用的安装过程之前,如图5所示,该方法还可以包括:
步骤501,加载与该应用对应的应用部署流程模板。
本实施例中,该装置不再使用统一的或固定的应用部署流程,而是可以预先建立多个应用部署流程模板,且不同应用的部署流程对应不同的部署流程模板。该部署流程模板主要包括在目标机器上创建安装目录、把应用和其依赖应用的运行包和配置包通过下载模块批量分发到目标机器、解压包、拷贝配置文件、拷贝运行文件、检测应用的服务进程是否存在、若存在则停止、启动新的应用服务、检查服务是否启动成功等。不同应用根据自身特点有不同的部署流程模板。该应用部署流程模板可以是yaml。
在加载与该应用对应的应用部署流程模板后,在执行前述步骤103时,即可按照该加载的应用部署流程,将运行文件包及修正后的配置文件包分发到应用客户端所在服务器,执行应用的安装过程。其中,将所述运行文件包及修正后的所述配置文件包分发到应用客户端所在服务器,包括:通过异步方式,将所述运行文件包及修正后的所述配置文件包批量分发到应用客户端所在服务器。即在分发过程中可以采用异步I/O方式,并行对运行文件包及修正后的配置文件包进行分发,实现运行文件包及修正后的配置文件包的批量分发,通过运行文件包和配置文件包的云存储和版本基线管理,可以实现集中、批量、并行地分发软件包,从而可以进行快速的大规模集群部署。
相应的,应用客户端所在服务器可以依据部署流程模板的部署执行安装过程,例如创建相应的安装目录,解压缩安装包即运行文件包及修正后的配置文件包,拷贝配置文件、拷贝运行文件,然后检测应用的服务进程是否存在、若存在则停止、启动新的应用服务、检查服务是否启动成功等,进行该应用的安装。
该方法可以使不同应用的部署流程可定制化,当应用的部署过程有变化时,只需更新流程模板,无需要更新部署模块或该部署装置。通过不同的部署流程模板,可以实现流程编排。
基于上述实施例,整个系统架构可以如图6所示,该装置首先从版本基线数据库中获得运行文件包和配置文件包的版本信息及存储地址,然后从运行包云存储仓库和配置包云存储仓库中并行下载获得应用的运行文件包和配置文件包,然后采用预先生成的配置信息对配置文件包进行修正,在获得修正后的配置文件包后,从应用部署流程模板中确定与该应用对应的应用部署流程模板,并加载该部署流程模板,然后按照该部署流程模板将运行文件包及修正后的配置文件包分发到应用客户端所在的各服务器,执行应用的安装过程。其中,底层使用异步I/O来分发各安装包,不仅实现了批量分发安装包到目标机器,还使得对各台机器分发运行包和配置包时并行化,从而加快了批量分发安装包的速度。
需要说明的是,对于方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请实施例并不受所描述的动作顺序的限制,因为依据本申请实施例,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作并不一定是本申请实施例所必须的。
参照图7,示出了本申请一种应用部署装置实施例的结构框图,具体可以包括如下单元:
获取单元701,被配置为获取应用的运行文件包和配置文件包。
修正单元702,被配置为获取预先生成的配置信息,并根据所述配置信息修正所述配置文件包。
执行单元703,被配置为按照预先设置的应用部署流程,将所述运行文件包及修正后的所述配置文件包分发到应用客户端所在服务器,执行所述应用的安装过程。
本申请实施例通过上述单元将应用的各个软件包及其依赖的运行时环境的安装包进行分离,划分为运行文件包和配置文件包,并预先针对不同的运行环境生成配置信息,从而使得在应用部署时可以利用不同运行环境下的配置信息对配置文件包进行修正,从而改变了现有应用的所有部署都只能使用同一配置的情况,实现了应用部署时的参数动态可配置,进而实现了搭建不同应用集群可以指定不同的运行时配置参数,以适应不同的业务需求,该装置实现了应用部署的灵活性和动态可定制性。
在另一实施例中,如图8所示,获取单元701可以进一步包括:
信息获取子单元801,被配置为在版本基线数据库中获取所述应用的所述运行文件包的版本基线信息和所述配置文件包的版本基线信息。
地址获取子单元802,被配置为根据版本基线信息与云存储地址之间的对应关系,获得所述运行文件包的云存储地址及所述配置文件包的云存储地址。
下载子单元803,被配置为根据所述运行文件包的云存储地址及所述配置文件包的云存储地址,从云存储仓库中下载获得所述运行文件包和所述配置文件包。
其中,下载子单元803,具体可以被配置为根据所述运行文件包的云存储地址及所述配置文件包的云存储地址,并行从运行包云存储仓库中下载获得所述运行文件包及从配置包云存储仓库中下载获得所述配置文件包。
在另一实施例中,如图9所示,该装置还可以包括:
加载单元901,被配置为在执行单元703按照预先设置的应用部署流程,将所述运行文件包及修正后的所述配置文件包分发到应用客户端所在服务器,执行所述应用的安装过程之前,加载与所述应用对应的应用部署流程模板。
在另一实施例中,如图10所示,所述修正单元702包括:
参数解析子单元1001,被配置为对所述配置信息进行解析,获取配置参数值;
参数修正子单元1002,被配置为采用所述配置参数值对所述配置文件包中默认的运行配置参数进行修正。
在另一实施例中,如图11所示,所述装置还包括:
分离单元1101,被配置为从软件包中分离出运行文件和配置文件;为所述配置文件配置默认的运行配置参数;为所述运行文件配置版本基线信息生成运行文件包,并为所述配置文件配置版本基线信息生成配置文件包;
存储单元1102,被配置为依据版本基线信息将所述运行文件包和配置文件包分别存储到存储仓库对应的云存储地址中。
在另一实施例中,所述执行单元703,被配置为通过异步方式,将所述运行文件包及修正后的所述配置文件包批量分发到应用客户端所在服务器。
上述配置信息均可以为ini文件。
本申请实施例还提供了一种电子设备,包括存储器和处理器。
处理器与存储器通过总线相互连接;总线可以是ISA总线、PCI总线或EISA总线等。 所述总线可以分为地址总线、数据总线、控制总线等。
其中,存储器用于存储一段程序,具体地,程序可以包括程序代码,所述程序代码包括计算机操作指令。存储器可能包含高速RAM存储器,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。
处理器用于读取存储器中的程序代码,执行以下步骤:
获取应用的运行文件包和配置文件包;
获取预先生成的配置信息,并根据所述配置信息修正所述配置文件包;
按照预先设置的应用部署流程,将所述运行文件包及修正后的所述配置文件包分发到应用客户端所在服务器,执行所述应用的安装过程。
对于装置实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。
本领域内的技术人员应明白,本申请实施例的实施例可提供为方法、装置、或计算机程序产品。因此,本申请实施例可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
在一个典型的配置中,所述计算机设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用 于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括非持续性的电脑可读媒体(transitory media),如调制的数据信号和载波。
本申请实施例是参照根据本申请实施例的方法、终端设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理终端设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理终端设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理终端设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理终端设备上,使得在计算机或其他可编程终端设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程终端设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
尽管已描述了本申请实施例的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例做出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本申请实施例范围的所有变更和修改。
最后,还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者终端设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者终端设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者终端设备中还存在另外的相同要素。
以上对本申请所提供的一种应用部署方法和一种应用部署装置,进行了详细介绍, 本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。

Claims (16)

  1. 一种应用部署方法,其特征在于,包括:
    获取应用的运行文件包和配置文件包;
    获取预先生成的配置信息,并根据所述配置信息修正所述配置文件包;
    按照预先设置的应用部署流程,将所述运行文件包及修正后的所述配置文件包分发到应用客户端所在服务器,执行所述应用的安装过程。
  2. 根据权利要求1所述的方法,其特征在于,所述获取应用的运行文件包和配置文件包,包括:
    在版本基线数据库中获取所述应用的所述运行文件包的版本基线信息和所述配置文件包的版本基线信息;
    根据版本基线信息与云存储地址之间的对应关系,获得所述运行文件包的云存储地址及所述配置文件包的云存储地址;
    根据所述运行文件包的云存储地址及所述配置文件包的云存储地址,从云存储仓库中下载获得所述运行文件包和所述配置文件包。
  3. 根据权利要求2所述的方法,其特征在于,所述根据所述运行文件包的云存储地址及所述配置文件包的云存储地址,从云存储仓库中下载获得所述运行文件包和所述配置文件包,包括:
    根据所述运行文件包的云存储地址及所述配置文件包的云存储地址,并行从运行包云存储仓库中下载获得所述运行文件包及从配置包云存储仓库中下载获得所述配置文件包。
  4. 根据权利要求1至3中任意一项所述的方法,其特征在于,在所述按照预先设置的应用部署流程,将所述运行文件包及修正后的所述配置文件包分发到应用客户端所在服务器,执行所述应用的安装过程之前,还包括:
    加载与所述应用对应的应用部署流程模板。
  5. 根据权利要求1所述的方法,其特征在于,根据所述配置信息修正所述配置文件包,包括:
    对所述配置信息进行解析,获取配置参数值;
    采用所述配置参数值对所述配置文件包中默认的运行配置参数进行修正。
  6. 根据权利要求1所述的方法,其特征在于,还包括:
    从软件包中分离出运行文件和配置文件;
    为所述配置文件配置默认的运行配置参数;
    为所述运行文件配置版本基线信息生成运行文件包,并为所述配置文件配置版本基线信息生成配置文件包;
    依据版本基线信息将所述运行文件包和配置文件包分别存储到存储仓库对应的云存储地址中。
  7. 根据权利要求1所述的方法,其特征在于,将所述运行文件包及修正后的所述配置文件包分发到应用客户端所在服务器,包括:
    通过异步方式,将所述运行文件包及修正后的所述配置文件包批量分发到应用客户端所在服务器。
  8. 根据权利要求1至3、5至7中任意一项所述的方法,其特征在于,所述配置信息为ini文件。
  9. 一种应用部署装置,其特征在于,包括:
    获取单元,被配置为获取应用的运行文件包和配置文件包;
    修正单元,被配置为获取预先生成的配置信息,并根据所述配置信息修正所述配置文件包;
    执行单元,被配置为按照预先设置的应用部署流程,将所述运行文件包及修正后的所述配置文件包分发到应用客户端所在服务器,执行所述应用的安装过程。
  10. 根据权利要求9所述的装置,其特征在于,所述获取单元包括:
    信息获取子单元,被配置为在版本基线数据库中获取所述应用的所述运行文件包的版本基线信息和所述配置文件包的版本基线信息;
    地址获取子单元,被配置为根据版本基线信息与云存储地址之间的对应关系,获得所述运行文件包的云存储地址及所述配置文件包的云存储地址;
    下载子单元,被配置为根据所述运行文件包的云存储地址及所述配置文件包的云存储地址,从云存储仓库中下载获得所述运行文件包和所述配置文件包。
  11. 根据权利要求10所述的装置,其特征在于,
    所述下载子单元,被配置为根据所述运行文件包的云存储地址及所述配置文件包的云存储地址,并行从运行包云存储仓库中下载获得所述运行文件包及从配置包云存储仓库中下载获得所述配置文件包。
  12. 根据权利要求9至11中任意一项所述的装置,其特征在于,所述装置还包括:
    加载单元,被配置为在所述执行单元按照预先设置的应用部署流程,将所述运行文 件包及修正后的所述配置文件包分发到应用客户端所在服务器,执行所述应用的安装过程之前,加载与所述应用对应的应用部署流程模板。
  13. 根据权利要求9所述的装置,其特征在于,所述修正单元包括:
    参数解析子单元,被配置为对所述配置信息进行解析,获取配置参数值;
    参数修正子单元,被配置为采用所述配置参数值对所述配置文件包中默认的运行配置参数进行修正。
  14. 根据权利要求9所述的装置,其特征在于,还包括:
    分离单元,被配置为从软件包中分离出运行文件和配置文件;为所述配置文件配置默认的运行配置参数;为所述运行文件配置版本基线信息生成运行文件包,并为所述配置文件配置版本基线信息生成配置文件包;
    存储单元,被配置为依据版本基线信息将所述运行文件包和配置文件包分别存储到存储仓库对应的云存储地址中。
  15. 根据权利要求9所述的装置,其特征在于,
    所述执行单元,被配置为通过异步方式,将所述运行文件包及修正后的所述配置文件包批量分发到应用客户端所在服务器。
  16. 根据权利要求9至11、13至15中任意一项所述的装置,其特征在于,所述配置信息为ini文件。
PCT/CN2016/102299 2015-10-26 2016-10-18 一种应用部署方法和装置 WO2017071494A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510702384.6 2015-10-26
CN201510702384.6A CN106610853A (zh) 2015-10-26 2015-10-26 一种应用部署方法和装置

Publications (1)

Publication Number Publication Date
WO2017071494A1 true WO2017071494A1 (zh) 2017-05-04

Family

ID=58613740

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/102299 WO2017071494A1 (zh) 2015-10-26 2016-10-18 一种应用部署方法和装置

Country Status (2)

Country Link
CN (1) CN106610853A (zh)
WO (1) WO2017071494A1 (zh)

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108804618A (zh) * 2018-05-31 2018-11-13 康键信息技术(深圳)有限公司 数据库配置方法、装置、计算机设备和存储介质
CN110007930A (zh) * 2018-03-28 2019-07-12 上海联影医疗科技有限公司 应用部署方法及系统
CN110109680A (zh) * 2019-05-14 2019-08-09 重庆商勤科技有限公司 应用部署方法、装置及应用发布方法、服务器、存储介质
CN110704041A (zh) * 2019-10-10 2020-01-17 达飞云贷科技(北京)有限公司 软件开发方法及装置
CN111324359A (zh) * 2020-02-27 2020-06-23 支付宝(杭州)信息技术有限公司 插件部署方法及装置
CN111324373A (zh) * 2018-12-13 2020-06-23 北京奇虎科技有限公司 多个工程文件上传代码仓库的方法及装置、计算设备
US10698673B2 (en) 2018-04-20 2020-06-30 Red Hat, Inc. Managing software installation
CN111443923A (zh) * 2020-03-26 2020-07-24 北京房天下嘉居网络技术有限公司 服务发布方法及装置
CN112035365A (zh) * 2020-09-01 2020-12-04 中国银行股份有限公司 支持多测试环境的版本部署方法及装置
CN112612550A (zh) * 2020-12-30 2021-04-06 北京世纪互联宽带数据中心有限公司 一种文件配置方法及装置
CN112783520A (zh) * 2019-11-04 2021-05-11 阿里巴巴集团控股有限公司 执行方法、装置、电子设备及存储介质
CN112835713A (zh) * 2021-01-28 2021-05-25 交通银行股份有限公司 一种基于多容器集群的工作负载组合统一部署方法及系统
CN113407227A (zh) * 2021-07-02 2021-09-17 携程旅游网络技术(上海)有限公司 程序管理方法及装置、设备、介质
CN113434170A (zh) * 2021-06-22 2021-09-24 重庆长安汽车股份有限公司 一种整车ota数据下载部署方法及装置
CN114124938A (zh) * 2021-11-24 2022-03-01 浪潮卓数大数据产业发展有限公司 一种自动部署ipfs网络的方法、装置、设备及介质
WO2022267675A1 (zh) * 2021-06-22 2022-12-29 康键信息技术(深圳)有限公司 中间件部署方法、装置、设备及存储介质
CN116501339A (zh) * 2023-06-26 2023-07-28 北京凌云雀科技有限公司 应用部署方法、装置、电子设备及计算机可读存储介质

Families Citing this family (30)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109558143B (zh) * 2017-09-22 2022-02-22 北京国双科技有限公司 一种集群中部署应用的方法及装置
CN107832107A (zh) * 2017-11-24 2018-03-23 泰康保险集团股份有限公司 系统部署方法、装置、电子设备及存储介质
CN110275729A (zh) * 2018-03-14 2019-09-24 上海圣一信息技术有限公司 一种应用发布系统及方法
CN110321139B (zh) * 2018-03-29 2023-06-23 阿里巴巴(中国)有限公司 数据管理方法和系统
CN108595190B (zh) * 2018-04-23 2020-06-19 平安科技(深圳)有限公司 报表工具搭建方法、装置、计算机装置及存储介质
CN108551487B (zh) * 2018-04-26 2021-02-09 Oppo广东移动通信有限公司 PaaS平台的应用部署方法、装置、服务器及存储介质
CN109240757A (zh) * 2018-07-23 2019-01-18 武汉智领云科技有限公司 一种大数据组件集中配置管理系统和方法
CN110888649B (zh) * 2018-09-10 2023-07-04 阿里巴巴集团控股有限公司 应用部署方法、应用基线的创建方法和装置
CN111273915B (zh) * 2018-11-16 2023-04-28 中移(杭州)信息技术有限公司 一种中间件配置优化方法、装置、终端设备和介质
CN109460268B (zh) * 2018-11-19 2022-05-27 中国银行股份有限公司 应用参数配置方法、装置和系统
CN110032376B (zh) * 2018-12-13 2024-02-13 中国电子科技集团公司电子科学研究院 基于Docker的自动化软件部署方法及装置
CN109800028B (zh) * 2018-12-30 2022-08-16 贝壳找房(北京)科技有限公司 一种Web环境的部署方法及装置
CN110083401A (zh) * 2019-03-12 2019-08-02 平安普惠企业管理有限公司 应用程序配置的调整方法、装置、计算机设备及存储介质
CN110210924B (zh) * 2019-04-15 2024-03-26 腾讯科技(深圳)有限公司 产品功能定制方法、装置以及服务器
CN110147241A (zh) * 2019-04-16 2019-08-20 平安普惠企业管理有限公司 程序配置更新方法、电子装置、计算机设备及存储介质
CN110109701A (zh) * 2019-05-14 2019-08-09 重庆商勤科技有限公司 应用部署时的文件配置方法、装置及应用发布方法、装置
CN110515670A (zh) * 2019-09-03 2019-11-29 深圳市路畅科技股份有限公司 一种嵌入式设备的运行方法、系统及一种上位机
CN110704039B (zh) * 2019-09-30 2020-12-01 北京三快在线科技有限公司 应用开发过程中的配置数据处理方法以及装置
CN111158655B (zh) * 2019-12-31 2023-09-22 中国银行股份有限公司 软件运行环境的部署方法及装置
CN111309390A (zh) * 2020-01-19 2020-06-19 维沃移动通信有限公司 一种获取配置信息的方法及电子设备
CN111399861A (zh) * 2020-03-11 2020-07-10 中国建设银行股份有限公司 一种软件自动化部署方法及系统
CN111949513A (zh) * 2020-07-09 2020-11-17 中国建设银行股份有限公司 一种配置文件加载方法、装置、电子设备和可读存储装置
CN112100060A (zh) * 2020-08-21 2020-12-18 杭州安恒信息安全技术有限公司 运行环境自适应方法、装置和计算机可读存储介质
CN112114904A (zh) * 2020-09-28 2020-12-22 中国建设银行股份有限公司 系统配置信息的处理方法及装置
CN112667281B (zh) * 2020-12-30 2024-04-23 联想(北京)有限公司 一种配置信息处理方法及装置
CN113472579B (zh) * 2021-07-01 2024-04-19 浪潮通用软件有限公司 一种访问外网应用程序接口的配置方法、设备及介质
CN113608802A (zh) * 2021-08-06 2021-11-05 上海艺赛旗软件股份有限公司 一种免安装运行rpa流程的方法及系统
CN113821229A (zh) * 2021-10-29 2021-12-21 北京光启元数字科技有限公司 一种程序安装方法、装置、设备及介质
CN114706628B (zh) * 2022-04-02 2023-02-17 北京星辰天合科技股份有限公司 基于一池多芯的分布式存储系统的数据处理方法和装置
CN115080101B (zh) * 2022-06-30 2023-08-18 北京亚控科技发展有限公司 应用管理方法、应用订阅方法及相关设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101593100A (zh) * 2008-05-30 2009-12-02 爱思开电讯投资(中国)有限公司 运行迷你应用程序的方法、执行该方法的装置及机器可读介质
CN103019732A (zh) * 2012-12-25 2013-04-03 深圳市天维尔通讯技术有限公司 一种基于省市县一体化软件的安装部署方法及系统
US20140279908A1 (en) * 2013-03-14 2014-09-18 Oracle International Corporation Method and system for generating and deploying container templates
CN104317642A (zh) * 2014-09-28 2015-01-28 华为技术有限公司 云计算环境下的软件部署方法和装置
CN104423983A (zh) * 2013-08-29 2015-03-18 国际商业机器公司 用于开发、测试和部署应用的方法和装置

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101453367B (zh) * 2007-11-30 2011-12-28 华为技术有限公司 软件部署方法和系统及软件部署服务器和用户服务器
CN101271391A (zh) * 2008-04-30 2008-09-24 中兴通讯股份有限公司 软件系统的制作和使用方法
CN102736946B (zh) * 2011-04-11 2015-12-16 阿里巴巴集团控股有限公司 一种应用节点的批量部署方法及装置
US20130139139A1 (en) * 2011-11-28 2013-05-30 Wyse Technology Inc. Automatic updating of an application or a driver on a client device using a deployment configuration file
CN103177077B (zh) * 2013-01-08 2016-08-10 杭州米加科技有限公司 一种apk文件的存储及输出方法
CN104793946B (zh) * 2015-04-27 2018-07-06 广州杰赛科技股份有限公司 基于云计算平台的应用部署方法和系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101593100A (zh) * 2008-05-30 2009-12-02 爱思开电讯投资(中国)有限公司 运行迷你应用程序的方法、执行该方法的装置及机器可读介质
CN103019732A (zh) * 2012-12-25 2013-04-03 深圳市天维尔通讯技术有限公司 一种基于省市县一体化软件的安装部署方法及系统
US20140279908A1 (en) * 2013-03-14 2014-09-18 Oracle International Corporation Method and system for generating and deploying container templates
CN104423983A (zh) * 2013-08-29 2015-03-18 国际商业机器公司 用于开发、测试和部署应用的方法和装置
CN104317642A (zh) * 2014-09-28 2015-01-28 华为技术有限公司 云计算环境下的软件部署方法和装置

Cited By (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110007930A (zh) * 2018-03-28 2019-07-12 上海联影医疗科技有限公司 应用部署方法及系统
CN110007930B (zh) * 2018-03-28 2024-02-27 上海联影医疗科技股份有限公司 应用部署方法及系统
US10698673B2 (en) 2018-04-20 2020-06-30 Red Hat, Inc. Managing software installation
CN108804618A (zh) * 2018-05-31 2018-11-13 康键信息技术(深圳)有限公司 数据库配置方法、装置、计算机设备和存储介质
CN111324373A (zh) * 2018-12-13 2020-06-23 北京奇虎科技有限公司 多个工程文件上传代码仓库的方法及装置、计算设备
CN111324373B (zh) * 2018-12-13 2023-12-05 北京奇虎科技有限公司 多个工程文件上传代码仓库的方法及装置、计算设备
CN110109680A (zh) * 2019-05-14 2019-08-09 重庆商勤科技有限公司 应用部署方法、装置及应用发布方法、服务器、存储介质
CN110704041A (zh) * 2019-10-10 2020-01-17 达飞云贷科技(北京)有限公司 软件开发方法及装置
CN112783520A (zh) * 2019-11-04 2021-05-11 阿里巴巴集团控股有限公司 执行方法、装置、电子设备及存储介质
CN111324359A (zh) * 2020-02-27 2020-06-23 支付宝(杭州)信息技术有限公司 插件部署方法及装置
CN111443923A (zh) * 2020-03-26 2020-07-24 北京房天下嘉居网络技术有限公司 服务发布方法及装置
CN112035365A (zh) * 2020-09-01 2020-12-04 中国银行股份有限公司 支持多测试环境的版本部署方法及装置
CN112035365B (zh) * 2020-09-01 2023-08-18 中国银行股份有限公司 支持多测试环境的版本部署方法及装置
CN112612550A (zh) * 2020-12-30 2021-04-06 北京世纪互联宽带数据中心有限公司 一种文件配置方法及装置
CN112835713A (zh) * 2021-01-28 2021-05-25 交通银行股份有限公司 一种基于多容器集群的工作负载组合统一部署方法及系统
CN112835713B (zh) * 2021-01-28 2024-02-06 交通银行股份有限公司 一种基于多容器集群的工作负载组合统一部署方法及系统
CN113434170A (zh) * 2021-06-22 2021-09-24 重庆长安汽车股份有限公司 一种整车ota数据下载部署方法及装置
WO2022267675A1 (zh) * 2021-06-22 2022-12-29 康键信息技术(深圳)有限公司 中间件部署方法、装置、设备及存储介质
CN113407227A (zh) * 2021-07-02 2021-09-17 携程旅游网络技术(上海)有限公司 程序管理方法及装置、设备、介质
CN114124938A (zh) * 2021-11-24 2022-03-01 浪潮卓数大数据产业发展有限公司 一种自动部署ipfs网络的方法、装置、设备及介质
CN116501339B (zh) * 2023-06-26 2023-09-08 北京凌云雀科技有限公司 应用部署方法、装置、电子设备及计算机可读存储介质
CN116501339A (zh) * 2023-06-26 2023-07-28 北京凌云雀科技有限公司 应用部署方法、装置、电子设备及计算机可读存储介质

Also Published As

Publication number Publication date
CN106610853A (zh) 2017-05-03

Similar Documents

Publication Publication Date Title
WO2017071494A1 (zh) 一种应用部署方法和装置
US20210349706A1 (en) Release lifecycle management system for multi-node application
US9959105B2 (en) Configuration of an application in a computing platform
US9959108B2 (en) Fast deployment across cloud platforms
US9262238B2 (en) Connection management for an application in a computing platform
US9038059B2 (en) Automatically targeting application modules to individual machines and application framework runtimes instances
US8863114B2 (en) Managing software packages using a version control system
US8645672B2 (en) Configuring a computer system for a software package installation
US9170797B2 (en) Automated deployment of an application in a computing platform
US9053236B1 (en) Automated directory services test setup utility
WO2019056187A1 (zh) 应用部署方法、装置及系统
US9141363B2 (en) Application construction for execution on diverse computing infrastructures
US20180150288A1 (en) Win32 software distribution architecture
CN117112122A (zh) 一种集群部署方法和装置
CN110704025A (zh) 编码规范工具的生成方法和装置、存储介质、电子设备
US9760364B2 (en) Checks for software extensions
TW201828078A (zh) 應用部署方法和裝置
US20180341475A1 (en) Just In Time Deployment with Package Managers
US11435995B2 (en) Composite content views
US9477447B1 (en) Semantic representations of software extensions
US20230259347A1 (en) Container based generation of inputs for generic functions
US20240143315A1 (en) Efficient configuration management in continuous deployment
US11900091B2 (en) Extensible upgrade and modification as a service
US20240143318A1 (en) Efficient configuration management in continuous deployment
CN117290048A (zh) 一种基于容器的工业app全生命周期管理方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16858929

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16858929

Country of ref document: EP

Kind code of ref document: A1