El contenido no se encuentra disponible en el idioma seleccionado. Estamos trabajando continuamente para agregar más idiomas. Gracias por su apoyo.

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

Getting Started

Updated on 2024-08-05 GMT+08:00

Overview

This section describes the environments, applications, and components of ServiceStage.

  • An environment is a combination of compute resources (such as CCE clusters), network resources (such as load balancers and EIPs), and middleware (such as DCS instances, RDS instances, and CSE engines). When deploying applications and components, you need to select an environment. After the environment is selected, the resources contained in the environment are automatically loaded.
  • An application is a service system with functions and consists of one or more components. For example, a typical Enterprise Resource Planning (ERP) system is an application, which generally consists of modules such as accounting, finance, production control, logistics, procurement, distribution, and inventory. These modules are closely related to each other, and each module is a component.
  • A component is an implementation of a service feature of an application, for example, a module of the preceding ERP system. In microservice application scenarios, each component has an independent software package and can be deployed and run independently. The deployed component is called a component instance. A component can have multiple component instances to form a cluster to ensure high reliability of applications and components. O&M operations are supported, such as starting, stopping, deploying (upgrading), rolling back, and scaling application component instances, viewing logs, viewing events, setting access modes, and setting threshold alarms.

This document describes how to set up an environment, create an application, create and deploy a component, confirm the deployment, access the application, and perform application O&M.

Prerequisites

  1. Create a VPC. For details, see Creating a VPC.
  2. Create a CCE cluster. For details, see Creating a CCE Cluster.

    The cluster must contain at least one ECS node with 8 vCPUs and 16 GB memory or two ECS nodes with 4 vCPUs and 8 GB memory and be bound to an EIP.

  3. Create a bucket for storing software packages. For details, see Creating a Bucket.
  4. For details about how to create a microservice engine with security authentication disabled, see Creating a Microservice Engine.
  5. This example provides a microservice demo, which is compiled, built, and packaged locally. You must install the Java JDK and Maven on the local host and the local host can access the Maven central library.

    After the installation, open the Command Prompt, and run the mvn -v command to query the versions of Java JDK and Maven. If their versions are displayed, the installation is successful. In this example, Maven 3.6.3 and JDK 1.8.0 are used.

    Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
    ...
    Java version: 1.8.0_201,......

Preparing Software Packages

  1. Download the microservice demo source code package to the local host and decompress it.
  2. In the root directory of the project (for example, D:\servicecomb-samples-master\servicecomb-samples-master\ServiceComb-SpringMVC), run the cmd and mvn clean package commands to compile and package the Java project.

    D:\servicecomb-samples-master\servicecomb-samples-master\ServiceComb-SpringMVC>mvn clean package
    ......
    [INFO] --- maven-jar-plugin:2.6:jar (default-jar) @ servicecomb ---
    [INFO] Building jar: D:\servicecomb-samples-master\servicecomb-samples-master\ServiceComb-SpringMVC\target\servicecomb-0.0.1-SNAPSHOT.jar
    [INFO]
    [INFO] --- spring-boot-maven-plugin:1.5.9.RELEASE:repackage (default) @ servicecomb ---
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESS
    ......

    After compilation, the servicecomb-0.0.1-SNAPSHOT.jar software package is generated in the target subdirectory in the root directory of the project (for example, D:\servicecomb-samples-master\servicecomb-samples-master\ServiceComb-SpringMVC\target), and the message "BUILD SUCCESS" is displayed.

  3. Upload the generated servicecomb-0.0.1-SNAPSHOT.jar software package to the created OBS bucket.

    For details about how to upload the software package, see Uploading a File.

Creating an Organization

  1. Log in to ServiceStage.
  2. Choose Deployment Source Management > Organization Management.
  3. Click Create Organization. On the displayed page, set Organization Name.
  4. Click OK.

