Git Product home page Git Product logo

nodecloud-legacy's Introduction

Node Cloud Logo

NodeCloud

npm version Hex.pm Codacy Badge Build Status

NodeCloud is a standard library to get a single API among common cloud service providers (Ex. AWS, GCP, Azure.. ). This will make building products among multiple cloud services and its services easier for the developer.

Install

npm install nodecloud
       or
yarn add nodecloud

Service Providers

  • Amazon web services (AWS)
  • Google cloud platform (GCP)

Service Types

Service Category Service AWS GCP
Compute IaaS EC2 Compute Engine
Containers ECS -
Storage Object Storage S3 Cloud Storage
Block Storage EBS Persistent Disks
Networking Load Balancer ELB -
Peering Direct Connect -
DNS Route53 Google DNS
Databases RDBMS RDS -
NoSQL: key-value DynamoDB Cloud Datastore
NoSQL: indexed - Cloud Datastore
Security/ Authorization IAM AWS IAM -
Serverless Functions AWS Lambda -

Usage

const nodeCloud = require("nodecloud");
// AWS
const ncAWS = nodeCloud.getProvider("AWS");
const options = {
  apiVersion: "2016-11-15"
};

const params = {
  ImageId: "ami-10fd7020", // amzn-ami-2011.09.1.x86_64-ebs
  InstanceType: "t1.micro",
  MinCount: 1,
  MaxCount: 1
};
const instanceParams = {
  Key: "Name",
  Value: "Node Cloud demo"
};

const ec2 = ncAWS.compute(options);
ec2
  .createInstance(params, instanceParams)
  .then(res => {
    console.log(`All done ! ${res}`);
  })
  .catch(err => {
    console.log(`Oops something happened ${err}`);
  });

Development setup

$ git clone https://github.com/cloudlibz/nodecloud
$ cd nodecloud
$ yarn install

Run unit tests

$ yarn test

nodecloud-legacy's People

Contributors

adhyandhull avatar agentmilindu avatar chamathpali avatar charithccmc avatar codacy-badger avatar dmbutalsodm avatar friedy10 avatar gayashanbc avatar iammosespaulr avatar keshav1002 avatar kmehant avatar nicolasraube avatar padamchopra avatar pranayrobo avatar raghavpuri avatar rajikaimal avatar raju249 avatar rehrumesh avatar samaystops4no1 avatar shlokj avatar tanmayanand44 avatar thelukaszns avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nodecloud-legacy's Issues

Google Code-In 2017: Getting Started Issue

THIS IS A NOT A REAL ISSUE BUT A PLACEHOLDER.

All the practising PRs for Google Code-In 2017 should refer this issue. PRs referring this issue will be closed without merging. Do not refer this issue if you are NOT submitting a practice PR and need your work merged.

Fix AWS S3 example in nodecloud

This is a (Bug Report / Feature Proposal)

Bug Report

Description

From one of the examples, AWS S3 was broken, since it used a method name that did not exist.

For bug reports:

  • What went wrong?
    AWS S3 bucket was not created.
  • What did you expect should have happened?
    AWS S3 bucket should have been created.
  • What was the config you used?
  • What stacktrace or error message from your provider did you see?
    Bucket Creation Error.

For feature proposals:

  • What is the use case that should be solved. The more detail you describe this in the easier it is to understand for us.
  • If there is additional config how would it look

Similar or dependent issues:

  • #12345

Additional Data

  • Operating System:
  • Stack Trace:
  • Provider Error messages:

Add AWS IAM support

This is a (Bug Report / Feature Proposal)

Feature Proposal

Description

AWS IAM is very much essential and used almost before accessing any other service.

For bug reports:

  • What went wrong?
  • What did you expect should have happened?
  • What was the config you used?
  • What stacktrace or error message from your provider did you see?

For feature proposals:

  • What is the use case that should be solved. The more detail you describe this in the easier it is to understand for us.
    AWS IAM allows user to create groups, attach policies to them, create users, etc
  • If there is additional config how would it look

Similar or dependent issues:
*

