No part of this document may be reproduced or transmitted in any form or by any means without prior
written consent of Huawei Technologies Co., Ltd.
Trademarks and Permissions
and other Huawei trademarks are trademarks of Huawei Technologies Co., Ltd.
All other trademarks and trade names mentioned in this document are the property of their respective
holders.
Notice
The purchased products, services and features are stipulated by the contract made between Huawei and
the customer. All or part of the products, services and features described in this document may not be
within the purchase scope or the usage scope. Unless otherwise specied in the contract, all statements,
information, and recommendations in this document are provided "AS IS" without warranties, guarantees
or representations of any kind, either express or implied.
The information in this document is subject to change without notice. Every eort has been made in the
preparation of this document to ensure accuracy of the contents, but all statements, information, and
recommendations in this document do not constitute a warranty of any kind, express or implied.
2.1 Creating a User and Granting Permissions.....................................................................................................................4
2.2 Creating a Custom Policy..................................................................................................................................................... 5
2.3 Assigning Permissions on Services that ServiceStage Depends On....................................................................... 6
3.1 Creating an Application........................................................................................................................................................ 8
3.2.2 Quickly Creating a Component.................................................................................................................................... 14
3.2.3 Creating a Microservice Component...........................................................................................................................17
3.2.4 Creating a Web Component.......................................................................................................................................... 20
3.2.5 Creating a Common Component................................................................................................................................. 23
3.3.2 Deploying a Component................................................................................................................................................. 26
3.5 Performing Advanced Settings for an Application.................................................................................................... 34
Conguring the Lifecycle of an Application............................................................................................................. 36
3.5.2
3.5.3 Conguring Data Storage...............................................................................................................................................37
3.6 Building an Application Component.............................................................................................................................. 48
3.7 Pipelining an Application Component........................................................................................................................... 48
3.8 Application
3.8.1 Creating a Secret............................................................................................................................................................... 50
3.8.2 Creating a CongMap......................................................................................................................................................53
5.11 Conguring Health Check............................................................................................................................................... 82
6.2 Using the Microservice Dashboard................................................................................................................................. 85
7.5 Authorizing a Repository................................................................................................................................................. 111
8.2.1 Uploading an Image...................................................................................................................................................... 117
9.1 Cloud Service Engines....................................................................................................................................................... 125
9.1.1 Creating an Exclusive Microservice Engine............................................................................................................ 125
Conguring Backup and Restoration of an Exclusive Microservice Engine................................................ 127
9.1.2
9.1.3 Conguring Public Network Access for an Exclusive Microservice Engine................................................. 128
9.1.4 Viewing the Access Address of a Microservice Engine.......................................................................................129
9.1.5 Viewing Operation Logs of an Exclusive Microservice Engine........................................................................ 130
9.1.6 Upgrading an Exclusive Microservice Engine........................................................................................................ 130
9.1.7 Deleting an Exclusive Microservice Engine............................................................................................................ 131
ServiceStage is an application management and O&M platform that lets you
deploy, roll out, monitor, and maintain applications all in one place. Java, Go, PHP,
Node.js, Docker, and Tomcat are supported. Web applications, microservice
applications such as Apache ServiceComb, Spring Cloud, Dubbo, and service mesh,
and common applications make it easier to migrate enterprise applications to the
cloud.
This document describes how to use ServiceStage to create, deploy, and maintain
applications and perform service governance.
Console Description
Table 1-1 describes ServiceStage console.
Table 1-1 ServiceStage console
Module
OverviewProvides ServiceStage overview, including the ServiceStage
Application
Management
Description
package selection and purchase entry, tutorials, applications,
environments, and components.
● Application List
Provides application lifecycle management, such as
application creation, component addition, component list,
environment view, component deployment, component
details, and O&M.
● Application Component
Displays the components (including static and deployed
components) of the application, and component details and
O&M.
● Application
Supports conguration item and secret management.
Environment is a collection of infrastructures, covering
computing, storage, and networks, used for application
deployment and running.
Provides environment creation, editing, and deletion, and
displays resource information in an existing environment.
Supports project build and release.
● Build
The software package or image package can be generated
with a few clicks in job building. In this way, the entire
process of source code pull, compilation, packaging, and
archiving is automatically implemented.
● Pipeline
One-click deployment can be achieved through pipeline. In
this way, the entire process of source code pull, complication,
packaging, archiving, and deployment is automatically
implemented. This
unies the integration environment and
standardizes the delivery process.
● Repository Authorization
You can create repository authorization so that build projects
and application components can use the authorization
information to access the software repository.
Software
Center
Provides functions such as organization management, software
repository, and image repository.
● Organization management is used to isolate images and
assign access permissions (read, write, and manage) to
dierent users.
● Image repositories are used to store and manage Docker
images.
● Software repositories are used to store, manage, and deploy
software packages.
InfrastructureProvides application infrastructure management, such as Cloud
Service Engine (CSE) and VM agent management (VMAgent).
On the CSE page, go to its console to perform microservice
governance.
Operation ListAfter the Cloud Trace Service (CTS) is enabled, the system
automatically traces operations and changes of all cloud
resources of the current tenant and saves the information as
traces for seven days. Advanced functions, such as trace transfer
(long-term storage) and encrypted storage, can be congured
in the tracker list.
Help CenterProvides an overview of ServiceStage documentation.
The VM agent management function depends on the ECS and AOM services. If these
services are not installed, the VM agent management function is unavailable.
Package Description
Log in to the ServiceStage console and select an edition on the Overview page.
Currently, ServiceStage provides basic edition and professional edition..
Table 1-2 ServiceStage edition description
EditionPackage Description
Basic20 instances are free to use.
ProfessionalOne exclusive CSE engine and AOM enterprise
edition are free to use.
For product pricing of each edition, see Product Pricing Details.
Assigning Permissions on Services that ServiceStage Depends On
2.1 Creating a User and Granting Permissions
This section describes how to use IAM to implement ne-grained permissions
control for your ServiceStage resources. With IAM, you can:
●Create IAM users for employees based on the organizational structure of your
enterprise. Each IAM user has their own security credentials, providing access
to ServiceStage resources.
●Grant only the permissions required for users to perform a task.
●Entrust a HUAWEI CLOUD account or cloud service to perform
on your ServiceStage resources.
If your HUAWEI CLOUD account does not require individual IAM users, skip this
section.
This section describes the procedure for granting permissions (see Figure 2-1).
Prerequisites
Before assigning permissions to user groups, you should learn about the
ServiceStage permissions listed in Permissions Management. For the system
policies of other services, see System Permissions.
A deny policy must be used in conjunction with other policies to take eect. If the
permissions assigned to a user contain both "Allow" and "Deny", the "Deny"
permissions take precedence over the "Allow" permissions.
After authorization, users in the group can verify their permissions using the
console or REST APIs.
The following are the steps to be performed on the console.
1.Log in to HUAWEI CLOUD as an IAM user.
–Account name: Name of the account used to create the IAM user
–Username and password: Username and password
specied for the IAM
user
2.On the ServiceStage console, choose Infrastructure > Cloud Service Engines,
and buy a microservice engine. If error 403 is returned, the permissions are
correct and have already taken
eect.
2.3 Assigning Permissions on Services that ServiceStage
Depends On
Granting CCE Namespace Permissions
You can grant only common operation permissions on CCE cluster resources to the
ServiceStage user group using IAM, excluding the namespace permissions of the
clusters with Kubernetes RBAC authentication enabled. Therefore, you need to
separately grant the namespace permissions for the clusters.
For details about how to set CCE namespace permissions, see Permissions
Management.
Granting CTS Permissions
Currently, Cloud Trace Service (CTS) does not support ne-grained authorization.
After the permissions are set for ServiceStage using IAM, they do not take eect
for the CTS service on which ServiceStage depends. You need to set the CTS
service permissions separately.
For details about how to set CTS namespace permissions, see Permissions
An application is a service system with functions and consists of one or more
application components.
For example, the weather forecast is an application that contains the weather and
forecast components. ServiceStage organizes multiple components by application,
and supports dark launch and quick cloning of applications in
environments.
Creating an Application
Step 1 Log in to ServiceStage and choose Application Management > Application List.
dierent
Step 2 Click Create Application and set basic application information.
1.Name: Enter an application name. This name cannot be changed after the
application is created.
2.Enterprise Project: Set an enterprise project.
Enterprise projects provide a cloud resource management mode, in which
cloud resources and members are centrally managed by project.
It is available after the enterprise center is enabled.
3.Description: (Optional) Enter an application description.
Step 3 Click OK.
----End
Adding Environment Variables
An environment is a collection of infrastructures, covering computing, storage, and
networks, used for application deployment and running. ServiceStage combines
basic resources (such as CCE and ECS) and optional resources (such as ELB, RDS,
and DCS) in the same VPC into an environment, such as the development
environment, testing environment, pre-production environment, and production
environment. Networks in an environment can communicate with each other. You
can manage resources and deploy services by environment, simplifying
infrastructure O&M.
Environment variables are parameters set in the system or user applications. You
can obtain the values of environment variables by calling APIs. During
deployment, parameters are
the code, which makes the deployment exible.
specied through environment variables instead of in
Step 1 Log in to ServiceStage and choose Application Management > Application List.
Step 2 Click the application name. The Overview page is displayed.
Step 3 Click Environment Variables and select a created environment from the
Environment drop-down list.
Step 4 Click Add Environment Variable and enter the values in Key and Value.
Key indicates the name of the environment variable, and Value indicates the
value of the environment variable. Click Submit.
For example, set Key to User and Value to admin. That is, when the program
code reads the User environment variable, admin is obtained. For example, you
can start subprocesses as the admin user and read
actual execution eect depends on the code.
----End
3.2 Creating Application Components
3.2.1 Application Components
les as the admin user. The
An application component implements a service feature of an application. It is in
the form of code or software packages and can be deployed independently.
After creating an application on ServiceStage, you can add components to the
application. Currently, microservice, web, and common application components are
supported.
You can create a static component by setting the component type, framework,
runtime system, and component source, and then deploy this component.
Source code repositoryCreate authorization by referring to
Authorizing a Repository and set the
code source.
JAR packageSupports the following uploading
modes:
1. Select the corresponding software
package from the SWR software
repository. You need to upload the
software package to the software
repository in advance. For details,
see Uploading the Software
Package.
2. Select the corresponding software
package from OBS. You need to
upload the software package to the
OBS bucket in advance. For details,
see Uploading a File.
1. Select the corresponding software
package from the SWR software
repository. You need to upload the
software package to the software
repository in advance. For details,
see Uploading the Software
Package.
2. Select the corresponding software
package from OBS. You need to
upload the software package to the
OBS bucket in advance. For details,
see Uploading a File.
ZIP packageSupports the following uploading
modes:
1. Select the corresponding software
package from the SWR software
repository. You need to upload the
software package to the software
repository in advance. For details,
see Uploading the Software
Package.
2. Select the corresponding software
package from OBS. You need to
upload the software package to the
OBS bucket in advance. For details,
see Uploading a File.
Image packageIf you use a private image to create
your containerized application, upload
the private image to the image
repository. Choose Software Center >
Image Repository and upload the
image to the image repository by
referring to Managing Images.
TemplateCreate authorization by referring to
Authorizing a Repository and set the
organization and repository names.
ServiceStage provides component
templates. You can select a template
to quickly create an application and
generate a development project in the
congured code repository. For details,
see Template Framework.
● Select Source code repository.
– Create authorization by referring to Authorizing a
Repository and set the code source.
– Set Build parameters to build the application
component.
Set Command, Organization, and CPU Architecture,
and select a cluster based on service requirements.
You can also specify Node Label to deliver the build
task to a
xed node based on the node label. For
details about how to add a node label, see Node
Management.
NOTICE
If Custom command is selected for Command:
Exercise caution when inputting sensitive information in the
echo, cat, or debug command, or encrypt sensitive
information to avoid information leakage.
● Select JAR package or WAR package.
NOTE
Select JAR package if Java8 is selected as the Runtime System.
Select WAR package if Tomcat8 is selected as the RuntimeSystem.
1. Select Upload Method.
Select the corresponding software package from the
SWR software repository. Upload the software package
to the software repository in advance. For details, see
Uploading the Software Package.
Upload the software package to OBS. For details, see
Uploading a File.
2. (Optional) Set Build parameters to build the
application component.
Set Organization and CPU Architecture, and select a
cluster based on service requirements.
You can also specify Node Label to deliver the build
task to a
xed node based on the node label. For
details about how to add a node label, see Node
Management.
● Set the following parameters if Template is selected.
1. Select the template framework. ServiceStage provides
template frameworks. You can select one to quickly
create an application component.
2. Set Code Archive. See Authorizing a Repository to
create authorization and set Username/Organization
and Repository.
●Click Create and Deploy. The deployment page is displayed. For details, see
Deploying a Component.
After the component is created, you can view the component status in the
Component List on the Overview tab.
----End
3.2.3 Creating a Microservice Component
ServiceStage provides a microservice framework that enables you to develop and
deploy applications on the cloud. It provides code framework generation, service
registry and discovery, load balancing, and service reliability including fault
tolerance, circuit breaker, rate limiting, and service degradation. This section
describes how to create a static microservice application component using
ServiceStage. For details about how to deploy a component, see Deploying a
Component.
Prerequisites
1.An application has been created cause components can only be added to
applications. For details, see Creating an Application.
2.If you create a microservice component based on the source code repository
or template, create repository authorization
a Repository.
3.If you create a microservice component based on the software package,
upload the software package to the software repository or OBS bucket.
–Upload the software package to the software repository. For details, see
Uploading the Software Package.
–Upload the software package to OBS. For details, see Uploading a File.
rst. For details, see Authorizing
Procedure
Step 1 Log in to ServiceStage and choose Application Management > Application List.
Step 2 Select the created application and click Create Component in the Operation
column.
Step 3 Select Custom for
Component Type, and click Next.
Step 4 Select Runtime System and click Next.
Dierent frameworks support dierent runtime systems. For details, see
Microservice Components.
Step 5 Select Framework/Service Mesh.
For details about the framework/service mesh, see Microservice Components.
Step 6 Select whether you want to save the preceding
future use.
●If you select this function, enter a template name. Then, go to Step 7.
●If you do not select this function, go to Step 7.
1. Create authorization by referring to Authorizing a
Repository and set the code source.
2. Set Build parameters to build the application
component.
Set Command, Organization, and CPU Architecture,
and build a cluster based on service requirements.
You can also specify Node Label to deliver the build
task to a
xed node based on the node label. For
details about how to add a node label, see Node
Management.
NOTICE
If Custom command is selected for Command:
Exercise caution when inputting sensitive information in the
echo, cat, or debug command, or encrypt sensitive
information to avoid information leakage.
● Select JAR package, WAR package, or ZIP package.
NOTE
Select JAR package if Java8 is selected as the Runtime System.
Select WAR package if Tomcat8 is selected as the RuntimeSystem.
Select ZIP package if Nodejs8, Php7, or Python3 is selected as
the Runtime System.
1. Select Upload Method.
Select the corresponding software package from the
SWR software repository. Upload the software package
to the software repository in advance. For details, see
Uploading the Software Package.
Upload the software package to OBS. For details, see
Uploading a File.
2. (Optional) Set Build parameters to build the
application component.
Set Organization and CPU Architecture, and build a
cluster based on service requirements.
You can also specify Node Label to deliver the build
task to a
xed node based on the node label. For
details about how to add a node label, see Node
Management.
● Set the following parameters if Template is selected.
1. ServiceStage provides template frameworks. You can
select one to quickly create an application component.
2. Set Code Archive. See Authorizing a Repository to
create authorization and set Username/Organization
and Repository.
NOTE
This parameter is invalid if you select Mesher or Spring Cloud for
Framework/Service Mesh in Step 5.
1. Create authorization by referring to Authorizing a
Repository and set the code source.
2. Set Build parameters to build the application
component.
Set Command, Organization, and CPU Architecture,
and select a cluster based on service requirements.
You can also specify Node Label to deliver the build
task to a
xed node based on the node label. For
details about how to add a node label, see Node
Management.
NOTICE
If Custom command is selected for Command:
Exercise caution when inputting sensitive information in the
echo, cat, or debug command, or encrypt sensitive
information to avoid information leakage.
● Select JAR package, WAR package, or ZIP package.
NOTE
Select JAR package if Java8 is selected as the Runtime System.
Select WAR package if Tomcat8 is selected as the RuntimeSystem.
Select ZIP package if Nodejs8, Php7, or Python3 is selected as
the Runtime System.
1. Select Upload Method.
Select the corresponding software package from the
SWR software repository. Upload the software package
to the software repository in advance. For details, see
Uploading the Software Package.
Upload the software package to OBS. For details, see
Uploading a File.
2. (Optional) Set Build parameters to build the
application component.
Set Organization and CPU Architecture, and select a
cluster based on service requirements.
You can also specify Node Label to deliver the build
task to a
xed node based on the node label. For
details about how to add a node label, see Node
Management.
● Set the following parameters if Template is selected.
1. ServiceStage provides template frameworks. You can
select one to quickly create an application component.
2. Set Code Archive. See Authorizing a Repository to
create authorization and set Username/Organization
and Repository.
NOTE
This parameter is invalid if you select Python3 for Runtime
System in Step 4.
●Click Create and Deploy. The deployment page is displayed. For details, see
Deploying a Component.
After the component is created, you can view the component status in the
Component List on the Overview tab.
----End
3.2.5 Creating a Common Component
This section describes how to create a static common application component
using ServiceStage. For details about how to deploy a component, see Deploying
a Component.
Prerequisites
Procedure
Step 1 Log in to ServiceStage and choose Application Management > Application List.
Step 2 Select the created application and click Create Component in the Operation
Step 3 Select Custom for
Step 4 Select Runtime System and click Next.
1.An application has been created cause components can only be added to
applications. For details, see Creating an Application.
2.If you create a microservice component based on the source code repository
or template, create repository authorization
a Repository.
3.If you create a microservice component based on the software package,
upload the software package to the software repository or OBS bucket.
–Upload the software package to the software repository. For details, see
Uploading the Software Package.
–Upload the software package to OBS. For details, see Uploading a File.
column.
Conguration Method, select Common for Component Type,
and click Next.
rst. For details, see Authorizing
Dierent frameworks support dierent runtime systems. For details, see
Microservice Components.
Step 5 Select whether you want to save the preceding congurations as a template for
future use.
●If you select this function, enter a template name. Then, go to Step 6.
●If you do not select this function, go to Step 6.
Step 6 Check whether Docker is selected in Step 4.
2.Create a component.
–Click Create Now to create a static component.
–Click Create and Deploy. The deployment page is displayed. For details,
see Deploying a Component.
3.No further action is required.
After the component is created, you can view the component status in the
Component List on the Overview tab.
Step 8
Congure component information according to the following table. Parameters
marked with an asterisk (*) are mandatory.
ParameterDescription
*NameComponent name.
*Source Code/
Software
Package
● Source code repository: Create authorization by referring
to Authorizing a Repository and set the code source.
● JAR package/WAR package/ZIP package: Set UploadMethod.
Select the corresponding software package from the SWR
software repository. Upload the software package to the
software repository in advance. For details, see Uploading
the Software Package.
Upload the software package to OBS. For details, see
Uploading a File.
NOTE
Select JAR package if Java8 is selected as the Runtime System.
Select WAR package if Tomcat8 is selected as the RuntimeSystem.
Select ZIP package if Nodejs8, Php7, or Python3 is selected as
the Runtime System.
● Set the following parameters if Template is selected.
1. ServiceStage provides template frameworks. You can
select one to quickly create an application component.
2. Set Code Archive. See Authorizing a Repository to
create authorization and set Username/Organization
and Repository.
NOTE
This parameter is invalid if you select Python3 for Runtime
System in Step 4.
This parameter is mandatory if you select Python3 in Step 4.
Set Module Name and Variable Name for all Python
frameworks except Python3-Django.
● If the entry point le of the Python project is server.py,Module Name is server.
● If the application function of the server.py entry point
of the Python project is app=get_wsgi_application(),
Variable Name is app.
Build● If Source code repository is selected for Source Code/
Software Package, set Build parameters to build the
application component.
Set Command, Organization, and CPU Architecture, and
select a cluster based on service requirements.
You can also specify Node Label to deliver the build task
xed node based on the node label. For details about
to a
how to add a node label, see Node Management.
NOTICE
If Custom command is selected for Command:
Exercise caution when inputting sensitive information in the echo,
cat, or debug command, or encrypt sensitive information to
avoid information leakage.
● (Optional) If JAR package, WAR package, or ZIPpackage is selected for Source Code/Software Package,
set Build parameters to build the application component.
Set Organization and CPU Architecture, and select a
cluster based on service requirements.
You can also specify Node Label to deliver the build task
xed node based on the node label. For details about
to a
how to add a node label, see Node Management.
le
Step 9 Create a component.
●Click Create Now to create a static component.
●Click Create and Deploy. The deployment page is displayed. For details, see
Deploying a Component.
After the component is created, you can view the component status in the
Cloud Container Engine (CCE) provides highly scalable, high-performance,
enterprise-class Kubernetes clusters and supports Docker containers. With CCE,
you can easily deploy, manage, and scale containerized applications on the cloud
platform.
If the build function is not enabled for the created component, the component
cannot be deployed using a container.
Deploying a Component Using VM
The created component can be deployed using a VM only when Java8, Tomcat8,
or Nodejs8 is selected for Select Runtime System.
3.3.2 Deploying a Component
Prerequisites
This section describes how to deploy static components in the corresponding
environment.
When creating an application component, you can also select Create and Deploy.
The deployment procedure is the same as that described in this section.
1.An application component has been created or is being created, and has been
congured. For details, see Creating Application Components.
2.The environment has been created. For details, see Environment
Management.
3.If you deploy components based on software packages or image packages,
you need to upload the software packages or image packages.
–Upload the software package to the software repository. For details, see
Uploading the Software Package.
–Upload the software package to OBS. For details, see Uploading a File.
–Upload the image package to the image repository. For details, see
Uploading an Image.
Congure the AK/SK. For details, see Checking and Conguring the AKSK
4.
Authentication Mode.
Procedure
Step 1 Log in to ServiceStage and choose Application Management >Application List.
Step 2 Click the name of the created application. The Overview page is displayed.
Step 3 On the Component List tab, select a created component and click Deploy in the
Operation column.
Step 4 Set basic parameters. Parameters marked with an asterisk (*) are mandatory.
Only the environment of the same enterprise project can be selected.
*VersionComponent version number, for example, 1.0.0.
DescriptionProvides supplementary information about the component.
*Deployment
System
Supports Cloud Container Engine, and VM.
For details, see Deployment Mode.
*Resource TypeThis parameter is valid when VM is selected for Deployment
System.
AS Groups and Elastic Cloud Servers (ECSs) are supported.
*Basic ResourceThe basic resources contained in the selected environment
are automatically loaded. Select the resources as required.
*InstancesNumber of instances in an application component. An
application component can have one or more instances. You
can specify the number of instances as required.
Conguring multiple instances for an application component
ensures high reliability of the application component. For
such a component, if an instance is faulty, the component
can still run properly.
NOTE
This parameter is not displayed when you select VM deployment.
The number of component instances is determined by the number of
Basic Resources.
*Resource QuotaComponents cannot be scheduled to nodes whose residual
resources are fewer than the requested amount. For details
about how to congure the request and limit parameters,
see Managing Resources for Containers.
You can customize CPU and Memory as required.
NOTE
This parameter is not displayed during deployment when the
component type is Common and the runtime system is Docker.
Component
Status
Sets the component status as required.
NOTE
This parameter is available when the component type is Common,
the runtime system is Docker, and Cloud Container Engine is
selected for Deployment System.
Step 5 Click Next to
congure the component.
●When the component type is Common and the runtime system is Docker,
perform the following operations:
a.Select an image. Multiple containers are supported. You can click Add
i.(Optional) Set Scheduling Policies. For details, see Setting Scheduling
Policies for Application Component Instances.
j.(Optional) Set Upgrade Policies. For details, see Setting Upgrade
Policies for Application Component Instances.
k.(Optional) Set Performance Management. For details, see
Application Performance Management.
●For other types of components, perform the following operations:
a.Set Image.
▪If the application source is a software package, source code, or
template, the
loaded.
congured static component information will be
▪If Runtime System is set to Docker, select an image package from
the SWR image repository.
b.(Optional) Enable Public Network Access.
i.Set Public Network Load Balancer.
Select the created load balancer.
If no load balancer exists, click Add Load Balancer to create one. For
details, see Using Shared Load Balancers — Entry Level.
ii.(Optional) Set HTTPS.
If HTTPS is enabled, click Use existing to select an existing
certicate.
If no certicate exists, click Create new to create a server certicate.
For details about how to create a server certicate, see Creating a
Certicate.
Conguring
iii.Set Domain Name.
Enter a customize domain name if Bound is selected. For details, see
Conguring Domain Name Mappings.
iv.(Optional) Set Listening Port.
Listening port of an application process. If Tomcat8 is selected as theRuntime System, this port is set to 8080 by default. You can
customize this port.
c.(Optional) Set JVM.
This parameter is mandatory when Runtime System is set to Java8 or
Tomcat8.
Enter the JVM parameter, for example, -Xms256m -Xmx1024m. Multiple
parameters are separated by spaces. If the parameter is left blank, the
default value is used.
d.(Optional) Congure Tomcat parameters.
This parameter is mandatory when Runtime System is set to Tomcat8.
i.Select Parameter settings. The Tomcat dialog box is displayed.
ii.Click Use Sample Code and edit the template
After a component is created or deployed, you can perform the following
management operations:
●Viewing Application Components: View the list of components created
under the application.
●Deploying a Component: Deploy the created static components.
●Updating Component Source: Update the source code/software package,
version, and environment
whose runtime system is Docker do not support this operation.
●Deleting Components: Delete the created components.
●Creating a Pipeline for a Component: One-click deployment can be achieved
through pipeline. In this way, the entire process of source code pull,
complication, packaging, archiving, and deployment is automatically
implemented. This
delivery process.
●Viewing Application Component Building: View the status of the
application component building project.
●Maintaining Component Instances: Maintain the deployed application
component instances.
●Managing Component Instance Access Mode: Set the access mode of the
component instances.
unies the integration environment and standardizes the
conguration of the components. Components
Viewing Application Components
Step 1 Log in to ServiceStage and choose Application Management >Application List.
Step 2 Click the name of the created application. The Overview page is displayed.
Step 3 Click the Component List tab to view the list of components created for the
application.
----End
Deploying a Component
For details about how to deploy a component, see Deploying a Component.
Updating Component Source
After a component is created, you can update the source code/software package,
version, and environment
Components whose runtime system is Docker do not support this operation.
Step 1 Log in to ServiceStage and choose Application Management >Application List.
Step 2 Click the name of the created application. The Overview page is displayed.
● Pipelines cannot be created for component instances deployed on VMs.
● Pipelines cannot be created for components whose runtime system is Docker.
----End
Viewing Application Component Building
Step 1 Log in to ServiceStage and choose Application Management >Application List.
Step 2 Click the name of the created application. The Overview page is displayed.
Step 3 On the Component List page, click a component name to go to the Overview
page.
Step 4 Click the Build Job tab to view the status of the application component building
project. For details, see Creating a Source Code Build Task.
----End
Maintaining Component Instances
Step 1 Log in to ServiceStage and choose Application Management >Application List.
Step 2 Click the name of the created application. The Overview page is displayed.
Step 3 On the Environment View tab, select an environment.
●You can view the deployment of the application component in each
environment.
●(Optional) Select an application component version whose type is
Microservice and click Console to go to the microservice console for service
governance. For details, see Microservice Governance.
●Select an application component version and click Perform O&M. TheOverview page is displayed, where you can view the component instance
details.
●Select an application component version and click Operation. You can
perform O&M operations such as component upgrade, scaling, event viewing,
start/stop, restart, rollback, and deletion. For details, see Application O&M.
●Select All or the corresponding application component, and click UpgradeComponent to change the version number, software package, or image
package of the component.
----End
Managing Component Instance Access Mode
Step 1 Log in to ServiceStage and choose Application Management >Application List.
Step 2 Click the name of the created application. The Overview page is displayed.
Step 3 On the Component List tab, click the name of the created component to go to
the Overview page.
You can view the component version on the card of the corresponding
environment.
Step 4 Select a component whose status is Running and click Set. On the Access Mode
page that is displayed, click Add Service.
Step 5 Set the following parameters. Parameters marked with an asterisk (*) are
mandatory.
ParameterDescription
*Service NameSets the name of the service to be accessed.
Access ModeSets the service access mode. The options are as follows:
● Intra-cluster access: allows access from other services in
the same cluster over TCP/UDP.
● Intra-VPC access: allows access from other services in the
same VPC over TCP/UDP.
● Public network access: allows access from the Internet
over TCP/UDP, including EIP.
Intra-VPC load
balancing
* Access Type● This parameter is valid when Access Mode is set to Intra-
Service AnityThis parameter is valid when Access Mode is set to Intra-
Port MappingSets Protocol, Container Port, and Access Port for accessing
Step 6 Click OK.
----End
This parameter is valid when Access Mode is set to IntraVPC access.
VPC access and Intra-VPC load balancing is enabled.
● This parameter is valid when Access Mode is set to Public
network access.
VPC access or Public network access.
the service.
3.5 Performing Advanced Settings for an Application
3.5.1 Setting Application Environment Variables
Environment variables are set in the container running environment and can be
modied after application component deployment, ensuring the exibility of
applications.
This section describes how to congure application environment variables for
deployment using CCE and a VM.
CCE
If Cloud Container Engine is selected for Deployment System on the
Basic Settings page during component deployment, add environment variables by
If Cloud Container Engine or Cloud Container Instance is selected for
Deployment System on the Congure Basic Settings page during component
deployment, ServiceStage provides callback functions that can be invoked in
specic 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
Step 1 When deploying an application component, click Advanced Settings >
Deployment
Conguration on the Congure Component page.
Step 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
command and parameter as CMD and Entrypoint. For details about the two
elds, see
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 3-6 describes the rules.
Table 3-6 Startup command parameters
Image
Entrypoint
[touch][/root/test]Not setNot set[touch /root/
[touch][/root/test][mkdir]Not set[mkdir]
[touch][/root/test]Not set[/opt/test][touch /opt/
Entrypoint Description
Image CMDApplication
and
CMD Description
Running
Command
denes the default
.
Application
Running
Parameter
Final
Execution
test]
test]
[touch][/root/test][mkdir][/opt/test][mkdir /opt/
test]
Step 3 Click Lifecycle and set Post-start Processing and Pre-stop Processing. Table 3-7
Command to be executed in the component instance. The command
format is Command
command or a user-dened executable program. If no path is
specied, 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 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 resides.
Args[1] Args[2]...
. Command is a system
3.5.3
----End
Conguring Data Storage
Container storage is a component that provides storage for applications. Multiple
types of storage are supported. An application component can use any amount of
storage.
If Cloud Container Engine is selected for Deployment System on the
Basic Settings page during component deployment, you can set data storage.
EVS disksEVS supports three specications: common I/O, high I/O, and
Scenario
ultra-high I/O.
● Common I/O: The backend storage is provided by the Serial
Advanced Technology Attachment (SATA) storage media.
Common I/O is applicable to scenarios where large capacity is
needed but high read/write rate is not required, and the
volume of transactions is low. Examples include development
testing and enterprise
● High I/O: The backend storage is provided by the Serial
Attached SCSI (SAS) storage media. High I/O is applicable to
scenarios where relatively high performance, high read/write
rate, and real-time data storage are required. Examples
include creating
● Ultra-high I/O: The backend storage is provided by the SolidState Drive (SSD) storage media. Ultra-high I/O is applicable
to scenarios where high performance, high read/write rate,
and data-intensive applications are required. Examples include
NoSQL, relational database, and data warehouse (such as
Oracle RAC and SAP HANA).
oce applications.
le systems and sharing distributed les.
SFS le
systems
OBS
buckets
Scalable File Service (SFS) le systems apply to a wide range of
scenarios, including media processing, content management, big
data, and analysis applications.
● Standard OBS buckets:
This type of OBS buckets applies to scenarios where a large
number of hotspot les or small-sized les need to be
accessed frequently (multiple times per month on average)
and data can be quickly obtained. For example, cloud
applications, data analysis, content analysis, and hotspot
objects.
● Infrequent access OBS buckets:
This type of OBS buckets applies to scenarios where data is
not frequently accessed (less than 12 times per year on
average) but fast access response is required. For example,
static website hosting, backup/active archiving, storage
resource pools or backup storage for cloud services.
HostPathThe le directory of the host where the application component is
located is mounted to the specied mounting point of the
application. If the application component needs to access /etc/
hosts, use HostPath to map /etc/hosts.
NOTICE
Do not mount the
run. Otherwise, an exception occurs. An empty directory is recommended.
If the directory is not empty, ensure that the directory does not contain
any les that aect the application component instance startup.
Otherwise, the
instance startup exceptions.
le directory to a system directory such as / or /var/
le will be replaced, causing application component
EmptyDirUsed for temporary storage. The lifecycle of temporary storage is
the same as that of an application component instance. When an
application instance disappears, EmptyDir will be deleted and
the data is permanently lost.
CongMapKeys in a CongMap are mapped to an application so that
conguration les can be mounted to the specied application
component directory.
SecretSensitive information such as application authentication and
application keys is stored in a secret, and the secret is mounted
to a specied path of the application component.
EVS Disks
Step 1 When deploying an application component, click Advanced Settings >
Step 2 Choose Data Storage > Cloud Storage > Add Cloud Storage and set parameters
Deployment Conguration on the Congure Component page.
by referring to Table 3-9.
Table 3-9 EVS disks
Parameter
Description
Storage TypeSelect EVS disk.
The method of using an EVS disk is the same as that of using
a traditional disk. However, EVS disks have higher data
reliability and I/O throughput and are easier to use. They apply
to le systems, databases, or other system software or
workloads that require block storage devices.
Select a created storage. You need to create a storage in
advance. For details, see Using EVS Volumes.
● Automatic
A storage is created automatically. You need to enter the
storage capacity.
1. If Storage Class is set to EVS Disk, select an AZ for
creating the EVS disk
rst.
2. Select a storage sub-type.
High I/O: EVS disks that have high I/O and use SAS.
Common I/O: EVS disks that use SATA.
Ultra-high I/O: EVS disks that have ultra-high I/O and
use SSD.
3. Enter the storage capacity, in the unit of GB. Ensure that
the storage capacity quota is not exceeded; otherwise,
creation will fail.
1. Set Mounting Path: Enter the application path to which the
data volume is mounted.
NOTICE
– Do not mount a data volume to a system directory such as /
or /var/run. Otherwise, an exception occurs. An empty directory
is recommended. If the directory is not empty, ensure that the
directory does not contain any
startup. Otherwise, the le will be replaced, causing application
startup exceptions. As a result, the application fails to be
created.
– When the data volume is mounted to a high-risk directory, you
are advised to use a low-permission account to start the
application; otherwise, high-risk les on the host may be
damaged.
les that aect application
2. Set Permission.
– Read-only: allows you only to read data volumes in the
application path.
– Read/Write: allows you to modify the data volumes in
the application path. To prevent data loss, newly written
data will not be migrated during application migration.
Step 3 Click OK.
----End
SFS File Systems
Step 1 When deploying an application component, click Advanced Settings >
Deployment
Step 2 Choose Data Storage > Cloud Storage > Add Cloud Storage and set parameters
Scalable File Service (SFS) applies to a wide range of scenarios,
including media processing, content management, big data,
and analysis application.
Storage
Allocation
Mode
Add Docker
Mounting
● Manual
Select a created storage. You need to create a storage in
advance. For details, see Using SFS Volumes.
● Automatic
A storage is created automatically. You need to enter the
storage capacity.
1. Select a storage sub-type.
Set the sub-type to NFS.
2. Enter the storage capacity, in the unit of GB. Ensure that
the storage capacity quota is not exceeded; otherwise,
creation will fail.
1. Set Sub-path and Container Path to the path to which the
data volume is mounted.
NOTICE
– Do not mount a data volume to a system directory such as /
or /var/run. Otherwise, an exception occurs. An empty directory
is recommended. If the directory is not empty, ensure that the
directory does not contain any
startup. Otherwise, the les will be replaced, causing application
startup exceptions. As a result, the application fails to be
created.
– When the data volume is mounted to a high-risk directory, you
are advised to use a low-permission account to start the
container; otherwise, high-risk les on the host may be
damaged.
les that aect application
2. Set Permission.
– Read-only: allows you only to read data volumes in the
application path.
– Read/Write: allows you to modify the data volumes in
the application path. To prevent data loss, newly written
data will not be migrated during application migration.
Step 3 Click OK.
----End
OBS Buckets
Step 1 When deploying an application component, click Advanced Settings >
Deployment
Step 2 Choose Data Storage > Cloud Storage > Add Cloud Storage and set parameters
Standard and Infrequent Access OBS classes are supported.
OBS buckets apply to scenarios such as big data analytics,
cloud native application data, static website hosting, and
backup/active archiving.
Storage
Allocation
Mode
Add Docker
Mounting
● Manual
Select a created storage. You need to create a storage in
advance. For details, see Using OBS Volumes.
● Automatic
Select a storage sub-type.
The sub-type can be set to standard OBS buckets or
infrequent access OBS buckets.
1. Set Mounting Path: Enter the application path to which the
data volume is mounted.
NOTICE
– Do not mount a data volume to a system directory such as /
or /var/run. Otherwise, an exception occurs. An empty directory
is recommended. If the directory is not empty, ensure that the
directory does not contain any
startup. Otherwise, the le will be replaced, causing application
startup exceptions. As a result, the application fails to be
created.
– When the data volume is mounted to a high-risk directory, you
are advised to use a low-permission account to start the
application; otherwise, high-risk les on the host may be
damaged.
les that aect application
2. Set Permission.
– Read-only: allows you only to read data volumes in the
application path.
– Read/Write: allows you to modify the data volumes in
the application path. To prevent data loss, newly written
data will not be migrated during application migration.
Step 3 Click OK.
----End
HostPath
The
le or directory of the host is mounted to the application component.
Step 1 When deploying an application component, click Advanced Settings >
Deployment Conguration on the Congure Component page.
Step 2 Choose Data Storage > Local Disk > Add Local Disk and set parameters by
Host PathEnter the host path, for example, /etc/hosts.
Docker
Mounting
1. Set Mounting Path: Enter the application path to which the
data volume is mounted.
NOTICE
– Do not mount a data volume to a system directory such as /
or /var/run. Otherwise, an exception occurs. An empty directory is
recommended. If the directory is not empty, ensure that the
directory does not contain any
Otherwise, the le will be replaced, causing application startup
exceptions. As a result, the application fails to be created.
– When the data volume is mounted to a high-risk directory, you are
advised to use a low-permission account to start the application;
otherwise, high-risk
les on the host may be damaged.
les that aect application startup.
2. Set Permission.
– Read-only: allows you only to read data volumes in the
application path.
– Read/Write: allows you to modify the data volumes in the
application path. To prevent data loss, newly written data
will not be migrated during application migration.
Step 3 Click OK.
EmptyDir
Step 1 When deploying an application component, click Advanced Settings >
Step 2 Choose Data Storage > Local Disk > Add Local Disk and set parameters by
----End
EmptyDir applies to temporary data storage, disaster recovery, and shared
running. It will be deleted upon deletion or transfer of application component
instances.
Disk Media● If you select Memory, the running speed is improved, but
the storage capacity is limited by the memory size. This
mode applies to a small amount of data with high
requirements on reading and writing eciency.
● When Memory is not selected, data is stored in disks, which
is applicable to a large amount of data with low
requirements on reading and writing
eciency.
Docker
Mounting
Step 3 Click OK.
1. Set Mounting Path: Enter the application path to which the
data volume is mounted.
NOTICE
– Do not mount a data volume to a system directory such as /
or /var/run. Otherwise, an exception occurs. An empty directory
is recommended. If the directory is not empty, ensure that the
directory does not contain any
startup. Otherwise, the le will be replaced, causing application
startup exceptions. As a result, the application fails to be created.
– When the data volume is mounted to a high-risk directory, you
are advised to use a low-permission account to start the
application; otherwise, high-risk
damaged.
les that aect application
les on the host may be
2. Set Permission.
– Read-only: allows you only to read data volumes in the
application path.
– Read/Write: allows you to modify the data volumes in the
application path. To prevent data loss, newly written data
will not be migrated during application migration.
----End
CongMap
ServiceStage separates the application codes from congurationles.CongMap
is used to process application component conguration parameters.
Step 1 When deploying an application component, expand Advanced Settings >
Component
Step 2 Choose Data Storage > Local Disk > Add Local Disk and set parameters by
Select the desired CongMap name.
Create a CongMap. For details, see Creating a CongMap.
1. Set Mounting Path: Enter the application path to which the
data volume is mounted.
NOTICE
– Do not mount a data volume to a system directory such as /
or /var/run. Otherwise, an exception occurs. An empty directory is
recommended. If the directory is not empty, ensure that the
directory does not contain any
Otherwise, the le will be replaced, causing application startup
exceptions. As a result, the application fails to be created.
– When the data volume is mounted to a high-risk directory, you are
advised to use a low-permission account to start the application;
otherwise, high-risk
les on the host may be damaged.
les that aect application startup.
2. Set Permission.
– Read-only: allows you only to read data volumes in the
application path.
– Read/Write: allows you to modify the data volumes in the
application path. To prevent data loss, newly written data
will not be migrated during application migration.
Secret
Step 3 Click OK.
----End
The data in the secret is mounted to the
content of the secret is
user-dened.
specied application component. The
Step 1 When deploying an application component, expand Advanced Settings >
Component
Congurations on the Congure Component page.
Step 2 Choose Data Storage > Local Disk > Add Local Disk and set parameters by
referring to Table 3-15.
Table 3-15 Secret
Parameter
Local Disk
Description
Select Secret.
Type
Secret
Item
Select the desired secret name.
Create a secret. For details, see Creating a Secret.
1. Set Mounting Path: Enter the application path to which the
data volume is mounted.
NOTICE
– Do not mount a data volume to a system directory such as /
or /var/run. Otherwise, an exception occurs. An empty directory is
recommended. If the directory is not empty, ensure that the
directory does not contain any
Otherwise, the le will be replaced, causing application startup
exceptions. As a result, the application fails to be created.
– When the data volume is mounted to a high-risk directory, you are
advised to use a low-permission account to start the application;
otherwise, high-risk
les on the host may be damaged.
les that aect application startup.
2. Set Permission.
– Read-only: allows you only to read data volumes in the
application path.
– Read/Write: allows you to modify the data volumes in the
application path. To prevent data loss, newly written data
will not be migrated during application migration.
3.5.4
Conguring Distributed Sessions
Prerequisites
Traditional single-instance applications use local session management. Session
contexts generated by user requests are stored in the process memory. After the
load balancing module is added, multi-instance sessions need to be shared using
distributed storage.
ServiceStage provides the out-of-the-box distributed session function. It uses the
Distributed Cache Service as the session persistence layer. Without code
modication, ServiceStage supports distributed session management for Tomcat
applications, Node.js applications that use express-session, and PHP applications
that use session handle.
During component deployment, you can bind distributed sessions in Database.
The procedure is as follows: After the binding is complete, query environment
variables during application running to obtain the distributed cache information.
For details about the environment variables, see
Conguration Information
About the Middleware Bound to Applications.
Before setting a distributed session, you need to create a distributed session. For
details, see Buying a DCS Redis Instance.
Procedure
Step 1 During component deployment, select Distributed session on the
Step 2 Click Add Distributed Session and set distributed session parameters.
Step 3 Select New Creation for Conguration Mode to create a distributed session.
In some regions, only Use existing can be selected.
Step 4 Set Distributed Cache Service, Subnet, and Password.
Step 5 Retain the default values for other parameters. For details, see Buying a DCS
Redis Instance.
Step 6 Click OK.
----End
3.5.5
Conguring Relational Databases
Prerequisites
Procedure
Step 1 During component deployment, select RDS DB instance on the
Step 2 Click Add RDS DB Instance and set relational database parameters.
To store application data permanently, you need to use Relational Database
Service (RDS). Based on the cloud computing platform, ServiceStage provides RDS
for MySQL which is reliable, scalable, easy to manage, and ready for use. RDS for
MySQL enables you to easily set and scale relational databases on the cloud.
Using the RDS service, you can perform nearly all necessary tasks without
programming. This service
O&M workloads, so that you can focus on application and service development.
When deploying an application component, you can bind a relational database in
the database settings.
Before
instance.For details, see Buy a DB Instance.
Component page.
conguring an RDS database instance, you need to create an RDS database
simplies operation procedures and reduces routine
Congure
Step 3 Select the New creationconguration method.
Some regions may not support New Creation. In this case, you can only select
Step 10 Retain the default values for other parameters. For details, see Buy a DB Instance.
Step 11 Click OK.
----End
3.6 Building an Application Component
ServiceStage needs to build a software package into an image and then deploy it.
Therefore, after you set the application source when creating an application
component, ServiceStage generates a build job for the application component.
Components whose runtime system is Docker cannot be built.
Viewing Application Component Building
Step 1 Log in to ServiceStage, choose Application Management > Application List, and
click the application name to go to the Overview page.
Step 2 On the Component List page, click a component name to go to the Overview
page.
Step 3 Click the Build Job tab to view the status of the application component build job.
----End
Maintaining a Build Job
Table 3-16 Maintenance
Operation
Build NowClick Build Now to start a build job.
Query
details/build
history
Operation Description
● Click View Other Build Records and view the build history.
● Click Logs to view the build log.
● Click Code Check to view the code check overview and
details.
Currently, the following code check plug-ins are supported:
Checkstyle, FindBugs, and PMD.
NOTE
Only the Maven build project supports code check.
3.7 Pipelining an Application Component
One-click deployment can be achieved through pipeline. In this way, the entire
process of source code pull, complication, packaging, archiving, and deployment is
automatically implemented. This unies the integration environment and
standardizes the delivery process.
In the new pipeline, the "phase/task" model is optimized to the "build/
environment" model. Each pipeline includes a group of build tasks and one or
more groups of environment (such as development environment, production-like
environment, and production environment) tasks, each group of environment
tasks contains one or more subtasks (such as deployment and test tasks) and
provides templates.
● Pipelines cannot be created for instances deployed on VMs.
● Pipelines cannot be created for components whose runtime system is Docker.
Creating a Pipeline
Step 1 Log in to ServiceStage, choose Application Management > Application List, and
click the application name to go to the Overview page.
Step 2 On the Component List page, click a component name to go to the Overview
page.
Step 3 Click the Pipeline tab and click Create Pipeline.
Step 4 Enter the basic pipeline information.
1.Enter a pipeline name.
2.(Optional) Enter the Description.
Step 5 Set pipeline.
1.Add a build task.
The build task of the component is automatically loaded.
2.Add a deploy task.
Click Add Environment. The deployed components are automatically loaded.
3.Set pipeline approval.
Click
in the environment area to set the approval mode and approver.
–Approval Mode: By all and By one person are now supported.
–Approved By: You can select multiple accounts as approvers. The system
automatically loads all subaccounts of the account.
Step 6 Click Create and Start to start the pipeline.
Click Create to save the settings and do not execute the pipeline.
----End
Related Operations
After the pipeline is started, you can build and upgrade applications in one-click
mode. For details about maintenance after application components are upgraded,
see Application O&M.
Secrets are user-dened resources that store authentication and sensitive
information such as application keys. They can be used as les or environment
variables in applications.
Prerequisites
●You have created a cluster that requires a secret.
–For details about how to create a hybrid cluster, see Buying a Hybrid
Cluster.
–For details about how to create a BMS cluster, see Create a BMS.
●You have created a namespace for the secret.
Creating a Secret
Step 1 Log in to ServiceStage and choose Application Management > Application
Conguration > Secret
Step 2 Click Create.
Step 3 Create a secret by Visualization or YAML.
●Method 1: Visualization. On the displayed page, set the parameters listed in
the following table. Parameters marked with an asterisk (*) are mandatory.
Table 3-17 Parameters for creating a secret
Parameter
Basic Information
*NameName of the secret, which must be unique in the same
*ClusterCluster where the secret will be used.
*NamespacesNamespace to which the secret belongs. The default value is
Select the type of the secret to be created based on service
requirements.
– Opaque: general secret type. If the secret type is not
explicitly set in the secret congurationle, the default
secret type is Opaque.
kubernetes.io/dockercongjson: a secret that stores the
–
authentication information required for pulling images
from a private repository.
– IngressTLS: a secret that stores the
certicate required by
ingresses (layer-7 load balancing services).
– Other: Enter a secret type that is none of the above.
This parameter is valid only when Secret Type is set tokubernetes.io/dockercongjson. Enter the address of the
image repository.
Value of the dataeld in the application secret le.
– If the secret type is Opaque, enter the key and value. The
value must be encoded using Base64. For more
information, see Base64 Encoding.
Click Add Data to add secret data.
– If the secret type is
kubernetes.io/dockercongjson,
enter the image repository address, username, and
password.
– If the secret type is IngressTLS, upload the
certicatele
and private key le.
– If the secret type is Other, enter the secret type, key, and
value.
Secret
Label
Labels are attached to objects, such as applications, nodes,
and services, in the form of key-value pairs.
Labels dene the identiable attributes of these objects and
are used to manage and select the objects.
1. Click Add Label.
2. Set keys and values.
●Method 2: YAML.
To create a secret by uploading a le, ensure that a resource description le has been
created. ServiceStage supports resource description les in YAML format. For more
information, see Secret Resource File Conguration.
a.Select a cluster from the Cluster drop-down list.
b.(Optional) Click Upload File, select the created secret le, and then click
c.Write or modify the secret le in Orchestration content.
Step 4 After the conguration is complete, click Create.
The new secret is displayed in the secret list.
----End
Secret Resource File Conguration
This section provides examples of conguring secret resource description les.
For example, you can retrieve the username and password for an application
through a secret.
username: my-username
password: my-password
The content in the secret
using Base64. For more information, see Base64 Encoding.
apiVersion: v1
kind: Secret
metadata:
name: mysecret #Secret name.
namespace: default #Namespace. The default value is default.
data:
username: ****** #The value must be encoded using Base64.
password: ****** #The value must be encoded using Base64.
type: Opaque #You are advised not to change this parameter value.
Base64 Encoding
To encrypt a string using Base64, run the echo -n'
command in the local Linux environment. Example:
root@ubuntu:~# echo -n '3306' | base64
MzMwNg==
In the preceding example, 3306 is the content to be encoded.
Managing Secrets
Operation
le secret.yaml is as follows. The value must be encoded
Description
Content to be encoded
' | base64
Modifying a
secret
1. Click Modify in the Operation column of the secret to be
modied.
2. Modify the secret information according to Table 3-17.
Click Delete in the Operation column of the secret to be
deleted, and follow the system prompts to delete the secret.
1. Select the secrets to be deleted.
2. Click Delete in the upper left of the page, and follow the
system prompts to delete the secrets.
NO TE
ServiceStage
User Guide3 Application Management
OperationDescription
Viewing a
secret
The secret list contains system secrets, which can only be viewed and cannot be modied or
deleted.
Click Show YAML in the Operation column of the target secret
to view the content of the YAML le of the secret.
3.8.2 Creating a CongMap
CongMaps
les or environment variables in applications.
Scenarios
CongMaps allow you to decouple congurationles from images to enhance the
portability of applications.
Benets of CongMaps:
●Manage congurations of dierent environments and services.
store user-dened application congurations. They can be used as
Prerequisites
Creating a
CongMap
Step 1 Log in to ServiceStage and choose Application Management > Application
Step 2 Click Create.
Step 3 Create a CongMap by Visualization or YAML.
●Deploy applications in dierent environments. You can maintain conguration
les in multiple versions, which makes it easy to update and roll back
applications.
●Quickly import
●You have created a cluster that requires a secret.
–For details about how to create a hybrid cluster, see Buying a Hybrid
Cluster.
–For details about how to create a BMS cluster, see Create a BMS.
●You have created a namespace for the secret.
Conguration > CongMap
congurations in the form of les to containers.
●Method 1: Visualization. On the displayed page, set the parameters listed in
the following table. Parameters marked with an asterisk (*) are mandatory.
Name of a CongMap, which must be unique in a namespace.
uration
Name
*ClusterCluster where the CongMap will be used.
*Names
pace
Descript
Namespace to which the CongMap belongs. If you do not
specify this parameter, the value default is used by default.
Description of the CongMap.
ion
Congu
ration
Data
Used in applications or used to store conguration data. Key is a
le name, and Value is the content of the le.
1. Click Add Data.
2. Set keys and values.
Congu
ration
Labels
Labels are attached to objects, such as applications, nodes, and
services, in the form of key-value pairs.
Labels dene the identiable attributes of these objects and are
used to manage and select the objects.
1. Click Add Label.
2. Set keys and values.
●Method 2: YAML.
To create CongMaps by uploading a le, ensure that the resource description le has
been created. ServiceStage supports resource description les in YAML format. For
details, see Conguration Item Requirements.
a.Select a cluster from the Cluster drop-down list.
b.(Optional) Click Upload File, select the created CongMaple, and then
click Open.
Upload a le whose size is less than 2 MB.
c.Write or modify the CongMaple in Orchestration content.
Step 4 After the conguration is complete, click Create.
The new conguration item is displayed in the conguration item list.
----End
Conguration Item Requirements
A CongMap resource le should be in YAML format, and the le size cannot
exceed 2 MB.
Environment is a collection of infrastructures, covering computing, storage, and
networks, used for application deployment and running. ServiceStage combines
basic resources (such as CCE and ECS) and optional resources (such as ELB, RDS,
and DCS) in the same VPC into an environment, such as a development
environment, testing environment, pre-production environment, and production
environment. Networks in an environment can communicate with each other. You
can manage resources and deploy services by environment, simplifying
infrastructure O&M.
Creating an Environment
Step 1 Log in to ServiceStage, choose Environment Management, and click Create
Environment.
Step 2 Set basic parameters. Parameters marked with an asterisk (*) are mandatory.
Parameter
*EnvironmentEnvironment name, for example, dev-bate.
DescriptionEnvironment description.
*VPCSelect the VPC to which the infrastructure belongs.
*Basic
Resource
Optional
Resource
Description
For details about how to create a VPC, see Creating a VPC.
NOTE
After a VPC is selected, infrastructure resources in the VPC are loaded for
selection. Resources that are not in the VPC cannot be selected.
Select at least one of the following infrastructures: Cloud
Container Engine (CCE), Elastic Cloud Server (ECS), and Auto
Scaling (AS). You can select multiple infrastructures.
You can select Elastic Load Balance (ELB), Elastic IP (EIP),
Distributed Cache Service (DCS), Relational Database Service
(RDS), or Cloud Service Engine (CSE) as required.
After the environment is created, you can view the environment information on
the Environment Management page.
----End
Modifying an Environment
Step 1 Log in to ServiceStage, choose Environment Management, and click Edit on an
existing environment.
Step 2 Set basic parameters. Parameters marked with an asterisk (*) are mandatory.
ParameterDescription
*EnvironmentYou can change the environment name.
DescriptionEnvironment description.
*VPCThe VPC cannot be modied. You can only add infrastructure
resources in the selected VPC. Resources that are not in the VPC
cannot be selected.
*Basic
Resource
Optional
Resource
Step 3 Click Save.
After the environment is
the Environment Management page.
----End
Deleting an Environment
● Before deleting an environment, ensure that no application component is deployed in
the environment or the deployed application components have been deleted. For details,
see Managing Application Components.
● Deleting an environment does not delete resources in the environment.
You can add or delete basic resources, including Cloud Container
Engine (CCE), Auto Scaling (AS), and Elastic Cloud Server (ECS).
You can add or delete optional resources, including Elastic Load
Balance (ELB), Elastic IP (EIP), Distributed Cache Service (DCS),
Relational Database Service (RDS), or Cloud Service Engine
(CSE) as required.
modied, you can view the environment information on
Step 1 Log in to ServiceStage, choose Environment Management, and click Delete on
an existing environment.
Step 2 In the dialog box that is displayed, click OK.
Setting Scaling Policies for Application Component Instances
Setting Scheduling Policies for Application Component Instances
Setting Upgrade Policies for Application Component Instances
Setting Custom Metric Monitoring for Application Components
Conguring Application Log Policies
Conguring Application Performance Management
Conguring Health Check
5.1 Maintaining Application Component Instances
Scaling Application Components
You can dene auto-scaling policies as required, releasing you from the workload
of repeatedly adjusting resources in response to service changes and heavy burden
during peak hours and saving resource and labor costs. For details, see Setting
Scaling Policies for Application Component Instances.
Starting and Stopping an Application Component
After an application component is deployed, you can start or stop it as required.
Step 1 Log in to ServiceStage and choose Application Management >Application List
to view all applications.
Step 2 Click an application name. The Overview page is displayed.
Step 2 Click an application name. The Overview page is displayed.
Step 3 On the Environment View tab page, select an environment to view the
application components that have been deployed in the environment.
Step 4 Click Delete in the Operation column delete an application component.
Click OK as prompted.
----End
5.2 Adding Labels for Application Component Instances
Labels are attached to application components using key-value pairs. After
creating labels for application components, you can manage and select application
components by labels. You can add labels to multiple application components or a
specic application component.
As shown in Figure 5-1, three labels (release, env, and role) are dened for the
application components APP 1, APP 2, and APP 3. Dierent label values are
dened for dierent application components.
Procedure
Step 1 Log in to ServiceStage and choose Application Management >Application List
Step 2 Click an application name. The Overview page is displayed.
Step 3 On the Environment View tab page, select an environment to view the
Step 4 Click the name of an application component to access its details page.
Step 5 Click Manage Label.
Figure 5-1 Label example
to view all applications.
application components that have been deployed in the environment.
Step 6 Click Add Label, set Key and Value, and click Save.
● The key name must be unique.
● Labels cannot be added to application component instances that are abnormal or
deployed on VMs.
Step 1 Log in to ServiceStage and choose Application Management >Application List
Step 2 Click an application name. The Overview page is displayed.
Step 3 On the Environment View tab, select an environment to view the application
For application components that have Internet access enabled, you must
domain name on ServiceStage and
domain name provider.
●An automatically generated domain name is valid only for seven days. After
the validity period expires, the domain name must be changed to a custom
domain name.
●You can change the domain name only when the application is in the
Running state.
●You have obtained the domain name from the domain name provider.
●You have obtained the elastic public IP address of the ELB bound to the
application component.
to view all applications.
components that have been deployed in the environment.
congure the domain name mapping in the
dene a
Step 4 Click the name of an application component to access its details page.
Step 5 Set a domain name.
1.Choose Access Mode > Set domain, and enter the obtained domain name.
2.Enable HTTPS.
If HTTPS is enabled, click Use existing to select an existing
If no certicate exists, click New creation to create a server certicate. For
details about how to create a server
Step 6 Congure domain name mapping in the domain name provider.
----End
certicate, see Creating a Certicate.
certicate.
5.4 Setting Alarm Thresholds for Resource Monitoring
When you need to monitor some resources and respond to exceptions in a timely
manner, you can create threshold rules for metrics of these key resources in
routine O&M so that you can nd and handle exceptions in time.
●If the metric meets the threshold conditions within a specied period, the
system sends a threshold alarm.
●If you cannot query the change information about the threshold rule status
on the ServiceStage console due to non-business hours or business trips, you
can enable the notication function to send the change information to related
personnel through SMS messages or emails.
Procedure
Step 1 Log in to ServiceStage and choose Application Management >Application List
to view all applications.
Step 2 Click an application name. The Overview page is displayed.
Step 3 On the Environment View tab page, select an environment to view the
application components that have been deployed in the environment.
Step 4 Click the name of an application component to access its details page.
Step 5 Choose Threshold Alarms > Set Threshold Rule and set threshold rule
parameters based on Table 5-1. The parameters marked with * are mandatory.
Table 5-1 Threshold rule parameters
ParameterDescription
*Threshold NameName of the threshold rule to be added. The name must
be unique and cannot be modied once specied.
DescriptionDescription about the threshold rule.
Statistics ModeMethod used to measure metrics.
Statistical CycleInterval at which metric data is collected.
MetricSelect the metrics to be monitored.
*Threshold
Condition
Continuous CycleWhen the metric meets the threshold condition for a
Trigger of a threshold alarm. A threshold condition
consists of two parts: operators (≥, ≤, >, and <) and
threshold value.
For example, if this parameter is set to ≥ 80, the system
generates a threshold alarm when the metric is greater
than or equal to 80.
specied number of consecutive periods, a threshold
alarm will be generated.
Alarm SeveritySeverity of the threshold alarm.
Send NoticationWhether to send notications.
● If you select Yes (recommended), the system sends
an email or SMS message to the user.
● If you select No, the system does not send an email
After creating a threshold rule, you can perform operations described in Table 5-2.
Table 5-2 Related operations
OperationDescription
Modify a
threshold
alarm.
Delete a
threshold
alarm.
Search for
threshold
alarms.
When you nd that the current threshold rule is not properly
set, you can perform the following operations to modify the
threshold rule to better meet your service requirements.
1. Click Modify in the Operations column of the threshold
alarm list.
2. On the Modify Threshold Rule page, modify the
parameters of the threshold rule as prompted.
3. Click Modify.
When you nd that the current threshold rule is no longer
needed, you can perform the following operations to delete the
threshold rule to release more threshold rule resources.
1. Delete one or multiple threshold rules.
● To delete a single threshold, click Delete in the
Operations column of the threshold rule list.
● To delete one or more threshold rules, select one or more
threshold rules and click Delete on the upper part of the
page.
2. In the dialog box displayed, click OK.
1. Select a time segment from the drop-down list.
2. Enter the keyword of the alarm name or description in the
search box on the upper right corner of the page.
3. Click or press Enter.
You can also click Advanced Search to set the search criteria
and click Search to query.
If the metric meets the threshold conditions within a specied
period, the system sends a threshold alarm.
View the alarm in the threshold alarm list.
If no metric is reported within a specied period, the system
sends a data insuciency event.
You can click the Event tab to view the event in the event list.
ServiceStage
User Guide5 Application O&M
5.5 Setting Scaling Policies for Application Component
Instances
After scaling policies are set, instances can be automatically added or deleted
based on resource changes or a
adjustment to cope with service changes and service peak , helping you save
resources and labor costs.
●Auto scaling: Metric-based, scheduled, and periodic policies are supported.
After
resource changes or a specied schedule.
To use auto scaling, you must be an APM administrator.
●Manual scaling: The number of instances is increased or decreased
immediately after the conguration is complete.
Graceful Scaling-In
conguration, instances can be automatically added or deleted based on
specied schedule. This reduces manual resource
You can set a graceful scaling-in time window to save important data before an
application component instance stops. The value ranges from 0 to 9999, in units
of seconds. The default value is 30s. For example, if an application has two
instances and only one instance will be kept after the scale-in operation, you can
still perform certain operations on the instance to be stopped in the
window.
You can also set the maximum number of unavailable instances allowed during
the rolling upgrade every day.
Step 1 Log in to ServiceStage and choose Application Management >Application List
to view all applications.
Step 2 Click an application name. The Overview page is displayed.
Step 3 On the Environment View tab page, select an environment to view the
application components that have been deployed in the environment.
Step 4 Click the name of an application component to access its details page.
Step 5 Choose Scaling.
●Set Graceful Time Window (s).
.
Specically, click , enter a value, and click
specied time
●Set Maximum number of unavailable instances. Specically, click , enter
the maximum number (or select percentage and enter the maximum
percentage), and click Save.
Click View Component Details. The instance is displayed in the Upgrading/Rolling back the component state. When the status changes to Running, the
scaling is complete.
Step 1 Log in to ServiceStage and choose Application Management >Application List
to view all applications.
Step 2 Click an application name. The Overview page is displayed.
Step 3 On the Environment View tab page, select an environment to view the
application components that have been deployed in the environment.
Step 4 Click the name of an application component to access its details page.
Step 5 Choose Scaling. In the Manual Scaling area:
Auto Scaling
Step 1 Log in to ServiceStage and choose Application Management >Application List
Step 2 Click an application name. The Overview page is displayed.
Step 3 On the Environment View tab page, select an environment to view the
1.Click
2.Click
and change the number of instances.
.
Click View Component Details. The instance is displayed in the Upgrading/Rolling back the component state. When the status changes to Running, the
scaling is complete.
----End
● CCE clusters of 1.15 or later do not support auto scaling.
● VM deployment does not support auto scaling.
to view all applications.
application components that have been deployed in the environment.
Step 4 Click the name of an application component to access its details page. Choose
Scaling.
Step 5 In the Auto Scaling area, click Edit Scaling Rule.
1.Set Cooling Time, Maximum Instances, and Minimum Instances based on
service requirements.
2.Click Save.
Step 6 In the Auto Scaling area, click Add Scaling Policy.
Currently, ServiceStage supports the following types of auto scaling policies:
●Alarm Policy: scaling based on the CPU or memory settings. After an
application component is deployed, instances in this application can be
automatically scaled in or out when the number of CPU cores or memory
amount exceeds or is less than a
Click Show/Hide Preview to set Triggering Condition, Duration, Continuous Cycle,
and Action.
●Scheduled Policy: Instances in an application can be automatically scaled in
or out at a
specied time. This policy is applicable to high trac scenarios,
such as ash sales and premier shopping events, where a large number of
application instances need to be added.
Table 5-4 Parameters for adding a scheduled policy
Parame
Description
ter
Policy
Name of the scaling policy.
Name
Policy
Set it to Scheduled Policy.
Type
Trigger
Set the time at which the policy is enforced.
Time
ActionSelect Add, Reduce, or Set to set the action to be executed after
the policy is triggered.
●Periodic Policy: Scaling policies can be executed daily, weekly, or monthly.
This policy is applicable to scenarios where
trac changes periodically.
Table 5-5 Parameters for adding a periodic policy
Parame
Description
ter
Policy
Name of the scaling policy.
Name
Policy
Set it to Periodic Policy.
Type
Trigger
Set the time at which the policy is enforced.
Time
ActionSelect Add, Reduce, or Set to set the action to be executed after
the policy is triggered.
Step 7 Click OK.
In the Auto Scaling area, check that the policy has been started. When the trigger
is met, the auto scaling policy immediately takes
5.6 Setting Scheduling Policies for Application
Component Instances
ServiceStage provides a variety of scheduling policies, including static global
scheduling policies and dynamic runtime scheduling policies. You can select or
combine these policies as required.
Concepts
●Application-AZ
–Anity with AZs: Application components can be deployed in specic
AZs.
–Non-anity with AZs: Application components cannot be deployed in
specic AZs.
●Application-Node Anity and Anti-Anity
–Anity with Nodes: Application components can be deployed on
specic nodes.
–Non-anity with Nodes: Application components cannot be deployed
on specic nodes.
●Application
It determines whether application components are deployed on the same
node or dierent nodes.
Anity with Applications: Application components are deployed on the
–
same node. You can deploy application components based on service
requirements. The nearest route between application components is used
to reduce network consumption. For example, Figure 5-2 shows
deployment, in which all applications are deployed on the same node.
Figure 5-2 Application anity
Anity and Anti-Anity
Anity
anity
–Anti-anity with Applications: Dierent applications or multiple
instances of the same application component are deployed on dierent
nodes. Anti-anity deployment for multiple instances of the same
application reduces the impact of system breakdowns. Anti-anity
deployment for applications can prevent interference between the
applications.
As shown in Figure 5-3, four applications are deployed on four dierent
nodes. The four applications are deployed in anti-anity mode.
Figure 5-3 Application anti-anity
Precautions
Procedure
Step 1 Access the page for setting a scheduling policy of an application component
Step 2 On the
When setting application component-node
application component anity, ensure that the anity relationships are not
mutually exclusive; otherwise, application deployment will fail. For example,
application deployment will fail when the following conditions are met:
Anti-anity is congured for two application components APP 1 and APP 2.
●
For example, APP 1 is deployed on node A and APP 2 is deployed on node B.
●When APP 3 is deployed on node C and goes online, anity is congured
between APP 3 and APP 2. As a result, anity relationships are mutually
exclusive, and APP 3 fails to be deployed.
When the component type is Common and the runtime system is Docker,
perform the following operations:
instance.
●To set a scheduling policy during component
component deployment, go to Step 2.
●To set a scheduling policy after an application component is deployed, go to
Step 3.
Congure Component page:
anity and application component-
conguration in the application
1.Set the scheduling policy for the application component instance based on
the following table.
5.7 Setting Upgrade Policies for Application
Component Instances
You can set an upgrade policy when deploying an application component or when
an application component has been deployed.
Procedure
When the component type is Common and the runtime system is Docker,
perform the following operations:
Step 1 Access the page for setting an upgrade policy of an application component
instance.
●To set an upgrade policy during component
component deployment, go to Step 2.
●To set an upgrade policy after an application component is deployed, go to
Step 3.
conguration in the application
Step 2 On the Congure Component page, set the upgrade policy for the application
component instance.
1.Select an upgrade mode for the application component instance.
The default upgrade mode is Rolling upgrade.
–Rolling upgrade
Install a new instance and then remove the old one. In this pattern,
services are evenly distributed to new and old instances during the
upgrade, so services are not interrupted.
–In-place upgrade
Delete the old instance and then create a new one. Services are
interrupted during the upgrade.
2.Click Next to complete the component deployment.
Step 3 Log in to ServiceStage and choose Application Management >Application List
to view all applications.
Step 4 Click an application name. The Overview page is displayed.
Step 5 On the Environment View tab page, select an environment to view the
application components that have been deployed in the environment.
Step 6 Click the name of an application component to access its details page.
Step 7 Choose Upgrade to set the upgrade policy.
1.Select an upgrade mode for the application component instance.
Install a new instance and then remove the old one. In this pattern,
services are evenly distributed to new and old instances during the
upgrade, so services are not interrupted.
–In-place upgrade
Delete the old instance and then create a new one. Services are
interrupted during the upgrade.
2.Click Re-deployment to complete the setting.
----End
For other types of components, perform the following operations:
Step 1 Access the page for setting an upgrade policy of an application component
instance.
●To set an upgrade policy during component
conguration in the application
component deployment, go to Step 6.
●To set an upgrade policy after an application component is deployed, go to
Step 2.
Step 2 Log in to ServiceStage and choose Application Management >Application List
to view all applications.
Step 3 Click an application name. The Overview page is displayed.
Step 4 On the Environment View tab page, select an environment to view the
application components that have been deployed in the environment.
Step 5 Click the name of an application component to access its details page. Choose
Upgrade.
Step 6 Choose Advanced Settings > Deployment
Conguration. On the Upgrade Policy
tab page, select the upgrade mode.
The default upgrade mode is Rolling upgrade.
●Rolling upgrade
Install a new instance and then remove the old one. In this pattern, services
are evenly distributed to new and old instances during the upgrade, so
services are not interrupted.
●In-place upgrade
Delete the old instance and then create a new one. Services are interrupted
during the upgrade.
Step 7 Complete the setting of the upgrade policy.
●If the upgrade policy is set during component
conguration, click Next.
●If the upgrade policy is set after the application component is deployed, click
5.8 Setting Custom Metric Monitoring for Application
Components
ServiceStage allows you to obtain monitoring data based on custom metrics.
You can set custom metric monitoring when deploying an application component
or when an application component has been deployed.
Precautions
●Currently, only Gauge metrics of Prometheus can be obtained.
●Before setting custom metric monitoring for an application component, you
must understand Prometheus and provide the GET API for obtaining custom
metric data in your application component so that ServiceStage can obtain
custom metric data using this API.
Procedure
When the component type is Common and the runtime system is Docker,
perform the following operations:
Step 1 Access the page for setting custom metric monitoring for an application
component.
●To set custom metric monitoring during component
application component deployment, go to Step 2.
●To set custom metric monitoring after an application component is deployed,
go to Step 3.
Step 2 On the
1.Specify the following parameters to set custom metric monitoring for the
application component.
Para
meter
Repor
t
Path
Repor
t Port
Congure Component page:
DescriptionMandat
URL provided by the exporter for ServiceStage to
obtain custom metric data.
Example: /metrics
Port provided by the exporter for ServiceStage to
obtain custom metric data.
● HostPath: Mount a host path to a specied container path.
● Mounting Path: Logs are exported only to the container path.
You do not need to mount the host path.
HostPath.
Enter the log storage path on the host.
NO TE
ServiceStage
User Guide5 Application O&M
ParameterDescription
Docker
Mounting
1. Set Mounting Path: Enter the application path to which the
data volume is mounted.
NOTICE
– Do not mount a data volume to a system directory such as /
or /var/run. Otherwise, an exception occurs. An empty directory is
recommended. If the directory is not empty, ensure that the
directory does not contain any
Otherwise, the les will be replaced, causing application startup
exceptions. As a result, the application fails to be created.
– If you intend to mount the volume to a high-risk directory, you are
advised to use an account with minimum permissions to start the
container. Otherwise, high-risk
les that aect application startup.
les on the host may be damaged.
2. Set Extended Host Path.
– None: No extended path is congured.
– PodUID: ID of a Pod.
– PodName: name of a Pod.
– PodUID/ContainerName: ID of a Pod or ontainer name.
– PodName/ContainerName: Pod name or container name.
3. Set Aging Period.
– Hourly: Log
les are scanned every hour. If the size of a log
le exceeds 20 MB, the system compresses the log le to a
historical
le, dumps the historical le to the directory
where the log le is stored, and clears the original log le.
– Daily: Log les are scanned once a day. If the size of a log
le exceeds 20 MB, the system compresses the log le to a
historical le, dumps the historical le to the directory
where the log
le is stored, and clears the original log le.
– Weekly: Log les are scanned once a week. If the size of a
le exceeds 20 MB, the system compresses the log le
log
to a historical le, dumps the historical le to the directory
where the log
le is stored, and clears the original log le.
Step 7 Click
Conrm.
Step 8 Complete the application log policy conguration.
●If the log policy is set during component conguration in the component
deployment, click Next.
●If the log policy is set after the component is deployed, click Re-deployment.
After the conguration and deployment are complete, you can view run logs on the AOM
console. For details, see Viewing Log Files.
ServiceStage allows you to congure application performance management
during or after application component deployment.
The Application Performance Management (APM) service helps you quickly locate
application problems and analyze performance bottlenecks, improving user
experience.
Selecting Java probe will start APM and install Java probes on the nodes deployed
with APM, which consumes a small amount of resources. Java probes use the
bytecode enhancement technology to trace Java application calls and generate
topology and call chain data.
Precautions
●JDK 7 and JDK 8 are supported.
●Tomcat 6.x, 7.x, and 8.x are supported. For details, see Usage Restrictions.
Procedure
Step 1 Go to the performance management
Step 2 Go to the Congure Component page and congure performance management.
Step 3 Log in to ServiceStage and choose Application Management >Application List
Step 4 Click an application name. The Overview page is displayed.
Step 5 On the Environment View tab, select an environment to view the application
Step 6 Click the name of an application component to access its details page.
When the component type is Common and the runtime system is Docker,
perform the following operations:
conguration page.
●To congure performance management during component conguration in
the application component deployment, go to Step 2.
●To
1.Select Java probe and select a probe version.
2.Click Next to complete the component deployment.
to view all applications.
components that have been deployed in the environment.
congure performance management after the component is deployed, go
to Step 3.
Step 7 Click O&M
Step 8 Click Re-deployment to complete the application performance management
conguration.
----End
For other types of components, perform the following operations:
conguration in the component deployment, select Java Probe and select a
probe version.
●If the performance management is congured after the component is
deployed, select Java probe and select a probe version.
congured during component
Step 7 Complete the application performance management conguration.
●If the performance management is congured during component
conguration in the component deployment, click Next.
●If the performance management is congured after the component is
deployed, click Re-deployment.
----End
5.11 Conguring Health Check
Health check periodically checks application health status during application
component running according to your needs.
ServiceStage provides the following health check methods:
●Component Liveness Probe: checks whether an application component
exists. It is similar to the ps command that checks whether a process exists. If
the liveness check of an application component fails, the cluster restarts the
application component. If the liveness check is successful, no operation is
executed.
●Component Service Probe: checks whether an application component is
ready to process user requests. It may take a long time for some applications
to start before they can provide services. This is because that they need to
load disk data or rely on startup of an external module. In this case, the
application process exists, but the application cannot provide services. This
check method is useful in this scenario. If the application component
readiness check fails, the cluster masks all requests sent to the application
component. If the application component readiness check is successful, the
application component can be accessed.
This health check mode is applicable to application components that provide
HTTP/HTTPS services. The cluster periodically sends an HTTP/HTTPS GET
request to such application components. If the return code of the HTTP/
HTTPS response is within 200–399, the check is successful. Otherwise, the
check fails. In this health check mode, you must specify an application
listening port and an HTTP/HTTPS request path.
For example, if the application component provides the HTTP service, the port
number is 80, the HTTP check path is /health-check, and the host address is
containerIP, the cluster periodically initiates the following request to the
application:
GET http://containerIP:80/health-check
If the host address is not set, the instance IP address is used by default.
●TCP port-based check
For applications that provide a TCP communication service, the cluster
periodically establishes a TCP connection to the application. If the connection
is successful, the probe is successful. Otherwise, the probe fails. In this health
check mode, you must specify an application listening port. For example, if
you have a Nginx application component with service port 80, after you
congure a TCP port-based check for the application component and specify
port 80 for the check, the cluster periodically establishes a TCP connection
with port 80 of the application component. If the connection is successful, the
check is successful. Otherwise, the check fails.
●CLI-based check
In this mode, you must specify an executable command in an application
component. The cluster will periodically execute the command in the
application component. If the command output is 0, the health check is
successful. Otherwise, the health check fails.
The CLI mode can be used to replace the following modes:
–TCP port-based check: Use a program to connect to an application
component port. If the connection is successful, the script returns 0.
Otherwise, the script returns –1.
–Http request-basked check: Use a script to run the wget command for an
application component.
wget http://127.0.0.1:80/health-check
Check the return code of the response. If the return code is within 200–
399, the script returns 0. Otherwise, the script returns –1.
● Put the program to be executed in the application component image
so that the program can be executed.
● If the command to be executed is a shell script, add a script interpreter
instead of specifying the script as the command. For example, if the
script is /data/scripts/health_check.sh, you must specify sh/data/scripts/health_check.sh for command execution. The reason is that
the cluster is not in the terminal environment when executing
programs in an application component.
Procedure
Step 1 Go to the application health check
●To congure health check during component conguration in the
application component deployment, go to Step 6.
●To
Step 2 Log in to ServiceStage and choose Application Management >Application List
to view all applications.
Step 3 Click an application name. The Overview page is displayed.
Step 4 On the Environment View tab, select an environment to view the application
components that have been deployed in the environment.
Step 5 Click the name of an application component to access its details page. Choose
Upgrade.
Step 6 Choose Advanced Settings > O&M Monitoring, click Health Check, and set
health check parameters based on service requirements.
Step 7 Complete the application health check
●If the health check is congured during component conguration in the
●If the health check is
congure health check after the component is deployed, go to Step 2.
component deployment, click Next.
congured after the component is deployed, click Re-
If an application is developed using the microservice framework, the microservice
is automatically registered with the corresponding microservice engine after the
application is managed and started. You can perform service governance on the
microservice engine console. Service governance applies only to Java Chassis and
Go Chassis development frameworks.
Currently, ServiceStage provides the Cloud Service Engine (professional edition).
You can use it directly. You can also create exclusive microservice engines. For
details, see Creating an Exclusive Microservice Engine.
6.2 Using the Microservice Dashboard
You can view metrics related to microservices through the dashboard in real time.
Based on abundant and real-time dashboard data, you can take corresponding
governance actions for microservices.
Background
●If a microservice application is deployed on ServiceStage, you need to
congure the microservice engine during application deployment. The
application automatically obtains the service registration center address,
conguration center address, and dashboard address. You do not need to
congure the monitor address. Currently, only Java Chassis and Go Chassis
support automatic discovery of a dashboard address.
●If the microservice application is locally started and registered with the
microservice engine, you need to manually congure the monitor address
before using the dashboard.
Procedure
Step 1 Log in to ServiceStage and choose Infrastructure > Cloud Service Engines.
Step 2 On the page that is displayed, select a microservice engine, and click Console.
Step 3 On the Dashboard page, select an application from the drop-down list box and
enter a microservice name in the search box. The operating metrics of the
microservice are displayed.
Click View Diagram to view the description of operating metrics.
Step 4 Select a sorting order to sort the
----End
6.3 Governing Microservices
After a microservice is deployed, you can govern it based on its running statuses.
Prerequisites
●You can create a microservice in Microservice List from Service Catalog and
start the microservice. After the microservice starts, the service instance is
registered under the corresponding service based on congurations in
the .yamlle.
●If the microservice is not created in advance or has been deleted, the
microservice is automatically created when the service instance is registered.
●After a microservice is created, you need to register the service instance
before performing the corresponding operation.
Governance Policies
ltered microservices.
You can
Degradation, Circuit Breaker, and Fault Injection policies. For details, see the
following table.
congure the Load Balancing, Rate Limiting, Fault Tolerance, Service
Description
When the access trac and trac volume are large and one
server cannot handle the load, you can congure load balancing
to distribute trac to multiple servers for balancing. In this way,
the response duration is reduced and server overload can be
prevented.
You can
rule parameters include Polling, Random, Response TimeWeight, and Session Stickiness.
congure load balancing policies by adding a rule. The
ServiceStage
User Guide6 Microservice Governance
NameDescription
Rate
Limiting
Service
Degradati
on
Fault
Tolerance
Circuit
Breaker
Rate limiting is used to solve the problem of trac distribution
across microservices. This ensures that microservices run in their
own resource pools without aecting each other.
● When the number of requests sent by the rate limiting object
to the current service instance exceeds the specied value, the
current service instance no longer accepts requests from the
rate limiting object.
● Common detection methods include request timeout and
excessive
trac.
● The parameters include Flow Control Object and QPS.
Service degradation is a special form of fault tolerance. When the
service throughput is large and resources are insucient, you can
use service degradation to disable some services that are not
important and have poor performance to avoid occupying
resources and ensure that the main services are normal.
Fault tolerance is used when an exception occurs in a service
instance after you access that instance. After the exception occurs,
you can retry to access the instance, or access another instance
based on the congured policy.
If the service is overloaded, you can use circuit breaker to protect
the system from breaking down.
Circuit breaker is triggered when a service request is handled
abnormally. After circuit breaker is triggered, Hystrix considers
that the requested service cannot process requests, so it
immediately rejects requests and returns an error message to the
caller.
Hystrix attempts to access backend services at a
specied interval.
If the services are restored, they will exit the circuit breaker state
and resume to accept requests.
Fault
Injection
Fault injection is used to test the fault tolerance capability of
microservices. This helps the user determine whether the system
can run properly when latency or fault occurs.
Fault injection allows you to test fault tolerance of microservices
with latency or faults.
Routing
Policy
Based on the public key authentication mechanism, CSE provides
the blacklist and whitelist functions to control the services that
can access microservices.
The blacklist and whitelist take eect only after public key
authentication is enabled. For details, see Conguring Public Key
Step 1 Log in to ServiceStage and choose Infrastructure > Cloud Service Engines.
Step 2 Click Console of a microservice engine and choose Service Governance.
Step 3 Click the microservice to be governed.
Step 4 Click Load Balancing.
Step 5 Click Add. Select the microservices to be governed and select a proper load
balancing policy. For details, see the following table.
PolicyDescription
RoundRobinSupports routes according to the location information about
service instances.
RandomProvides random routes for service instances.
Response
Time
Weight
Session
Stickiness
Step 6 Click OK to save the settings.
----End
Provides weight routes with the minimum active number
(latency) and supports service instances with slow service
processing in receiving a small number of requests to prevent the
system from stopping response. This load balancing policy is
suitable for applications with low and stable service requests.
Provides a mechanism on the load balancer. In the specied
session stickiness duration, this mechanism allocates the access
requests related to the same user to the same instance.
● Stickiness Duration: Session hold time. Range: 0-86400. Unit:
s.
● Failures Threshold: Number of access failures. Range: 0-10. If
the upper limit of failures or the session stickiness duration
exceeds the
this instance.
Conguring the Rate Limiting Policy
specied values, the microservice stops accessing
Step 1 Log in to ServiceStage and choose Infrastructure > Cloud Service Engines.
Step 2 Click Console of a microservice engine and choose Service Governance.
You can select the microservice
that the application relies on
from the drop-down list.
An integer ranging from 0 to
99999.
sent by the rate limiting object to
the current service instance
exceeds the specied value, the
current service instance no longer
accepts requests from the rate
limiting object.
If a microservice has three instances, the rate limiting of each instance is set to 2700 QPS,
then the total QPS is 8100, and rate limiting is triggered only when the QPS exceeds 8100.
Step 6 Click OK to save the settings.
----End
Conguring the Service Degradation Policy
Step 1 Log in to ServiceStage and choose Infrastructure > Cloud Service Engines.
Step 2 Click Console of a microservice engine and choose Service Governance.
Step 3 Click the microservice to be governed.
Step 4 Click Service Degradation.
Step 5 Click Add. Select a proper policy. The following table describes the
items of service degradation.
Congurati
on Item
Fallback
Object
Fallback
Policy
Description
Microservice to be degraded and the corresponding degradation
method.
Step 1 Log in to ServiceStage and choose Infrastructure > Cloud Service Engines.
Step 2 Click Console of a microservice engine and choose Service Governance.
Step 3 Click the microservice to be governed.
Step 4 Click Fault Tolerance.
Step 5 Click Add. Select a proper policy. The following table describes the conguration
items of fault tolerance.
Conguration
Description
Item
Fault Tolerance
Object
Microservice or method that the application relies on. You can
select it from the drop-down list.
Fault ToleranceOpen: The system processes the service request based on the
selected fault tolerance policy when the request sent to the
fault tolerance object encounters an error.
Close: The system waits until the timeout interval expires and
then returns the failure result even though the service request
fails to be implemented.
FT Policy
NOTE
Set this
parameter when
Fault Tolerance
is set to Open.
● Failover
The system attempts to reestablish connections on
dierent servers.
● Failfast
The system does not attempt to reestablish a connection.
After a request fails, a failure result is returned
immediately.
● Failback
The system attempts to reestablish connections on the
same server.
● custom
– Number of attempts to reestablish connections on the
same server
– Number of attempts to reestablish connections on new
servers
Step 6 Click OK to save the settings.
----End
Conguring the Circuit Breaker Policy
Step 1 Log in to ServiceStage and choose Infrastructure > Cloud Service Engines.
Step 2 Click Console of a microservice engine and choose Service Governance.
ProtocolProtocol for accessing the microservice when latency or fault
Delay TimePeriod of latency when accessing a microservice. This parameter
HTTP Error
Code
Occurrence
Probability
Step 6 Click OK to save the settings.
----End
Description
occurs.
● Rest
● Highway
is required when Type is set to Delayed.
HTTP error code during microservice access. This parameter is
required when Type is set to Error. This error code is an HTTP
error code.
Probability of latency or fault occurrence.
Conguring Blacklist and Whitelist
Based on the public key authentication mechanism, CSE provides the blacklist and
whitelist functions. The blacklist and whitelist can be used to control which
services can be accessed by microservices.
The blacklist and whitelist take
enabled. For details, see
Step 1 Log in to ServiceStage and choose Infrastructure > Cloud Service Engines.
Step 2 Click Console of a microservice engine and choose Service Governance.
Step 3 Click the microservice to be governed.
Step 4 Click Routing Policy.
Step 5 Click Add to add a blacklist or whitelist for the application. The following table
describes
Congura
tion Item
Type● Blacklist: microservices matching the matching rule are not
conguration items of blacklist and whitelist.
Description
allowed to access the current service.
● Whitelist: microservices matching the matching rule are
For example, if Rule is set to data*, it indicates that a service
whose name starts with data in the blacklist cannot access the
current service, or a service whose name starts with data in the
whitelist can access the current service.
Step 6 Click OK to save the settings.
----End
Conguring Public Key Authentication
Public key authentication is a simple and ecient authentication mechanism
between microservices provided by CSE. Its security is based on the reliable
interaction between microservices and the service center. That is, the
authentication mechanism must be enabled between microservices and the
service center. The procedure is as follows:
1.When a microservice starts, a key pair is generated, and the public key is
registered with the service center.
2.Before accessing the provider, the consumer uses its own private key to sign a
message.
3.The provider obtains the public key of the consumer from the service center
veries the signed message.
and
To enable public key authentication, perform the following steps:
1.Enable public key authentication for both the consumer and provider.
If dynamic conguration is set for a single microservice, the dynamic conguration
overwrites the global conguration. For details about how to set dynamic
conguration, see Dynamic Conguration.
Global Conguration
Global conguration provides common congurations for microservices, such as
log levels and running parameters. After being added, the global
used as the default conguration if no same conguration items are dened for
microservices.
Conguration items are stored in plaintext. Do not include sensitive data.
Step 1 Log in to ServiceStage and choose Infrastructure > Cloud Service Engines.
conguration is
Step 2 Click Console of a microservice engine and choose Global
the following operations.
OperationProcedure
Export
congurati
ons.
Import
congurati
ons.
Add
congurati
ons.
Modify
congurati
ons.
Click Export All to export all global conguration items.
1. Click Import.
2. Click ··· to select a conguration item le.
3. Click Upload Files to import conguration items in batches.
1. Click Create Conguration. The Create Conguration dialog
box is displayed.
2. Select a microservice environment and enter Conguration
Item and Value.
3. Click OK to save the settings.
1. Click Edit in the Operations column corresponding to the
3. In the Delete Conguration dialog box, click OK to delete the
global conguration.
1. Select the conguration items to be deleted.
2. Click Delete above the conguration item list to delete global
conguration items in batches.
NO TE
NO TICE
ServiceStage
User Guide6 Microservice Governance
----End
6.5 Maintaining Microservices
You can use service catalogs to view microservice details and search for target
microservices to maintain microservices.
The following information is displayed on the Service Catalog page:
●Application List: displays all applications of the current user. You can search
for the target application by application name, or
environment.
●Microservice List: displays all microservices of the current user. You can
search for the target microservice by microservice name, or lter microservices
by environment and application.
●Instance List: displays all instances of the current user. You can search for the
target instance by microservice name, or lter instances by environment,
application, or status.
lter applications by
Microservice diagnosis depends on the development framework used by microservice
applications. Currently, only microservices developed using the SDK can be diagnosed.
Applications developed using the Mesher framework cannot be diagnosed.
Dynamic Conguration
Step 1 Log in to ServiceStage and choose Infrastructure > Cloud Service Engines.
Step 2 Click Console of a microservice engine and choose Service Catalog.
Step 3 Click a microservice.
Step 4 Choose Dynamic Conguration. The Dynamic Conguration page is displayed.
On the Dynamic
Conguration items are stored in plaintext. Do not include sensitive data.
Operation
Export
conguration
s.
Conguration page, perform the following operations.
Procedure
Select a scope from the All drop-down list and click Export to
export the JSON congurationle of the current scope.
The scope format is as follows:
● Microservice name@application to which the microservice
belongs
● Microservice name@application to which the microservice
belongs#version number