Help Center/ ServiceStage/ User Guide/ Deployment Source Management/ Software Center/ Packaging Specifications of Software Packages
Updated on 2024-11-04 GMT+08:00

Packaging Specifications of Software Packages

JAR and WAR packages can be directly uploaded.

For other types of software packages, such as compressed packages:

The package name format must be software name+extension. The extension must be tar.gz or zip.

  • The extension of a compressed package must be consistent with the compression mode. Otherwise, the software package cannot be decompressed.
  • The prefix of a compressed package name must be the same as the name of the root directory after decompression. For example, if the package name is xxx.tar.gz, the root directory after decompression must be xxx.

Directory Structure

For decompressed software packages, ensure that lifecycle command scripts can be executed.

The following software package directory structure is recommended:

├── scripts/
│   │      ├── pre-stop.sh
│   │      ├── stop.sh
│   │      ├── uninstall.sh
│   │      ├── install.sh
│   │      ├── start.sh
│   │      ├── check.sh
│   │      ├── post-start.sh
├── packages/
│   │      ├── xxx.jar/xxx.war
├── config/
├── appspec.yml
Table 1 Software package directories and files

Directory/File

Description

scripts

(Mandatory) Stores lifecycle scripts.

When creating an application, you can specify execution commands based on the location of lifecycle scripts. For example, specify bash scripts/install.sh in the install phase to run the installation script.

Lifecycles supported by software package applications are as follows:

  • install.sh: Command for installing software.
  • post-start.sh: Operation performed after software is started.
  • start.sh: Command for starting software.
  • restart.sh: Command for restarting software, which is used to recover the applications failing in health check.
  • pres-top.sh: Operation which is performed before software is stopped.
  • stop.sh: Command for stopping software.
  • uninstall.sh: Command for uninstalling software.

packages

(Mandatory) Stores application JAR or WAR packages.

config

(Mandatory) Stores application configuration information.

appspec.yml

(Mandatory) Records the lifecycle definition and also specifies information such as health check.