Skip to content

Commit a982204

Browse files
committed
Final touches for do-plugin and code formattings
1 parent 9eff4df commit a982204

File tree

69 files changed

+6873
-5635
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+6873
-5635
lines changed

README.md

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
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

8384
Create 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
];
129130
module.exports = providers;
130131
```
@@ -138,11 +139,11 @@ The below code is an example of usage in AWS.
138139
```js
139140
const nc = require("@nodecloud/common"); // NodeCloud common module
140141
const optionsProvider = {
141-
overrideProviders: false,
142+
overrideProviders: false
142143
};
143144
const ncProviders = nc.getProviders(optionsProvider);
144145
const options = {
145-
apiVersion: "2017-11-01",
146+
apiVersion: "2017-11-01"
146147
};
147148

148149
const 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

170171
function 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
193194
const nodeCloud = require("nodecloud");
194195
const options = {
195-
overrideProviders: true,
196+
overrideProviders: true
196197
};
197198
const 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

docs/AWS_ArchivalStorage.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -398,8 +398,8 @@ <h5>Parameters:</h5>
398398
>AWS/storage/aws-archivalStorage.js</a
399399
>,
400400
<a
401-
href="AWS_storage_aws-archivalStorage.js.html#line58"
402-
>line 58</a
401+
href="AWS_storage_aws-archivalStorage.js.html#line56"
402+
>line 56</a
403403
>
404404
</span>
405405
</p>
@@ -479,8 +479,8 @@ <h5>Parameters:</h5>
479479
>AWS/storage/aws-archivalStorage.js</a
480480
>,
481481
<a
482-
href="AWS_storage_aws-archivalStorage.js.html#line41"
483-
>line 41</a
482+
href="AWS_storage_aws-archivalStorage.js.html#line40"
483+
>line 40</a
484484
>
485485
</span>
486486
</p>
@@ -560,8 +560,8 @@ <h5>Parameters:</h5>
560560
>AWS/storage/aws-archivalStorage.js</a
561561
>,
562562
<a
563-
href="AWS_storage_aws-archivalStorage.js.html#line92"
564-
>line 92</a
563+
href="AWS_storage_aws-archivalStorage.js.html#line88"
564+
>line 88</a
565565
>
566566
</span>
567567
</p>
@@ -646,8 +646,8 @@ <h5>Parameters:</h5>
646646
>AWS/storage/aws-archivalStorage.js</a
647647
>,
648648
<a
649-
href="AWS_storage_aws-archivalStorage.js.html#line75"
650-
>line 75</a
649+
href="AWS_storage_aws-archivalStorage.js.html#line72"
650+
>line 72</a
651651
>
652652
</span>
653653
</p>

docs/AWS_BlockStorage.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -400,8 +400,8 @@ <h5>Parameters:</h5>
400400
<a href="AWS_storage_aws-blockStorage.js.html"
401401
>AWS/storage/aws-blockStorage.js</a
402402
>,
403-
<a href="AWS_storage_aws-blockStorage.js.html#line41"
404-
>line 41</a
403+
<a href="AWS_storage_aws-blockStorage.js.html#line40"
404+
>line 40</a
405405
>
406406
</span>
407407
</p>
@@ -483,8 +483,8 @@ <h5>Parameters:</h5>
483483
<a href="AWS_storage_aws-blockStorage.js.html"
484484
>AWS/storage/aws-blockStorage.js</a
485485
>,
486-
<a href="AWS_storage_aws-blockStorage.js.html#line58"
487-
>line 58</a
486+
<a href="AWS_storage_aws-blockStorage.js.html#line56"
487+
>line 56</a
488488
>
489489
</span>
490490
</p>
@@ -565,8 +565,8 @@ <h5>Parameters:</h5>
565565
<a href="AWS_storage_aws-blockStorage.js.html"
566566
>AWS/storage/aws-blockStorage.js</a
567567
>,
568-
<a href="AWS_storage_aws-blockStorage.js.html#line75"
569-
>line 75</a
568+
<a href="AWS_storage_aws-blockStorage.js.html#line72"
569+
>line 72</a
570570
>
571571
</span>
572572
</p>

docs/AWS_ComputeInstance.html

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -400,8 +400,8 @@ <h5>Parameters:</h5>
400400
>AWS/compute/aws-computeInstance.js</a
401401
>,
402402
<a
403-
href="AWS_compute_aws-computeInstance.js.html#line92"
404-
>line 92</a
403+
href="AWS_compute_aws-computeInstance.js.html#line88"
404+
>line 88</a
405405
>
406406
</span>
407407
</p>
@@ -483,8 +483,8 @@ <h5>Parameters:</h5>
483483
>AWS/compute/aws-computeInstance.js</a
484484
>,
485485
<a
486-
href="AWS_compute_aws-computeInstance.js.html#line143"
487-
>line 143</a
486+
href="AWS_compute_aws-computeInstance.js.html#line136"
487+
>line 136</a
488488
>
489489
</span>
490490
</p>
@@ -566,8 +566,8 @@ <h5>Parameters:</h5>
566566
>AWS/compute/aws-computeInstance.js</a
567567
>,
568568
<a
569-
href="AWS_compute_aws-computeInstance.js.html#line41"
570-
>line 41</a
569+
href="AWS_compute_aws-computeInstance.js.html#line40"
570+
>line 40</a
571571
>
572572
</span>
573573
</p>
@@ -649,8 +649,8 @@ <h5>Parameters:</h5>
649649
>AWS/compute/aws-computeInstance.js</a
650650
>,
651651
<a
652-
href="AWS_compute_aws-computeInstance.js.html#line58"
653-
>line 58</a
652+
href="AWS_compute_aws-computeInstance.js.html#line56"
653+
>line 56</a
654654
>
655655
</span>
656656
</p>
@@ -732,8 +732,8 @@ <h5>Parameters:</h5>
732732
>AWS/compute/aws-computeInstance.js</a
733733
>,
734734
<a
735-
href="AWS_compute_aws-computeInstance.js.html#line75"
736-
>line 75</a
735+
href="AWS_compute_aws-computeInstance.js.html#line72"
736+
>line 72</a
737737
>
738738
</span>
739739
</p>
@@ -815,8 +815,8 @@ <h5>Parameters:</h5>
815815
>AWS/compute/aws-computeInstance.js</a
816816
>,
817817
<a
818-
href="AWS_compute_aws-computeInstance.js.html#line109"
819-
>line 109</a
818+
href="AWS_compute_aws-computeInstance.js.html#line104"
819+
>line 104</a
820820
>
821821
</span>
822822
</p>
@@ -898,8 +898,8 @@ <h5>Parameters:</h5>
898898
>AWS/compute/aws-computeInstance.js</a
899899
>,
900900
<a
901-
href="AWS_compute_aws-computeInstance.js.html#line126"
902-
>line 126</a
901+
href="AWS_compute_aws-computeInstance.js.html#line120"
902+
>line 120</a
903903
>
904904
</span>
905905
</p>
@@ -981,8 +981,8 @@ <h5>Parameters:</h5>
981981
>AWS/compute/aws-computeInstance.js</a
982982
>,
983983
<a
984-
href="AWS_compute_aws-computeInstance.js.html#line160"
985-
>line 160</a
984+
href="AWS_compute_aws-computeInstance.js.html#line152"
985+
>line 152</a
986986
>
987987
</span>
988988
</p>

docs/AWS_Container.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -399,8 +399,8 @@ <h5>Parameters:</h5>
399399
<a href="AWS_compute_aws-container.js.html"
400400
>AWS/compute/aws-container.js</a
401401
>,
402-
<a href="AWS_compute_aws-container.js.html#line41"
403-
>line 41</a
402+
<a href="AWS_compute_aws-container.js.html#line40"
403+
>line 40</a
404404
>
405405
</span>
406406
</p>
@@ -481,8 +481,8 @@ <h5>Parameters:</h5>
481481
<a href="AWS_compute_aws-container.js.html"
482482
>AWS/compute/aws-container.js</a
483483
>,
484-
<a href="AWS_compute_aws-container.js.html#line58"
485-
>line 58</a
484+
<a href="AWS_compute_aws-container.js.html#line56"
485+
>line 56</a
486486
>
487487
</span>
488488
</p>
@@ -563,8 +563,8 @@ <h5>Parameters:</h5>
563563
<a href="AWS_compute_aws-container.js.html"
564564
>AWS/compute/aws-container.js</a
565565
>,
566-
<a href="AWS_compute_aws-container.js.html#line75"
567-
>line 75</a
566+
<a href="AWS_compute_aws-container.js.html#line72"
567+
>line 72</a
568568
>
569569
</span>
570570
</p>

0 commit comments

Comments
 (0)