kenperkins / coreos-cluster

Create a coreos cluster from node.js
MIT License
12 stars 4 forks source link

coreos-cluster Build Status NPM version

Create a fully functional CoreOs Cluster on Rackspace Cloud from any node.js application. A command-line version of coreos-cluster is available on npm as coreos-cluster-cli.

Quick Example

var cluster = require('coreos-cluster');

cluster.createCluster({
  numNodes: 10,
  type: 'performance',
  release: 'beta',
  keyname: 'my-ssh-keyname',
  credentials: {
    username: 'your-user-name',
    apiKey: 'some-key-here',
    region: 'iad'
  }
}, function(err, results) {
  // will callback with a functional cluster
});

Options

Advanced Usage Example

var cluster = require('coreos-cluster');

cluster.createCluster({
  numNodes: 10,
  type: 'performance',
  release: 'beta',
  keyname: 'my-ssh-keyname',
  discoveryServiceUrl: 'https://discovery.etcd.io/some-guid-here',
  privateNetwork: '4c371711-44ae-15ab-86af-45438fb96a15',
  monitoringToken: 'your-monitoring-token',
  update: {
      group: '0a809ab1-c01c-4a6b-8ac8-6b17cb9bae09',
      server: 'https://customer.update.core-os.net/v1/update/',
      rebootStrategy: 'best-effort'
  },
  credentials: {
    username: 'your-user-name',
    apiKey: 'some-key-here',
    region: 'iad'
  }
}, function(err, results) {
  // will callback with a details of the added nodes
});

Installation

npm install coreos-cluster

Next Steps

As coreos-cluster is built on pkgcloud, the next step is to add a provider option that allows you to use different compute providers within pkgcloud.