ROS integration example

更新时间:
复制 MD 格式

This topic shows you how to use a Resource Orchestration Service template to create an ApsaraDB for MongoDB instance.

Resource architecture

image.png

This template creates a Virtual Private Cloud (VPC) and a vSwitch in a specified region, and then creates an MongoDB replica set instance.

Permissions

By default, Resource Orchestration Service uses the credentials of the user who is logged on to the console. Ensure that this user has the following MongoDB to create a Virtual Private Cloud (VPC), a vSwitch, and an MongoDB instance:

  • AliyunROSFullAccess: Grants permissions to manage Resource Orchestration Service.

  • AliyunVPCFullAccess: Grants permissions to manage Virtual Private Cloud.

  • AliyunMongoDBFullAccess: Grants permissions to manage ApsaraDB for MongoDB.

Procedure

  1. Log on to the Resource Orchestration Service (ROS) console. In the top navigation bar, select the target region from the Region drop-down list.

  2. In the navigation pane on the left, click Stacks. On the Stacks page, choose Create stack > Use ROS.

    • Under Specify template, select Select an existing template.

    • For Template import method, select Enter template content.

  3. In the Template content section, select ROS and enter the following code.

    The following topics provide the syntax and descriptions for the instance resources used in the template:

  4. Click Next and configure the parameters on the Configure template parameters page.

  5. Click Create to deploy the stack.

  6. Verify the result.

    On the Resources tab of the stack details page, verify that the status of the ApsaraDB for MongoDB instance (ALIYUN::MONGODB::Instance), vSwitch (ALIYUN::ECS::VSwitch), and VPC (ALIYUN::ECS::VPC) resources is Create Succeeded.