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,14 @@ 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- | 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 `
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 ` |
81+
8182** 3️⃣ Create the NodeCloud config file**
8283
8384Create the ` .nc.config.js ` file in the project root in the following format.
@@ -104,27 +105,27 @@ const providers = [
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 },
123124 {
124125 name: " digitalocean" ,
125126 tag: " do" ,
126- plugin: nodeCloudDoPlugin,
127- },
127+ plugin: nodeCloudDoPlugin
128+ }
128129];
129130module .exports = providers;
130131```
@@ -138,11 +139,11 @@ The below code is an example of usage in AWS.
138139``` js
139140const nc = require (" @nodecloud/common" ); // NodeCloud common module
140141const optionsProvider = {
141- overrideProviders: false ,
142+ overrideProviders: false
142143};
143144const ncProviders = nc .getProviders (optionsProvider);
144145const options = {
145- apiVersion: " 2017-11-01" ,
146+ apiVersion: " 2017-11-01"
146147};
147148
148149const computeModule = ncProviders .aws .compute (options);
@@ -153,33 +154,33 @@ function launchInstance() {
153154 InstanceType: " t2.micro" ,
154155 KeyName: " nodeCloud" , // key name of Key pair
155156 MinCount: 1 ,
156- MaxCount: 1 ,
157+ MaxCount: 1
157158 };
158159
159160 // create AWS EC2 instance
160161 computeModule
161162 .create (instanceParams)
162- .then (( res ) => {
163+ .then (res => {
163164 console .log (` All done ! ${ res} ` );
164165 })
165- .catch (( err ) => {
166+ .catch (err => {
166167 console .log (` Oops something happened ${ err} ` );
167168 });
168169}
169170
170171function stopInstance () {
171172 const params = {
172173 InstanceIds: [" i-0928af5c626f85da9" ],
173- DryRun: false ,
174+ DryRun: false
174175 };
175176
176177 // stop AWS EC2 instance
177178 computeModule
178179 .stop (params)
179- .then (( res ) => {
180+ .then (res => {
180181 console .log (res);
181182 })
182- .catch (( err ) => {
183+ .catch (err => {
183184 console .log (err);
184185 });
185186}
@@ -192,7 +193,7 @@ NodeCloud officially supports AWS, GCP, Azure, DigitalOcean and AliCloud. If you
192193``` js
193194const nodeCloud = require (" nodecloud" );
194195const options = {
195- overrideProviders: true ,
196+ overrideProviders: true
196197};
197198const ncProviders = nodeCloud .getProviders (options);
198199```
@@ -203,19 +204,19 @@ const ncProviders = nodeCloud.getProviders(options);
203204| ----------------------- | ----------------------------------- | :-----------------------------------: | :-------------------------------: | :---------------------------------------------------------------------: | :---------------------------------------: | :---------------------------------------------------: |
204205| Compute | IaaS | EC2 | Compute Engine | Virtual Machine | Droplets | ECS |
205206| | Faas | AWS Lambda\* | Cloud Functions\* | Azure Functions\* | - | Function Compute\* |
206- | | 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* |
207208| | Containers (without infrastructure) | AWS Fargate\* | Cloud Run\* | - | - | ECI\* |
208209| | Paas | AWS Elastic Beanstalk | App Engine\* | App Service | - | Simple Application Server\* |
209210| Storage | Object Storage | S3 | Cloud Storage | Azure Blob Storage | Spaces\* | Bucket (OSS) |
210211| | Block Storage | EBS | Persistent Disks | Disk Storage | Volumes | NAS\* |
211212| Networking | Load Balancer | ELB | Cloud Load Balancing\* | Azure Load Balancer | DO Load Balancer | SLB |
212213| | Peering/Dedicated Interconnect | Direct Connect | Cloud Interconnect\* | ExpressRoute\* | - | Express Connect\* |
213- | | DNS | Route53 | Google Domains, Cloud DNS | Azure DNS | DO DNS | Alibaba Cloud DNS\* |
214- | 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) |
215216| | NoSQL: key-value | DynamoDB | Cloud Firestore, Cloud Bigtable\* | Table Storage | Managed Databases(Redis)\* | ApsaraDB for Redis\* |
216217| | NoSQL: indexed | Amazon SimpleDB\* | Cloud Firestore | Cosmos DB | - | ApsaraDB for MongoDB\* |
217218| Security/ Authorization | Identity Access Management | AWS IAM | Cloud IAM\* | Azure Active Directory* , Azure Role Based Access Control* | - | Resource Access Management\* |
218- | Management | Key Management | AWS-KMS | - | - | Do-Keys | - |
219+ | Management | Key Management | AWS-KMS | - | - | Do-Keys | - |
219220
220221\* yet to be implemented
221222
0 commit comments