Skip to content

pkgcloud/pkgcloud-bootstrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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
});

About

Bootstrapper module extracted from pkgcloud

Resources

License

Stars

Watchers

Forks

Packages

No packages published