ROS integration example

Updated at:

This topic describes how a RAM user can use Resource Orchestration Service (ROS) to create an Lindorm instance.

Prerequisites

To use Resource Orchestration Service (ROS), you must create a RAM user and grant it the following permissions.

  • The AliyunROSFullAccess permission to manage all operations of Resource Orchestration Service (ROS).

  • The AliyunLindormFullAccess permission to manage all operations of Lindorm.

    Note

    For demonstration purposes, this example uses the AliyunLindormFullAccess permission policy. In a production environment, we recommend that you grant only the required permissions before you make API calls. For more information about the permission policies for Lindorm, see System policies.

Procedure

  1. Log on to the Resource Orchestration Service (ROS) console. In the top navigation bar, click Region and select the desired region.

  2. In the left-side navigation pane, click Stacks and choose Create Stack > Use New Resources (Standard).

    • Specify Template: Select Existing Template.

    • Template Source: Select Enter Template.

  3. For Template Content, select ROS and enter the template code. The following template creates a Lindorm instance.

    Note

    The template in this example creates a Lindorm instance with the following specifications: the billing method is pay-as-you-go, the storage type is ultra disk, multiple engines are enabled (including two Lindorm Search nodes and two time-series nodes), and the instance storage capacity is 480 GB. You can modify the parameter values or add other parameters based on your business requirements. For parameter descriptions, see ALIYUN::Lindorm::Instance.

    YAML format

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      VpcId:
        Type: String
        AssociationProperty: ALIYUN::ECS::VPC::VPCId
        Label: VPC ID
      ZoneId:
        Type: String
        AssociationProperty: ALIYUN::ECS::ZoneId
        Label: Zone ID
      VSwitchId:
        Type: String
        Label: VSwitch ID
        AssociationProperty: ALIYUN::ECS::VSwitch::VSwitchId
        AssociationPropertyMetadata:
          ZoneId: ${ZoneId}
          VpcId: ${VpcId}
    Resources:
      LindormInstance:
        Type: ALIYUN::Lindorm::Instance
        Properties:
          InstanceStorage: 480
          ZoneId:
            Ref: ZoneId
          InstanceChargeType: POSTPAY
          VSwitchId:
            Ref: VSwitchId
          DiskCategory: cloud_efficiency
          InstanceName: TestLindormDB
          VpcId:
            Ref: VpcId
          LindormSpec: lindorm.c.xlarge
          TsdbSpec: lindorm.g.xlarge
          CoreSpec: lindorm.i2.xlarge
          LindormNum: 2
          TsdbNum: 2
          FilestoreSpec: lindorm.c.xlarge
    Outputs:
      JdbcUrlList:
        Description: A list of the JDBC connection URLs.
        Value:
          Fn::GetAtt:
            - LindormInstance
            - JdbcUrlList
      InstanceId:
        Description: The ID of the created Lindorm instance.
        Value:
          Fn::GetAtt:
            - LindormInstance
            - InstanceId

    JSON format

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "VpcId": {
          "AssociationProperty": "ALIYUN::ECS::VPC::VPCId",
          "Type": "String",
          "Label": {
            "zh-cn": "VPC ID",
            "en": "VPC ID"
          }
        },
        "VSwitchId": {
          "AssociationProperty": "ALIYUN::ECS::VSwitch::VSwitchId",
          "AssociationPropertyMetadata": {
            "VpcId": "${VpcId}",
            "ZoneId": "${ZoneId}"
          },
          "Type": "String",
          "Label": {
            "zh-cn": "VSwitch Id",
            "en": "VSwitch ID"
          }
        },
        "ZoneId": {
          "AssociationProperty": "ALIYUN::ECS::ZoneId",
          "Type": "String",
          "Label": {
            "zh-cn": "Zone ID",
            "en": "Zone ID"
          }
        }
      },
      "Resources": {
        "LindormInstance": {
          "Type": "ALIYUN::Lindorm::Instance",
          "Properties": {
            "VpcId": {
              "Ref": "VpcId"
            },
            "TsdbNum": 2,
            "LindormSpec": "lindorm.c.xlarge",
            "TsdbSpec": "lindorm.g.xlarge",
            "DiskCategory": "cloud_efficiency",
            "CoreSpec": "lindorm.i2.xlarge",
            "LindormNum": 2,
            "InstanceChargeType": "POSTPAY",
            "VSwitchId": {
              "Ref": "VSwitchId"
            },
            "InstanceStorage": 480,
            "ZoneId": {
              "Ref": "ZoneId"
            },
            "InstanceName": "TestLindormDB",
            "FilestoreSpec": "lindorm.c.xlarge"
          }
        }
      },
      "Outputs": {
        "InstanceId": {
          "Description": "The ID of the created Lindorm instance.",
          "Value": {
            "Fn::GetAtt": [
              "LindormInstance",
              "InstanceId"
            ]
          }
        },
        "JdbcUrlList": {
          "Description": "A list of the JDBC connection URLs.",
          "Value": {
            "Fn::GetAtt": [
              "LindormInstance",
              "JdbcUrlList"
            ]
          }
        }
      }
    }
  4. Click Next.

  5. On the Create Stack page, configure the following parameters:

    Parameter

    Description

    Stack name

    The name of the ROS stack.

    VPC ID

    Select the VPC for the Lindorm instance.

    VSwitch ID

    Select the VSwitch for the Lindorm instance.

    Zone ID

    Select the availability zone for the Lindorm instance.

  6. Click Create. A Status of Create_Success indicates that the stack is created.

  7. Click the Outputs tab to view the Lindorm instance ID and JDBC connection URLs. You can also view the instance details in the Lindorm console as follows:

    1. Log on to the Lindorm console.

    2. In the upper-left corner of the page, select the region where the instance is deployed.

    3. On the Instances page, find your instance and click its ID to open the Instance Details page.

Related operations