add openstack_version and docker_namespace choice in globals.yml
Change-Id: If077b423f2a4d26e2ff070b3b8b1714cc6301993 Signed-off-by: Zhou Ya <zhou.ya@zte.com.cn>
This commit is contained in:
parent
c24b2baf57
commit
b73af5d9bb
@ -87,6 +87,8 @@ def add_role_to_inventory(file_path, config_data):
|
||||
|
||||
# generate kolla's globals.yml file
|
||||
def update_globals_yml(config_data):
|
||||
Version = config_data['Version']
|
||||
Namespace = config_data['Namespace']
|
||||
VIP = config_data['VIP']
|
||||
IntIfMac = config_data['IntIfMac']
|
||||
ExtIfMac = config_data['ExtIfMac']
|
||||
@ -99,10 +101,12 @@ def update_globals_yml(config_data):
|
||||
'network_interface': 'eth0',
|
||||
'neutron_external_interface': 'eth1'
|
||||
}
|
||||
kolla_yml['openstack_release'] = Version.encode()
|
||||
kolla_yml['docker_registry'] = local_ip.encode()
|
||||
kolla_yml['docker_namespace'] = Namespace.encode()
|
||||
kolla_yml['kolla_internal_vip_address'] = VIP.encode()
|
||||
kolla_yml['network_interface'] = IntIfMac.encode()
|
||||
kolla_yml['neutron_external_interface'] = ExtIfMac.encode()
|
||||
kolla_yml['docker_registry'] = local_ip.encode()
|
||||
yaml.dump(kolla_yml, file('/etc/kolla/globals.yml', 'w'),
|
||||
default_flow_style=False)
|
||||
|
||||
|
@ -177,6 +177,8 @@ def get_cluster_kolla_config(req, cluster_id):
|
||||
computer_ip_list = []
|
||||
mgt_macname_list = []
|
||||
pub_macname_list = []
|
||||
openstack_version = '2.0.3'
|
||||
docker_namespace = 'kolla'
|
||||
docker_registry_ip = _get_local_ip()
|
||||
docker_registry = docker_registry_ip + ':4000'
|
||||
cluster_networks = daisy_cmn.get_cluster_networks_detail(req, cluster_id)
|
||||
@ -205,6 +207,8 @@ def get_cluster_kolla_config(req, cluster_id):
|
||||
management must be same!"))
|
||||
LOG.error(msg)
|
||||
raise HTTPForbidden(msg)
|
||||
kolla_config.update({'Version': openstack_version})
|
||||
kolla_config.update({'Namespace': docker_namespace})
|
||||
kolla_config.update({'VIP': kolla_vip})
|
||||
kolla_config.update({'IntIfMac': mgt_macname})
|
||||
kolla_config.update({'ExtIfMac': pub_macname})
|
||||
|
Loading…
Reference in New Issue
Block a user