CN110727440A - Software packaging method - Google Patents

Software packaging method Download PDF

Info

Publication number
CN110727440A
CN110727440A CN201910949745.5A CN201910949745A CN110727440A CN 110727440 A CN110727440 A CN 110727440A CN 201910949745 A CN201910949745 A CN 201910949745A CN 110727440 A CN110727440 A CN 110727440A
Authority
CN
China
Prior art keywords
software
configuration
container
information
installation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910949745.5A
Other languages
Chinese (zh)
Other versions
CN110727440B (en
Inventor
卢笑天
李博南
崔隽
丁海斌
戴佳男
黄学华
包亮
杨胜蓝
宋越
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CETC 28 Research Institute
Original Assignee
CETC 28 Research Institute
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 CETC 28 Research Institute filed Critical CETC 28 Research Institute
Priority to CN201910949745.5A priority Critical patent/CN110727440B/en
Publication of CN110727440A publication Critical patent/CN110727440A/en
Application granted granted Critical
Publication of CN110727440B publication Critical patent/CN110727440B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/62Uninstallation

Landscapes

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

Abstract

The invention discloses a software packaging method, which comprises the following steps: step 1, selecting a software type; step 2, describing basic information of the software section; step 3, setting software desktop shortcuts, program bar shortcuts and starting up self-starting; step 4, describing the software dependency relationship; step 5, supporting the container by software; step 6, configuring software parameter information; step 7, setting scripts such as software installation, software uninstallation, software startup and software shutdown; step 8, setting a software environment variable; step 9, setting a software running environment; and step 10, software encapsulation and one-key installation package generation. The method realizes unified description and packaging of the software through a universal software packaging description and normative description of all layers of software such as basic information, parameter information, dependency information, shortcuts, environment variables, custom running scripts, running environments and the like, and can support unified management and maintenance of the software in two scenes of independent software installation and deployment and system integration and deployment.

Description

Software packaging method
Technical Field
The invention relates to the field of system integration, in particular to a software packaging method.
Background
When a system is integrated, because a lot of software is involved, operations and processes such as installation, uninstallation and maintenance are complex, and the level of developers is good and uneven, if no standard specification restricts the description of the software from the aspects of basic information, technical constitution, software form, running environment setting and the like, the software is difficult to be incorporated into unified management, and for example, the implementation modes of environment variables are different for developers, so that the system environment cannot be uniformly managed and controlled, a huge disaster is caused from the perspective of system integration operation and maintenance, and the workload of system operation and maintenance personnel is exponentially increased due to the increase of the number of the software.
Disclosure of Invention
The invention aims to solve the special requirements generated by the constraint of software integratability and normativity in order to realize the unified management and maintenance of software in the field of system integration. The method can support cross-platform packaging of software, realizes unified packaging of software through normative description of all layers of software such as basic information, parameter information, dependency information, shortcuts, environment variables, custom running scripts and running environments, supports unified management and maintenance of software, and has certain universality for DevOps concepts, supports containerization description of software and expansion of configuration centers.
The technical scheme of the invention is a universal software packaging method, which comprises the following steps:
step 1, creating a software packaging project, describing basic software information, uploading a software icon and software installation permission, and performing step 2;
step 2, selecting an application type, wherein the application type supported by the software comprises the following steps: software basic packages, Web application packages, databases, plug-in packages, mobile apps and the like. According to different application types, different software description options are displayed, for example, for a database, a system user name password, a database port, a database SID, a tablespace, user information to be created and the like when the database is installed need to be set; meanwhile, different installation processes are realized according to different software package types during software installation, for example, for a Web application package, the Web application package can be automatically installed and deployed into an existing Web application container in an environment according to the actual situation of the current environment during installation and deployment, such as Tomcat, golden butterfly and the like. Carrying out step 3;
step 3, importing a software entity, wherein the entity type supports a folder or a file type; carrying out step 4;
step 4, selecting a file in the software entity, creating a shortcut, setting the name and the user-defined icon of the shortcut, wherein the shortcut comprises a starting self-starting shortcut, a desktop shortcut and a program bar shortcut, and performing step 5;
step 5, according to the requirement of software dependence, software dependence information is configured, the dependence information comprises information such as prefixes, names, version ranges, dependence types and dependence scenes of dependent software segments, the description of the dependence information is used for specifying the dependence relationship between the software, for example, the software A needs to be locally installed with the software B, for the use scene, the dependence description can be added during the packaging of the software A, the dependence B is used for specifying the dependent version range, the dependence type is set as local dependence, the dependence scene is set as installation dependence, and by using the description of the dependence information, the environment detection of the software layer can be performed during the software integration, so that the software deployment efficiency is improved. Carrying out step 6;
step 6, judging whether the application type is a database or not according to the application type, and if so, performing step 7; otherwise, skipping to step 8;
step 7, setting a database port number, a database SID, a system user name and a system user name password of a target database of the database device, wherein the parameters can modify corresponding values according to actual environments in actual installation and deployment, configuring a tablespace and a temporary tablespace, and setting user information, wherein the user information comprises the user name, the user name password, database authority and the relationship between the user name, the user name password and the tablespace and the temporary tablespace to be led in; skipping step 13;
step 8, configuring software parameter information, configuring the parameter information needing to be modified in the installation and deployment process of the software in the modes of structural display of a structured file, unstructured user self-definition and manual addition, setting the configuration type of the parameter and configuring the source of the parameter, and performing step 9;
step 9, whether the software supports containerization deployment is set, if so, step 10 is carried out, otherwise, step 11 is skipped;
step 10, setting the capacity of container support, including the capacity expansion of the container, automatic capacity expansion, and the setting of the support capacity of privilege mode, supporting the setting capacity of information such as container basic mirror address, storage path of software package in basic mirror, start command, compilation command, installation dependent command, compilation process environment variable, and the like, which are necessary for constructing container mirror, and simultaneously, setting the CPU, memory size, copy number, and source port when the container is running: mapping condition of destination port, host volume: the mapping condition of the container volume and the information of the running states such as the maximum percentage of the CPU are described, the support arrangement of the container provides a standardized description of the installation state and the running state of the container, software developers do not need to compile cumbersome DockFile files, software containerization description can be realized only by a graphical interface configuration mode, convenience is improved, and meanwhile the error rate of manually compiling the DockFile is reduced. Performing step 11;
step 11, setting environment variables, wherein the environment variables comprise user-defined environment variables and system environment variables, such as PATH, LD _ LIBRARY _ PATH and the like, and performing step 12;
step 12, setting custom installing, uninstalling, starting and stopping scripts, wherein the custom scripts are used for specific operations of each software and support personalized behaviors and operations of users, for example, some custom libraries can be copied to a system library catalog in the custom scripts, and the like, and performing step 13;
step 13, selecting a constructed target hardware architecture and operating system (for example, windows, CentOS7.2, x86 various software and hardware environments such as kylin of Galaxy, kylin of Feiteng Galangal, kylin of Longxin, and kylin of Mega Hunan), starting to encapsulate software, generating an encapsulated description file, compressing a one-key installation package, a software entity and the description file in the corresponding environment into an executable program according to the target hardware architecture and the operating system, executing the executable program of the one-key installation package by a self-decompression technology during software installation, and installing the software package according to the encapsulated description file.
In step 1, the software basic information includes a software prefix, a software name, a software version number, a software description, developer information and a software running environment, the software prefix is a software identifier, the software running environment includes requirements of a CPU, a memory, a disk and an operating system bit number, according to the description of the environment in which the software needs to run, the running environment of a target machine can be detected before the software is installed, and a machine which does not meet the running environment can be prompted.
In step 2, the application types include: the system comprises a software basic package, a Web application package, a database, a plug-in package and a mobile App, wherein the software basic package refers to files or file sets capable of completing specific functions, for example, all files in a certain folder form a set of all files required by a certain specific function, and the folder can be imported as a basic package; web application packages refer to war packages developed using Java; the database refers to a database DMP file exported by the database; the plug-in package can not operate independently and must operate depending on a specific platform, such as a Firefox browser plug-in; the mobile App refers to a handheld terminal application.
In step 4, the shortcuts comprise three types, namely desktop shortcuts, boot self-starting and program bar shortcuts.
In step 5, the setting of the software dependence information comprises setting of a software prefix, a software name and a version range of the dependence software, setting of a dependence type and a dependence scene, and explaining dependence necessity; the dependency types comprise local dependencies and network dependencies, and the dependency scenarios comprise installation dependencies and operation dependencies.
In step 8, the configuration types include general configuration, general configuration and dependent configuration; the general configuration refers to parameters which are self-defined in each software, and has no universality, for example, a certain configuration item in a certain software configuration file represents a complete function or a typical function option of the installed software, and the parameters have no universality and are only specific behaviors of the software according to the selection of a user according to the requirement when the software is installed. The general configuration comprises two parts, wherein one part is an IP address, a software installation path, a database system user name password, a database SID and the like, information which is directly acquired through background calculation when the general configuration is deployed to a target machine, the other part is a Web access port, a Web closing port, a TCP port, a UDP port and the like, the information is exposed when software is packaged, and the general configuration can be used for port collision detection and the like when the software is integrated. Dependent configuration refers to that the configuration item is dependent on some specific parameters of the dependent software, and in combination with the above dependent configuration, for example, the a software network is dependent on the B software, and a certain parameter of the a software represents the IP address of the B software, so that the parameter can be described as dependent configuration, and the dependent item is the B software and is dependent on the IP address of the B software.
The source comprises a local configuration center and a configuration center, wherein the local configuration center is different in that the parameters set to be the local configuration are only used for modifying the installation state, the configuration information is static data after the software is installed, the configuration information is not managed by the configuration center, the source is set to be the parameters of the configuration center, the configuration item information is still subjected to the unified management of the configuration center after the software is installed, the dynamic change of the parameters through the configuration center is supported, and the hot effect of the configuration is supported.
The step 10 comprises: whether the capacity expansion, the automatic capacity expansion and the privilege mode of the container are supported or not is configured, the capacity expansion of the container means whether the software can utilize the elastic expansion capacity of the container after being deployed in the container or not, the dynamic capacity expansion of a container instance is manually supported, on the basis of supporting the capacity expansion, the automatic capacity expansion describes whether the software can support the automatic load balancing of the container or not, the characteristics of the container are fully utilized, the automatic capacity expansion of a software peak value and the automatic capacity reduction capacity in idle time are supported, and the privilege mode means whether all functions of operating the container in the privilege mode are supported or not. Setting a container base mirror address (such as http:// IP: PORT/tomcat-7z: latest), a storage path of a software package in a base mirror (such as/user/local/tomcat/webcaps /), a start command (such as catarina.sh run), a compiling command (such as cd/user/local/tomcat/ROOT & & rm-rf & & cp-R/user/local/tomcat/webcaps/yanshi &), an installation dependent command (such as cp-rf/user/share/zoneinfo/Asia/Shanghai/ect/localcotine) and compiling process environment variable (such as ENV NGX _ VERSION1.14.0), and automatically generating a run-time pair (such as 0) of the container according to the information Memory (e.g., 300M), number of copies (e.g., 2), source port: mapping of destination port (e.g., 8080:40094), host volume: the mapping (example/opt/tomcat:/opt/docker/tomcat) of the container volume, the maximum percentage of the CPU (such as 5%) and the copy number range (such as 1-3) are automatically added into the parameter configuration in the step 8, the type is general configuration, and the parameter configuration before the container is operated is supported.
The step 11 comprises the following steps: supporting the user-defined environment variables under each operating system, supporting the generation of the user-defined environment variables according to the requirements of users, modifying a registry under a windows operating system, adding items and values of the user-defined environment variables, and writing the user-defined variables into/etc/profile under a linux operating system; the method comprises the steps that PATH and LD _ LIBRARY _ PATH environment variables are added, for the PATH environment variables, under a windows operating system, the PATH environment variables are written into a registry of the system, the environment variable values of the added PATH items are values added by user self-definition, under a linux operating system, in order to meet the requirement that all operating system users can read the environment variables, the added environment variables are written into/etc/profile files, for the LD _ LIBRARY _ PATH environment variables, under/etc/ld.so.con.d folders, new-built, conf files and LIBRARY files are enabled to take effect immediately by adopting ldfig commands; the method supports the reference of the custom environment variable, for example, a user adds the custom environment variable SOFT _ PATH to point to the installation PATH of the software, and at the same time, an executable file of the software needs to be added into the PATH, that is, the PATH ═ SOFT _ PATH%/bin can be described under windows, and the export PATH ═ SOFT _ PATH/bin can be described under linux: the PATH approach adds PATH environment variables. When the environment variable is related to the actual installation path, the installation path can be represented by the placeholder, and the placeholder is replaced by the actual installation path in the actual installation process.
In step 12, on-demand execution of more than two scripts is supported.
The software encapsulation in the invention means that a software entity imported by a user is encapsulated according to a uniform specification and standard through a series of descriptions, and various types of software are encapsulated into an executable software package installation file, wherein the file can be used for independent deployment of the software and simultaneously supports uniform management and maintenance of the software under a system integration scene. The standardization and the integratability of the software are improved through software packaging, and the IT operation and maintenance cost is reduced.
The cross-platform supporting software package comprises: the information description of the software is independent of the hardware architecture and the operating system of the software operation, the software description is only a static information item, the information item comprises basic information (application prefix, application name, application version number, application type, software icon, application description, unit name, installation permission description, hardware resource requirements for CPU, memory and the like), dependency description, parameter information description, shortcut description, installation/uninstallation/start/stop custom script description, environment variable description and the like, and for the applied database, the information description also comprises related elements such as database port, database SID, system user name password, table space, temporary table space, user information and the like. After the description is completed, in the final stage of software packaging, a one-key installation package under a corresponding environment can be generated according to a hardware architecture and an operating system environment required by software operation, the one-key installation package is independently compiled and operated, the executable environment of a software entity, a normative description file and the one-key installation package is compressed into the same file, when the software is independently deployed in the form of the installation package, the software entity, the normative description file and the one-key installation package are decompressed to a temporary folder through a self-decompression technology, and an executable program of the one-key installation package is executed, and the executable program is used for installing and uninstalling the software according to set parameters, scripts, environment variables, shortcuts and the like by reading the normative description file.
The encapsulation supporting containerization of software: the encapsulation of software containerization refers to the description of the container environment when software support runs in the container, including: (1) constructing a required basic mirror image address, wherein the address can provide a series of basic mirror image lists for selection; (2) a software package storage path, namely a path stored in the basic mirror image; (3) start commands (commands that software executes after container start), compile commands (commands that software installs), install dependent commands (some dependent packages that software is installed); (4) and compiling process environment variables, namely environment variables required in the process of installing the software. Through the information description, a corresponding DockFile can be generated to support the operation of software in the container. Meanwhile, the method also supports the setting description of capacity expansion, automatic capacity expansion and privilege modes, and supports capacity expansion and capacity reduction as required during container deployment. Parameters (CPU, memory, copy number, source port and destination port mapping, host volume and container volume mapping, CPU maximum percentage and copy number range) required by the container operation are configured, and dynamic modification of the parameters before the container instance is started is supported. After the container package is packaged by software, the container package is connected with a container cloud platform to obtain a basic mirror image, and the mirror image is generated according to the basic mirror image and the configuration description and can be operated on the container cloud platform.
The parameter information of the configuration files supporting various types of software describes: during packaging, the configuration file parameters needing to be modified are extracted from the software package during installation and deployment, and the values of the configuration files can be modified according to user input or according to automatic calculation results during system integration when the software package is independently installed and deployed. The parameter configuration supports three configuration modes, wherein the first mode is to import common structured data such as xml, ini, properties, cfg and the like; secondly, for the parameters which are stored in the text file in the unstructured format and need to be configured, the values which need to be modified are replaced by placeholders, and the placeholders are called user-defined variables; thirdly, parameter configuration is manually input, the configuration is independent of software entities and configuration files of the software, for example, the support adopts general configuration for information such as CPU, memory, copy number and the like in software containerization packaging. The configuration of parameters is also divided into three categories, general configuration, and dependent configuration. The general configuration is a common configuration, which indicates that the parameter is not related to the result calculated by the system, and the final actual value of the parameter when the parameter is installed and deployed is determined by the input of a user; the general configuration is some fixed configurations, such as software installation paths, IP addresses, Web application ports and the like, the use scene is system integration, the related values of the general configuration can be automatically calculated according to the actual situation during the system integration, manual modification is not needed, and the configuration error rate in the software integration deployment is reduced. The dependent configuration is the configuration of the software depending on other software, and includes an IP address, an installation path, a database port, a database SID, a Web application port, a Web application name, etc. of the dependent software, and the usage scenario is also used for supporting automatic processing and configuration of the software dependency relationship when the software is used for system integration. For a description of the dependency information see item 4 below. The configuration sources of the parameters are divided into two types, namely a local configuration and a configuration center, the sources are the parameters of the local configuration and are mostly used for scenes of independent software deployment, and after software installation and deployment are completed, if new requirements are generated and the values of the parameters need to be changed, the values of the corresponding parameters in the configuration files need to be manually modified on a local machine. Meanwhile, under the concept of DevOps, in order to support the mode of micro service + container + unified configuration, description on a parameter source as a configuration center is supported during packaging.
The dependency information of the supporting software describes: the software dependence means that the function implementation of one software depends on the function of another software, and the use scene of the software is that the software cannot run independently and needs the support of other software. The dependent information description comprises the dependent type of the software and the dependent scene of the software. The dependency types can be classified as local dependency or network dependency. Local dependency means that software a and software B need to be installed in the same operating system instance, software a accesses software B locally. Network dependency means that software a and software B can be installed in different operating system instances in a local area network, software a accessing software B over the network. The dependency scene can be divided into installation dependency or operation dependency. Installation dependency means that software a needs software B support for installation, i.e. software B must be installed before software a is installed, but there is no requirement on the order of starting the two software. The operation dependency refers to the operation dependency software B of the software A, and the software B should be started before the software A is started. The dependency information can be used for environment detection when the software is independently installed and software configuration management when the system is integrated.
Has the advantages that: the invention provides a universal software packaging method, which realizes unified software packaging, supports unified management and maintenance of software, and supports two use modes and scenes of independent software deployment based on a package description file and integrated adaptation of software and software management application (such as a software store) by normative description of all layers of software, such as basic information, parameter information, dependency information, shortcuts, environment variables, custom operation scripts, operation environments and the like. The invention supports cross-platform software packaging, supports software containerization packaging, supports parameter information description of various types of configuration files of the software and supports dependent information description of the software.
The method simultaneously supports the encapsulation description of software containerization, supports the migration and expansion of software configuration information to a configuration center, and has certain universality.
Drawings
The foregoing and other advantages of the invention will become more apparent from the following detailed description of the invention when taken in conjunction with the accompanying drawings.
FIG. 1 is a flow chart of a general software encapsulation method according to the present invention;
FIG. 2 is a diagram of the method architecture of the present invention.
Detailed Description
The invention is further explained below with reference to the drawings and the embodiments.
Examples
As shown in fig. 1 and 2, the present invention provides a software encapsulation method.
The software packaging implementation steps are as follows: taking a basic package A supporting container deployment as an example, and describing a software packaging process of a software package B depending on a network of the basic package A, the specific steps are as follows:
step 1, creating a software packaging project A, describing basic information of software, software prefix (example AppA), software name (example application A), software version number (example 0.0.0.1), software description, developer information, software operating environment (requirements of CPU, memory, disk, operating system digit and the like), and uploading software icons and software installation permission; carrying out step 2;
step 2, selecting the application type as a basic package; carrying out step 3;
step 3, selecting a path where the software entity is located, and importing the software entity; carrying out step 4;
step 4, selecting a certain file F in the software entity, creating a desktop, a starting self-starting program bar shortcut and setting the name and the custom icon of the shortcut according to requirements; carrying out step 5;
step 5, configuring software dependence information, adding dependence information, depending on a software prefix AppB and depending on a software name application B, selecting a dependence type as a network dependence, and selecting a dependence scene as an installation dependence; carrying out step 6;
step 6, configuring software parameter information, adopting a mode of self-defining variables, replacing a value corresponding to IPADDRESS with a placeholder, such as $ LOCAL _ IP $ for a configuration file Config.cfg in software A, which has IPADDRESS options to represent a LOCAL IP address, setting a user-defined variable $ LOCAL _ IP $ during software packaging, and associating the Config.cfg with the user-defined variable $ LOCAL _ IP $ from a list of software entities; carrying out step 7;
step 7, describing the software package supporting containerized deployment, configuring the capacity expansion, automatic capacity expansion and privilege mode of the supporting container, configuring the address of the base mirror of the container (e.g. http:// IP: PORT/tomcat-7z: latest), the storage path of the software package in the base mirror (e.g. user/local/tomcat/webcams /), the start command (e.g. cathina. sh run), the compiling command (e.g. cd/user/local/tomcat/webcams/ROOT & & rm-rf & & cp-R/usr/local/tomcat/webcams/yanshi /), the installation dependent command (e.g. and the compiling process environment variable (e.g.) and the like, and automatically generating the CPU of the operation of the container according to the information, and simultaneously generating the CPU of the operation of the container, Memory (example 300MB), number of copies (example 2), source port: mapping of destination port (example 8080:40094), host volume: parameters such as mapping of the container volume, the maximum percentage of CPU (Central processing Unit), the range of the number of copies and the like are added into parameter configuration, the type is general configuration, and the parameter configuration before the operation of the container is supported;
step 8, setting an environment variable, newly adding a coverage APP _ HOME environment variable which is an installation address of the software package, namely $ (InstallDir), adding a PATH environment variable, and referring to the APP _ HOME variable, $ (InstallDir)/bin; carrying out step 9;
step 9, setting an installation script of the software package A as an Installall.sh file in the entity, an uninstallation script as an UnInstallall.sh file in the entity, a start script as a start.sh file in the entity and a stop script as a stop.sh file in the entity; step 10 is carried out;
step 10, selecting the constructed target hardware architecture and the operating system CentOS7.2, starting to encapsulate the software, generating an encapsulated description file, compressing the one-key installation package under the CentOS7.2, the entity file of the software A and the description file into an executable program AppASetUp, and completing software encapsulation.
For the usage scenario after software encapsulation, two scenarios are described from independent deployment and integrated deployment:
scene one: independently deploying scenes after encapsulation, and the specific steps are as follows:
step 1, copying an executable program AppASetUp to an operating system of a certain CentOS7.2, and double-clicking to run the AppASetUp; carrying out step 2;
step 2, AppASetUp performs self-decompression, releases a one-key installation program, a description file and a software entity under a CentOS to a temporary folder, and runs the one-key installation program; carrying out step 3;
step 3, reading the description file by the one-key installation program, firstly judging that AppA depends on AppB, monitoring whether the local machine is provided with the dependent software or not for local dependence, if so, performing step 4, otherwise, skipping to step 14; for network dependence, after giving a dependence information prompt, performing step 4;
step 4, generating an application introduction according to the application prefix, the application name, the application version, the application description, the unit name and the like in the description file; carrying out step 5;
step 5, reading the application installation permission file according to the installation permission file information in the description file, and generating installation permission; carrying out step 6;
step 6, providing a software custom installation path selection; carrying out step 7;
step 7, providing a parameter modification mechanism according to the configuration of the application to the parameters in the description file, and supporting the parameter input before the software installation; carrying out step 8;
step 8, starting to install the application, and releasing the application to an installation path selected by a user; carrying out step 9;
step 9, after the application is released, modifying parameter values in the software entity according to the parameter configuration result before installation; to carry out
Step 10, executing the application installation custom script according to the installation custom script information in the description file, judging whether the script is executed correctly, if so, performing step 11, otherwise, skipping to step 14;
step 11, setting system environment variables according to the configuration information of the environment variables in the description file, and enabling the environment variables to take effect; performing step 12;
step 12, generating shortcuts on a desktop, a starting self-starting device and a program bar according to the shortcut configuration information in the description file and the user-defined icon and the shortcut name during packaging; performing step 13;
step 13, according to the start script described in the packaging process, the application can be immediately operated after being installed; performing step 14;
and step 14, finishing independent software deployment, and performing error prompt on the encountered errors.
Scene two: after packaging, integrating a deployment scene, taking system installation deployment software as an example, the specific steps are as follows:
step 1, uploading the packaged AppA to a software warehouse under system installation deployment software; carrying out step 2;
step 2, the system installs and deploys software to extract the encapsulated description file and acquire information of the application prefix, the application name, the application version, the application description, the unit name and the like of the software; carrying out step 3;
step 3, acquiring the dependency relationship of AppA, if the AppA does not exist in the warehouse temporarily, generating a prompt, and if the AppA does not exist in the warehouse, the prompt is generated, and the AppA lacks; carrying out step 4;
step 4, the system is divided into container deployment and common deployment when being installed and deployed; deploying the container, and performing step 5; ordinary deployment is carried out, and step 8 is carried out;
step 5, according to the description of the basic mirror image during packaging, modifying the address of the basic mirror image according to actual requirements, connecting a container cloud platform, selecting the basic mirror image, and constructing to form the mirror image of the AppA; carrying out step 6;
step 6, starting the instance of the AppA according to the mirror image of the AppA, and before deployment, carrying out the following steps on the CPU, the memory, the copy number and the source port: mapping of destination port, host volume: configuring parameters such as mapping of the container volume, the maximum percentage of CPU, the range of the number of copies and the like; carrying out step 7;
step 7, after deployment is completed, capacity expansion of the container is supported according to the requirement according to the configuration such as whether capacity expansion and automatic capacity expansion are supported; skipping to step 12;
step 8, when the system installation deployment software deploys the AppA to a certain IP address, judging whether an inorganic device installation AppA exists in the system according to the dependency relationship, if not, performing step 9, and if so, performing step 10;
step 9, prompting that dependence is absent, deploying AppB first when deploying AppA, and deploying AppB to any machine of the system; step 10 is carried out;
step 10, pushing AppA software to a machine to be deployed; performing step 11;
step 11, performing steps 7 to 13 in scene one; performing step 12;
and step 12, completing the deployment of the software AppA in the system integration environment.
The present invention provides a software packaging method, and a method and a way for implementing the technical solution are many, and the above is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, a plurality of modifications and embellishments can be made without departing from the principle of the present invention, and these modifications and embellishments should also be regarded as the protection scope of the present invention. All the components not specified in the present embodiment can be realized by the prior art.

Claims (9)

1. A method for encapsulating software, comprising the steps of:
step 1, creating a software packaging project, describing basic software information, uploading a software icon and software installation permission, and performing step 2;
step 2, selecting an application type, displaying different software description options according to different application types, and performing step 3;
step 3, importing a software entity, wherein the entity type supports a folder or a file type; carrying out step 4;
step 4, selecting a file in the software entity, creating a shortcut, setting the name and the custom icon of the shortcut, and performing step 5;
step 5, configuring software dependence information according to the requirement of software dependence, and performing step 6;
step 6, judging whether the application type is a database or not according to the application type, and if so, performing step 7; otherwise, skipping to step 8;
step 7, setting a database port number, a database SID, a system user name and a system user name password of a target database of the database device, configuring a table space and a temporary table space, and setting user information, wherein the user information comprises the user name, the user name password, the database authority and the relationship between the user name, the user name password, the database authority and the table space and the temporary table space to be led in; skipping step 13;
step 8, configuring software parameter information, configuring the parameter information needing to be modified in the installation and deployment process of the software in the modes of structural display of a structured file, unstructured user self-definition and manual addition, setting the configuration type of the parameter and configuring the source of the parameter, and performing step 9;
step 9, whether the software supports containerization deployment is set, if so, step 10 is carried out, otherwise, step 11 is skipped;
step 10, setting the supporting capacity of the container, including the capacity expansion, the automatic capacity expansion and the supporting capacity of the privilege mode of the container, and performing step 11;
step 11, setting environment variables, wherein the environment variables comprise user-defined environment variables and system environment variables, and performing step 12;
step 12, setting custom installing, uninstalling, starting and stopping scripts, wherein the custom scripts are used for specific operation of each software, supporting personalized behaviors and operation of a user, and performing step 13;
and step 13, selecting a constructed target hardware architecture and operating system, starting to encapsulate software, generating an encapsulated description file, compressing the one-key installation package, the software entity and the description file in the corresponding environment into an executable program according to the target hardware architecture and the operating system, executing the executable program of the one-key installation package by a self-decompression technology during software installation, and installing the software package according to the encapsulated description file.
2. The method according to claim 1, wherein in step 1, the software basic information includes a software prefix, a software name, a software version number, a software description, developer information, and a software running environment, the software prefix is a software identifier, the software running environment includes bit requirements of a CPU, a memory, a disk, and an operating system, and according to the description of an environment in which software needs to run, the running environment of a target machine can be detected before software is installed, and a machine which does not satisfy the running environment can be prompted.
3. The method according to claim 2, wherein in step 2, the application type comprises: the system comprises a software basic package, a Web application package, a database, a plug-in package and a mobile App, wherein the software basic package refers to a file or a file set capable of completing a specific function; web application packages refer to war packages developed using Java; the database refers to a database DMP file exported by the database; the plug-in package can not operate independently and must operate depending on a specific platform; the mobile App refers to a handheld terminal application.
4. The method of claim 3, wherein in step 4, the shortcuts comprise three types, namely desktop shortcuts, boot-up self-start-up and program bar shortcuts.
5. The method according to claim 4, wherein in step 5, the setting of the software dependency information comprises setting of a software prefix, a software name and a version range of the dependent software, setting of a dependency type and a dependency scenario, and explaining the necessity of dependency; the dependency types comprise local dependencies and network dependencies, and the dependency scenarios comprise installation dependencies and operation dependencies.
6. The method according to claim 5, wherein in step 8, the configuration types include general configuration, general configuration and dependent configuration, and the general configuration refers to parameters which are self-defined in each software; the general configuration comprises an IP address, a software installation path, a database system user name password, a database SID, a Web access port, a Web closing port, a TCP port and a UDP port; dependent configuration means that the configuration item is dependent on a specific parameter of the dependent software;
the source comprises a local configuration center and a configuration center, wherein the local configuration center is different in that the parameters set to be the local configuration are only used for modifying the installation state, the configuration information is static data after the software is installed, the configuration information is not managed by the configuration center, the source is set to be the parameters of the configuration center, the configuration item information is still subjected to the unified management of the configuration center after the software is installed, the dynamic change of the parameters through the configuration center is supported, and the hot effect of the configuration is supported.
7. The method of claim 6, wherein step 10 comprises: whether the capacity expansion, the automatic capacity expansion and the privilege mode of the container are supported or not is configured, the capacity expansion of the container means whether the software can utilize the elastic expansion capacity of the container or not after being deployed in the container, the dynamic capacity expansion of a container instance is manually supported, on the basis of supporting the capacity expansion, the automatic capacity expansion describes whether the software can support the automatic load balancing of the container or not, the characteristics of the container are fully utilized, the automatic capacity expansion of a software peak value and the automatic capacity reduction capacity in idle time are supported, and the privilege mode means whether all functions of operating the container by adopting the privilege mode are supported or not; set up deposit route, start command, compilation command, installation dependence command and the compilation process environment variable information of container basis mirror image address, software package in basic mirror image, according to above-mentioned information, automatic generation DockFile, simultaneously to CPU, memory, copy number, source port when container operation: mapping of destination port, host volume: the mapping of the container volume, the maximum percentage of the CPU and the range of the number of copies are automatically added into the parameter configuration in the step 8, the type is general configuration, and the parameter configuration before the container is operated is supported.
8. The method of claim 7, wherein step 11 comprises: supporting the user-defined environment variables under each operating system, supporting the generation of the user-defined environment variables according to the requirements of users, modifying a registry under a windows operating system, adding items and values of the user-defined environment variables, and writing the user-defined variables into/etc/profile under a linux operating system; the method comprises the steps that PATH and LD _ LIBRARY _ PATH environment variables are added, for PATH environment variables, under a windows operating system, the PATH environment variables are written into a registry of the system, the environment variable values of added PATH items are values added by user self-definition, under a linux operating system, the added environment variables are written into/etc/profile files, for LD _ LIRY _ PATH environment variables, under a/etc/ld.so.con.d folder, new conf files are created, and the LIBRARY files are immediately validated by adopting ldconfig commands; and the reference of the custom environment variable is supported, when the environment variable is related to the actual installation path, the installation path can be represented by the placeholder, and the placeholder is replaced by the actual installation path in the actual installation process.
9. The method of claim 8, wherein in step 12, on-demand execution of more than two scripts is supported.
CN201910949745.5A 2019-10-08 2019-10-08 Software packaging method Active CN110727440B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910949745.5A CN110727440B (en) 2019-10-08 2019-10-08 Software packaging method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910949745.5A CN110727440B (en) 2019-10-08 2019-10-08 Software packaging method

Publications (2)

Publication Number Publication Date
CN110727440A true CN110727440A (en) 2020-01-24
CN110727440B CN110727440B (en) 2022-10-04

Family

ID=69220726

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910949745.5A Active CN110727440B (en) 2019-10-08 2019-10-08 Software packaging method

Country Status (1)

Country Link
CN (1) CN110727440B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112099814A (en) * 2020-09-24 2020-12-18 智道网络科技(天津)有限公司 System and method for managing vehicle-mounted machine application software installation environment
CN112558930A (en) * 2020-12-09 2021-03-26 中国科学院电子学研究所苏州研究院 Software generation system and method for container service
CN112732277A (en) * 2020-12-31 2021-04-30 罗普特科技集团股份有限公司 Java multi-service application automatic installation and deployment integration method and system
CN112860645A (en) * 2021-02-09 2021-05-28 恒安嘉新(北京)科技股份公司 Processing method and device for offline compressed file, computer equipment and medium
CN112860277A (en) * 2021-02-04 2021-05-28 江苏云从曦和人工智能有限公司 Software deployment method, device and computer readable storage medium
CN113076115A (en) * 2021-04-21 2021-07-06 扬州万方电子技术有限责任公司 Basic software packaging method based on domestic platform
CN113467790A (en) * 2021-06-22 2021-10-01 龙芯中科(太原)技术有限公司 Software packaging method and device and readable storage medium
CN116149689A (en) * 2023-04-24 2023-05-23 上海观安信息技术股份有限公司 Software installation method and device, storage medium and computer equipment
CN116775048A (en) * 2023-08-24 2023-09-19 浪潮通用软件有限公司 Rapid deployment method, device and medium based on software delivery

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103425512A (en) * 2013-08-19 2013-12-04 曙光信息产业股份有限公司 Software package management method and system
WO2015039413A1 (en) * 2013-09-18 2015-03-26 国云科技股份有限公司 Method for releasing large linux software package
WO2016000623A1 (en) * 2014-07-01 2016-01-07 北京奇虎科技有限公司 Method, apparatus and system for initializing intelligent terminal device
CN108052333A (en) * 2017-12-11 2018-05-18 北京紫优能源科技有限公司 A kind of power scheduling centralized control system standardization Automation arranging method and framework

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103425512A (en) * 2013-08-19 2013-12-04 曙光信息产业股份有限公司 Software package management method and system
WO2015039413A1 (en) * 2013-09-18 2015-03-26 国云科技股份有限公司 Method for releasing large linux software package
WO2016000623A1 (en) * 2014-07-01 2016-01-07 北京奇虎科技有限公司 Method, apparatus and system for initializing intelligent terminal device
CN108052333A (en) * 2017-12-11 2018-05-18 北京紫优能源科技有限公司 A kind of power scheduling centralized control system standardization Automation arranging method and framework

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112099814A (en) * 2020-09-24 2020-12-18 智道网络科技(天津)有限公司 System and method for managing vehicle-mounted machine application software installation environment
CN112099814B (en) * 2020-09-24 2023-04-11 智道网络科技(天津)有限公司 System and method for managing vehicle-mounted machine application software installation environment
CN112558930A (en) * 2020-12-09 2021-03-26 中国科学院电子学研究所苏州研究院 Software generation system and method for container service
CN112732277A (en) * 2020-12-31 2021-04-30 罗普特科技集团股份有限公司 Java multi-service application automatic installation and deployment integration method and system
CN112732277B (en) * 2020-12-31 2022-06-14 罗普特科技集团股份有限公司 Java multi-service application automatic installation and deployment integration method and system
CN112860277A (en) * 2021-02-04 2021-05-28 江苏云从曦和人工智能有限公司 Software deployment method, device and computer readable storage medium
CN112860645A (en) * 2021-02-09 2021-05-28 恒安嘉新(北京)科技股份公司 Processing method and device for offline compressed file, computer equipment and medium
CN113076115B (en) * 2021-04-21 2023-12-26 扬州万方科技股份有限公司 Basic software packaging method based on domestic platform
CN113076115A (en) * 2021-04-21 2021-07-06 扬州万方电子技术有限责任公司 Basic software packaging method based on domestic platform
CN113467790A (en) * 2021-06-22 2021-10-01 龙芯中科(太原)技术有限公司 Software packaging method and device and readable storage medium
CN116149689A (en) * 2023-04-24 2023-05-23 上海观安信息技术股份有限公司 Software installation method and device, storage medium and computer equipment
CN116775048A (en) * 2023-08-24 2023-09-19 浪潮通用软件有限公司 Rapid deployment method, device and medium based on software delivery
CN116775048B (en) * 2023-08-24 2024-01-16 浪潮通用软件有限公司 Rapid deployment method, device and medium based on software delivery

Also Published As

Publication number Publication date
CN110727440B (en) 2022-10-04

Similar Documents

Publication Publication Date Title
CN110727440B (en) Software packaging method
KR101831430B1 (en) Apparatus and method for infrastructure automation
US7337434B2 (en) Off-device class/resource loading methods, systems and computer program products for debugging a Java application in a Java micro device
CN112416524A (en) Implementation method and device of cross-platform CI/CD (compact disc/compact disc) based on docker and kubernets offline
CN105657191B (en) Application increment upgrading method and system based on Android system
US7774762B2 (en) System including run-time software to enable a software application to execute on an incompatible computer platform
EP2932374B1 (en) Systems, methods, and computer program products for a software build and load process using a compilation and deployment service
US9043767B2 (en) Release management system for a multi-node application
US6571388B1 (en) Building a custom software environment including pre-loaded classes
US20070283344A1 (en) Programming model generic application deployment
US20140196022A1 (en) Cloud Based Application Packaging
CN101470621A (en) Virtual machine configuration system
US20080222160A1 (en) Method and system for providing a program for execution without requiring installation
CN111399840B (en) Module development method and device
US20040088397A1 (en) System and method for management of software applications
US20070282801A1 (en) Dynamically creating and executing an application lifecycle management operation
WO2015165111A1 (en) Fast deployment across cloud platforms
US9747091B1 (en) Isolated software installation
CN106294113B (en) creation method and device based on programmable test service
CN111475227B (en) Business plug-in loading implementation method and device and terminal equipment
CN105302563A (en) Plug-in method and system for mobile application service
CN102541609B (en) Installation program manufacturing method, device and network device
CN112286504B (en) Method for realizing development and loading of applet based on REACTNATIVE in mobile APP
US20130227572A1 (en) Test device, a system, a program and a method
CN110888655A (en) Application publishing 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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: No.1 Lingshan South Road, Qixia District, Nanjing, Jiangsu Province, 210000

Applicant after: THE 28TH RESEARCH INSTITUTE OF CHINA ELECTRONICS TECHNOLOGY Group Corp.

Address before: 210007 No. 1 East Street, alfalfa garden, Jiangsu, Nanjing

Applicant before: THE 28TH RESEARCH INSTITUTE OF CHINA ELECTRONICS TECHNOLOGY Group Corp.

GR01 Patent grant
GR01 Patent grant