Creating an Environment

  1. Log in to ServiceStage.
  2. Choose Environment Management > Create Environment and set the environment information by referring to the following table.

    Parameter

    Description

    Environment

    Enter an environment name, for example, test-env.

    * Enterprise Project

    Enterprise project.

    Enterprise projects let you manage cloud resources and users by project.

    It is available after you create an enterprise project.

    VPC

    Select the VPC prepared in Prerequisites.

    NOTE:

    The VPC cannot be modified after the environment is created.

    Environment Type

    Select Kubernetes.

  3. Click Create Now.
  4. In the Resource Settings area, choose Cloud Container Engine from Compute and click Manage Resource.
  5. In the dialog box that is displayed, select the created CCE cluster and click OK.
  6. In the Resource Settings area, choose Cloud Service Engine from Middleware and click Manage Resource.
  7. In the dialog box that is displayed, select the created CSE engine and click OK.

Creating an Application

  1. Log in to ServiceStage.
  2. Choose Application Management > Create Application.
  3. Enter an application name, for example, test-servicestage. Select an enterprise project.
  4. Click OK.

Creating and Deploying a Component

  1. Log in to ServiceStage.
  2. Choose Application Management. The application list is displayed.
  3. Select the application (for example, test-servicestage) created in Creating an Application and click Create Component in the Operation column.
  4. In the Basic Information area, set the following mandatory parameters. Retain the default values for other parameters.

    Parameter

    Description

    Component Name

    Enter a component name, for example, test-cse.

    Environment

    Select the environment created in Creating an Environment, for example, test-env.

  5. In the Component Package area, set the following mandatory parameters. Retain the default values for other parameters.

    Parameter

    Description

    Stack

    Select Java.

    Upload Method

    Click Software Package and select servicecomb-0.0.1-SNAPSHOT.jar uploaded in Preparing Software Packages.

  6. In the Build area, set the following mandatory parameters. Retain the default values for other parameters.

    Parameter

    Description

    Organization

    An organization is used to manage images generated during component build.

    Select the organization created in Creating an Organization.

    Environment

    Select Use current environment to use the CCE cluster in the deployment environment to which the component belongs to build an image.

    In the current environment, masters and nodes in the CCE cluster must have the same CPU architecture. Otherwise, the component build fails.

  7. Click Next.
  8. In the Resources area, retain the default settings.
  9. In the Access Mode area, retain the default settings.
  10. In the Local Time area, retain the default settings.
  11. In the Advanced Settings area, choose Advanced Settings > Microservice Engine.

    1. Click Bind Microservice Engine.
    2. Select the managed microservice engine in the current environment.
    3. Click OK.

  12. Click Create and Deploy to deploy the component.

Confirming the Deployment Result

  1. Log in to ServiceStage.
  2. Choose Cloud Service Engine > Microservice Catalog.
  3. Select the microservice engine where the component is deployed from the microservice engine drop-down list.
  4. Select springmvc from the All applications drop-down list.

    If the microservice servicecombspringmvc is displayed and the number of microservice instances is 2, the deployment is successful.

Accessing an Application

  1. Log in to ServiceStage.
  2. Choose Application Management. The application list is displayed.
  3. Click the application created in Creating an Application (for example, test-servicestage). The Overview page is displayed.
  4. On the Component List tab, click the component created in Creating and Deploying a Component (for example, test-cse). The Overview page is displayed.
  5. Click Access Mode.
  6. Click Add Service in the TCP/UDP Route Configuration area and set parameters by referring to the following table.

    Parameter

    Description

    Service Name

    Retain the default value.

    Access Mode

    Select Public network access.

    Access Type

    Select Elastic IP address.

    Service Affinity

    Retain the default value.

    Port Mapping

    1. Protocol: Select TCP.
    2. Container Port: Enter 8080.
    3. Access Port: Select Automatically generated.

  7. Click OK.
  8. Click the access address in the Access Address column to access the application.

    The following information is displayed:
    {"message":"Not Found"}

  9. Enter http://Access address generated in 7/rest/helloworld?name=ServiceStage in the address box of the browser to access the application again.

    The following information is displayed:

    "ServiceStage"

Application O&M

  1. Log in to ServiceStage.
  2. Click Application Management.
  3. Click the application created in Creating an Application (for example, test-servicestage). The Overview page is displayed.
  4. On the Component List tab, click the component created in Creating and Deploying a Component (for example, test-cse). The Overview page is displayed, where you can perform O&M operations.

Utilizamos cookies para mejorar nuestro sitio y tu experiencia. Al continuar navegando en nuestro sitio, tú aceptas nuestra política de cookies. Descubre más

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback