Bu sayfa henüz yerel dilinizde mevcut değildir. Daha fazla dil seçeneği eklemek için yoğun bir şekilde çalışıyoruz. Desteğiniz için teşekkür ederiz.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
On this page

Show all

Configuring the Lifecycle of an Application

Updated on 2023-06-25 GMT+08:00

If Cloud Container Engine or is selected for Deployment System on the Configure Basic Settings page during component deployment, ServiceStage provides callback functions that can be invoked in specific phases of the application lifecycle. For example, if an operation needs to be performed on an application component before the component is stopped, you can register the corresponding hook function.

ServiceStage provides the following lifecycle callback functions:

  • Startup command: used to start a container.
  • Post-start processing: triggered after an application is started.
  • Pre-stop processing: triggered before an application is stopped.

Procedure

  1. When deploying an application component, choose Advanced Settings > Component Configuration on the Configure Component page.
  2. Click Startup Command to set Command and Parameter for the container.

    A Docker image has metadata that stores image information. If no Lifecycle command or parameter is set, the container runs the default command and parameter provided during image creation. The Docker defines the default command and parameter as CMD and Entrypoint. For details about the two fields, see Entrypoint Description and CMD Description.

    If the running command and parameter of the application are set during application component deployment, the default Entrypoint and CMD will be overwritten during image building. Table 1 describes the rules.

    Table 1 Startup command parameters

    Image Entrypoint

    Image CMD

    Application Running Command

    Application Running Parameter

    Final Execution

    [touch]

    [/root/test]

    Not set

    Not set

    [touch /root/test]

    [touch]

    [/root/test]

    [mkdir]

    Not set

    [mkdir]

    [touch]

    [/root/test]

    Not set

    [/opt/test]

    [touch /opt/test]

    [touch]

    [/root/test]

    [mkdir]

    [/opt/test]

    [mkdir /opt/test]

  3. Click Lifecycle and set Post-Start and Pre-Stop parameters. Table 2 describes the parameters. Select one of the parameters.

    Table 2 Container lifecycle parameters

    Parameter

    Description

    CLI Mode

    Command to be executed in the component instance. The command format is Command Args[1] Args[2].... Command is a system command or a user-defined executable program. If no path is specified, an executable program in the default path will be selected. If multiple commands need to be executed, write the commands into a script for execution.

    For example, the following commands need to be executed:

    exec: 
      command: 
      - /install.sh 
      - install_agent

    Write /install.sh install_agent in the script.

    This command indicates that the agent will be installed after the component is deployed.

    HTTP request mode

    HTTP call request. The related parameters are described as follows:

    • Path: (optional) URL of a request.
    • Port: (mandatory) request port.
    • Host Address: (optional) IP address of the request. The default value is the IP address of the node where the application is located.

Sitemizi ve deneyiminizi iyileştirmek için çerezleri kullanırız. Sitemizde tarama yapmaya devam ederek çerez politikamızı kabul etmiş olursunuz. Daha fazla bilgi edinin

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback