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

Quickly Creating a Component

ServiceStage provides three default templates. For details, see Existing Templates.

A template provides default configurations of the component type, language/runtime system, and framework/service mesh to help you quickly create a component.

Prerequisites

  1. An application has been created because components can only be added to applications. For details, see Creating an Application.
  2. If you create a microservice component based on a source code repository or template, create repository authorization first. For details, see Authorizing a Repository.
  3. If you create a microservice component based on a software package, upload the software package to the OBS bucket.

    Upload the software package to the OBS bucket. For details, see Uploading a File.

Procedure

  1. Log in to ServiceStage and choose Application Management > Application List.
  2. Select the created application and click Create Component in the Operation column.
  3. Select Template for Configuration Method, select a template, and click Next.
  4. Configure component information according to the following table. Parameters marked with an asterisk (*) are mandatory.

    Table 1 Basic component information

    Parameter

    Description

    *Name

    Component name.

    *Software Package

    • 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 and Organization, and select a cluster based on service requirements.

        You can also specify Node Label to deliver the build job to a fixed node based on the node label. For details about how to add a node label, see Adding a Node Label.
        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 for Select Runtime System.
      • Select WAR package if Tomcat8 is selected for Select Runtime System.
      1. Select Upload Method.

        Upload the software package to the OBS bucket. For details, see Uploading a File.

      2. (Optional) Set Build parameters to build the application component.

        Set Organization and select a cluster based on service requirements.

        You can also specify Node Label to deliver the build job to a fixed node based on the node label. For details about how to add a node label, see Adding a Node Label.

    • 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.

  5. Complete component creation.

    • 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 page.