From 2dbd97539f8b49795a323c554db32eed4af40357 Mon Sep 17 00:00:00 2001 From: Vitalii Kovalchuk Date: Fri, 9 Sep 2016 12:50:35 +0000 Subject: [PATCH] Add vmware related setting to Fuel Contrail tab Change-Id: Ic2ee7586492f03b4f4b05e833418f3a797e71f4c --- .../files/nova-compute.conf.erb_fixed | 5 ++ .../contrail/manifests/compute/vmware.pp | 9 -- .../puppet/modules/contrail/manifests/init.pp | 7 +- environment_config.yaml | 84 +++++++++++++++++++ 4 files changed, 92 insertions(+), 13 deletions(-) diff --git a/deployment_scripts/puppet/modules/contrail/files/nova-compute.conf.erb_fixed b/deployment_scripts/puppet/modules/contrail/files/nova-compute.conf.erb_fixed index dcbe7558c..abeae015c 100644 --- a/deployment_scripts/puppet/modules/contrail/files/nova-compute.conf.erb_fixed +++ b/deployment_scripts/puppet/modules/contrail/files/nova-compute.conf.erb_fixed @@ -1,3 +1,6 @@ +<%- +contrail_data=scope.function_hiera(['contrail']) +-%> [DEFAULT] compute_driver=nova.virt.vmwareapi.contrailVCDriver log_file=nova-compute-vmware-<%= @availability_zone_name %>-<%= @service_name %>.log @@ -13,6 +16,8 @@ cache_prefix=$host cluster_name=<%= cluster_name %> <% end %> +vcenter_dvswitch=<%= contrail_data['dvs_internal'] %> + host_ip=<%= @vc_host %> host_username=<%= @vc_user %> host_password=<%= @vc_password %> diff --git a/deployment_scripts/puppet/modules/contrail/manifests/compute/vmware.pp b/deployment_scripts/puppet/modules/contrail/manifests/compute/vmware.pp index 0d6cd443e..10084116a 100644 --- a/deployment_scripts/puppet/modules/contrail/manifests/compute/vmware.pp +++ b/deployment_scripts/puppet/modules/contrail/manifests/compute/vmware.pp @@ -23,14 +23,6 @@ class contrail::compute::vmware { 'neutron/url': value => "http://${contrail::mos_mgmt_vip}:9696"; } - ini_setting { 'vmware-int-dvs': - ensure => present, - path => '/etc/nova/nova-compute.conf', - section => 'vmware', - setting => 'vcenter_dvswitch', - value => $contrail::dvs_internal, - } - # Config file file { '/etc/contrail': ensure => directory, @@ -53,7 +45,6 @@ class contrail::compute::vmware { enable => true, } - Ini_setting['vmware-int-dvs'] -> Nova_Config <||> ~> service { 'nova-compute': ensure => running, diff --git a/deployment_scripts/puppet/modules/contrail/manifests/init.pp b/deployment_scripts/puppet/modules/contrail/manifests/init.pp index 1deaa0d4c..c00036bb0 100644 --- a/deployment_scripts/puppet/modules/contrail/manifests/init.pp +++ b/deployment_scripts/puppet/modules/contrail/manifests/init.pp @@ -207,11 +207,10 @@ class contrail { $vcenter_server_user = $vcenter_hash['computes'][0]['vc_user'] $vcenter_server_pass = $vcenter_hash['computes'][0]['vc_password'] $vcenter_server_cluster = $vcenter_hash['computes'][0]['vc_cluster'] - $vcenter_server_name = $vcenter_hash['computes'][0]['availability_zone_name'] - $contrail_vcenter_datacenter = pick($settings['contrail_vcenter_datacenter'], 'Datacenter') + $contrail_vcenter_datacenter = $settings['dc_name'] + $dvs_internal = $settings['dvs_internal'] + $dvs_external = $settings['dvs_external'] $contrail_esxi_info = hiera_array('contrail_esxi_info', []) - $dvs_external = 'Contrail-DVS-Ext' - $dvs_internal = 'Contrail-DVS-Int' $vmware_iface_name = get_vmware_devices() } diff --git a/environment_config.yaml b/environment_config.yaml index 1362e11b9..8b91264d5 100644 --- a/environment_config.yaml +++ b/environment_config.yaml @@ -159,3 +159,87 @@ attributes: description: "Disable this option to disable provisioning ostf networks" weight: 260 type: "checkbox" + esxi_datastore_name: + value: "nfs" + label: "ESXi datastore name" + description: "Name of datastore where ContrailVM will be spawned" + weight: 270 + type: "text" + regex: + source: '^\w+$' + error: "Invalid datastore name" + restrictions: + - condition: "settings:common.use_vcenter.value == false" + action: "hide" + esxi_uplink_ext: + value: "vmnic1" + label: "ESXi uplink admin" + description: "Name of interface that provide connection between ESXi node and Fuel admin network" + weight: 280 + type: "text" + regex: + source: '^\w+$' + error: "Invalid ESXi uplink name" + restrictions: + - condition: "settings:common.use_vcenter.value == false" + action: "hide" + esxi_uplink_priv: + value: "vmnic2" + label: "ESXi uplink private" + description: "Name of interface that provide connection between ESXi node and Fuel private network" + weight: 290 + type: "text" + regex: + source: '^\w+$' + error: "Invalid ESXi uplink name" + restrictions: + - condition: "settings:common.use_vcenter.value == false" + action: "hide" + dc_name: + value: "Datacenter" + label: "vCenter Datacenter name" + description: "Name of vCenter Datacenter" + weight: 300 + type: "text" + regex: + source: '^[A-Za-z0-9_-]+$' + error: "Invalid Datacenter name" + restrictions: + - condition: "settings:common.use_vcenter.value == false" + action: "hide" + dvs_external: + value: "Contrail-DVS-Ext" + label: "External DVS name" + description: "Name of DVS that provide connection between ESXi nodes and Fuel admin network" + weight: 310 + type: "text" + regex: + source: '^[A-Za-z0-9_-]+$' + error: "Invalid DVS name" + restrictions: + - condition: "settings:common.use_vcenter.value == false" + action: "hide" + dvs_private: + value: "Contrail-DVS-Priv" + label: "Private DVS name" + description: "Name of DVS that provide connection between ESXi nodes and Fuel private network" + weight: 320 + type: "text" + regex: + source: '^[A-Za-z0-9_-]+$' + error: "Invalid DVS name" + restrictions: + - condition: "settings:common.use_vcenter.value == false" + action: "hide" + dvs_internal: + value: "Contrail-DVS-Int" + label: "Private DVS name" + description: "Name of DVS that need for internal contrail traffic" + weight: 330 + type: "text" + regex: + source: '^[A-Za-z0-9_-]+$' + error: "Invalid DVS name" + restrictions: + - condition: "settings:common.use_vcenter.value == false" + action: "hide"