All Products
Search
Document Center

CloudOps Orchestration Service:Integration with ROS

Last Updated:Sep 06, 2024

Resource Orchestration Service (ROS) can automatically create and configure all the resources defined in templates to implement automated deployment and O&M. You can use ROS to call the API operations of CloudOps Orchestration Service (OOS). This topic describes how to write an ROS template to automatically create a common parameter in OOS.

Supported resources

ROS is a service provided by Alibaba Cloud to simplify the management of cloud computing resources. You can create a template to describe the cloud computing resources that you need, such as Elastic Compute Service (ECS) and ApsaraDB RDS instances, and the relationship between the resources. ROS automatically creates and configures all the resources based on the template to implement automated deployment and O&M. For more information, see What is ROS?

You can use ROS to call the API operations of OOS. The following table describes the resources that can be orchestrated by using ROS.

Resource type

Reference

Description

Resources

ALIYUN::OOS::DefaultPatchBaseline

Registers a default patch baseline.

ALIYUN::OOS::Execution

Starts an execution.

ALIYUN::OOS::Template

Creates a template.

ALIYUN::OOS::Parameter

Creates a common parameter.

ALIYUN::OOS::PatchBaseline

Creates a patch baseline.

ALIYUN::OOS::SecretParameter

Creates an encrypted parameter.

ALIYUN::OOS::StateConfiguration

Creates a desired-state configuration.

Data sources

DATASOURCE::OOS::PatchBaseline

Queries a patch baseline.

DATASOURCE::OOS::PatchBaselines

Queries a list of patch baselines.

DATASOURCE::OOS::SecretParameters

Queries a list of encrypted parameters.

Permissions

An Alibaba Cloud account has permissions on all API operations. Security risks may arise if you use an Alibaba Cloud account to call API operations. We recommend that you call API operations or perform routine O&M as a Resource Access Management (RAM) user. Before you call API operations as a RAM user, grant the required permissions to the RAM user. For more information, see Use RAM for access control.

Procedure

  1. Log on to the ROS console. In the top navigation bar, select a region based on your business requirements.

  2. In the left-side navigation pane, choose Deployment > Stacks. On the Stacks page, choose Create Stack > Use ROS.

    • Specify Template: Select Select an Existing Template.

    • Template Import Method: Select Enter Template Content.

  3. In the Template Content section, click the ROS tab and enter code in the JSON or YAML format.

    For more information about the syntax, description, and example of creating a common parameter, see ALIYUN::OOS::Parameter. The following sample code creates a common parameter.

    YAML format

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters: {}
    Resources:
      Parameter:
        Type: ALIYUN::OOS::Parameter
        Properties:
          Type: String
          Value: echo hello world
          Description: Prefix for Interruption Handler parameters
          Name:
            Fn::Join:
              - ''
              - - /ecs-test-handler/run_commands/test-SampleWebAppAutoScalingGroup-
                - Ref: ALIYUN::StackId
    Outputs:
      Value:
        Description: The Value of the parameter.
        Value:
          Fn::GetAtt:
            - Parameter
            - Value
      Name:
        Description: The Name of the parameter.
        Value:
          Fn::GetAtt:
            - Parameter
            - Name

    JSON format

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
      },
      "Resources": {
        "Parameter": {
          "Type": "ALIYUN::OOS::Parameter",
          "Properties": {
            "Type": "String",
            "Value": "echo hello world",
            "Description": "Prefix for Interruption Handler parameters",
            "Name": {
              "Fn::Join": [
                "",
                [
                  "/ecs-test-handler/run_commands/test-SampleWebAppAutoScalingGroup-",
                  {
                    "Ref": "ALIYUN::StackId"
                  }
                ]
              ]
            }
          }
        }
      },
      "Outputs": {
        "Value": {
          "Description": "The Value of the parameter.",
          "Value": {
            "Fn::GetAtt": [
              "Parameter",
              "Value"
            ]
          }
        },
        "Name": {
          "Description": "The Name of the parameter.",
          "Value": {
            "Fn::GetAtt": [
              "Parameter",
              "Name"
            ]
          }
        }
      }
    }
  4. Click Next. In the Configure Parameters step, select Yes for the Rollback on Failure parameter.

  5. Click Create to create the stack.

  6. View the result.

    image

  7. Log on to the OOS console. In the left-side navigation pane, click Parameter Store.

  8. In the top navigation bar, select the region in which you created the stack.

  9. On the Common Parameters tab of the Parameter Store page, check whether the parameter is created as expected.

    image