Additional Data

  • Operating System:
  • Stack Trace:
  • Provider Error messages:

Couldn't run the project on MacOS - Cannot read property 'accessKeyId' of null

This is a Bug Report

Description

For bug reports:

  • What went wrong?
    When trying to run the project from Mac, the project did not initiate due to following error. Tried to hardcode the credentials in providerJS as well in core folder with the region. But no luck. The same process configured earlier was working well on Linux environment.

  • What did you expect should have happened?
    Run the initial project

  • What was the config you used?
    Created a config.json file in the newly created project with the personal aws credentials

  • What stacktrace or error message from your provider did you see?

/Users/lakindugunasekara/Desktop/nodecloud-test/nodecloud/lib/core/aws/provider.js:22
      !this._AWS.config.credentials.accessKeyId ||
                                   ^
TypeError: Cannot read property 'accessKeyId' of null
    at new AWS (/Users/lakindugunasekara/Desktop/nodecloud-test/nodecloud/lib/core/aws/provider.js:22:36)
    at Provider.getProvider (/Users/lakindugunasekara/Desktop/nodecloud-test/nodecloud/lib/core/base-provider.js:20:44)
    at new Provider (/Users/lakindugunasekara/Desktop/nodecloud-test/nodecloud/lib/core/base-provider.js:12:27)
    at Object.getProvider (/Users/lakindugunasekara/Desktop/nodecloud-test/nodecloud/lib/core/index.js:9:10)
    at Object.<anonymous> (/Users/lakindugunasekara/Desktop/nodecloud-test/nodecloud-mock/index.js:2:25)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
  • Operating System: MacOS
  • Stack Trace:
/Users/lakindugunasekara/Desktop/nodecloud-test/nodecloud/lib/core/aws/provider.js:22
      !this._AWS.config.credentials.accessKeyId ||
                                   ^
TypeError: Cannot read property 'accessKeyId' of null
    at new AWS (/Users/lakindugunasekara/Desktop/nodecloud-test/nodecloud/lib/core/aws/provider.js:22:36)
    at Provider.getProvider (/Users/lakindugunasekara/Desktop/nodecloud-test/nodecloud/lib/core/base-provider.js:20:44)
    at new Provider (/Users/lakindugunasekara/Desktop/nodecloud-test/nodecloud/lib/core/base-provider.js:12:27)
    at Object.getProvider (/Users/lakindugunasekara/Desktop/nodecloud-test/nodecloud/lib/core/index.js:9:10)
    at Object.<anonymous> (/Users/lakindugunasekara/Desktop/nodecloud-test/nodecloud-mock/index.js:2:25)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)

  • Provider Error messages:TypeError: Cannot read property 'accessKeyId' of null

Update ESLint configurations

This is a (Bug Reportl)

The current npm script for running the linter is not displaying the linter results.

Possible actions

  • Update the npm script for running ESLint
  • Add .eslintignore file to exclude directories such as the node_modules/ folder
  • Adjust linter rules per requirement
  • Fix issues pointed out by ESLint

Docs for AWS IAM support

This is a (Bug Report / Feature Proposal)

Feature Proposal

Description

Add documentation to newly added AWS IAM support.
For bug reports:

  • What went wrong?
  • What did you expect should have happened?
  • What was the config you used?
  • What stacktrace or error message from your provider did you see?

For feature proposals:

  • What is the use case that should be solved. The more detail you describe this in the easier it is to understand for us.

Provide documentation on how to user NodeCloud AWS IAM

  • If there is additional config how would it look

Similar or dependent issues:
*

Additional Data

  • Operating System:
  • Stack Trace:
  • Provider Error messages:

mocha test/storage/aws-s3.js testing actually creates a bucket in s3

This is a Bug Report

Description

  • Unit testing storage with provider as aws, actually creates a bucket in the aws
  • In the Unit test intercepting the http request to create a bucket and mock the http response

Additional Data

  • Operating System: Linux mint 18.3 Cinnamon 64-bit

  • Stack Trace:
    AWS S3

    1. should create S3 bucket
      (node:10378) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): BucketAlreadyOwnedByYou: Your previous request to create the named bucket succeeded and you already own it.
      (node:10378) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
      ✓ should not delete S3 bucket (1296ms)
      ✓ should create multipart upload (1055ms)
      ✓ should list all buckets (1337ms)
      (node:10378) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): AssertionError: expected 'https://ncbucketcr.s3.us-west-2.amazonaws.com/key' to equal 'https://ncbucketcr.s3-us-west-2.amazonaws.com/key'
    2. should upload an arbitary sized buffer, blob, or stream

    3 passing (8s)
    2 failing

    1. AWS S3
      should create S3 bucket:
      Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.

    2. AWS S3
      should upload an arbitary sized buffer, blob, or stream:
      Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.

Add CDN Service - aws cloud front

This is a Feature Proposal

Description

*Supporting for CDN services. aws cloud front. ex :- create distributions , create invalidations. For an example CDN invalidations specially helpful when sdk is used with continuous delivery

add npm lint script

This is a Feature Proposal

Description

  • GCI2017 task
  • Add an npm script to execute ESLint
  • ESLint config should use Airbnb stylings and the npm script should be able to run using npm run lint.

Similar or dependent issues:

Additional Data

  • Operating System: Ubuntu 17.10 x64
  • Stack Trace:
  • Provider Error messages:

Unit tests failure

This is a (Bug Report)

Unit tests fails when running the yarn test command. The issue occurs in the file test\compute\ec2.js

Additional Data

  • Operating System: Windows 8.1 64 bit
  • Stack Trace:
