hardcode awsbox into deployment names everywhere for consistency
This commit is contained in:
Родитель
190389f37c
Коммит
1350254bfa
14
awsbox.js
14
awsbox.js
|
@ -70,7 +70,7 @@ verbs['destroy'] = function(args) {
|
|||
var fqdn = fqdns.shift();
|
||||
process.stdout.write("deleting " + fqdn + ": ");
|
||||
dns.deleteRecord(dnsKey, fqdn, function(err) {
|
||||
console.log(err ? "failed: " + err : "done");
|
||||
console.log(err ? "failed: " + err : "done");
|
||||
removeNext();
|
||||
});
|
||||
}
|
||||
|
@ -87,13 +87,13 @@ verbs['test'] = function() {
|
|||
process.stdout.write("Checking AWS access: ");
|
||||
vm.list(function(err) {
|
||||
console.log(err ? "NOT ok: " + err : "good");
|
||||
|
||||
|
||||
if (process.env['ZERIGO_DNS_KEY']) {
|
||||
process.stdout.write("Checking DNS access: ");
|
||||
dns.inUse(process.env['ZERIGO_DNS_KEY'], 'example.com', function(err, res) {
|
||||
console.log(err ? "NOT ok: " + err : "good");
|
||||
console.log(err ? "NOT ok: " + err : "good");
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -158,11 +158,11 @@ verbs['create'] = function(args) {
|
|||
var name = opts.n || "noname";
|
||||
validateName(name);
|
||||
var hostname = name;
|
||||
var longName = process.env['USER'] + "'s " + process.title + ' deployment (' + name + ')';
|
||||
var longName = process.env['USER'] + "'s awsbox deployment (" + name + ')';
|
||||
|
||||
console.log("reading .awsbox.json");
|
||||
|
||||
try {
|
||||
try {
|
||||
var awsboxJson = JSON.parse(fs.readFileSync("./.awsbox.json"));
|
||||
} catch(e) {
|
||||
checkErr("Can't read awsbox.json: " + e);
|
||||
|
@ -178,7 +178,7 @@ verbs['create'] = function(args) {
|
|||
dnsKey = process.env['ZERIGO_DNS_KEY'];
|
||||
dnsHost = urlparse(opts.u).host;
|
||||
if (opts.dnscheck) {
|
||||
console.log(" ... Checking for DNS availability of " + dnsHost);
|
||||
console.log(" ... Checking for DNS availability of " + dnsHost);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
18
lib/vm.js
18
lib/vm.js
|
@ -55,7 +55,7 @@ exports.list = function(cb) {
|
|||
});
|
||||
};
|
||||
|
||||
// given something the user typed in, try to figure out what instance they're talking about
|
||||
// given something the user typed in, try to figure out what instance they're talking about
|
||||
function findInstance(r, name) {
|
||||
// is what the human typed in an instance id?
|
||||
var x = jsel.match("object:has(:root > .instanceId:val(?))", [ name ], r);
|
||||
|
@ -90,15 +90,15 @@ exports.destroy = function(name, cb) {
|
|||
};
|
||||
|
||||
function dateBasedVersion() {
|
||||
var d = new Date();
|
||||
var d = new Date();
|
||||
function pad(n){return n<10 ? '0'+n : n}
|
||||
return d.getUTCFullYear()+'.'
|
||||
+ pad(d.getUTCMonth()+1)+'.'
|
||||
+ pad(d.getUTCDate())+'-'
|
||||
+ pad(d.getUTCHours())+'.'
|
||||
+ pad(d.getUTCMinutes());
|
||||
}
|
||||
|
||||
return d.getUTCFullYear()+'.'
|
||||
+ pad(d.getUTCMonth()+1)+'.'
|
||||
+ pad(d.getUTCDate())+'-'
|
||||
+ pad(d.getUTCHours())+'.'
|
||||
+ pad(d.getUTCMinutes());
|
||||
}
|
||||
|
||||
exports.find = function(name, cb) {
|
||||
exports.list(function(err, r) {
|
||||
if (err) return cb('failed to list vms: ' + err);
|
||||
|
|
Загрузка…
Ссылка в новой задаче