Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 29 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
[![Mailing list : Scorelab](https://img.shields.io/badge/Mailing%20list-Scorelab-blue.svg)](https://groups.google.com/g/score-community)
[![contributions welcome](https://img.shields.io/badge/contributions-welcome-ff69b4.svg?style=flat)](https://github.com/leopardslab/nodecloud/issues)

Table of Content
Table of Content

- [Introduction](#introduction)
- [Introduction](#introduction)
- [Supported Service Providers](#-supported-service-providers)
- [Getting Started](#getting-started)
- [NodeCloud Plugins](#nodecloud-plugins)
Expand Down Expand Up @@ -71,13 +71,14 @@ Once `@nodecloud/common` is installed, you need to install the plugins to intera

### NodeCloud Plugins

| Plugin | Installation |
| -------------------- | --------------------------------------------------------------------------------- |
| AWS plugin | `yarn add @nodecloud/aws-plugin` or `npm i @nodecloud/aws-plugin` |
| Azure plugin | `yarn add @nodecloud/gcp-plugin` or `npm i @nodecloud/gcp-plugin` |
| Google Cloud plugin | `yarn add @nodecloud/azure-plugin` or `npm i @nodecloud/azure-plugin` | |
| Digital Ocean plugin | `yarn add @nodecloud/do-plugin` or `npm i @nodecloud/do-plugin` |
| Alibaba plugin | `yarn add nodecloud-ali-plugin` or `npm i nodecloud-ali-plugin`
| Plugin | Installation |
| -------------------- | --------------------------------------------------------------------- |
| AWS plugin | `yarn add @nodecloud/aws-plugin` or `npm i @nodecloud/aws-plugin` |
| Azure plugin | `yarn add @nodecloud/gcp-plugin` or `npm i @nodecloud/gcp-plugin` |
| Google Cloud plugin | `yarn add @nodecloud/azure-plugin` or `npm i @nodecloud/azure-plugin` | |
| Digital Ocean plugin | `yarn add @nodecloud/do-plugin` or `npm i @nodecloud/do-plugin` |
| Alibaba plugin | `yarn add nodecloud-ali-plugin` or `npm i nodecloud-ali-plugin` |

**3️⃣ Create the NodeCloud config file**

Create the `.nc.config.js` file in the project root in the following format.
Expand All @@ -104,27 +105,27 @@ const providers = [
name: "aws",
tag: "aws",
plugin: nodeCloudAwsPlugin,
configPath: "C:\\Users\\Rajitha\\opensource\\aws_cred.json",
configPath: "C:\\Users\\Rajitha\\opensource\\aws_cred.json"
},
{
name: "google",
tag: "google",
plugin: nodeCloudGcpPlugin,
configPath: {
projectId: "astral-hold-276807",
keyFilename: "C:\\Users\\Rajitha\\opensource\\gcp_cred.json",
},
keyFilename: "C:\\Users\\Rajitha\\opensource\\gcp_cred.json"
}
},
{
name: "azure",
tag: "azure",
plugin: nodeCloudAzurePlugin,
plugin: nodeCloudAzurePlugin
},
{
name: "digitalocean",
tag: "do",
plugin: nodeCloudDoPlugin,
},
plugin: nodeCloudDoPlugin
}
];
module.exports = providers;
```
Expand All @@ -138,11 +139,11 @@ The below code is an example of usage in AWS.
```js
const nc = require("@nodecloud/common"); // NodeCloud common module
const optionsProvider = {
overrideProviders: false,
overrideProviders: false
};
const ncProviders = nc.getProviders(optionsProvider);
const options = {
apiVersion: "2017-11-01",
apiVersion: "2017-11-01"
};

const computeModule = ncProviders.aws.compute(options);
Expand All @@ -153,33 +154,33 @@ function launchInstance() {
InstanceType: "t2.micro",
KeyName: "nodeCloud", // key name of Key pair
MinCount: 1,
MaxCount: 1,
MaxCount: 1
};

// create AWS EC2 instance
computeModule
.create(instanceParams)
.then((res) => {
.then(res => {
console.log(`All done ! ${res}`);
})
.catch((err) => {
.catch(err => {
console.log(`Oops something happened ${err}`);
});
}

function stopInstance() {
const params = {
InstanceIds: ["i-0928af5c626f85da9"],
DryRun: false,
DryRun: false
};

// stop AWS EC2 instance
computeModule
.stop(params)
.then((res) => {
.then(res => {
console.log(res);
})
.catch((err) => {
.catch(err => {
console.log(err);
});
}
Expand All @@ -192,7 +193,7 @@ NodeCloud officially supports AWS, GCP, Azure, DigitalOcean and AliCloud. If you
```js
const nodeCloud = require("nodecloud");
const options = {
overrideProviders: true,
overrideProviders: true
};
const ncProviders = nodeCloud.getProviders(options);
```
Expand All @@ -203,19 +204,19 @@ const ncProviders = nodeCloud.getProviders(options);
| ----------------------- | ----------------------------------- | :-----------------------------------: | :-------------------------------: | :---------------------------------------------------------------------: | :---------------------------------------: | :---------------------------------------------------: |
| Compute | IaaS | EC2 | Compute Engine | Virtual Machine | Droplets | ECS |
| | Faas | AWS Lambda\* | Cloud Functions\* | Azure Functions\* | - | Function Compute\* |
| | Containers | ECS, EKS | Google Kubernetes Engine | AKS, Azure Service Fabric\* | DO Kubernetes | Container Service*, Container Service for Kubernetes* |
| | Containers | ECS, EKS | Google Kubernetes Engine | AKS, Azure Service Fabric\* | DO Kubernetes | Container Service*, Container Service for Kubernetes* |
| | Containers (without infrastructure) | AWS Fargate\* | Cloud Run\* | - | - | ECI\* |
| | Paas | AWS Elastic Beanstalk | App Engine\* | App Service | - | Simple Application Server\* |
| Storage | Object Storage | S3 | Cloud Storage | Azure Blob Storage | Spaces\* | Bucket (OSS) |
| | Block Storage | EBS | Persistent Disks | Disk Storage | Volumes | NAS\* |
| Networking | Load Balancer | ELB | Cloud Load Balancing\* | Azure Load Balancer | DO Load Balancer | SLB |
| | Peering/Dedicated Interconnect | Direct Connect | Cloud Interconnect\* | ExpressRoute\* | - | Express Connect\* |
| | DNS | Route53 | Google Domains, Cloud DNS | Azure DNS | DO DNS | Alibaba Cloud DNS\* |
| 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) |
| | DNS | Route53 | Google Domains, Cloud DNS | Azure DNS | DO DNS | Alibaba Cloud DNS\* |
| 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) |
| | NoSQL: key-value | DynamoDB | Cloud Firestore, Cloud Bigtable\* | Table Storage | Managed Databases(Redis)\* | ApsaraDB for Redis\* |
| | NoSQL: indexed | Amazon SimpleDB\* | Cloud Firestore | Cosmos DB | - | ApsaraDB for MongoDB\* |
| Security/ Authorization | Identity Access Management | AWS IAM | Cloud IAM\* | Azure Active Directory*, Azure Role Based Access Control* | - | Resource Access Management\* |
| Management | Key Management | AWS-KMS | - | - | Do-Keys | - |
| Management | Key Management | AWS-KMS | - | - | Do-Keys | - |

\*yet to be implemented

Expand Down
16 changes: 8 additions & 8 deletions docs/AWS_ArchivalStorage.html
Original file line number Diff line number Diff line change
Expand Up @@ -398,8 +398,8 @@ <h5>Parameters:</h5>
>AWS/storage/aws-archivalStorage.js</a
>,
<a
href="AWS_storage_aws-archivalStorage.js.html#line58"
>line 58</a
href="AWS_storage_aws-archivalStorage.js.html#line56"
>line 56</a
>
</span>
</p>
Expand Down Expand Up @@ -479,8 +479,8 @@ <h5>Parameters:</h5>
>AWS/storage/aws-archivalStorage.js</a
>,
<a
href="AWS_storage_aws-archivalStorage.js.html#line41"
>line 41</a
href="AWS_storage_aws-archivalStorage.js.html#line40"
>line 40</a
>
</span>
</p>
Expand Down Expand Up @@ -560,8 +560,8 @@ <h5>Parameters:</h5>
>AWS/storage/aws-archivalStorage.js</a
>,
<a
href="AWS_storage_aws-archivalStorage.js.html#line92"
>line 92</a
href="AWS_storage_aws-archivalStorage.js.html#line88"
>line 88</a
>
</span>
</p>
Expand Down Expand Up @@ -646,8 +646,8 @@ <h5>Parameters:</h5>
>AWS/storage/aws-archivalStorage.js</a
>,
<a
href="AWS_storage_aws-archivalStorage.js.html#line75"
>line 75</a
href="AWS_storage_aws-archivalStorage.js.html#line72"
>line 72</a
>
</span>
</p>
Expand Down
12 changes: 6 additions & 6 deletions docs/AWS_BlockStorage.html
Original file line number Diff line number Diff line change
Expand Up @@ -400,8 +400,8 @@ <h5>Parameters:</h5>
<a href="AWS_storage_aws-blockStorage.js.html"
>AWS/storage/aws-blockStorage.js</a
>,
<a href="AWS_storage_aws-blockStorage.js.html#line41"
>line 41</a
<a href="AWS_storage_aws-blockStorage.js.html#line40"
>line 40</a
>
</span>
</p>
Expand Down Expand Up @@ -483,8 +483,8 @@ <h5>Parameters:</h5>
<a href="AWS_storage_aws-blockStorage.js.html"
>AWS/storage/aws-blockStorage.js</a
>,
<a href="AWS_storage_aws-blockStorage.js.html#line58"
>line 58</a
<a href="AWS_storage_aws-blockStorage.js.html#line56"
>line 56</a
>
</span>
</p>
Expand Down Expand Up @@ -565,8 +565,8 @@ <h5>Parameters:</h5>
<a href="AWS_storage_aws-blockStorage.js.html"
>AWS/storage/aws-blockStorage.js</a
>,
<a href="AWS_storage_aws-blockStorage.js.html#line75"
>line 75</a
<a href="AWS_storage_aws-blockStorage.js.html#line72"
>line 72</a
>
</span>
</p>
Expand Down
32 changes: 16 additions & 16 deletions docs/AWS_ComputeInstance.html
Original file line number Diff line number Diff line change
Expand Up @@ -400,8 +400,8 @@ <h5>Parameters:</h5>
>AWS/compute/aws-computeInstance.js</a
>,
<a
href="AWS_compute_aws-computeInstance.js.html#line92"
>line 92</a
href="AWS_compute_aws-computeInstance.js.html#line88"
>line 88</a
>
</span>
</p>
Expand Down Expand Up @@ -483,8 +483,8 @@ <h5>Parameters:</h5>
>AWS/compute/aws-computeInstance.js</a
>,
<a
href="AWS_compute_aws-computeInstance.js.html#line143"
>line 143</a
href="AWS_compute_aws-computeInstance.js.html#line136"
>line 136</a
>
</span>
</p>
Expand Down Expand Up @@ -566,8 +566,8 @@ <h5>Parameters:</h5>
>AWS/compute/aws-computeInstance.js</a
>,
<a
href="AWS_compute_aws-computeInstance.js.html#line41"
>line 41</a
href="AWS_compute_aws-computeInstance.js.html#line40"
>line 40</a
>
</span>
</p>
Expand Down Expand Up @@ -649,8 +649,8 @@ <h5>Parameters:</h5>
>AWS/compute/aws-computeInstance.js</a
>,
<a
href="AWS_compute_aws-computeInstance.js.html#line58"
>line 58</a
href="AWS_compute_aws-computeInstance.js.html#line56"
>line 56</a
>
</span>
</p>
Expand Down Expand Up @@ -732,8 +732,8 @@ <h5>Parameters:</h5>
>AWS/compute/aws-computeInstance.js</a
>,
<a
href="AWS_compute_aws-computeInstance.js.html#line75"
>line 75</a
href="AWS_compute_aws-computeInstance.js.html#line72"
>line 72</a
>
</span>
</p>
Expand Down Expand Up @@ -815,8 +815,8 @@ <h5>Parameters:</h5>
>AWS/compute/aws-computeInstance.js</a
>,
<a
href="AWS_compute_aws-computeInstance.js.html#line109"
>line 109</a
href="AWS_compute_aws-computeInstance.js.html#line104"
>line 104</a
>
</span>
</p>
Expand Down Expand Up @@ -898,8 +898,8 @@ <h5>Parameters:</h5>
>AWS/compute/aws-computeInstance.js</a
>,
<a
href="AWS_compute_aws-computeInstance.js.html#line126"
>line 126</a
href="AWS_compute_aws-computeInstance.js.html#line120"
>line 120</a
>
</span>
</p>
Expand Down Expand Up @@ -981,8 +981,8 @@ <h5>Parameters:</h5>
>AWS/compute/aws-computeInstance.js</a
>,
<a
href="AWS_compute_aws-computeInstance.js.html#line160"
>line 160</a
href="AWS_compute_aws-computeInstance.js.html#line152"
>line 152</a
>
</span>
</p>
Expand Down
12 changes: 6 additions & 6 deletions docs/AWS_Container.html
Original file line number Diff line number Diff line change
Expand Up @@ -399,8 +399,8 @@ <h5>Parameters:</h5>
<a href="AWS_compute_aws-container.js.html"
>AWS/compute/aws-container.js</a
>,
<a href="AWS_compute_aws-container.js.html#line41"
>line 41</a
<a href="AWS_compute_aws-container.js.html#line40"
>line 40</a
>
</span>
</p>
Expand Down Expand Up @@ -481,8 +481,8 @@ <h5>Parameters:</h5>
<a href="AWS_compute_aws-container.js.html"
>AWS/compute/aws-container.js</a
>,
<a href="AWS_compute_aws-container.js.html#line58"
>line 58</a
<a href="AWS_compute_aws-container.js.html#line56"
>line 56</a
>
</span>
</p>
Expand Down Expand Up @@ -563,8 +563,8 @@ <h5>Parameters:</h5>
<a href="AWS_compute_aws-container.js.html"
>AWS/compute/aws-container.js</a
>,
<a href="AWS_compute_aws-container.js.html#line75"
>line 75</a
<a href="AWS_compute_aws-container.js.html#line72"
>line 72</a
>
</span>
</p>
Expand Down
Loading