diff --git a/deployment_scripts/puppet/manifests/upload-glance-image.pp b/deployment_scripts/puppet/manifests/upload-glance-image.pp deleted file mode 100644 index c3f4e9f..0000000 --- a/deployment_scripts/puppet/manifests/upload-glance-image.pp +++ /dev/null @@ -1,10 +0,0 @@ -notice('fuel-plugin-nsxv: upload-glance-image.pp') - -$access_hash = hiera_hash('access',{}) -$controller_node = hiera('service_endpoint') - -class { '::nsxv::upload_image': - os_username => $access_hash['user'], - os_password => $access_hash['password'], - os_auth_url => "http://${controller_node}:5000/v2.0/", -} diff --git a/deployment_scripts/puppet/modules/nsxv/manifests/hiera_override.pp b/deployment_scripts/puppet/modules/nsxv/manifests/hiera_override.pp index eb992c0..f98fb7f 100644 --- a/deployment_scripts/puppet/modules/nsxv/manifests/hiera_override.pp +++ b/deployment_scripts/puppet/modules/nsxv/manifests/hiera_override.pp @@ -42,12 +42,28 @@ class nsxv::hiera_override ( <%= network_scheme.to_yaml %>") $neutron_advanced_configuration = inline_template("<%- + require 'yaml' neutron_advanced_configuration = { 'neutron_advanced_configuration' => scope.function_hiera(['neutron_advanced_configuration']) } neutron_advanced_configuration['neutron_advanced_configuration']['neutron_dvr'] = false neutron_advanced_configuration['neutron_advanced_configuration']['neutron_l2_pop'] = false -%> <%= neutron_advanced_configuration.to_yaml %>") + $override_testvm_image = inline_template("<%- + require 'yaml' + test_vm_image = {} + test_vm_image['os_name'] = 'TinyCoreLinux' + test_vm_image['img_path'] = '/usr/share/tcl-testvm/tcl.vmdk' + test_vm_image['container_format'] = 'bare' + test_vm_image['min_ram'] = '128' + test_vm_image['disk_format'] = 'vmdk' + test_vm_image['glance_properties'] = '--property hypervisor_type=vmware --property vmware_disktype=streamOptimized --property vmware_adaptertype=lsiLogic' + test_vm_image['img_name'] = 'TestVM-VMDK' + test_vm_image['public'] = 'true' + override_testvm_image = { 'test_vm_image' => test_vm_image } + -%> +<%= override_testvm_image.to_yaml %>") + file { $override_dir: ensure => directory, } -> @@ -81,6 +97,12 @@ class nsxv::hiera_override ( content => regsubst($neutron_advanced_configuration,'---',''), order => '30' } + concat::fragment{ 'override-testvm-image': + ensure => present, + target => $override_file, + content => regsubst($override_testvm_image,'---',''), + order => '40' + } file_line {"${plugin_name}_hiera_override": path => '/etc/hiera.yaml', diff --git a/deployment_scripts/puppet/modules/nsxv/manifests/init.pp b/deployment_scripts/puppet/modules/nsxv/manifests/init.pp index db17bb1..abd0445 100644 --- a/deployment_scripts/puppet/modules/nsxv/manifests/init.pp +++ b/deployment_scripts/puppet/modules/nsxv/manifests/init.pp @@ -27,6 +27,9 @@ class nsxv ( package { $neutron_plugin_name: ensure => latest, } + package { 'tcl-testvm': + ensure => latest, + } $nsxv_config_dirs = [ '/etc/neutron', '/etc/neutron/plugins', '/etc/neutron/plugins/vmware' ] file { $nsxv_config_dirs: diff --git a/deployment_scripts/puppet/modules/nsxv/manifests/upload_image.pp b/deployment_scripts/puppet/modules/nsxv/manifests/upload_image.pp deleted file mode 100644 index 0775efa..0000000 --- a/deployment_scripts/puppet/modules/nsxv/manifests/upload_image.pp +++ /dev/null @@ -1,29 +0,0 @@ -class nsxv::upload_image ( - $os_tenant_name = 'admin', - $os_username, - $os_password, - $os_auth_url, - $disk_format = 'vmdk', - $container_format = 'bare', - $public = 'true', - $img_name = 'TestVM-TCL', - $img_path = '/usr/share/tcl-testvm/tcl.vmdk', - $min_ram = 128, -) { - package { 'tcl-testvm': - ensure => latest, - } - exec { 'upload-img': - path => '/sbin:/usr/sbin:/bin:/usr/bin', - environment => [ - "OS_TENANT_NAME=${os_tenant_name}", - "OS_USERNAME=${os_username}", - "OS_PASSWORD=${os_password}", - "OS_AUTH_URL=${os_auth_url}", - 'OS_ENDPOINT_TYPE=internalURL', - ], - command => "glance -k image-create --name=${img_name} --is-public=${public} --container-format=${container_format} --disk-format=${disk_format} --property hypervisor_type='vmware' --property vmware_disktype='streamOptimized' --property vmware_adaptertype='lsilogic' --min-ram ${min_ram} < ${img_path}", - unless => "glance -k image-list && (glance -k image-list | grep ${img_name})", - require => Package['tcl-testvm'], - } -} diff --git a/repositories/ubuntu/tcl-testvm-1-1.deb b/repositories/ubuntu/tcl-testvm-1-2.deb similarity index 68% rename from repositories/ubuntu/tcl-testvm-1-1.deb rename to repositories/ubuntu/tcl-testvm-1-2.deb index 736e795..78c668e 100644 Binary files a/repositories/ubuntu/tcl-testvm-1-1.deb and b/repositories/ubuntu/tcl-testvm-1-2.deb differ diff --git a/tasks.yaml b/tasks.yaml index f38ad89..b325eb1 100644 --- a/tasks.yaml +++ b/tasks.yaml @@ -5,10 +5,3 @@ puppet_manifest: puppet/manifests/patch-neutron-manifest.pp puppet_modules: puppet/modules timeout: 120 -- role: ['primary-controller'] - stage: post_deployment/6010 - type: puppet - parameters: - puppet_manifest: puppet/manifests/upload-glance-image.pp - puppet_modules: puppet/modules - timeout: 300