Browse files

Unhardcode flavor and image

  • Loading branch information...
1 parent 391e160 commit 54ce90b5ea4d1bc028d1fee40033f6ff16d86e5c @mmalecki committed Feb 7, 2014
Showing with 13 additions and 3 deletions.
  1. +2 −2 lib/bootstrapper/bootstrap.js
  2. +11 −1 lib/commands/deploy.js
View
4 lib/bootstrapper/bootstrap.js
@@ -40,8 +40,8 @@ module.exports = function bootstrap(options, callback) {
],
commands: commands,
keynames: keys.map(function (key) { return key.id }),
- image: '1505699', // TODO: unhardcode from Ubuntu 13.10 x64 on DO
- flavor: '63' // TODO: unhardcode from 1 GB on DO
+ image: options.image,
+ flavor: options.flavor
};
santa.inspect.putObject(createOptions);
View
12 lib/commands/deploy.js
@@ -7,6 +7,14 @@ var build = require('../bootstrapper/build.js');
var bootstrap = require('../bootstrapper/bootstrap.js');
module.exports = function (callback) {
+ var flavor = santa.config.get('flavor');
+ var image = santa.config.get('image');
+
+ if (!flavor || !image) {
+ santa.log.error('Flavor and image (`--flavor` and `--image`) are required');
+ return;
+ }
+
santa.log.info('Deploying application (hold on to your butts!)...');
santa.log.info('Building application...');
@@ -28,7 +36,9 @@ module.exports = function (callback) {
options = {
compute: santa.pkgcloud,
package: results.build,
- name: [ results.package.name, results.package.version, animal.getId() ].join('-')
+ name: [ results.package.name, results.package.version, animal.getId() ].join('-'),
+ flavor: flavor,
+ image: image
};
bootstrap(options, function (err, ee) {

0 comments on commit 54ce90b

Please sign in to comment.