ServiceStage
User Guide
Issue |
01 |
Date |
2021-04-06 |
HUAWEI TECHNOLOGIES CO., LTD.
Copyright © Huawei Technologies Co., Ltd. 2021. All rights reserved.
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 c fi 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 ff 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.
Issue 01 (2021-04-06) |
Copyright © Huawei Technologies Co., Ltd. |
i |
ServiceStage |
|
User Guide |
Contents |
Contents
1 Overview |
.................................................................................................................................... |
|
|
1 |
||
2 Permissions .....................................................................................................Management |
4 |
|||||
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 Application ......................................................................................................Management |
8 |
|||||
3.1 |
Creating an ........................................................................................................................................................Application |
8 |
||||
3.2 |
Creating Application .....................................................................................................................................Components |
9 |
||||
3.2.1 Application ...................................................................................................................................................Components |
9 |
|||||
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 |
Deploying ...............................................................................................................................Application Components |
25 |
||||
3.3.1 Deployment ............................................................................................................................................................Mode |
26 |
|||||
3.3.2 Deploying .................................................................................................................................................a Component |
26 |
|||||
3.4 |
Managing ...............................................................................................................................Application Components |
31 |
||||
3.5 |
Performing ....................................................................................................Advanced Settings for an Application |
34 |
||||
3.5.1 Setting Application ..............................................................................................................Environment Variables |
34 |
|||||
3.5.2 C |
nfi ............................................................................................................. |
n |
the Lifecycle of an Application |
36 |
||
3.5.3 C |
nfi ............................................................................................................................................... |
n |
Data Storage |
37 |
||
3.5.4 C |
nfi ................................................................................................................................. |
n |
Distributed Sessions |
46 |
||
3.5.5 C |
nfi ............................................................................................................................... |
n |
Relational Databases |
47 |
||
3.6 |
Building an ..............................................................................................................................Application Component |
48 |
||||
3.7 |
Pipelining an ...........................................................................................................................Application Component |
48 |
||||
3.8 |
Application ..................................................................................................................................................C |
nfi |
n |
50 |
||
3.8.1 Creating ...............................................................................................................................................................a Secret |
|
50 |
||||
3.8.2 Creating ......................................................................................................................................................a C |
nfi |
M |
53 |
|||
4 Environment .................................................................................................Management |
56 |
|||||
5 Application ...................................................................................................................O&M |
58 |
|||||
5.1 |
Maintaining .........................................................................................................Application Component Instances |
58 |
||||
5.2 |
Adding Labels ..............................................................................................for Application Component Instances |
61 |
||||
Issue 01 (2021-04-06) |
Copyright © Huawei Technologies Co., Ltd. |
ii |
ServiceStage |
|
|
|
|||
User Guide |
|
|
Contents |
|||
5.3 |
C nfi |
n |
Domain Name Mappings.......................................................................................................................... |
62 |
||
5.4 |
Setting Alarm Thresholds for Resource Monitoring.................................................................................................. |
62 |
||||
5.5 |
Setting Scaling Policies for Application Component Instances............................................................................. |
65 |
||||
5.6 |
Setting Scheduling Policies for Application Component Instances...................................................................... |
69 |
||||
5.7 |
Setting Upgrade Policies for Application Component Instances.......................................................................... |
74 |
||||
5.8 |
Setting Custom Metric Monitoring for Application Components........................................................................ |
76 |
||||
5.9 |
C |
nfi |
n |
Application Log Policies............................................................................................................................. |
79 |
|
5.10 C |
|
nfi |
n |
Application Performance Management............................................................................................. |
81 |
|
5.11 C |
|
nfi |
n |
Health Check............................................................................................................................................... |
82 |
|
6 Microservice Governance..................................................................................................... |
85 |
|||||
6.1 |
Overview.................................................................................................................................................................................. |
|
85 |
|||
6.2 |
Using the Microservice Dashboard................................................................................................................................. |
85 |
||||
6.3 |
Governing Microservices..................................................................................................................................................... |
86 |
||||
6.4 |
C |
nfi |
n |
Microservices.................................................................................................................................................. |
93 |
|
6.5 |
Maintaining Microservices................................................................................................................................................. |
95 |
||||
7 Continuous Delivery........................................................................................................... |
100 |
|||||
7.1 |
Overview................................................................................................................................................................................ |
|
100 |
|||
7.2 |
Creating a Source Code Build Task............................................................................................................................... |
101 |
||||
7.3 |
Creating a Package Build Task....................................................................................................................................... |
105 |
||||
7.4 |
Managing Pipelines........................................................................................................................................................... |
107 |
||||
7.5 |
Authorizing a Repository................................................................................................................................................. |
111 |
||||
8 Software Center................................................................................................................... |
112 |
|||||
8.1 |
Software Repository.......................................................................................................................................................... |
112 |
||||
8.1.1 Managing Software Packages.................................................................................................................................... |
112 |
|||||
8.1.2 Packaging |
c fic n of Software Packages................................................................................................... |
116 |
||||
8.2 |
Image Repository................................................................................................................................................................ |
117 |
||||
8.2.1 Uploading an Image...................................................................................................................................................... |
117 |
|||||
8.2.2 Managing Images........................................................................................................................................................... |
119 |
|||||
8.3 |
Organization Management............................................................................................................................................. |
122 |
||||
9 Infrastructure Management............................................................................................. |
125 |
|||||
9.1 |
Cloud Service Engines....................................................................................................................................................... |
125 |
||||
9.1.1 Creating an Exclusive Microservice Engine............................................................................................................ |
125 |
|||||
9.1.2 C |
nfi |
n |
Backup and Restoration of an Exclusive Microservice Engine................................................ |
127 |
||
9.1.3 C |
nfi |
n |
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 |
|||||
9.2 |
VMAgent Manager............................................................................................................................................................ |
132 |
Issue 01 (2021-04-06) |
Copyright © Huawei Technologies Co., Ltd. |
iii |
ServiceStage |
|
User Guide |
1 Overview |
1Overview
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 |
Description |
|
|
|
|
||
Overview |
Provides ServiceStage overview, including the ServiceStage |
||
|
package selection and purchase entry, tutorials, applications, |
||
|
environments, and components. |
||
|
|
|
|
Application |
● |
Application List |
|
Management |
|
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 C nfi |
n |
|
|
Supports c nfi |
n item and secret management. |
|
|
|
|
Issue 01 (2021-04-06) |
Copyright © Huawei Technologies Co., Ltd. |
1 |
ServiceStage |
|
|
|
User Guide |
|
1 Overview |
|
|
|
|
|
|
Module |
Description |
|
|
|
|
|
|
Environment |
Environment is a collection of infrastructures, covering |
|
|
Management |
computing, storage, and networks, used for application |
|
|
|
deployment and running. |
|
|
|
Provides environment creation, editing, and deletion, and |
|
|
|
displays resource information in an existing environment. |
|
|
|
|
|
|
Continuous |
Supports project build and release. |
|
|
Delivery |
● |
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 n fi 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 |
Provides functions such as organization management, software |
|
|
Center |
repository, and image repository. |
|
|
|
● Organization management is used to isolate images and |
|
|
|
|
assign access permissions (read, write, and manage) to |
|
|
|
ff n users. |
|
|
● Image repositories are used to store and manage Docker |
|
|
|
|
images. |
|
|
● Software repositories are used to store, manage, and deploy |
|
|
|
|
software packages. |
|
|
|
|
|
Infrastructure |
Provides 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 List |
After 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 c nfi |
|
|
|
in the tracker list. |
|
|
|
|
|
|
Help Center |
Provides an overview of ServiceStage documentation. |
|
|
|
|
|
Issue 01 (2021-04-06) |
Copyright © Huawei Technologies Co., Ltd. |
2 |
ServiceStage |
|
User Guide |
1 Overview |
NOTE
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
Edition |
Package Description |
|
|
Basic |
20 instances are free to use. |
|
|
Professional |
One exclusive CSE engine and AOM enterprise |
|
edition are free to use. |
|
|
NOTE
For product pricing of each edition, see Product Pricing Details.
Issue 01 (2021-04-06) |
Copyright © Huawei Technologies Co., Ltd. |
3 |
ServiceStage |
|
User Guide |
2 Permissions Management |
2Permissions Management
Creating a User and Granting Permissions
Creating a Custom Policy
Assigning Permissions on Services that ServiceStage Depends On
This section describes how to use IAM to implement fin |
n 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 ffic n O&M 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.
Issue 01 (2021-04-06) |
Copyright © Huawei Technologies Co., Ltd. |
4 |
ServiceStage |
|
User Guide |
2 Permissions Management |
Process Flow
Figure 2-1 Process for granting ServiceStage permissions
1.Create a user group and grant permissions to it.
Create a user group on the IAM console, and assign the ServiceStage ReadOnlyAccess policy to the group.
2.Create a user.
Create a user on the IAM console and add the user to the group created in 1.
3.Log in and verify permissions.
Log in to the ServiceStage console as the created user, and verify that it only has read permissions for ServiceStage.
– Select ServiceStage from Service List. Choose Application Management
> Application List from the navigation tree. On the page that is
displayed, click Create Application. If a message appears indicating
nffic n permissions to access the service, the ServiceStage
ReadOnlyAccess policy has already taken ff c
–Choose any other service in the Service List. If a message appears
indicating n ffic n permissions to access the service, the ServiceStage ReadOnlyAccess policy has already taken ff c
Custom policies can be created as a supplement to the system policies of
ServiceStage.
You can create custom policies in either of the following ways:
●Visual editor: Select cloud services, actions, resources, and request conditions. This does not require knowledge of policy syntax.
Issue 01 (2021-04-06) |
Copyright © Huawei Technologies Co., Ltd. |
5 |
ServiceStage |
|
User Guide |
2 Permissions Management |
|
● JSON: Edit JSON policies from scratch or based on an existing policy. |
|
For details, see Creating a Custom Policy. The following section contains |
|
examples of common ServiceStage custom policies. |
Example Custom Policy
This procedure creates a policy that an IAM user is prohibited to create and modify a microservice engine.
{
"Version": "1.1", "Statement": [
{
"Action": [ "cse:*:*"
],
ff c "Allow"
},
{
"Action": [ "cse:engine:create", "cse:engine:delete"
],
ff c "Deny"
}
]
}
A deny policy must be used in conjunction with other policies to take ff c 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 |
c fi 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 ff c
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.
Issue 01 (2021-04-06) |
Copyright © Huawei Technologies Co., Ltd. |
6 |
ServiceStage |
|
User Guide |
2 Permissions Management |
|
For details about how to set CCE namespace permissions, see Permissions |
|
Management. |
Granting CTS Permissions
Currently, Cloud Trace Service (CTS) does not support fin n authorization. After the permissions are set for ServiceStage using IAM, they do not take ff c 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 Management.
Issue 01 (2021-04-06) |
Copyright © Huawei Technologies Co., Ltd. |
7 |
ServiceStage |
|
User Guide |
3 Application Management |
3Application Management
Creating an Application
Creating Application Components
Deploying Application Components
Managing Application Components
Performing Advanced Settings for an Application
Building an Application Component
Pipelining an Application Component
Application C nfi |
n |
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 ff n environments.
Creating an Application
Step 1 Log in to ServiceStage and choose Application Management > Application List.
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.
Issue 01 (2021-04-06) |
Copyright © Huawei Technologies Co., Ltd. |
8 |
ServiceStage |
|
User Guide |
3 Application Management |
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 c fi through environment variables instead of in the code, which makes the deployment fl x b
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 fi as the admin user. The actual execution ff c depends on the code.
----End
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.
Issue 01 (2021-04-06) |
Copyright © Huawei Technologies Co., Ltd. |
9 |
ServiceStage |
|
|
|
User Guide |
|
|
3 Application Management |
In the process of adding a component, you can c |
nfi |
the component using a |
|
template (Template) or customize the c |
nfi |
n (Custom). |
|
● Template provides default c nfi |
n of the component type, runtime |
system, and framework to help you quickly create components.
●Custom allows you to select the desired component type, runtime system, and proper framework/service mesh.
Existing Templates
Table 3-1 Existing templates
Type |
Runtime System |
Framework |
|
|
|
ServiceComb |
Java8 |
Java Chassis |
MicroService |
|
|
|
|
|
SpringCloud MicroService |
Java8 |
SpringCloud |
|
|
|
Web(Tomcat) WebApp |
Tomcat8 |
Web |
|
|
|
Microservice Components
Supported Runtime |
Supported Framework/ |
Supported Source |
System |
Service Mesh |
Code/Software Package |
|
|
|
Java8 |
Java Chassis |
Source code repository, |
|
|
template, and JAR |
|
|
package |
|
|
|
Tomcat8 |
|
Source code repository, |
|
|
template, and WAR |
|
|
package |
|
|
|
Docker |
|
This parameter does not |
|
|
need to be set. |
|
|
|
Java8 |
Mesher |
Source code repository |
|
|
and JAR package |
|
|
|
Tomcat8 |
|
Source code repository |
|
|
and WAR package |
|
|
|
Node.js8 |
|
Source code repository |
|
|
and ZIP package |
|
|
|
Php7 |
|
Source code repository |
|
|
and ZIP package |
|
|
|
Docker |
|
This parameter does not |
|
|
need to be set. |
|
|
|
Python3 |
|
Source code repository |
|
|
and ZIP package |
|
|
|
Issue 01 (2021-04-06) |
Copyright © Huawei Technologies Co., Ltd. |
10 |
ServiceStage |
|
|
|
User Guide |
|
3 Application Management |
|
|
|
|
|
|
Supported Runtime |
Supported Framework/ |
Supported Source |
|
System |
Service Mesh |
Code/Software Package |
|
Docker |
Go Chassis |
This parameter does not |
|
|
|
need to be set. |
|
|
|
|
|
Java8 |
Spring Cloud |
Source code repository |
|
|
|
and JAR package |
|
|
|
|
|
Tomcat8 |
|
Source code repository |
|
|
|
and WAR package |
|
|
|
|
|
Docker |
|
This parameter does not |
|
|
|
need to be set. |
|
|
|
|
|
Java8 |
Dubbo |
Source code repository, |
|
|
|
template, and JAR |
|
|
|
package |
|
|
|
|
|
Tomcat8 |
|
Source code repository, |
|
|
|
template, and WAR |
|
|
|
package |
|
|
|
|
|
Docker |
|
This parameter does not |
|
|
|
need to be set. |
|
|
|
|
Web Application Components
Supported |
Supported Source Code/Software Package |
Runtime |
|
System |
|
Java8 |
Source code repository, template, and JAR package |
|
|
Nodejs8 |
Source code repository, template, and ZIP package |
|
|
Php7 |
Source code repository, template, and ZIP package |
|
|
Tomcat8 |
Source code repository, template, and WAR package |
|
|
Docker |
This parameter does not need to be set. |
|
|
Python3 |
Source code repository and ZIP package |
|
|
Common Components
Supported Runtime System |
Supported Source Code/Software |
|
Package |
|
|
Java8 |
Source code repository, template, and |
|
JAR package |
|
|
Issue 01 (2021-04-06) |
Copyright © Huawei Technologies Co., Ltd. |
11 |
ServiceStage |
|
|
User Guide |
3 Application Management |
|
|
|
|
|
Supported Runtime System |
Supported Source Code/Software |
|
|
Package |
|
Tomcat8 |
Source code repository, template, and |
|
|
WAR package |
|
|
|
|
Node.js8 |
Source code repository, template, and |
|
|
ZIP package |
|
|
|
|
Php7 |
Source code repository, template, and |
|
|
ZIP package |
|
|
|
|
Docker |
This parameter does not need to be |
|
|
set. |
|
|
|
|
Python3 |
Source code repository and ZIP |
|
|
package |
|
|
|
Component Source
Component Source |
Description |
|
|
Source code repository |
Create authorization by referring to |
|
Authorizing a Repository and set the |
|
code source. |
|
|
JAR package |
Supports 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. |
|
|
Issue 01 (2021-04-06) |
Copyright © Huawei Technologies Co., Ltd. |
12 |
ServiceStage |
|
|
|
User Guide |
|
3 Application Management |
|
|
|
|
|
|
Component Source |
Description |
|
|
|
|
|
|
WAR package |
Supports 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. |
|
|
|
|
|
|
ZIP package |
Supports 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 package |
If 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. |
|
|
|
|
|
|
Template |
Create 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 |
|
|
|
c nfi |
code repository. For details, |
|
|
see Template Framework. |
|
|
|
|
|
Issue 01 (2021-04-06) |
Copyright © Huawei Technologies Co., Ltd. |
13 |
ServiceStage |
|
User Guide |
3 Application Management |
Template Framework
Runtime |
Framework Provided by the |
Framework Description |
System |
Template |
|
|
|
|
Java8 |
CSE-Java (SpringMVC) |
Based on the ServiceComb |
|
|
microservice development |
|
|
framework, supports |
|
|
SpringMVC annotations and |
|
|
uses the SpringMVC style to |
|
|
develop microservices. |
|
|
|
|
CSE-Java (JAX-RS) |
Based on the ServiceComb |
|
|
microservice development |
|
|
framework, supports JAX-RS |
|
|
annotations and uses the JAX- |
|
|
RS mode to develop |
|
|
microservices. |
|
|
|
|
CSE-Java (POJO) |
Based on the ServiceComb |
|
|
microservice development |
|
|
framework, supports APIs and |
|
|
API implementation, and uses |
|
|
transparent RPC to develop |
|
|
microservices. |
|
|
|
Tomcat8 |
SpringBoot-Webapp-Tomcat |
Web applications, running on |
|
|
an independent web server. |
|
|
|
|
SpringBoot-WebService- |
Web services, running on an |
|
Tomcat |
independent web server. |
|
|
|
Nodejs8 |
Express |
A Node.js web framework that |
|
|
supports high compatibility, |
|
|
and fast and simple |
|
|
deployment. |
|
|
|
|
Koa |
Next-generation web |
|
|
development framework |
|
|
based on the Node.js platform. |
|
|
|
Php7 |
Laravel |
A PHP development |
|
|
framework for web |
|
|
developers. |
|
|
|
|
Slim |
A lightweight micro-PHP |
|
|
framework. |
|
|
|
ServiceStage provides three default templates. For details, see Existing Templates.
A template provides default c nfi n of the component type, language/ runtime system, and framework/service mesh to help you quickly create a component.
Issue 01 (2021-04-06) |
Copyright © Huawei Technologies Co., Ltd. |
14 |
ServiceStage |
|
User Guide |
3 Application Management |
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 fi |
For details, see Authorizing |
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.
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 Template for |
n |
n Method, select a template, and click Next. |
||
Step 4 |
C nfi |
component information according to the following table. Parameters |
|||
|
marked with an asterisk (*) are mandatory. |
||||
|
Table 3-2 Basic component information |
||||
|
|
|
|
|
|
|
Parameter |
|
Description |
|
|
|
|
|
|
|
|
|
*Name |
|
|
Component name. |
|
|
|
|
|
|
|
Issue 01 (2021-04-06) |
Copyright © Huawei Technologies Co., Ltd. |
15 |
ServiceStage |
|
|
|
|
User Guide |
|
|
3 Application Management |
|
|
|
|
|
|
|
Parameter |
Description |
|
|
|
|
|
||
|
*Source Code/ |
● Select Source code repository. |
||
|
Software |
– |
Create authorization by referring to Authorizing a |
|
|
Package |
|||
|
|
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 fix |
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 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 fix |
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. |
|
|
|
|
|
|
Step 5 Complete component creation.
●Click Create Now to create a static component.
Issue 01 (2021-04-06) |
Copyright © Huawei Technologies Co., Ltd. |
16 |
ServiceStage |
|
User Guide |
3 Application Management |
●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
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 fi |
For details, see Authorizing |
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.
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 n n Method and Microservice for Select Component Type, and click Next.
Step 4 Select Runtime System and click Next.
ff n frameworks support ff n 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 c nfi |
n as a template for |
|
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.
Issue 01 (2021-04-06) |
Copyright © Huawei Technologies Co., Ltd. |
17 |
ServiceStage |
|
User Guide |
3 Application Management |
Step 7 Check whether Docker is selected in Step 4.
●If yes, click Next and go to Step 8.
●If no, click Next and go to Step 9.
Step 8 Create a Docker component.
1.Enter a component name.
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 9 C nfi |
component information according to the following table. Parameters |
||
|
marked with an asterisk (*) are mandatory. |
||
|
Table 3-3 Basic component information |
||
|
|
|
|
|
Parameter |
Description |
|
|
|
|
|
|
*Name |
|
Component name. |
|
|
|
|
Issue 01 (2021-04-06) |
Copyright © Huawei Technologies Co., Ltd. |
18 |
ServiceStage |
|
|
|
User Guide |
|
3 Application Management |
|
|
|
|
|
|
Parameter |
Description |
|
|
|
|
|
|
*Source Code/ |
● Select Source code repository. |
|
|
Software |
1. Create authorization by referring to Authorizing a |
|
|
Package |
||
|
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 fix |
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 Runtime |
|
|
|
System. |
|
|
|
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 fix |
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. |
|
|
|
|
|
Issue 01 (2021-04-06) |
Copyright © Huawei Technologies Co., Ltd. |
19 |
ServiceStage |
|
User Guide |
3 Application Management |
Step 10 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
Component List on the Overview tab.
----End
This section describes how to create a static web application component using ServiceStage. For details, 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 fi |
For details, see Authorizing |
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.
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 n |
n Method, select Web for Component Type, and |
click Next. |
|
Step 4 Select Runtime System and click Next.
ff n frameworks support ff n runtime systems. For details, see
Microservice Components. |
|
Step 5 Select whether you want to save the preceding c nfi |
n 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.
●If yes, click Next and go to Step 7.
●If no, click Next and go to Step 8.
Issue 01 (2021-04-06) |
Copyright © Huawei Technologies Co., Ltd. |
20 |
ServiceStage |
|
User Guide |
3 Application Management |
Step 7 Create a Docker component.
1.Enter a component name.
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 C nfi |
component information according to the following table. Parameters |
||
|
marked with an asterisk (*) are mandatory. |
||
|
Table 3-4 Basic component information |
||
|
|
|
|
|
Parameter |
Description |
|
|
|
|
|
|
*Name |
|
Component name. |
|
|
|
|
Issue 01 (2021-04-06) |
Copyright © Huawei Technologies Co., Ltd. |
21 |
ServiceStage |
|
|
|
User Guide |
|
3 Application Management |
|
|
|
|
|
|
Parameter |
Description |
|
|
|
|
|
|
*Source Code/ |
● Select Source code repository. |
|
|
Software |
1. Create authorization by referring to Authorizing a |
|
|
Package |
||
|
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 fix |
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 Runtime |
|
|
|
System. |
|
|
|
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 fix |
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. |
|
|
|
|
|
Issue 01 (2021-04-06) |
Copyright © Huawei Technologies Co., Ltd. |
22 |
ServiceStage |
|
User Guide |
3 Application Management |
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
Component List on the Overview tab.
----End
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
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 fi |
For details, see Authorizing |
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.
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 n |
n Method, select Common for Component Type, |
and click Next. |
|
Step 4 Select Runtime System and click Next.
ff n frameworks support ff n runtime systems. For details, see
Microservice Components. |
|
Step 5 Select whether you want to save the preceding c nfi |
n 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.
●If yes, click Next and go to Step 7.
Issue 01 (2021-04-06) |
Copyright © Huawei Technologies Co., Ltd. |
23 |
ServiceStage |
|
User Guide |
3 Application Management |
● If no, click Next and go to Step 8. Step 7 Create a Docker component.
1.Enter a component name.
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 C nfi |
component information according to the following table. Parameters |
||
|
marked with an asterisk (*) are mandatory. |
||
|
|
|
|
|
Parameter |
Description |
|
|
|
|
|
|
*Name |
|
Component name. |
|
|
|
|
|
*Source Code/ |
● Source code repository: Create authorization by referring |
|
|
Software |
|
to Authorizing a Repository and set the code source. |
|
Package |
|
● JAR package/WAR package/ZIP package: Set 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. |
|
|
|
NOTE |
|
|
|
Select JAR package if Java8 is selected as the Runtime System. |
|
|
|
Select WAR package if Tomcat8 is selected as the Runtime |
|
|
|
System. |
|
|
|
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. |
|
|
|
|
Issue 01 (2021-04-06) |
Copyright © Huawei Technologies Co., Ltd. |
24 |
ServiceStage |
|
|
|
User Guide |
|
3 Application Management |
|
|
|
|
|
|
Parameter |
Description |
|
|
|
|
|
|
*Python |
This parameter is mandatory if you select Python3 in Step 4. |
|
|
framework |
Set Module Name and Variable Name for all Python |
|
|
|
||
|
|
frameworks except Python3-Django. |
|
|
|
● If the entry point fi of the Python project is server.py, |
|
|
|
Module Name is server. |
|
|
|
● If the application function of the server.py entry point fi |
|
|
|
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 |
|
|
|
to a fix |
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. |
|
|
|
● (Optional) If JAR package, WAR package, or ZIP |
|
|
|
package 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 |
|
|
|
to a fix |
node based on the node label. For details about |
|
|
how to add a node label, see Node Management. |
|
|
|
|
|
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
Component List on the Overview tab.
----End
Issue 01 (2021-04-06) |
Copyright © Huawei Technologies Co., Ltd. |
25 |
ServiceStage |
|
User Guide |
3 Application Management |
Deploying a Component Using CCE
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.
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.
Prerequisites
1.An application component has been created or is being created, and has been
c nfi |
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.
4. C nfi |
the AK/SK. For details, see Checking and C nfi |
n the AKSK |
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.
Issue 01 (2021-04-06) |
Copyright © Huawei Technologies Co., Ltd. |
26 |