Help Center > > Getting Started> Quick Experience

Quick Experience

Updated at: Oct 15, 2021 GMT+08:00

Overview

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, Python, 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.

The new application model of ServiceStage provides environment management. Basic resources (such as CCE clusters and ECSs) in the same Virtual Private Cloud (VPC) and optional resources (such as ELB, RDS, and DCS) are combined into an environment. When the environment is selected during application deployment, its resources are automatically loaded.

An application is a service system with functions and consists of one or more components. A component implements a service feature of an application. It is in the form of code or software packages and can be deployed independently.

You can perform O&M operations, such as starting, stopping, upgrading, rolling back, and scaling application components, viewing logs, viewing events, setting access modes, and setting threshold alarms.

This example describes how to quickly create a microservice application based on the ServiceComb (SpringMVC) framework to experience the functions of the new ServiceStage application model.

Prerequisites

  • You have registered a HUAWEI CLOUD account and logged in to it.
  • You have obtained the AK/SK. For details, see Obtaining the AK/SK.
    • If the professional microservice engine is used, you need to configure the AK/SK.
    • If the exclusive microservice engine is used, you do not need to configure the AK/SK.
  • You have created a VPC. For details, see Creating a VPC.
  • You have created a Cloud Container Engine (CCE) cluster that contains at least one Elastic Cloud Server (ECS) node. (To facilitate subsequent operations, it is recommended that the node has 4 vCPUs and 8 GB memory.) You have also bound an elastic IP address (EIP) to the cluster. For details about binding an EIP to the cluster, see Buying a Hybrid Cluster.
  • In this example, the GitHub source code repository is bound to ServiceStage to implement source code building, archiving, and application creation. Ensure that you have registered an account on GitHub.
  • You have created a repository authorization on ServiceStage to authorize access to the GitHub repository. For details, see Authorizing a Repository.

Creating an Organization

  1. Log in to ServiceStage and choose Software Center > Organization.
  2. Click Create Organization. On the displayed page, specify Organization Name.
  3. Click OK.

Creating an Environment

  1. Log in to ServiceStage, choose Environment Management, and click Create Environment.
  2. Configure the environment information.

    1. Environment: Enter test-env.
    2. VPC: Select a VPC from the drop-down list.
    3. Basic Resources: Click Add Basic Resource and select basic resources in the VPC. In this example, select CCE.
    4. Optional Resources: Click Add Optional Resource and select optional resources in the VPC. In this example, select professional Cloud Service Engine (CSE).

    After a VPC is selected, basic resources and optional resources in the VPC are loaded. Resources that are not in the VPC cannot be selected.

  3. Click Create Now.

Creating an Application

  1. Log in to ServiceStage, choose Application Management > Application List, and click Create Application.
  2. Configure basic application information.

    1. Name: Enter servicecomb.
    2. Enterprise Project: Select default. (This parameter is displayed only when the enterprise center is enabled.)

  3. Click OK.

Creating a Component

  1. Log in to ServiceStage and choose Application Management > Application List.
  2. Select the created servicecomb application and click Create Component in the Operation column.
  3. Select Custom for Configuration Method, select Microservice as the component type, and click Next.
  4. Select Java8 for Runtime System and click Next.
  5. Select Java Chassis for Framework/Service Mesh and click Next.
  6. Configure basic component information.

    1. Enter java-test in Name.
    2. Select Template for Source Code/Software Package.

      Select ServiceComb (SpringMVC).

    3. Select GitHub for Code Archive. Set Authorization, Username/Organization, and Repository.

  7. Set Build parameters.

    1. Organization: Select the organization created in Creating an Organization.
    2. Select the CCE cluster used in Creating an Environment.

  8. Click Create Now to create a static component.

Deploying a Component

  1. Log in to ServiceStage and choose Application Management > Application List.
  2. Click servicecomb. The Overview page is displayed.
  3. On the Component List page, select the created component java-test and click Deploy in the Operation column.
  4. Configure basic information.

    1. Environment: Select the environment test-env created in Creating an Environment.
    2. Version: Set it to the default value 1.0.0.
    3. Deployment System: Select Cloud Container Engine.
    4. Basic Resources: Use CCE resources (automatically loaded) in the test-env environment.
    5. Instances: Set it to 1.
    6. Resource Quota: Use the default value.

  5. Click Next to configure the component.

    1. Image: The configured static component information is loaded by default.
    2. Cloud Service Engine: The professional CSE in the test-env environment is used by default.
      • After an application component is deployed, the microservice is registered with the selected microservice engine.
      • All application components must be registered with the same microservice engine.
    3. Set environment variables.

      Choose Advanced Settings > Component Configuration. In Environment Variable, click Add Environment Variable to add the following environment variables:

      Type

      Name

      Variable

      Add manually

      servicecomb_credentials_accessKey

      AK obtained in Prerequisites

      servicecomb_credentials_secretKey

      SK obtained in Prerequisites

    4. Use the default values for all other parameters.

  6. Click Next, confirm the specifications, and click Deploy.

    Wait until the component deployment is complete.

Confirming the Deployment Result

  1. Log in to ServiceStage and choose Infrastructure > Cloud Service Engines.
  2. Select the Cloud Service Engine and click Console.
  3. Choose Service Catalog > Microservice List and select springmvc from the All applications drop-down list.

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

Accessing an Application

  1. Log in to ServiceStage and choose Application Management > Application List.
  2. Click servicecomb. The Overview page is displayed.
  3. On the Environment View tab, select test-env for Environment to view the deployed application components.
  4. Click the application component name java-test. The component 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 setting.

    Access Mode

    Select Public network access.

    Access Type

    Select Elastic IP address.

    Service Affinity

    Retain the default setting.

    Port Mapping

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

  7. Click OK.

    Figure 1 Access address

  8. Click the access address in the Access Address column to access the application, as shown in Figure 1.

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

  9. Enter http://Access address/rest/helloworld?name=ServiceStage in the address bar of the browser to access the application again. The following result is returned:

    "ServiceStage"

Application O&M

  1. Log in to ServiceStage and choose Application Management > Application List.
  2. Click servicecomb. The Overview page is displayed.
  3. On the Component List page, click the name of the created java-test component to go to the Overview page.
  4. You can view the java-test component version on the corresponding Environment card.
  5. Click java-test. The component instance Overview page is displayed.

    You can perform O&M operations, such as starting, stopping, upgrading, rolling back, and scaling application components, viewing logs, viewing events, setting access modes, and setting threshold alarms.

Did you find this page helpful?

Submit successfully!

Thank you for your feedback. Your feedback helps make our documentation better.

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel