CUCloud (Node.js) is an implementation of the Cornell Cloud Library Spec. It is designed for use with invoked scripts or deployment in AWS Lambda.
- Requires Node.js v4.3+
- Uses AWS DynamoDB to store configuration.
- Extensible plugin based model.
CUCloud (Node.js) uses the AWS SDK for JavaScript and stores configuration in a DynamoDB table named cucloud_config
. Before using the module with any plugins, you'll need to initialize the schema. For details about the schema, see SCHEMA.md.
CUCloud (Node.js) is not available via npm, but you can install it locally for yourself.
# fork, then clone the repository from your account
git clone [email protected]:<YOURUSERNAME>/cucloud-js.git
# install the modules dependencies
cd cucloud-js
npm install
# install the module globally for yourself
npm install . -g
npm link
Review Setting AWS Credentials before initializing the schema. When invoking the module, you will need access to DynamoDB be via your IAM user or a role.
Broad IAM policy:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"dynamodb:*"
],
"Resource": "*"
}
]
}
Initialize the DynamoDB schema using the model defined in examples/schema.yml
# use environmental variable or set the profile at runtime
export CUCLOUD_PROFILE=<profile-name>
# import the schema
cucloud-js-schema import examples/schema.yml [--profile <profile-name> ]
If at any point you would like to export your schema you can dump the configuration in YAML format. You can later import this export as needed.
# use environmental variable CUCLOUD_PROFILE= or set the profile at runtime
cucloud-js-schema export examples/prod-schema-export.yml [--profile <profile-name> ]
CUCloud (Node.js) is designed to be used with plugins.
CUCloud.plugins.cnamer
-CUCloud.plugins.gitHubHookSns
-
Implementations of the plugins are included in examples/
. Documentation is included in doc/
.
examples/lambda-cnamer.js
- An AWS Lambda function to update a Route53 CNAME record with the public DNS of an EC2 instance when it enters a RUNNING state. For more detail see LAMBDA-CNAMER.md.examples/lambda-snshook.js
- AWS Lambda function to maintain the "Amazon SNS" service hook on all repositories for a GitHub organization. For more detail see LAMBDA-SNSHOOK.md.
Future features under consideration...
- expanded command line management of configuration.
- schema export/import should be first level methods of CUCloud
- options to reserve namespace
- Expand out of the box environmental variable support.
- Potential integrate with Claudia.JS