Error: Cannot find module 'D:\repos\nodecloud\nodecloud\node_modules\grpc\src\node\extension_binary\grpc_node.node'
    at Function.Module._resolveFilename (module.js:555:15)
    at Function.Module._load (module.js:482:25)
    at Module.require (module.js:604:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (D:\repos\nodecloud\nodecloud\node_modules\grpc\src\node\src\grpc_extension.js:38:15)
    at Module._compile (module.js:660:30)
    at Object.Module._extensions..js (module.js:671:10)
    at Module.load (module.js:573:32)
    at tryModuleLoad (module.js:513:12)
    at Function.Module._load (module.js:505:3)
    at Module.require (module.js:604:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (D:\repos\nodecloud\nodecloud\node_modules\grpc\src\node\src\client.js:55:12)
    at Module._compile (module.js:660:30)
    at Object.Module._extensions..js (module.js:671:10)
    at Module.load (module.js:573:32)
    at tryModuleLoad (module.js:513:12)
    at Function.Module._load (module.js:505:3)
    at Module.require (module.js:604:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (D:\repos\nodecloud\nodecloud\node_modules\grpc\src\node\index.js:45:14)
    at Module._compile (module.js:660:30)
    at Object.Module._extensions..js (module.js:671:10)
    at Module.load (module.js:573:32)
    at tryModuleLoad (module.js:513:12)
    at Function.Module._load (module.js:505:3)
    at Module.require (module.js:604:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (D:\repos\nodecloud\nodecloud\node_modules\@google-cloud\common-grpc\src\service.js:27:12)
    at Module._compile (module.js:660:30)
    at Object.Module._extensions..js (module.js:671:10)
    at Module.load (module.js:573:32)
    at tryModuleLoad (module.js:513:12)
    at Function.Module._load (module.js:505:3)
    at Module.require (module.js:604:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (D:\repos\nodecloud\nodecloud\node_modules\@google-cloud\common-grpc\src\operation.js:36:15)
    at Module._compile (module.js:660:30)
    at Object.Module._extensions..js (module.js:671:10)
    at Module.load (module.js:573:32)
    at tryModuleLoad (module.js:513:12)
    at Function.Module._load (module.js:505:3)
    at Module.require (module.js:604:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (D:\repos\nodecloud\nodecloud\node_modules\@google-cloud\common-grpc\src\index.js:26:21)
    at Module._compile (module.js:660:30)
    at Object.Module._extensions..js (module.js:671:10)
    at Module.load (module.js:573:32)
    at tryModuleLoad (module.js:513:12)
    at Function.Module._load (module.js:505:3)
    at Module.require (module.js:604:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (D:\repos\nodecloud\nodecloud\node_modules\@google-cloud\bigtable\src\index.js:25:18)
    at Module._compile (module.js:660:30)
    at Object.Module._extensions..js (module.js:671:10)
    at Module.load (module.js:573:32)
    at tryModuleLoad (module.js:513:12)
    at Function.Module._load (module.js:505:3)
    at Module.require (module.js:604:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (D:\repos\nodecloud\nodecloud\node_modules\google-cloud\src\index.js:69:13)
    at Module._compile (module.js:660:30)
    at Object.Module._extensions..js (module.js:671:10)
    at Module.load (module.js:573:32)
    at tryModuleLoad (module.js:513:12)
    at Function.Module._load (module.js:505:3)
    at Module.require (module.js:604:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (D:\repos\nodecloud\nodecloud\lib\core\google\provider.js:1:81)
    at Module._compile (module.js:660:30)
    at Object.Module._extensions..js (module.js:671:10)
    at Module.load (module.js:573:32)
    at tryModuleLoad (module.js:513:12)
    at Function.Module._load (module.js:505:3)
    at Module.require (module.js:604:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (D:\repos\nodecloud\nodecloud\lib\core\base-provider.js:3:24)
    at Module._compile (module.js:660:30)
    at Object.Module._extensions..js (module.js:671:10)
    at Module.load (module.js:573:32)
    at tryModuleLoad (module.js:513:12)
    at Function.Module._load (module.js:505:3)
    at Module.require (module.js:604:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (D:\repos\nodecloud\nodecloud\lib\core\index.js:1:84)
    at Module._compile (module.js:660:30)
    at Object.Module._extensions..js (module.js:671:10)
    at Module.load (module.js:573:32)
    at tryModuleLoad (module.js:513:12)
    at Function.Module._load (module.js:505:3)
    at Module.require (module.js:604:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (D:\repos\nodecloud\nodecloud\lib\index.js:1:76)
    at Module._compile (module.js:660:30)
    at Object.Module._extensions..js (module.js:671:10)
    at Module.load (module.js:573:32)
    at tryModuleLoad (module.js:513:12)
    at Function.Module._load (module.js:505:3)
    at Module.require (module.js:604:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (D:\repos\nodecloud\nodecloud\test\compute\ec2.js:4:19)
    at Module._compile (module.js:660:30)
    at Object.Module._extensions..js (module.js:671:10)
    at Module.load (module.js:573:32)
    at tryModuleLoad (module.js:513:12)
    at Function.Module._load (module.js:505:3)
    at Module.require (module.js:604:17)
    at require (internal/module.js:11:18)
    at D:\repos\nodecloud\nodecloud\node_modules\mocha\lib\mocha.js:231:27
    at Array.forEach (<anonymous>)
    at Mocha.loadFiles (D:\repos\nodecloud\nodecloud\node_modules\mocha\lib\mocha.js:228:14)
    at Mocha.run (D:\repos\nodecloud\nodecloud\node_modules\mocha\lib\mocha.js:514:10)
    at Object.<anonymous> (D:\repos\nodecloud\nodecloud\node_modules\mocha\bin\_mocha:480:18)
    at Module._compile (module.js:660:30)
    at Object.Module._extensions..js (module.js:671:10)
    at Module.load (module.js:573:32)
    at tryModuleLoad (module.js:513:12)
    at Function.Module._load (module.js:505:3)
    at Function.Module.runMain (module.js:701:10)
    at startup (bootstrap_node.js:193:16)
    at bootstrap_node.js:617:3
  • Provider Error messages:
    Cannot find module 'D:\repos\nodecloud\nodecloud\node_modules\grpc\src\node\extension_binary\grpc_node.node'

Amazon SimpleDB support for AWS (Counter for Google Datastore)

This is a (Feature Proposal)

Description

We have support for NoSQL indexed db for Google Cloud. Amazon SimpleDB is equivalent to AWS indexed db support.

For bug reports:

  • What went wrong?
  • What did you expect should have happened?
  • What was the config you used?
  • What stacktrace or error message from your provider did you see?

For feature proposals:

  • What is the use case that should be solved. The more detail you describe this in the easier it is to understand for us.

This will add complete support to NoSQL indexed DB for both cloud providers.

  • If there is additional config how would it look

Similar or dependent issues:
*

Additional Data

  • Operating System:
  • Stack Trace:
  • Provider Error messages:

Serverless Support to nodecloud -- AWS Lambda

This is a Feature Proposal

Description

For bug reports:

  • What went wrong?
  • What did you expect should have happened?
  • What was the config you used?
  • What stacktrace or error message from your provider did you see?

For feature proposals:

  • What is the use case that should be solved. The more detail you describe this in the easier it is to understand for us.

This will add support to serverless service integration with nodecloud for AWS.

  • If there is additional config how would it look

Similar or dependent issues:

Additional Data

  • Operating System:
  • Stack Trace:
  • Provider Error messages:

Extend the services support for AWS platform

This is a Feature Proposal

I would like to propose the following functionalities to be added to the NodeCloud library for the AWS platform, so that we will be able to extend the service support for the AWS platform.

DynamoDB

  • Support for the scan operation.
  • Support for creating, and deleting DynamoDB tables.

S3

  • Support for enabling static website hosting feature.
  • Support for enabling and disabling bucket CORS.

EC2

  • Support for attaching, detaching volumes.
  • Support for allocating, releasing and associating Elastic IP addresses.

Create Milestone list

Milestones list

Add milestones list in the readme

Display the current state of the project and the plan

Support for Azure SQL Service

This is a (Bug Report / Feature Proposal)

Description

For bug reports:

  • What went wrong?
  • What did you expect should have happened?
  • What was the config you used?
  • What stacktrace or error message from your provider did you see?

For feature proposals:

  • What is the use case that should be solved. The more detail you describe this in the easier it is to understand for us.

This allows nodecloud to extend its first support to SQL service of Azure Cloud Provider. 🥇

  • If there is additional config how would it look

Similar or dependent issues:

Additional Data

  • Operating System:
  • Stack Trace:
  • Provider Error messages:

Api calls to AWS not being mocked in storage tests.

This is a Bug Report

In the current storage tests the api calls to AWS are not being mocked correctly. This causes most of the storage tests to fail.

Description:

  • In the storage tests the url being mocked is s3-us-west-2.amazonaws.com:443. It should actually be s3.us-west-2.amazonaws.com:443.
  • This makes actual buckets to be created and listed. And the other tests fail.

Similar or dependent issues:

Additional Data

  • Operating System: Mac OSX
  • Stack Trace:
yarn run v1.5.1
$ mocha test/storage/aws-s3.js


  AWS S3
(node:1472) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): BucketAlreadyExists: The requested bucketname is not available. The bucket namespace is shared by all users of the system. Please select a different name and try again.
(node:1472) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
    1) should create S3 bucket
(node:1472) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): AssertionError: expected [AccessDenied: Access Denied] to equal 'BucketNotEmpty: The bucket you tried to delete is not empty'
    2) should not delete S3 bucket
(node:1472) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): AccessDenied: Access Denied
    3) should create multipart upload
    ✓ should list all buckets (1653ms)
(node:1472) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 4): AccessDenied: Access Denied
    4) should upload an arbitary sized buffer, blob, or stream


  1 passing (10s)
  4 failing

  1) AWS S3 should create S3 bucket:
     Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.


  2) AWS S3 should not delete S3 bucket:
     Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.


  3) AWS S3 should create multipart upload:
     Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.


  4) AWS S3 should upload an arbitary sized buffer, blob, or stream:
     Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.




error An unexpected error occurred: "Command failed.
Exit code: 4
Command: sh
Arguments: -c mocha test/storage/aws-s3.js
Directory: /Users/samayjain/Desktop/samay/nodecloud
Output:
".
  • Provider Error messages:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.