0.1.6 • Published 4 years ago

ros-cdk-zero v0.1.6

Weekly downloads
1
License
ISC
Repository
-
Last release
4 years ago

Ali Cloud Development Kit (ROS CDK) v0.1.1

The Ali Cloud Development Kit (ROS CDK) is an open-source software development framework to define cloud infrastructure in code and provision it through Ali Cloud ROS.

It offers a high-level object-oriented abstraction to define Ali Cloud resources imperatively using the power of modern programming languages. Using the CDK’s library of infrastructure constructs, you can easily encapsulate Ali Cloud best practices in your infrastructure definition and share it without worrying about boilerplate logic.

Now the CDK is available in the following languages and more languages will be added later:


Alicloud ROS(阿里云资源编排) | ROS DOC(资源编排官方文档) | ROS console(资源编排控制台)

Developers use the CDK framework in one of the supported programming languages to define reusable cloud components called constructs, which are composed together into stacks, forming a "CDK app".

They then use the Ali CDK CLI to interact with their CDK app. The CLI allows developers to synthesize artifacts such as Ali ROS Templates, deploy stacks to Ali Cloud accounts and "diff" against a deployed stack to understand the impact of a code change.

If you are the CDK user

When initialize a CDK project, install CDK from npm (requires Node.js ≥ 10.13.0).

$ mkdir hello-ros
$ cd hello-ros
$ npm i ros-cdk-zero
$ mkdir lib

This creates a sample project in file example.ts looking like this:

import * as ros from 'ros-cdk-zero/lib/core';
import { Vpc } from 'ros-cdk-zero/lib/ros-cdk/ecs/ros-vpc';
export class MyStack extends ros.Stack {
  constructor(scope: ros.Construct, id: string, props?: ros.StackProps) {
    super(scope, id, props);

    const version = new ros.RosInfo(this, ros.InfoType.FORMAT_VERSION, ros.FormatVersion.V2015_09_01);

    const vpc = new Vpc(this, 'ROS-VPC', {
      vpcName: 'vpcName',
      cidrBlock: '10.0.0.0/8',
      description: 'This is the description of VPC'
    });
  }
}

Then create a new file name app.ts under the same directory looking like this:

import * as ros from 'ros-cdk-zero/lib/core';
import { MyStack } from './stack';
import { expect as expectCDK } from 'ros-cdk-zero/lib/assert';
const app = new ros.App();
const stack = new MyStack(app, 'MyStack');
console.log(expectCDK(stack).value);

Finally, you can run the following command to get the ros template.

$ npx ts-node lib/app.ts

Later we will release the command line to integrate the initialization, synthesis and deploy.

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.4-0

4 years ago

0.1.3

4 years ago

0.1.2-0

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago

0.0.14

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago