Overview

Updated at: 2025-01-03 10:07

Cloud Development Toolkit (CDK) is an open source toolkit that is provided by Resource Orchestration Service (ROS) to develop software. You can use ROS CDK to define cloud resources in code and deploy the resources by using ROS. If you use ROS CDK, you can create and configure resources by using a programming language with which you are familiar to automate deployment and O&M for the resources. You do not need to follow the syntax of JSON or YAML templates.

Usage notes

ROS CDK supports the following programming languages: TypeScript, JavaScript, Python, Java, C#, and Go. You can define cloud resources by using one of the programming languages. For more information, see Sample entry-level application.

ROS CDK consists of two parts:

  • Construct library: A collection of pre-written modular and reusable snippets of code that you can use, modify, and integrate to quickly deploy cloud resources and build applications. The construct library contains various functions that are provided to reduce the complexity of defining and integrating Alibaba Cloud services when you build applications.

  • Command-line tool: A tool that you use to interact with applications after you build the applications by using ROS CDK. You can use the command-line tool to generate templates, deploy resources online, and query and delete stacks.

Scenarios

ROS CDK provides an object-oriented mode, which is abstract and advanced, to help you define cloud resources in a standardized and efficient manner. ROS CDK is applicable to scenarios where fast, secure, and repeatable deployment of cloud resources is required. The following section describes common scenarios of ROS CDK:

  • IaC: ROS CDK provides a powerful Infrastructure as Code (IaC) solution that you can use to provision, manage, and update cloud infrastructure on Alibaba Cloud in a programmable and repeatable manner. ROS CDK allows you to define resources such as virtual private clouds (VPCs), Elastic Compute Service (ECS) instances, ApsaraDB RDS instances, and Container Service for Kubernetes (ACK) clusters in stacks by writing code. This ensures environment consistency and facilitates cross-environment deployment of the same infrastructure configurations.

  • Complex architecture management: You can use ROS CDK if your project involves complex architecture design of Alibaba Cloud resources and contains interdependencies among multiple services. ROS CDK helps you organize the service components to create modular building blocks, and reuse and combine the components to build a large-scale application architecture. The building blocks are called constructs.

  • Multi-team collaboration and hierarchical design: ROS CDK provides version control tools that aim to promote collaborative working for projects jointly developed by multiple teams. ROS CDK also supports the hierarchical design of infrastructure so that each team can focus on separate services or components.

  • Automated deployment and CI/CD pipelines: ROS CDK can be seamlessly integrated into continuous integration and continuous deployment (CI/CD) processes. This facilitates automated deployment and update of applications and related infrastructure resources.

  • Security and permission management: You can use ROS CDK to precisely control security-related settings, such as Resource Access Management (RAM) roles and policies, to ensure security compliance of your infrastructure.

  • Test-driven development: ROS CDK supports unit testing and synthetic testing. You can validate the infrastructure model before the actual deployment. This improves code quality and reduces errors in the production environment.

Benefits

ROS CDK is an IaC framework that provides the capability to define infrastructure as code. With the power of programming languages, you can use ROS CDK to create and manage your infrastructure in a more efficient, flexible, and reliable manner. ROS CDK provides the following benefits:

  • Development with general-purpose programming languages: ROS CDK allows you to define infrastructure by using a preferred programming language, such as JavaScript, TypeScript, Python, Java, C#, or Go. You do not need to familiarize yourself with a new configuration language.

  • Advanced, abstract, and hierarchical design: ROS CDK provides constructs that are used to encapsulate configurations of a lower hierarchy. This way, you can focus on developing business logic.

  • Modularity and reusability: You can use predefined constructs in the construct library or create custom constructs and then reuse the constructs in different infrastructure projects. This improves modularity and code reusability.

  • Type safety: ROS CDK provides type safety for statically typed programming languages, such as TypeScript and Java, to reduce runtime problems that are caused by type errors.

  • Intelligent editor: ROS CDK allows you to develop code in a general-purpose programming language. You can take full advantage of the features such as code completion, syntax highlighting, formatting, and linting provided by modern integrated development environments (IDEs).

  • Version control and team collaboration: ROS CDK code is made available as source code. You can easily incorporate ROS CDK code into a version control system to facilitate collaborative working.

  • Integration with ROS: ROS CDK is integrated with ROS. This allows you to deploy and provision your infrastructure on Alibaba Cloud. You can use ROS CDK together with ROS to predictably and repeatedly deploy infrastructure, and roll back resources when errors occur. If you are already familiar with ROS, you can directly use ROS CDK without the need to learn about new IaC concepts for service management.

  • Integration with software development tools: ROS CDK can be seamlessly integrated into software engineering tools and processes on the market to implement source control, unit testing, integration testing, and CI/CD.

Examples

ROS CDK provides examples from the following dimensions.

Entry-level application

To develop your first application by using ROS CDK, you can refer to Sample entry-level application to choose a preferred programming language from different programming languages.

Resource

You can specify parameters for a resource type supported by ROS CDK in OpenAPI Explorer to generate sample code in different programming languages for the resource. This way, you can use the sample code of different resource types to create the relevant resources. The sample code can be run online and supports complete project download.

Solution

ROS CDK is provided as open source code on GitHub for easy access and download. In the examples directory, sample code is provided for different scenarios in the documentation and solution center on the Alibaba Cloud official website.

References

API reference page

The CDK construct library provides a collection of API operations for you to build your CDK applications. For more information about how to use the API operations and the features of the API operations, see Ros Cdk References.

CDK command

For more information about how to use CDK commands and the usage examples, see ROS CDK commands.

CDK feature

For more information about how to use CDK features such as outputs and pseudo parameters and the usage examples, see ROS CDK features.

GitHub repository

For more information about the official GitHub repository of ROS CDK, visit Resource-Orchestration-Service-Cloud-Development-Kit. On the website, you can submit issues and view licenses and release notes.

  • On this page (1, T)
  • Usage notes
  • Scenarios
  • Benefits
  • Examples
  • Entry-level application
  • Resource
  • Solution
  • References
  • API reference page
  • CDK command
  • CDK feature
  • GitHub repository
Feedback