Configure nova on compute-vmware role to support nsx-t

Change-Id: I17520b619c243b2faf9695992ca366525822ccb1
This commit is contained in:
Artem Savinov 2016-09-05 12:51:49 +03:00
parent 3dcbf31891
commit 24cd70e987
3 changed files with 62 additions and 9 deletions

View File

@ -32,12 +32,12 @@ mod 'firewall',
:git => 'https://github.com/fuel-infra/puppetlabs-firewall.git', :git => 'https://github.com/fuel-infra/puppetlabs-firewall.git',
:ref => '1.8.0' :ref => '1.8.0'
## Pull in puppet-keystone # Pull in puppet-keystone
#mod 'keystone', mod 'keystone',
# :git => 'https://github.com/fuel-infra/puppet-keystone.git', :git => 'https://github.com/fuel-infra/puppet-keystone.git',
# :ref => 'stable/mitaka' :ref => 'stable/mitaka'
#
## Pull in puppet-nova # Pull in puppet-nova
#mod 'nova', mod 'nova',
# :git => 'https://github.com/fuel-infra/puppet-nova.git', :git => 'https://github.com/fuel-infra/puppet-nova.git',
# :ref => 'stable/mitaka' :ref => 'stable/mitaka'

View File

@ -0,0 +1,39 @@
notice('fuel-plugin-nsx-t: compute_vmware_nova_config.pp')
include ::nova::params
include ::nsxt::params
$neutron_config = hiera_hash('neutron_config')
$neutron_metadata_proxy_secret = $neutron_config['metadata']['metadata_proxy_shared_secret']
$nova_parameters = {
'neutron/service_metadata_proxy' => { value => 'True' },
'neutron/metadata_proxy_shared_secret' => { value => $neutron_metadata_proxy_secret }
}
$management_vip = hiera('management_vip')
$service_endpoint = hiera('service_endpoint', $management_vip)
$ssl_hash = hiera_hash('use_ssl', {})
$neutron_username = pick($neutron_config['keystone']['admin_user'], 'neutron')
$neutron_password = $neutron_config['keystone']['admin_password']
$neutron_tenant_name = pick($neutron_config['keystone']['admin_tenant'], 'services')
$region = hiera('region', 'RegionOne')
$admin_identity_protocol = get_ssl_property($ssl_hash, {}, 'keystone', 'admin', 'protocol', 'http')
$admin_identity_address = get_ssl_property($ssl_hash, {}, 'keystone', 'admin', 'hostname', [$service_endpoint, $management_vip])
$neutron_internal_protocol = get_ssl_property($ssl_hash, {}, 'neutron', 'internal', 'protocol', 'http')
$neutron_endpoint = get_ssl_property($ssl_hash, {}, 'neutron', 'internal', 'hostname', [hiera('neutron_endpoint', ''), $management_vip])
$auth_api_version = 'v3'
$admin_identity_uri = "${admin_identity_protocol}://${admin_identity_address}:35357"
$neutron_auth_url = "${admin_identity_uri}/${auth_api_version}"
$neutron_url = "${neutron_internal_protocol}://${neutron_endpoint}:9696"
class {'nova::network::neutron':
neutron_password => $neutron_password,
neutron_project_name => $neutron_tenant_name,
neutron_region_name => $region,
neutron_username => $neutron_username,
neutron_auth_url => $neutron_auth_url,
neutron_url => $neutron_url,
neutron_ovs_bridge => '',
}
create_resources(nova_config, $nova_parameters)

View File

@ -14,6 +14,20 @@
puppet_modules: puppet/modules puppet_modules: puppet/modules
timeout: 120 timeout: 120
- id: nsx-t-compute-vmware-nova-config
version: 2.0.0
type: puppet
groups:
- compute-vmware
required_for:
- top-role-compute-vmware
requires:
- top-role-compute
parameters:
puppet_manifest: puppet/manifests/compute-vmware-nova-config.pp
puppet_modules: puppet/modules
timeout: 300
- id: nsx-t-gem-install - id: nsx-t-gem-install
version: 2.0.0 version: 2.0.0
type: puppet type: puppet