All Products
Search
Document Center

CloudOps Orchestration Service:ACS::CICD::SoftwarePackageDeployOnSingleEcs

Last Updated:Sep 14, 2024

Action

ACS::CICD::SoftwarePackageDeployOnSingleEcs

Description

Pulls a software package from Object Storage Service (OSS) and deploys the software package on an Elastic Compute Service (ECS) instance. This action can be performed only on Linux ECS instances.

Syntax

Action: ACS::CICD::SoftwarePackageDeployOnSingleEcs
Properties:
  regionId: String
  instanceId: String
  bucketName: String
  objectName: String
  isInternal: Boolean
  downloadPath: String
  deployScript: String

Attributes

Attribute

Description

Type

Required

Default value

Limit

regionId

The region ID.

String

No

{{ ACS::RegionId }}

instanceId

The ID of the ECS instance.

String

Yes

bucketName

The name of the OSS bucket.

String

Yes

objectName

The name of the OSS object.

String

Yes

isInternal

Specifies whether to generate an internal URL.

Boolean

No

True

downloadPath

The download path of the software package.

String

No

/home/admin/app/

deployScript

The deployment script.

String

No

# The deployment script is run on every instance in the deployment group. The following script shows the typical logic: Decompress the software package that is stored in the download directory to the specified directory and then run the startup script. The startup script is usually specified in the code, such as deploy.sh in the sample project. 
# For more information about the sample project, see https://www.alibabacloud.com/help/document_detail/153848.html.
# tar zxvf /home/admin/app/package.tgz -C /home/admin/app/
# sh /home/admin/app/deploy.sh restart
# To deploy software without a software package, such as PHP code, you can run the git clone or git pull command to download the source code to your server and then run other commands.
# git clone ***@***.git

Output

None

References

For more information, see ACS::CICD::SoftwarePackageDeployOnSingleEcs.yml at GitHub.