Browse Source

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

Change-Id: I17520b619c243b2faf9695992ca366525822ccb1
changes/30/365930/1
Artem Savinov 2 years ago
parent
commit
24cd70e987

+ 9
- 9
Puppetfile View File

@@ -32,12 +32,12 @@ mod 'firewall',
32 32
     :git => 'https://github.com/fuel-infra/puppetlabs-firewall.git',
33 33
     :ref => '1.8.0'
34 34
 
35
-## Pull in puppet-keystone
36
-#mod 'keystone',
37
-#    :git => 'https://github.com/fuel-infra/puppet-keystone.git',
38
-#    :ref => 'stable/mitaka'
39
-#
40
-## Pull in puppet-nova
41
-#mod 'nova',
42
-#    :git => 'https://github.com/fuel-infra/puppet-nova.git',
43
-#    :ref => 'stable/mitaka'
35
+# Pull in puppet-keystone
36
+mod 'keystone',
37
+    :git => 'https://github.com/fuel-infra/puppet-keystone.git',
38
+    :ref => 'stable/mitaka'
39
+
40
+# Pull in puppet-nova
41
+mod 'nova',
42
+    :git => 'https://github.com/fuel-infra/puppet-nova.git',
43
+    :ref => 'stable/mitaka'

+ 39
- 0
deployment_scripts/puppet/manifests/compute-vmware-nova-config.pp View File

@@ -0,0 +1,39 @@
1
+notice('fuel-plugin-nsx-t: compute_vmware_nova_config.pp')
2
+
3
+include ::nova::params
4
+include ::nsxt::params
5
+
6
+$neutron_config = hiera_hash('neutron_config')
7
+$neutron_metadata_proxy_secret = $neutron_config['metadata']['metadata_proxy_shared_secret']
8
+$nova_parameters = {
9
+  'neutron/service_metadata_proxy'       => { value => 'True' },
10
+  'neutron/metadata_proxy_shared_secret' => { value => $neutron_metadata_proxy_secret }
11
+}
12
+
13
+$management_vip            = hiera('management_vip')
14
+$service_endpoint          = hiera('service_endpoint', $management_vip)
15
+$ssl_hash                  = hiera_hash('use_ssl', {})
16
+$neutron_username          = pick($neutron_config['keystone']['admin_user'], 'neutron')
17
+$neutron_password          = $neutron_config['keystone']['admin_password']
18
+$neutron_tenant_name       = pick($neutron_config['keystone']['admin_tenant'], 'services')
19
+$region                    = hiera('region', 'RegionOne')
20
+$admin_identity_protocol   = get_ssl_property($ssl_hash, {}, 'keystone', 'admin', 'protocol', 'http')
21
+$admin_identity_address    = get_ssl_property($ssl_hash, {}, 'keystone', 'admin', 'hostname', [$service_endpoint, $management_vip])
22
+$neutron_internal_protocol = get_ssl_property($ssl_hash, {}, 'neutron', 'internal', 'protocol', 'http')
23
+$neutron_endpoint          = get_ssl_property($ssl_hash, {}, 'neutron', 'internal', 'hostname', [hiera('neutron_endpoint', ''), $management_vip])
24
+$auth_api_version          = 'v3'
25
+$admin_identity_uri        = "${admin_identity_protocol}://${admin_identity_address}:35357"
26
+$neutron_auth_url          = "${admin_identity_uri}/${auth_api_version}"
27
+$neutron_url               = "${neutron_internal_protocol}://${neutron_endpoint}:9696"
28
+
29
+class {'nova::network::neutron':
30
+  neutron_password     => $neutron_password,
31
+  neutron_project_name => $neutron_tenant_name,
32
+  neutron_region_name  => $region,
33
+  neutron_username     => $neutron_username,
34
+  neutron_auth_url     => $neutron_auth_url,
35
+  neutron_url          => $neutron_url,
36
+  neutron_ovs_bridge   => '',
37
+}
38
+
39
+create_resources(nova_config, $nova_parameters)

+ 14
- 0
deployment_tasks.yaml View File

@@ -14,6 +14,20 @@
14 14
     puppet_modules: puppet/modules
15 15
     timeout: 120
16 16
 
17
+- id: nsx-t-compute-vmware-nova-config
18
+  version: 2.0.0
19
+  type: puppet
20
+  groups:
21
+    - compute-vmware
22
+  required_for:
23
+    - top-role-compute-vmware
24
+  requires:
25
+    - top-role-compute
26
+  parameters:
27
+    puppet_manifest: puppet/manifests/compute-vmware-nova-config.pp
28
+    puppet_modules: puppet/modules
29
+    timeout: 300
30
+
17 31
 - id: nsx-t-gem-install
18 32
   version: 2.0.0
19 33
   type: puppet

Loading…
Cancel
Save