lib/awsborn/rake.rb in awsborn-0.8.1 vs lib/awsborn/rake.rb in awsborn-0.8.2
- old
+ new
@@ -24,13 +24,25 @@
desc "Like 'all' but with chef debugging on."
task :debug => ["chef:set_chef_debug", :all]
desc "Start all servers (or host=name1,name2) but don't run chef."
task :start do |t,args|
- cluster(args).launch get_hosts(args)
+ c = cluster(args)
+ c.launch get_hosts(args)
+ info = c.load_balancer_info
+ print_required_dns_setting(info) if info
end
+ def print_required_dns_setting (info)
+ puts "Make sure those NS records are present in your DNS settings:"
+ puts(info.map do |dns_entry|
+ dns_entry[:name_servers].map do |ns|
+ "#{dns_entry[:name]}\tIN\tNS\t#{ns}."
+ end
+ end.join("\n"))
+ end
+
desc "Update .ssh/known_hosts with data from all servers (or host=host1,host2)"
task :update_known_hosts do |t,args|
hosts = get_hosts(args)
cluster(args).each do |server|
server.running? && server.update_known_hosts if hosts.nil? || hosts.include?(server.name.to_s)
@@ -130,6 +142,6 @@
Awsborn::ServerCluster.clusters.detect { |c| c.name == name } || raise("Could not find cluster named '#{name}'")
end
end
end
-end
\ No newline at end of file
+end