Manage ROS templates and stacks using Visual Studio Code
This topic describes how to use the Alibaba Cloud Toolkit for Visual Studio Code to easily and efficiently manage ROS templates and stacks.
Prerequisites
Download and install Visual Studio Code.
You have installed and configured Cloud Toolkit in IntelliJ IDEA.
Manage templates
The ROS LOCAL TEMPLATES and ROS REMOTE TEMPLATES features in Alibaba Cloud Toolkit are used to manage Alibaba Cloud Resource Orchestration Service (ROS) templates. These features use a resource configuration file (.ros.config.yml) to help you manage template files.
ROS LOCAL TEMPLATES: Manage your local ROS templates.
ROS REMOTE TEMPLATES: Manage the ROS templates in your remote account.
Template authoring provides the following features:
Code block feature: You can quickly create param and ref parameters.
Code hinting: In the Resources section, when you enter a keyword for a resource type, hints for all related resource types are displayed. For example:
Enter ECS to display hints for all ECS-related resource types. You can then select the resource type that you need.
In the Properties section, when you enter the letters of a property, hints for related properties of that resource type are displayed. Property names support fuzzy match.
Syntax validation: The data types of key-value pairs in the template are validated.
The .ros.config.yml file is the source file used by the ROS Templates tool to manage templates.
Open your project in Visual Studio Code.
In the left-side taskbar, click EXPLORER and then click the plus sign (+) next to ROS LOCAL TEMPLATES.
NoteYou can create ROS templates in JSON and YAML formats.
Edit the local template. In the Resources section, enter the resource type.
The following operations are available for the local template management feature.
Feature
Description
Open Folder
Opens a folder.
Refresh
Refreshes the local template folder.
Create
Creates a local template. When you use this extension to create a template for the first time, it creates JSON, YAML, and .ros.config.yml files by default.
Upload
Uploads a local template to the remote server.
Right-click a local template and select an operation.
The following describes the operations for this feature.
Feature
Description
Delete
Deletes the local template.
Rename
Renames the template.
Upload
Uploads the local template.
Edit a remote template. Hover over a remote template to view its properties.
This topic describes the operations for the remote template management feature.
Feature
Description
Refresh
Refreshes the remote template folder.
Update
Updates the remote template.
Download
Downloads the remote template.
NoteWhen you click a remote template, a temporary read-only file opens by default.
Right-click a remote template and select an operation.
The following describes this feature.
Feature
Description
Delete
Deletes the remote template.
Download
Downloads the remote template.
Rename
Renames the remote template.
Update
Updates the remote template.
NoteWhen you update a remote template, a comparison window opens by default to show the changes. Edit the template in the right pane. After you finish, right-click Alibaba Cloud Ros - Update Template to update the remote template.
If the file in the editor has a .ros.json or .ros.yaml extension, you can right-click Alibaba Cloud Ros - Create Stack to go to the stack creation page.
Manage stacks
The ROS View in ALIBABA CLOUD VIEW is a tool that helps you manage remote ROS stacks.
Open your project in Visual Studio Code.
In the Visual Studio Code window, go to and perform the required operations.
This section describes stack management operations.
Feature
Description
Region
Select a region.
Search
In the current region, search for a stack by its ID or name. If you do not enter anything, the stack list for the current region is refreshed.
Create Stack
Creates a stack. You are automatically redirected to the Create Stack page in the ROS console.
Stack ID/Name
Click the name to view the properties of the stack.
Status
Shows the current status of the stack.
Create at
Shows the creation time of the stack.
Outputs
Shows the output values of the stack.
Delete
Deletes the stack.
More
Properties: Shows the properties of the stack.
Resources: Shows all resources within the stack.
Parameters: Shows the parameters of the stack.