Bootstrapper module extracted from pkgcloud
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
.gitignore
LICENSE
README.md
package.json

README.md

pkgcloud-bootstrapper

pkgcloud.compute.Bootstrapper extracted into its own module. Originally found in pkgcloud core in pkgcloud@<=0.8.17

Usage

var pkgcloud = require('pkgcloud');
var Bootstrapper = require('pkgcloud-bootstrapper');

var client = pkgcloud.compute.createClient({
  // Provider options
});

var bootstrapper = new Bootstrapper({ compute: client });
var ee = bootstrapper.createServer({
  name: 'mad_torvald',
  image: 'ubuntu-13.10',
  flavor: '512mb'
});

ee.on('error', function (err) {
  // Handle error.
});

ee.on('create', function (server) {
  // We received a reply to our creation request from the provider.
});

ee.on('active', function (server) {
  // Server is now active (accepting SSH connections).
});

ee.on('complete', function (server) {
  // Server was bootstrapped and creation is complete
});