1717[ ![ Mailing list : Scorelab] ( https://img.shields.io/badge/Mailing%20list-Scorelab-blue.svg )] ( https://groups.google.com/g/score-community )
1818[ ![ contributions welcome] ( https://img.shields.io/badge/contributions-welcome-ff69b4.svg?style=flat )] ( https://github.com/leopardslab/nodecloud/issues )
1919
20- Table of Content
20+ Table of Content
2121
22- - [ Introduction] ( #introduction )
22+ - [ Introduction] ( #introduction )
2323- [ Supported Service Providers] ( #-supported-service-providers )
2424- [ Getting Started] ( #getting-started )
2525 - [ NodeCloud Plugins] ( #nodecloud-plugins )
@@ -71,13 +71,13 @@ Once `@nodecloud/common` is installed, you need to install the plugins to intera
7171
7272### NodeCloud Plugins
7373
74- | Plugin | Installation |
75- | -------------------- | --------------------------------------------------------------------------------- |
76- | AWS plugin | ` yarn add @nodecloud/aws-plugin ` or ` npm i @nodecloud/aws-plugin ` |
77- | Azure plugin | ` yarn add @nodecloud/gcp-plugin ` or ` npm i @nodecloud/gcp-plugin ` |
78- | Google Cloud plugin | ` yarn add @nodecloud/azure-plugin ` or ` npm i @nodecloud/azure-plugin ` |
79- | Alibaba plugin | ` yarn add nodecloud-ali- plugin ` or ` npm i nodecloud-ali- plugin ` |
80- | Digital Ocean plugin | ` yarn add nodecloud-digitalocean -plugin ` or ` npm i nodecloud-digitalocean -plugin ` |
74+ | Plugin | Installation |
75+ | -------------------- | --------------------------------------------------------------------- |
76+ | AWS plugin | ` yarn add @nodecloud/aws-plugin ` or ` npm i @nodecloud/aws-plugin ` |
77+ | Azure plugin | ` yarn add @nodecloud/gcp-plugin ` or ` npm i @nodecloud/gcp-plugin ` |
78+ | Google Cloud plugin | ` yarn add @nodecloud/azure-plugin ` or ` npm i @nodecloud/azure-plugin ` | |
79+ | Digital Ocean plugin | ` yarn add @ nodecloud/do- plugin ` or ` npm i @ nodecloud/do- plugin ` |
80+ | Alibaba plugin | ` yarn add nodecloud-ali -plugin ` or ` npm i nodecloud-ali -plugin ` |
8181
8282** 3️⃣ Create the NodeCloud config file**
8383
@@ -98,28 +98,34 @@ This config file can contain an array of objects for all providers and all will
9898const nodeCloudAwsPlugin = require (" @nodecloud/aws-plugin" );
9999const nodeCloudGcpPlugin = require (" @nodecloud/gcp-plugin" );
100100const nodeCloudAzurePlugin = require (" @nodecloud/azure-plugin" );
101+ const nodeCloudDoPlugin = require (" @nodecloud/do-plugin" );
101102
102103const providers = [
103104 {
104105 name: " aws" ,
105106 tag: " aws" ,
106107 plugin: nodeCloudAwsPlugin,
107- configPath: " C:\\ Users\\ Rajitha\\ opensource\\ aws_cred.json" ,
108+ configPath: " C:\\ Users\\ Rajitha\\ opensource\\ aws_cred.json"
108109 },
109110 {
110111 name: " google" ,
111112 tag: " google" ,
112113 plugin: nodeCloudGcpPlugin,
113114 configPath: {
114115 projectId: " astral-hold-276807" ,
115- keyFilename: " C:\\ Users\\ Rajitha\\ opensource\\ gcp_cred.json" ,
116- },
116+ keyFilename: " C:\\ Users\\ Rajitha\\ opensource\\ gcp_cred.json"
117+ }
117118 },
118119 {
119120 name: " azure" ,
120121 tag: " azure" ,
121- plugin: nodeCloudAzurePlugin,
122+ plugin: nodeCloudAzurePlugin
122123 },
124+ {
125+ name: " digitalocean" ,
126+ tag: " do" ,
127+ plugin: nodeCloudDoPlugin
128+ }
123129];
124130module .exports = providers;
125131```
@@ -133,11 +139,11 @@ The below code is an example of usage in AWS.
133139``` js
134140const nc = require (" @nodecloud/common" ); // NodeCloud common module
135141const optionsProvider = {
136- overrideProviders: false ,
142+ overrideProviders: false
137143};
138144const ncProviders = nc .getProviders (optionsProvider);
139145const options = {
140- apiVersion: " 2017-11-01" ,
146+ apiVersion: " 2017-11-01"
141147};
142148
143149const computeModule = ncProviders .aws .compute (options);
@@ -148,33 +154,33 @@ function launchInstance() {
148154 InstanceType: " t2.micro" ,
149155 KeyName: " nodeCloud" , // key name of Key pair
150156 MinCount: 1 ,
151- MaxCount: 1 ,
157+ MaxCount: 1
152158 };
153159
154160 // create AWS EC2 instance
155161 computeModule
156162 .create (instanceParams)
157- .then (( res ) => {
163+ .then (res => {
158164 console .log (` All done ! ${ res} ` );
159165 })
160- .catch (( err ) => {
166+ .catch (err => {
161167 console .log (` Oops something happened ${ err} ` );
162168 });
163169}
164170
165171function stopInstance () {
166172 const params = {
167173 InstanceIds: [" i-0928af5c626f85da9" ],
168- DryRun: false ,
174+ DryRun: false
169175 };
170176
171177 // stop AWS EC2 instance
172178 computeModule
173179 .stop (params)
174- .then (( res ) => {
180+ .then (res => {
175181 console .log (res);
176182 })
177- .catch (( err ) => {
183+ .catch (err => {
178184 console .log (err);
179185 });
180186}
@@ -187,7 +193,7 @@ NodeCloud officially supports AWS, GCP, Azure, DigitalOcean and AliCloud. If you
187193``` js
188194const nodeCloud = require (" nodecloud" );
189195const options = {
190- overrideProviders: true ,
196+ overrideProviders: true
191197};
192198const ncProviders = nodeCloud .getProviders (options);
193199```
@@ -198,18 +204,19 @@ const ncProviders = nodeCloud.getProviders(options);
198204| ----------------------- | ----------------------------------- | :-----------------------------------: | :-------------------------------: | :---------------------------------------------------------------------: | :---------------------------------------: | :---------------------------------------------------: |
199205| Compute | IaaS | EC2 | Compute Engine | Virtual Machine | Droplets | ECS |
200206| | Faas | AWS Lambda\* | Cloud Functions\* | Azure Functions\* | - | Function Compute\* |
201- | | Containers | ECS, EKS | Google Kubernetes Engine | AKS, Azure Service Fabric\* | DO Kubernetes\* | Container Service* , Container Service for Kubernetes* |
207+ | | Containers | ECS, EKS | Google Kubernetes Engine | AKS, Azure Service Fabric\* | DO Kubernetes | Container Service* , Container Service for Kubernetes* |
202208| | Containers (without infrastructure) | AWS Fargate\* | Cloud Run\* | - | - | ECI\* |
203209| | Paas | AWS Elastic Beanstalk | App Engine\* | App Service | - | Simple Application Server\* |
204210| Storage | Object Storage | S3 | Cloud Storage | Azure Blob Storage | Spaces\* | Bucket (OSS) |
205211| | Block Storage | EBS | Persistent Disks | Disk Storage | Volumes | NAS\* |
206212| Networking | Load Balancer | ELB | Cloud Load Balancing\* | Azure Load Balancer | DO Load Balancer | SLB |
207213| | Peering/Dedicated Interconnect | Direct Connect | Cloud Interconnect\* | ExpressRoute\* | - | Express Connect\* |
208- | | DNS | Route53 | Google Domains, Cloud DNS | Azure DNS | DO DNS\* | Alibaba Cloud DNS\* |
209- | Databases | RDBMS | RDS, Amazon Aurora* , Amazon Redshift* | Cloud SQL\* , Cloud Spanner | SQL Database, Azure Database for MySQL* , Azure Database for PostgreSQL* | Managed Databases(PostgreSQL* and MySQL* ) | ApsaraDB (MySQL, MariaDB TX, SQL Server, PostgreSQL) |
214+ | | DNS | Route53 | Google Domains, Cloud DNS | Azure DNS | DO DNS | Alibaba Cloud DNS\* |
215+ | Databases | RDBMS | RDS, Amazon Aurora* , Amazon Redshift* | Cloud SQL\* , Cloud Spanner | SQL Database, Azure Database for MySQL* , Azure Database for PostgreSQL* | Managed Databases(PostgreSQL\ * and MySQL) | ApsaraDB (MySQL, MariaDB TX, SQL Server, PostgreSQL) |
210216| | NoSQL: key-value | DynamoDB | Cloud Firestore, Cloud Bigtable\* | Table Storage | Managed Databases(Redis)\* | ApsaraDB for Redis\* |
211217| | NoSQL: indexed | Amazon SimpleDB\* | Cloud Firestore | Cosmos DB | - | ApsaraDB for MongoDB\* |
212218| Security/ Authorization | Identity Access Management | AWS IAM | Cloud IAM\* | Azure Active Directory* , Azure Role Based Access Control* | - | Resource Access Management\* |
219+ | Management | Key Management | AWS-KMS | - | - | Do-Keys | - |
213220
214221\* yet to be implemented
215222
0 commit comments