Help Center> ServiceStage> User Guide> Component Management> Cloning Components in Batches
Updated on 2024-05-28 GMT+08:00

Cloning Components in Batches

This avoids complex and repeated configurations because multiple microservice components may have same configurations, for example, scheduling policy, AS policy, data storage, log storage, and lifecycle configurations, and only minor differences need to be modified. ServiceStage provides the function of cloning and deploying components in batches to improve component deployment efficiency and user experience.

Only components in the Running and Not ready states can be cloned.

Procedure

  1. Log in to ServiceStage.
  2. Choose Application Management.
  3. Click the application where the target components are located. The Overview page of the application is displayed.
  4. Select the components to be cloned in batches in Component List and click Bulk Clone.
  5. Set the version configuration information of the components to be cloned by referring to the following table.

    Parameter

    Description

    Component

    Name of a component, which cannot be changed after the component is deployed.

    Kubernetes environment:

    • Components with the same name in different applications can be deployed in the same environment.
    • Components with the same name in the same application can be deployed in different environments.

    VM environment:

    • Components with the same name in different applications can be deployed in the same environment.
    • Components with the same name in the same application can be deployed in different environments.

    Component Version

    Version number of a component.

    • By default, the version number is the time when you start to clone components in batches. The format is yyyy.mmdd.hhmms, where s is the ones place of the second in the timestamp. For example, if the timestamp is 2022.0803.104321, the version number is 2022.0803.10431.
    • You can also customize the version number in the format of A.B.C, or A.B.C.D. A. B, C, and D are natural numbers, for example, 1.0.0 or 1.0.0.0.
      NOTICE:

      The customized version number must be unique and cannot be the same as any historical version number of the component.

    You can perform the following operations to synchronize component versions in batches:

    1. Move the cursor to the Component Version text box of the specified component and click .
    2. Select other components whose versions need to be synchronized.
    3. Click OK.

    Application

    Select the application to which the component belongs. You can perform the following operations to synchronize the applications to which components belong in batches:

    1. Move the cursor to the Application drop-down list of the specified component and click .
    2. Select other components whose applications need to be synchronized.
    3. Click OK.

    Environment

    Select the component deployment environment. Only the Kubernetes environment can be selected.

    You can perform the following operations to synchronize the environments to which components belong in batches:

    1. Move the cursor to the Environment drop-down list of the specified component and click .
    2. Select other components whose environments need to be synchronized.
    3. Click OK.

    Namespace

    Select the namespace of the CCE cluster in the environment where the build is executed, which is used to isolate build data. For details, see Managing Namespaces.

    You can perform the following operations to synchronize the namespaces to which components belong in batches:

    1. Move the cursor to the Namespace drop-down list of the specified component and click .
    2. Select other components whose namespaces need to be synchronized.
    3. Click OK.

    Software Package/Image Package/Source Code Repository

    Click and select the software package, source code repository, or image package again. For details, see Component Source.

    Instances

    Set the number of component instances running in the environment. The value range is 1–200.

    You can perform the following operations to synchronize the number of component instances in batches:

    1. Move the cursor to the Instances text box of the specified component and click .
    2. Select other components whose number of component instances need to be synchronized.
    3. Click OK.

    Operation

    • Click in the Operation column of a component to cancel the clone.
    • Click Advanced Settings in the Operation column of a component to configure advanced settings.
      • Set public network access parameters by referring to 11.
      • Set Microservice Engine, Distributed Cache Service, Relational Database Service, Component Configuration, Deployment Configuration, and O&M Monitoring by referring to 13.
    NOTE:
    • You can perform the following operations to synchronize the bound microservice engines, distributed caches, or cloud databases of components in batches:
      1. Click to expand Microservice Engine, Distributed Cache Service, or Relational Database Service under Advanced Settings.
      2. Move the cursor to the microservice engine, distributed cache, or cloud database bound to the specified component, and click .
      3. Select other components whose configurations need to be synchronized.
      4. Click OK.
    • You can perform the following operations to delete microservice engines, distributed caches, or cloud databases for components in batches:
      1. Click to expand Microservice Engine, Distributed Cache Service, or Relational Database Service under Advanced Settings.
      2. Move the cursor to the microservice engine, distributed cache, or cloud database bound to the specified component, and click .
      3. Click Delete, select other components whose configurations need to be synchronized, and click OK.

        To delete the microservice engine, distributed cache, or cloud database only for the current component, click Cancel.

    • You can perform the following operations to rebind a microservice engine, distributed cache, or cloud database to a component:
      1. Click to expand Microservice Engine, Distributed Cache Service, or Relational Database Service under Advanced Settings.
      2. Move the cursor to the microservice engine, distributed cache, or cloud database bound to the specified component, and click .
      3. Select a managed microservice engine, distributed cache, or cloud database in the current environment, and click OK.

  6. (Optional) Click Pre-check Advanced Settings to check whether the advanced settings of each component are correct.
  7. Click Complete and Execute.

    Wait until the component statuses change from Initializing to Running, indicating that the components have been cloned.