Merge "modify multinode environment template" into dev/experimental
This commit is contained in:
commit
cb174227fc
@ -241,8 +241,14 @@ class ActionHelper(object):
|
|||||||
for host_id in hosts_id_list:
|
for host_id in hosts_id_list:
|
||||||
info = cluster_db.get_cluster_host(user, cluster_id, host_id)
|
info = cluster_db.get_cluster_host(user, cluster_id, host_id)
|
||||||
logging.debug("checking on info %r %r" % (host_id, info))
|
logging.debug("checking on info %r %r" % (host_id, info))
|
||||||
|
|
||||||
info[const.ROLES] = ActionHelper._get_role_names(info[const.ROLES])
|
info[const.ROLES] = ActionHelper._get_role_names(info[const.ROLES])
|
||||||
|
|
||||||
|
# TODO(grace): Is following line necessary??
|
||||||
|
roles_info = info.setdefault(const.ROLES, [])
|
||||||
|
if not roles_info:
|
||||||
|
raise Exception("Host(id=%d) haven't set any roles!" % host_id)
|
||||||
|
|
||||||
config = cluster_db.get_cluster_host_config(user,
|
config = cluster_db.get_cluster_host_config(user,
|
||||||
cluster_id,
|
cluster_id,
|
||||||
host_id)
|
host_id)
|
||||||
|
@ -253,6 +253,17 @@ class BaseConfigManager(object):
|
|||||||
def get_host_roles(self, host_id):
|
def get_host_roles(self, host_id):
|
||||||
return self.__get_host_item(host_id, const.ROLES, [])
|
return self.__get_host_item(host_id, const.ROLES, [])
|
||||||
|
|
||||||
|
def get_all_hosts_roles(self, hosts_id_list=None):
|
||||||
|
roles = []
|
||||||
|
if hosts_id_list is None:
|
||||||
|
hosts_id_list = self.get_host_id_list()
|
||||||
|
|
||||||
|
for host_id in hosts_id_list:
|
||||||
|
host_roles = self.get_host_roles(host_id)
|
||||||
|
roles.extend([role for role in host_roles if role not in roles])
|
||||||
|
|
||||||
|
return roles
|
||||||
|
|
||||||
def get_host_roles_mapping(self, host_id):
|
def get_host_roles_mapping(self, host_id):
|
||||||
roles_mapping = {}
|
roles_mapping = {}
|
||||||
deployed_pk_config = self.get_host_package_config(host_id)
|
deployed_pk_config = self.get_host_package_config(host_id)
|
||||||
|
@ -58,6 +58,7 @@ class ChefInstaller(PKInstaller):
|
|||||||
key, client = self.get_chef_credentials(installer_settings)
|
key, client = self.get_chef_credentials(installer_settings)
|
||||||
|
|
||||||
self.chef_api = self._get_chef_api(key, client)
|
self.chef_api = self._get_chef_api(key, client)
|
||||||
|
self.all_chef_roles = self.get_all_roles()
|
||||||
logging.debug('%s instance created', self)
|
logging.debug('%s instance created', self)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@ -88,6 +89,15 @@ class ChefInstaller(PKInstaller):
|
|||||||
|
|
||||||
return chef_api
|
return chef_api
|
||||||
|
|
||||||
|
def get_all_roles(self):
|
||||||
|
import chef
|
||||||
|
if not self.chef_api:
|
||||||
|
logging.info("chefAPI is None! Cannot retrieve roles from server.")
|
||||||
|
return None
|
||||||
|
|
||||||
|
roles_objs = chef.Role.list(self.chef_api)
|
||||||
|
return [name for name, value in roles_objs.items()]
|
||||||
|
|
||||||
def get_env_name(self, dist_sys_name, cluster_name):
|
def get_env_name(self, dist_sys_name, cluster_name):
|
||||||
"""Generate environment name."""
|
"""Generate environment name."""
|
||||||
return "-".join((dist_sys_name, cluster_name))
|
return "-".join((dist_sys_name, cluster_name))
|
||||||
@ -173,6 +183,9 @@ class ChefInstaller(PKInstaller):
|
|||||||
|
|
||||||
run_list = node.run_list
|
run_list = node.run_list
|
||||||
for role in roles:
|
for role in roles:
|
||||||
|
if role not in self.all_chef_roles:
|
||||||
|
raise Exception("Cannot find role '%s' on chef server!")
|
||||||
|
|
||||||
node_role = 'role[%s]' % role
|
node_role = 'role[%s]' % role
|
||||||
if node_role not in run_list:
|
if node_role not in run_list:
|
||||||
node.run_list.append(node_role)
|
node.run_list.append(node_role)
|
||||||
@ -371,6 +384,15 @@ class ChefInstaller(PKInstaller):
|
|||||||
|
|
||||||
return cluster_vars_dict
|
return cluster_vars_dict
|
||||||
|
|
||||||
|
def validate_roles(self, hosts_id_list):
|
||||||
|
hosts_roles = self.config_manager.get_all_hosts_roles(hosts_id_list)
|
||||||
|
for role in hosts_roles:
|
||||||
|
if role not in self.all_chef_roles:
|
||||||
|
logging.error("Role: %s cannot be found on chef server!",
|
||||||
|
role)
|
||||||
|
return False
|
||||||
|
return True
|
||||||
|
|
||||||
def deploy(self):
|
def deploy(self):
|
||||||
"""Start to deploy a distributed system. Return both cluster and hosts
|
"""Start to deploy a distributed system. Return both cluster and hosts
|
||||||
deployed configs. The return format:
|
deployed configs. The return format:
|
||||||
@ -395,6 +417,9 @@ class ChefInstaller(PKInstaller):
|
|||||||
if not host_list:
|
if not host_list:
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
if self.validate_roles(host_list) is False:
|
||||||
|
raise Exception("Some role cannot be found in chef server!")
|
||||||
|
|
||||||
adapter_name = self.config_manager.get_adapter_name()
|
adapter_name = self.config_manager.get_adapter_name()
|
||||||
cluster_name = self.config_manager.get_clustername()
|
cluster_name = self.config_manager.get_clustername()
|
||||||
env_name = self.get_env_name(adapter_name, cluster_name)
|
env_name = self.get_env_name(adapter_name, cluster_name)
|
||||||
|
@ -63,6 +63,10 @@ class TestChefInstaller(unittest2.TestCase):
|
|||||||
|
|
||||||
ChefInstaller._get_chef_api = Mock()
|
ChefInstaller._get_chef_api = Mock()
|
||||||
ChefInstaller._get_chef_api.return_value = 'mock_server'
|
ChefInstaller._get_chef_api.return_value = 'mock_server'
|
||||||
|
ChefInstaller.get_all_roles = Mock()
|
||||||
|
ChefInstaller.get_all_roles.return_value = []
|
||||||
|
ChefInstaller.validate_roles = Mock()
|
||||||
|
ChefInstaller.validate_roles.return_value = True
|
||||||
chef_installer = ChefInstaller(config_manager)
|
chef_installer = ChefInstaller(config_manager)
|
||||||
return chef_installer
|
return chef_installer
|
||||||
|
|
||||||
@ -83,8 +87,9 @@ class TestChefInstaller(unittest2.TestCase):
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
output = self.test_chef._generate_node_attributes(['os-compute'],
|
output = self.test_chef._generate_node_attributes(
|
||||||
vars_dict)
|
['os-compute-worker'], vars_dict
|
||||||
|
)
|
||||||
self.maxDiff = None
|
self.maxDiff = None
|
||||||
self.assertDictEqual(expected_node_attr, output)
|
self.assertDictEqual(expected_node_attr, output)
|
||||||
|
|
||||||
@ -97,8 +102,6 @@ class TestChefInstaller(unittest2.TestCase):
|
|||||||
"json_class": "Chef::Environment",
|
"json_class": "Chef::Environment",
|
||||||
"chef_type": "environment",
|
"chef_type": "environment",
|
||||||
"default_attributes": {
|
"default_attributes": {
|
||||||
},
|
|
||||||
"override_attributes": {
|
|
||||||
"compute": {
|
"compute": {
|
||||||
"syslog": {
|
"syslog": {
|
||||||
"use": False
|
"use": False
|
||||||
@ -113,6 +116,11 @@ class TestChefInstaller(unittest2.TestCase):
|
|||||||
"bind_interface": "eth0"
|
"bind_interface": "eth0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"network": {
|
||||||
|
"l3": {
|
||||||
|
"external_network_bridge_interface": "eth2"
|
||||||
|
}
|
||||||
|
},
|
||||||
"db": {
|
"db": {
|
||||||
"bind_interface": "vnet0",
|
"bind_interface": "vnet0",
|
||||||
"compute": {
|
"compute": {
|
||||||
@ -231,7 +239,7 @@ class TestChefInstaller(unittest2.TestCase):
|
|||||||
"subnet": "172.16.1.0/24"
|
"subnet": "172.16.1.0/24"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"os_compute": {
|
"os_compute_worker": {
|
||||||
"management": {
|
"management": {
|
||||||
"interface": "eth0",
|
"interface": "eth0",
|
||||||
"ip": "12.234.32.101",
|
"ip": "12.234.32.101",
|
||||||
@ -312,7 +320,7 @@ class TestChefInstaller(unittest2.TestCase):
|
|||||||
2: {
|
2: {
|
||||||
"deployed_package_config": {
|
"deployed_package_config": {
|
||||||
"roles_mapping": {
|
"roles_mapping": {
|
||||||
"os_compute": {
|
"os_compute_worker": {
|
||||||
"management": {
|
"management": {
|
||||||
"interface": "eth0",
|
"interface": "eth0",
|
||||||
"ip": "12.234.32.101",
|
"ip": "12.234.32.101",
|
||||||
@ -368,7 +376,7 @@ class TestChefInstaller(unittest2.TestCase):
|
|||||||
"subnet": "10.0.0.0/24"
|
"subnet": "10.0.0.0/24"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"os_compute": {
|
"os_compute_worker": {
|
||||||
"management": {
|
"management": {
|
||||||
"interface": "eth0",
|
"interface": "eth0",
|
||||||
"ip": "12.234.32.103",
|
"ip": "12.234.32.103",
|
||||||
|
@ -81,7 +81,7 @@ class TestConfigManager(unittest2.TestCase):
|
|||||||
"subnet": "172.16.1.0/24"
|
"subnet": "172.16.1.0/24"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"os_compute": {
|
"os_compute_worker": {
|
||||||
"management": {
|
"management": {
|
||||||
"interface": "eth0",
|
"interface": "eth0",
|
||||||
"ip": "12.234.32.101",
|
"ip": "12.234.32.101",
|
||||||
@ -130,6 +130,12 @@ class TestConfigManager(unittest2.TestCase):
|
|||||||
output = self.test_config_manager.get_cluster_roles_mapping()
|
output = self.test_config_manager.get_cluster_roles_mapping()
|
||||||
self.assertEqual(expected_output, output)
|
self.assertEqual(expected_output, output)
|
||||||
|
|
||||||
|
def test_get_all_hosts_roles(self):
|
||||||
|
expected_output = ['os-compute-worker', 'os-network', 'os-controller']
|
||||||
|
output = self.test_config_manager.get_all_hosts_roles()
|
||||||
|
self.assertEqual(len(expected_output), len(output))
|
||||||
|
self.assertEqual(sorted(expected_output), sorted(output))
|
||||||
|
|
||||||
def test_get_host_role_mapping(self):
|
def test_get_host_role_mapping(self):
|
||||||
expected_output = {
|
expected_output = {
|
||||||
"os_network": {
|
"os_network": {
|
||||||
@ -158,7 +164,7 @@ class TestConfigManager(unittest2.TestCase):
|
|||||||
"subnet": "10.0.0.0/24"
|
"subnet": "10.0.0.0/24"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"os_compute": {
|
"os_compute_worker": {
|
||||||
"management": {
|
"management": {
|
||||||
"interface": "eth0",
|
"interface": "eth0",
|
||||||
"ip": "12.234.32.103",
|
"ip": "12.234.32.103",
|
||||||
|
@ -287,7 +287,7 @@ hosts_test_config = {
|
|||||||
"mac": "00:0c:29:3e:60:a1",
|
"mac": "00:0c:29:3e:60:a1",
|
||||||
"name": "server02.test",
|
"name": "server02.test",
|
||||||
"hostname": "server02",
|
"hostname": "server02",
|
||||||
"roles": ["os-compute"],
|
"roles": ["os-compute-worker"],
|
||||||
"networks": {
|
"networks": {
|
||||||
"eth0": {
|
"eth0": {
|
||||||
"ip": "12.234.32.101",
|
"ip": "12.234.32.101",
|
||||||
@ -326,7 +326,7 @@ hosts_test_config = {
|
|||||||
"mac": "00:0c:29:3e:60:a2",
|
"mac": "00:0c:29:3e:60:a2",
|
||||||
"name": "server03.test",
|
"name": "server03.test",
|
||||||
"hostname": "server03",
|
"hostname": "server03",
|
||||||
"roles": ["os-network", "os-compute"],
|
"roles": ["os-network", "os-compute-worker"],
|
||||||
"networks": {
|
"networks": {
|
||||||
"eth0": {
|
"eth0": {
|
||||||
"ip": "12.234.32.103",
|
"ip": "12.234.32.103",
|
||||||
|
@ -1,3 +1,47 @@
|
|||||||
|
#set controller_role = $get_role('os_compute_controller', $getVar('os_controller', None))
|
||||||
|
|
||||||
|
## Contoller node management IP/interface
|
||||||
|
#set controller_ip = $controller_role.management.ip
|
||||||
|
#set controller_nic = $controller_role.management.interface
|
||||||
|
|
||||||
|
## Compute node management IP/interface
|
||||||
|
#set compute_role = $getVar('os_compute_worker', None)
|
||||||
|
#set compute_nic = $compute_role.management.interface
|
||||||
|
|
||||||
|
## Network server/worker node IP/interface
|
||||||
|
#set network = $getVar('os_network', None)
|
||||||
|
#set network_server_role = $get_role('os_network_server', [$network, $controller_role])
|
||||||
|
#set network_worker_role = $get_role('os_network_worker', [$network, $compute_role])
|
||||||
|
|
||||||
|
#set network_server_ip = $network_server_role.management.ip
|
||||||
|
#set network_server_nic = $network_server_role.management.interface
|
||||||
|
|
||||||
|
## Network worker node management IP/interface
|
||||||
|
#set network_worker_ip = $network_worker_role.management.ip
|
||||||
|
#set network_worker_nic = $network_worker_role.management.interface
|
||||||
|
#set network_worker_public_nic = $network_worker_role.public.interface
|
||||||
|
|
||||||
|
## Database node management IP
|
||||||
|
#set db_role = $get_role('os_ops_database', $controller_role)
|
||||||
|
#set db_ip = $db_role.management.ip
|
||||||
|
|
||||||
|
#def get_role($role_name, $default_roles=None)
|
||||||
|
#set target_role = $getVar($role_name, None)
|
||||||
|
#if $target_role is None and $default_roles is not None:
|
||||||
|
#if isinstance($default_roles, list)
|
||||||
|
#for $role in $default_roles
|
||||||
|
#if $role is not None:
|
||||||
|
#set target_role = $role
|
||||||
|
#break
|
||||||
|
#end if
|
||||||
|
#end for
|
||||||
|
#else
|
||||||
|
#set target_role = $default_roles
|
||||||
|
#end if
|
||||||
|
#end if
|
||||||
|
#return target_role
|
||||||
|
#end def
|
||||||
|
|
||||||
#set credentials = $getVar('service_credentials', {})
|
#set credentials = $getVar('service_credentials', {})
|
||||||
{
|
{
|
||||||
"name": "testing",
|
"name": "testing",
|
||||||
@ -7,29 +51,32 @@
|
|||||||
"json_class": "Chef::Environment",
|
"json_class": "Chef::Environment",
|
||||||
"chef_type": "environment",
|
"chef_type": "environment",
|
||||||
"default_attributes": {
|
"default_attributes": {
|
||||||
},
|
|
||||||
"override_attributes": {
|
|
||||||
"compute": {
|
"compute": {
|
||||||
"syslog": {
|
"syslog": {
|
||||||
"use": false
|
"use": false
|
||||||
},
|
},
|
||||||
"libvirt": {
|
"libvirt": {
|
||||||
"bind_interface": "$os_compute.management.interface"
|
"bind_interface": "$compute_nic"
|
||||||
},
|
},
|
||||||
"novnc_proxy": {
|
"novnc_proxy": {
|
||||||
"bind_interface": "$os_controller.management.interface"
|
"bind_interface": "$controller_nic"
|
||||||
},
|
},
|
||||||
"xvpvnc_proxy": {
|
"xvpvnc_proxy": {
|
||||||
"bind_interface": "eth0"
|
"bind_interface": "eth0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"network": {
|
||||||
|
"l3": {
|
||||||
|
"external_network_bridge_interface": "$network_worker_public_nic"
|
||||||
|
}
|
||||||
|
},
|
||||||
"db": {
|
"db": {
|
||||||
"bind_interface": "$os_controller.management.interface",
|
"bind_interface": "$controller_nic",
|
||||||
"compute": {
|
"compute": {
|
||||||
"host": "$os_controller.management.ip"
|
"host": "$db_ip"
|
||||||
},
|
},
|
||||||
"identity": {
|
"identity": {
|
||||||
"host": "$os_controller.management.ip"
|
"host": "$db_ip"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"mq": {
|
"mq": {
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"openstack": {
|
"openstack": {
|
||||||
"endpoints": {
|
"endpoints": {
|
||||||
"compute-vnc-bind": {
|
"compute-vnc-bind": {
|
||||||
"host":"$os_compute.management.ip"
|
"host":"$os_compute_worker.management.ip"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -5,12 +5,21 @@ FLAVORS = [{
|
|||||||
'template': 'allinone.tmpl',
|
'template': 'allinone.tmpl',
|
||||||
'roles': ['allinone-compute']
|
'roles': ['allinone-compute']
|
||||||
}, {
|
}, {
|
||||||
'flavor': 'multinodes',
|
'flavor': 'single-contoller-multi-compute',
|
||||||
'display_name': 'Multi-node Cluster',
|
'display_name': 'Single controller multi-compute',
|
||||||
'template': 'multinodes.tmpl',
|
'template': 'multinodes.tmpl',
|
||||||
'roles': [
|
'roles': [
|
||||||
'os-compute-worker', 'os-network', 'os-block-storage-worker',
|
'os-controller', 'os-compute-worker', 'os-network',
|
||||||
'os-image', 'os-compute-vncproxy', 'os-controller',
|
'os-block-storage-volume'
|
||||||
'os-ops-messaging', 'os-ops-database', 'ha-proxy'
|
]
|
||||||
|
}, {
|
||||||
|
'flavor': 'multinodes',
|
||||||
|
'display_name': 'multi-nodes',
|
||||||
|
'template': 'multnodes.tmpl',
|
||||||
|
'roles': [
|
||||||
|
'os-compute-controller','os-compute-worker', 'os-network-server',
|
||||||
|
'os-network-worker', 'os-block-storage-volume',
|
||||||
|
'os-block-storage-controller', 'os-image', 'os-dashboard',
|
||||||
|
'os-identity', 'os-ops-messaging', 'os-ops-database', 'ha-proxy'
|
||||||
]
|
]
|
||||||
}]
|
}]
|
||||||
|
@ -6,5 +6,5 @@ SETTINGS = {
|
|||||||
'chef_server_dns': '$chef_hostname',
|
'chef_server_dns': '$chef_hostname',
|
||||||
'key_dir': '',
|
'key_dir': '',
|
||||||
'client_name': '',
|
'client_name': '',
|
||||||
'databags': ['user_passwords', 'db_passwords', 'service_passwords', 'secrets']
|
'databags': []
|
||||||
}
|
}
|
||||||
|
@ -6,11 +6,27 @@ ROLES = [{
|
|||||||
}, {
|
}, {
|
||||||
'role': 'os-network',
|
'role': 'os-network',
|
||||||
'display_name': 'network node',
|
'display_name': 'network node',
|
||||||
'description': 'network node'
|
'description': 'network node including network server'
|
||||||
|
}, {
|
||||||
|
'role': 'os-network-server',
|
||||||
|
'display_name': 'network server node',
|
||||||
|
'description': 'network server node'
|
||||||
|
}, {
|
||||||
|
'role': 'os-network-worker',
|
||||||
|
'display_name': 'network node',
|
||||||
|
'description': 'network node including network server'
|
||||||
|
}, {
|
||||||
|
'role': 'os-block-storage-controller',
|
||||||
|
'display_name': 'storage controller node',
|
||||||
|
'description': 'storage controller node'
|
||||||
},{
|
},{
|
||||||
'role': 'os-block-storage-worker',
|
'role': 'os-block-storage-worker',
|
||||||
'display_name': 'storage node',
|
'display_name': 'storage node',
|
||||||
'description': 'storage node'
|
'description': 'storage node'
|
||||||
|
}, {
|
||||||
|
'role': 'os-block-storage-volume',
|
||||||
|
'display_name': 'storage node',
|
||||||
|
'description': 'storage node'
|
||||||
}, {
|
}, {
|
||||||
'role': 'os-image',
|
'role': 'os-image',
|
||||||
'display_name': 'image node',
|
'display_name': 'image node',
|
||||||
@ -22,7 +38,11 @@ ROLES = [{
|
|||||||
}, {
|
}, {
|
||||||
'role': 'os-controller',
|
'role': 'os-controller',
|
||||||
'display_name': 'controller node',
|
'display_name': 'controller node',
|
||||||
'description': 'controller node'
|
'description': 'controller node including identity, dashboard, network server, and block stroage controller services'
|
||||||
|
}, {
|
||||||
|
'role': 'os-compute-controller',
|
||||||
|
'display_name': 'controller-only node',
|
||||||
|
'description': 'controller node for nova APIs'
|
||||||
}, {
|
}, {
|
||||||
'role': 'os-ops-messaging',
|
'role': 'os-ops-messaging',
|
||||||
'display_name': 'message queue node',
|
'display_name': 'message queue node',
|
||||||
@ -31,6 +51,14 @@ ROLES = [{
|
|||||||
'role': 'os-ops-database',
|
'role': 'os-ops-database',
|
||||||
'display_name': 'database node',
|
'display_name': 'database node',
|
||||||
'description': 'database node'
|
'description': 'database node'
|
||||||
|
}, {
|
||||||
|
'role': 'os-identity',
|
||||||
|
'display_name': 'keystone node',
|
||||||
|
'description': 'keystone node'
|
||||||
|
}, {
|
||||||
|
'role': 'os-dashboard',
|
||||||
|
'display_name': 'dashboard node',
|
||||||
|
'description': 'dashboard node'
|
||||||
}, {
|
}, {
|
||||||
'role': 'ha-proxy',
|
'role': 'ha-proxy',
|
||||||
'display_name': 'ha proxy node',
|
'display_name': 'ha proxy node',
|
||||||
|
@ -1,11 +1,29 @@
|
|||||||
{
|
{
|
||||||
"nova": {
|
"nova": {
|
||||||
"nova": "mypass"
|
"nova": "nova"
|
||||||
},
|
},
|
||||||
"horizon": {
|
"horizon": {
|
||||||
"horizon": "horizon"
|
"horizon": "horizon"
|
||||||
},
|
},
|
||||||
"keystone": {
|
"keystone": {
|
||||||
"identity": "identity"
|
"identity": "identity"
|
||||||
|
},
|
||||||
|
"glance": {
|
||||||
|
"glance": "glance"
|
||||||
|
},
|
||||||
|
"ceilometer": {
|
||||||
|
"ceilometer": "ceilometer"
|
||||||
|
},
|
||||||
|
"neutron": {
|
||||||
|
"neutron": "neutron"
|
||||||
|
},
|
||||||
|
"cinder": {
|
||||||
|
"cinder": "cinder"
|
||||||
|
},
|
||||||
|
"heat": {
|
||||||
|
"heat": "heat"
|
||||||
|
},
|
||||||
|
"dash": {
|
||||||
|
"dash": "dash"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"openstack_identity_bootstrap_token": {
|
||||||
|
"openstack_identity_bootstrap_token": "openstack_identity_bootstrap_token"
|
||||||
|
},
|
||||||
|
"neutron_metadata_secret": {
|
||||||
|
"neutron_metadata_secret": "neutron_metadata_secret"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"openstack-image": {
|
||||||
|
"openstack-image" : "openstack-image"
|
||||||
|
},
|
||||||
|
"openstack-compute": {
|
||||||
|
"openstack-compute": "openstack-compute"
|
||||||
|
},
|
||||||
|
"openstack-block-storage": {
|
||||||
|
"openstack-block-storage": "openstack-block-storage"
|
||||||
|
},
|
||||||
|
"openstack-orchestration": {
|
||||||
|
"openstack-orchestration": "openstack-orchestration"
|
||||||
|
},
|
||||||
|
"openstack-network": {
|
||||||
|
"openstack-network": "openstack-network"
|
||||||
|
},
|
||||||
|
"rbd": {
|
||||||
|
"rbd": "rbd"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"admin": {
|
||||||
|
"admin": "admin"
|
||||||
|
}
|
||||||
|
}
|
@ -1,4 +1,6 @@
|
|||||||
#set credentials = $service_credentials
|
#set credentials = $service_credentials
|
||||||
|
|
||||||
|
## allinone compute management IP/interface
|
||||||
#set allinone_compute_mgmt_nic = $allinone_compute.management.interface
|
#set allinone_compute_mgmt_nic = $allinone_compute.management.interface
|
||||||
#set allinone_compute_mgmt_ip = $allinone_compute.management.ip
|
#set allinone_compute_mgmt_ip = $allinone_compute.management.ip
|
||||||
{
|
{
|
||||||
@ -275,18 +277,27 @@
|
|||||||
"admin"
|
"admin"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"demo": {
|
||||||
|
"password": "demo",
|
||||||
|
"default_tenant": "demo",
|
||||||
|
"roles": {
|
||||||
|
"member": [
|
||||||
|
"demo"
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"image": {
|
"image": {
|
||||||
"api": {
|
"api": {
|
||||||
"bind_interface": "eth0"
|
"bind_interface": "$allinone_compute_mgmt_nic"
|
||||||
},
|
},
|
||||||
"debug": true,
|
"debug": true,
|
||||||
"identity_service_chef_role": "os-identity",
|
"identity_service_chef_role": "os-identity",
|
||||||
"rabbit_server_chef_role": "os-ops-messaging",
|
"rabbit_server_chef_role": "os-ops-messaging",
|
||||||
"registry": {
|
"registry": {
|
||||||
"bind_interface": "eth0"
|
"bind_interface": "$allinone_compute_mgmt_nic"
|
||||||
},
|
},
|
||||||
"syslog": {
|
"syslog": {
|
||||||
"use": false
|
"use": false
|
||||||
@ -299,7 +310,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"memcached_servers": [
|
"memcached_servers": [
|
||||||
"$allinone_compute_mgmt_nic:11211"
|
"$allinone_compute_mgmt_ip:11211"
|
||||||
],
|
],
|
||||||
"mq": {
|
"mq": {
|
||||||
"user": "$credentials.rabbitmq.username",
|
"user": "$credentials.rabbitmq.username",
|
||||||
|
@ -1,4 +1,69 @@
|
|||||||
#set controller_mgmt_ip = $os_controller.management.ip
|
#set controller_role = $get_role('os_compute_controller', $getVar('os_controller', None))
|
||||||
|
|
||||||
|
## Contoller node management IP/interface
|
||||||
|
#set controller_ip = $controller_role.management.ip
|
||||||
|
#set controller_nic = $controller_role.management.interface
|
||||||
|
|
||||||
|
## Compute node management IP/interface
|
||||||
|
#set compute_role = $getVar('os_compute_worker', None)
|
||||||
|
#set compute_nic = $compute_role.management.interface
|
||||||
|
|
||||||
|
## Network server/worker node IP/interface
|
||||||
|
#set network = $getVar('os_network', None)
|
||||||
|
#set network_server_role = $get_role('os_network_server', [$network, $controller_role])
|
||||||
|
#set network_worker_role = $get_role('os_network_worker', [$network, $compute_role])
|
||||||
|
|
||||||
|
#set network_server_ip = $network_server_role.management.ip
|
||||||
|
#set network_server_nic = $network_server_role.management.interface
|
||||||
|
|
||||||
|
## Network worker node management IP/interface
|
||||||
|
#set network_worker_ip = $network_worker_role.management.ip
|
||||||
|
#set network_worker_nic = $network_worker_role.management.interface
|
||||||
|
#set network_worker_public_nic = $network_worker_role.public.interface
|
||||||
|
|
||||||
|
## Database node management IP
|
||||||
|
#set db_role = $get_role('os_ops_database', $controller_role)
|
||||||
|
#set db_ip = $db_role.management.ip
|
||||||
|
|
||||||
|
## Message queue node management IP/interface
|
||||||
|
#set msg_queue_role = $get_role('os_ops_messaging', $controller_role)
|
||||||
|
#set msg_queue_ip = $msg_queue_role.management.ip
|
||||||
|
|
||||||
|
## Identity (keystone) node IP/interface
|
||||||
|
#set identity_role = $get_role('os_identity', $controller_role)
|
||||||
|
#set identity_ip = $identity_role.management.ip
|
||||||
|
#set identity_nic = $identity_role.management.interface
|
||||||
|
|
||||||
|
## Glance node management IP/interface
|
||||||
|
#set glance_role = $get_role('os_image', $controller_role)
|
||||||
|
#set glance_ip = $glance_role.management.ip
|
||||||
|
#set glance_nic = $glance_role.management.interface
|
||||||
|
|
||||||
|
## Cinder node management IP/interface
|
||||||
|
#set cinder_role = $get_role('os_block_storage_controller', $controller_role)
|
||||||
|
#set cinder_controller_ip = $cinder_role.management.ip
|
||||||
|
#set cinder_controller_nic = $cinder_role.management.interface
|
||||||
|
|
||||||
|
## Dashboard node management IP/interface
|
||||||
|
#set dash_role = $get_role('os_dashboard', $controller_role)
|
||||||
|
#set dash_ip = $dash_role.management.ip
|
||||||
|
|
||||||
|
#def get_role($role_name, $default_roles=None)
|
||||||
|
#set target_role = $getVar($role_name, None)
|
||||||
|
#if $target_role is None and $default_roles is not None
|
||||||
|
#if isinstance($default_roles, list)
|
||||||
|
#for $role in $default_roles
|
||||||
|
#if $role is not None
|
||||||
|
#set target_role = $role
|
||||||
|
#break
|
||||||
|
#end if
|
||||||
|
#end for
|
||||||
|
#else
|
||||||
|
#set target_role = $default_roles
|
||||||
|
#end if
|
||||||
|
#end if
|
||||||
|
#return $target_role
|
||||||
|
#end def
|
||||||
{
|
{
|
||||||
"name": "testing",
|
"name": "testing",
|
||||||
"description": "Environment used in testing the upstream cookbooks and reference Chef repository",
|
"description": "Environment used in testing the upstream cookbooks and reference Chef repository",
|
||||||
@ -31,18 +96,17 @@
|
|||||||
"use_ssl": "false"
|
"use_ssl": "false"
|
||||||
},
|
},
|
||||||
"compute": {
|
"compute": {
|
||||||
#set compute_mgmt_nic = $os_compute_worker.management.interface
|
|
||||||
"syslog": {
|
"syslog": {
|
||||||
"use": false
|
"use": false
|
||||||
},
|
},
|
||||||
"libvirt": {
|
"libvirt": {
|
||||||
"bind_interface": "$compute_mgmt_nic"
|
"bind_interface": "$compute_nic"
|
||||||
},
|
},
|
||||||
"novnc_proxy": {
|
"novnc_proxy": {
|
||||||
"bind_interface": "$compute_mgmt_nic"
|
"bind_interface": "$compute_nic"
|
||||||
},
|
},
|
||||||
"xvpvnc_proxy": {
|
"xvpvnc_proxy": {
|
||||||
"bind_interface": "$compute_mgmt_nic"
|
"bind_interface": "$compute_nic"
|
||||||
},
|
},
|
||||||
"ratelimit": {
|
"ratelimit": {
|
||||||
"api": {
|
"api": {
|
||||||
@ -74,96 +138,81 @@
|
|||||||
"tunnel_id_ranges": "1:1000"
|
"tunnel_id_ranges": "1:1000"
|
||||||
},
|
},
|
||||||
"l3": {
|
"l3": {
|
||||||
"external_network_bridge_interface": "$os_compute_worker.public.interface"
|
"external_network_bridge_interface": "$network_worker_public_nic"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"db": {
|
"db": {
|
||||||
"bind_interface": "$os_controller.management.interface",
|
"bind_interface": "$controller_ip",
|
||||||
#set db_role = $getVar('os_ops_database', None)
|
|
||||||
#set db_mgmt_ip = $os_controller.management.ip
|
|
||||||
#if db_role is not None:
|
|
||||||
#set db_mgmt_ip = $db_role.management.ip
|
|
||||||
#end if
|
|
||||||
"compute": {
|
"compute": {
|
||||||
"host": "$db_mgmt_ip"
|
"host": "$db_ip"
|
||||||
},
|
},
|
||||||
"identity": {
|
"identity": {
|
||||||
"host": "$db_mgmt_ip"
|
"host": "$db_ip"
|
||||||
},
|
},
|
||||||
"image": {
|
"image": {
|
||||||
"host": "$db_mgmt_ip"
|
"host": "$db_ip"
|
||||||
},
|
},
|
||||||
"network": {
|
"network": {
|
||||||
"host": "$db_mgmt_ip"
|
"host": "$db_ip"
|
||||||
},
|
},
|
||||||
"volume": {
|
"volume": {
|
||||||
"host": "$db_mgmt_ip"
|
"host": "$db_ip"
|
||||||
},
|
},
|
||||||
"dashboard": {
|
"dashboard": {
|
||||||
"host": "$db_mgmt_ip"
|
"host": "$db_ip"
|
||||||
},
|
},
|
||||||
"telemetry": {
|
"telemetry": {
|
||||||
"host": "$db_mgmt_ip"
|
"host": "$db_ip"
|
||||||
},
|
},
|
||||||
"orchestration": {
|
"orchestration": {
|
||||||
"host": "$db_mgmt_ip"
|
"host": "$db_ip"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"developer_mode": true,
|
"developer_mode": true,
|
||||||
"endpoints": {
|
"endpoints": {
|
||||||
"db": {
|
"db": {
|
||||||
"host": "$db_mgmt_ip"
|
"host": "$db_ip"
|
||||||
},
|
},
|
||||||
"mq": {
|
"mq": {
|
||||||
#set msg_queue_ip = controller_mgmt_ip
|
|
||||||
#if $getVar('os_ops_messaging', None) is not None:
|
|
||||||
#set msg_queue_ip = $os_ops_messaging.management.ip
|
|
||||||
#end if
|
|
||||||
"host": "$msg_queue_ip"
|
"host": "$msg_queue_ip"
|
||||||
},
|
},
|
||||||
"compute-api": {
|
"compute-api": {
|
||||||
"host": "$controller_mgmt_ip",
|
"host": "$controller_ip",
|
||||||
"scheme": "http",
|
"scheme": "http",
|
||||||
"port": "8774",
|
"port": "8774",
|
||||||
"path": "/v2/%(tenant_id)s"
|
"path": "/v2/%(tenant_id)s"
|
||||||
},
|
},
|
||||||
"compute-api-bind": {
|
"compute-api-bind": {
|
||||||
"bind_interface": "$os_controller.management.interface"
|
"bind_interface": "$controller_nic"
|
||||||
},
|
},
|
||||||
"compute-ec2-admin": {
|
"compute-ec2-admin": {
|
||||||
"host": "$controller_mgmt_ip",
|
"host": "$controller_ip",
|
||||||
"scheme": "http",
|
"scheme": "http",
|
||||||
"port": "8773",
|
"port": "8773",
|
||||||
"path": "/services/Admin"
|
"path": "/services/Admin"
|
||||||
},
|
},
|
||||||
"compute-ec2-api": {
|
"compute-ec2-api": {
|
||||||
"host": "$controller_mgmt_ip",
|
"host": "$controller_ip",
|
||||||
"scheme": "http",
|
"scheme": "http",
|
||||||
"port": "8773",
|
"port": "8773",
|
||||||
"path": "/services/Cloud"
|
"path": "/services/Cloud"
|
||||||
},
|
},
|
||||||
"compute-novnc": {
|
"compute-novnc": {
|
||||||
"host": "$controller_mgmt_ip",
|
"host": "$controller_ip",
|
||||||
"scheme": "http",
|
"scheme": "http",
|
||||||
"port": "6080",
|
"port": "6080",
|
||||||
"path": "/vnc_auto.html"
|
"path": "/vnc_auto.html"
|
||||||
},
|
},
|
||||||
"compute-novnc-bind": {
|
"compute-novnc-bind": {
|
||||||
"bind_interface": "$os_controller.management.interface"
|
"bind_interface": "$controller_nic"
|
||||||
},
|
},
|
||||||
"compute-vnc-bind": {
|
"compute-vnc-bind": {
|
||||||
"bind_interface" : "$os_compute_worker.management.interface"
|
"bind_interface" : "$compute_nic"
|
||||||
},
|
},
|
||||||
"vnc_bind": {
|
"vnc_bind": {
|
||||||
"bind_interface": "$os_controller.management.interface"
|
"bind_interface": "$controller_nic"
|
||||||
},
|
},
|
||||||
"image-api": {
|
"image-api": {
|
||||||
#set glance_ip = controller_mgmt_ip
|
|
||||||
#set glance_nic = $os_controller.management.interface
|
|
||||||
#if $getVar('os_image', None) is not None:
|
|
||||||
#set glance_ip = $os_image.management.ip
|
|
||||||
#set glance_nic = $os_image.management.interface
|
|
||||||
#end if
|
|
||||||
"host": "$glance_ip",
|
"host": "$glance_ip",
|
||||||
"scheme": "http",
|
"scheme": "http",
|
||||||
"port": "9292",
|
"port": "9292",
|
||||||
@ -182,55 +231,55 @@
|
|||||||
"bind_interface": "$glance_nic"
|
"bind_interface": "$glance_nic"
|
||||||
},
|
},
|
||||||
"identity-bind": {
|
"identity-bind": {
|
||||||
"bind_interface": "$os_controller.management.interface"
|
"bind_interface": "$identity_nic"
|
||||||
},
|
},
|
||||||
"identity-api": {
|
"identity-api": {
|
||||||
"host": "$controller_mgmt_ip",
|
"host": "$identity_ip",
|
||||||
"scheme": "http",
|
"scheme": "http",
|
||||||
"port": "5000",
|
"port": "5000",
|
||||||
"path": "/v2.0"
|
"path": "/v2.0"
|
||||||
},
|
},
|
||||||
"identity-admin": {
|
"identity-admin": {
|
||||||
"host": "$controller_mgmt_ip",
|
"host": "$identity_ip",
|
||||||
"scheme": "http",
|
"scheme": "http",
|
||||||
"port": "35357",
|
"port": "35357",
|
||||||
"path": "/v2.0"
|
"path": "/v2.0"
|
||||||
},
|
},
|
||||||
"block-storage-api": {
|
"block-storage-api": {
|
||||||
"host": "$controller_mgmt_ip",
|
"host": "$cinder_controller_ip",
|
||||||
"scheme": "http",
|
"scheme": "http",
|
||||||
"port": "8776",
|
"port": "8776",
|
||||||
"path": "/v1/%(tenant_id)s"
|
"path": "/v1/%(tenant_id)s"
|
||||||
},
|
},
|
||||||
"block-storage-api-bind": {
|
"block-storage-api-bind": {
|
||||||
"bind_interface": "$os_controller.management.interface"
|
"bind_interface": "$cinder_controller_nic"
|
||||||
},
|
},
|
||||||
"telemetry-api": {
|
"telemetry-api": {
|
||||||
"host": "$controller_mgmt_ip",
|
"host": "$controller_ip",
|
||||||
"scheme": "http",
|
"scheme": "http",
|
||||||
"port": "8777",
|
"port": "8777",
|
||||||
"path": "/v1"
|
"path": "/v1"
|
||||||
},
|
},
|
||||||
"network-api": {
|
"network-api": {
|
||||||
"host": "$controller_mgmt_ip",
|
"host": "$network_server_ip",
|
||||||
"scheme": "http",
|
"scheme": "http",
|
||||||
"port": "9696",
|
"port": "9696",
|
||||||
"path": ""
|
"path": ""
|
||||||
},
|
},
|
||||||
"network-api-bind": {
|
"network-api-bind": {
|
||||||
"bind_interface": "$os_controller.management.interface"
|
"bind_interface": "$network_server_nic"
|
||||||
},
|
},
|
||||||
"network-openvswitch": {
|
"network-openvswitch": {
|
||||||
"bind_interface": "$os_controller.management.interface"
|
"bind_interface": "$network_server_nic"
|
||||||
},
|
},
|
||||||
"orchestration-api": {
|
"orchestration-api": {
|
||||||
"host": "$controller_mgmt_ip",
|
"host": "$controller_ip",
|
||||||
"scheme": "http",
|
"scheme": "http",
|
||||||
"port": "8004",
|
"port": "8004",
|
||||||
"path": "/v1/%(tenant_id)s"
|
"path": "/v1/%(tenant_id)s"
|
||||||
},
|
},
|
||||||
"orchestration-api-cfn": {
|
"orchestration-api-cfn": {
|
||||||
"host": "$controller_mgmt_ip",
|
"host": "$controller_ip",
|
||||||
"scheme": "http",
|
"scheme": "http",
|
||||||
"port": "8000",
|
"port": "8000",
|
||||||
"path": "/v1"
|
"path": "/v1"
|
||||||
@ -238,7 +287,7 @@
|
|||||||
},
|
},
|
||||||
"identity": {
|
"identity": {
|
||||||
"admin_user": "admin",
|
"admin_user": "admin",
|
||||||
"bind_interface": "$os_controller.management.interface",
|
"bind_interface": "$identity_nic",
|
||||||
"catalog": {
|
"catalog": {
|
||||||
"backend": "sql"
|
"backend": "sql"
|
||||||
},
|
},
|
||||||
@ -252,7 +301,8 @@
|
|||||||
},
|
},
|
||||||
"tenants": [
|
"tenants": [
|
||||||
"admin",
|
"admin",
|
||||||
"service"
|
"service",
|
||||||
|
"demo"
|
||||||
],
|
],
|
||||||
"token": {
|
"token": {
|
||||||
"backend": "sql"
|
"backend": "sql"
|
||||||
@ -266,6 +316,15 @@
|
|||||||
"admin"
|
"admin"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"demo": {
|
||||||
|
"password": "demo",
|
||||||
|
"default_tenant": "demo",
|
||||||
|
"roles": {
|
||||||
|
"member": [
|
||||||
|
"demo"
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -288,7 +347,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"memcached_servers": [
|
"memcached_servers": [
|
||||||
"$controller_mgmt_ip:11211"
|
"$identity_ip:11211"
|
||||||
],
|
],
|
||||||
"mq": {
|
"mq": {
|
||||||
"user": "guest",
|
"user": "guest",
|
||||||
|
Loading…
Reference in New Issue
Block a user