This commit is contained in:
Lloyd Hilaiel 2012-06-11 15:00:08 +03:00
Родитель dcd343eaff
Коммит 99570254b0
2 изменённых файлов: 12 добавлений и 2 удалений

Просмотреть файл

@ -1,3 +1,6 @@
0.2.9 -
* add a --dnscheck flag to create to disable dns check prior to VM creation
0.2.8 - 0.2.8 -
* fix /ver.txt serving over SSL * fix /ver.txt serving over SSL

Просмотреть файл

@ -107,6 +107,9 @@ verbs['create'] = function(args) {
var parser = optimist(args) var parser = optimist(args)
.usage('awsbox create: Create a VM') .usage('awsbox create: Create a VM')
.describe('d', 'setup DNS via zerigo (requires ZERIGO_DNS_KEY in env)') .describe('d', 'setup DNS via zerigo (requires ZERIGO_DNS_KEY in env)')
.describe('dnscheck', 'whether to check for existing DNS records')
.boolean('dnscheck')
.default('dnscheck', true)
.describe('n', 'a short nickname for the VM.') .describe('n', 'a short nickname for the VM.')
.describe('u', 'publically visible URL for the instance') .describe('u', 'publically visible URL for the instance')
.describe('remote', 'add a git remote') .describe('remote', 'add a git remote')
@ -174,12 +177,16 @@ verbs['create'] = function(args) {
if (!process.env['ZERIGO_DNS_KEY']) checkErr('-d requires ZERIGO_DNS_KEY env var'); if (!process.env['ZERIGO_DNS_KEY']) checkErr('-d requires ZERIGO_DNS_KEY env var');
dnsKey = process.env['ZERIGO_DNS_KEY']; dnsKey = process.env['ZERIGO_DNS_KEY'];
dnsHost = urlparse(opts.u).host; dnsHost = urlparse(opts.u).host;
console.log(" ... Checking for DNS availability of " + dnsHost); if (opts.dnscheck) {
console.log(" ... Checking for DNS availability of " + dnsHost);
}
} }
dns.inUse(dnsKey, dnsHost, function(err, res) { dns.inUse(dnsKey, dnsHost, function(err, res) {
checkErr(err); checkErr(err);
if (res) checkErr('that domain is in use, pointing at ' + res.data); if (res && opts.dnscheck) {
checkErr('that domain is in use, pointing at ' + res.data);
}
vm.startImage({ vm.startImage({
type: opts.t type: opts.t