Designate integration

This patch implements designate integration. Added:
* 'use_designate' and 'nameservers' configs
* 'domain_name' column to Cluster and Cluster Templates and
  'dns_hostname' to Instance in DB
* get_management_ip() method for Instance for properly setup
  hostnames in cluster info and use it in ambari, cdh, mapr, spark,
  storm and vanilla plugins
* method for change /etc/resolv.conf on all cluster instances
  according to 'nameservers' config
* method for generate heat template for designate A and PTR records
* validation check for cluster template creation because now it
  contains new field - 'domain_name'
* fix unit tests appropriatly and new tests added
* updated heat_template_version to '2016-04-08' (because we use
  'str_split' method)

NOTE: in spec we proposed to use two domains: one for internal
resolution and another for external. But we decided to use only one
domain for both sides so an instance will have one hostname in the
domain and two appropriate A records because it's more convenient.

bp: designate-integration
Change-Id: I66525c0305450d8ba08840be1c95bfe79f21fff7
This commit is contained in:
Michael Ionkin 2016-07-11 17:20:02 +03:00
parent 173011bf5a
commit 1210bc96bc
1 changed files with 6 additions and 5 deletions

View File

@ -107,24 +107,25 @@ class VersionHandler(avm.AbstractVersionHandler):
if rm:
info['YARN'] = {
'Web UI': 'http://%s:%s' % (rm.management_ip, '8088'),
'ResourceManager': 'http://%s:%s' % (rm.management_ip, '8032')
'Web UI': 'http://%s:%s' % (rm.get_ip_or_dns_name(), '8088'),
'ResourceManager': 'http://%s:%s' % (
rm.get_ip_or_dns_name(), '8032')
}
if nn:
info['HDFS'] = {
'Web UI': 'http://%s:%s' % (nn.management_ip, '50070'),
'Web UI': 'http://%s:%s' % (nn.get_ip_or_dns_name(), '50070'),
'NameNode': 'hdfs://%s:%s' % (nn.hostname(), '9000')
}
if oo:
info['JobFlow'] = {
'Oozie': 'http://%s:%s' % (oo.management_ip, '11000')
'Oozie': 'http://%s:%s' % (oo.get_ip_or_dns_name(), '11000')
}
if hs:
info['MapReduce JobHistory Server'] = {
'Web UI': 'http://%s:%s' % (hs.management_ip, '19888')
'Web UI': 'http://%s:%s' % (hs.get_ip_or_dns_name(), '19888')
}
ctx = context.ctx()