6wind-virtual-accelerator-plugin: use new task for nova configuration
Let's move all the nova configuration performed on the compute + virtual accelerator node in a dedicated deployment task. Signed-off-by: Francesco Santoro <francesco.santoro@6wind.com> Change-Id: I1d01f6a4770193db9c5eee4386441d15f766576c
This commit is contained in:
parent
6217bee2e5
commit
bdea8de749
|
@ -0,0 +1,7 @@
|
||||||
|
#
|
||||||
|
# Copyright 2016 6WIND S.A.
|
||||||
|
|
||||||
|
notice('MODULAR: virtual_accelerator/nova_conf.pp')
|
||||||
|
|
||||||
|
include virtual_accelerator
|
||||||
|
class { 'virtual_accelerator::nova_conf': }
|
|
@ -0,0 +1,27 @@
|
||||||
|
#
|
||||||
|
# Copyright 2016 6WIND S.A.
|
||||||
|
|
||||||
|
class virtual_accelerator::nova_conf inherits virtual_accelerator {
|
||||||
|
|
||||||
|
$NOVA_CONF_FILE = "/etc/nova/nova.conf"
|
||||||
|
$enable_host_cpu = $virtual_accelerator::enable_host_cpu
|
||||||
|
$disable_secgroup = $virtual_accelerator::disable_secgroup
|
||||||
|
|
||||||
|
if $enable_host_cpu == true {
|
||||||
|
exec { 'cpu_host':
|
||||||
|
command => "crudini --set ${NOVA_CONF_FILE} libvirt cpu_mode host-passthrough",
|
||||||
|
notify => Package['6wind-openstack-extensions'],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
package { "6wind-openstack-extensions":
|
||||||
|
ensure => 'installed',
|
||||||
|
install_options => ['--allow-unauthenticated'],
|
||||||
|
}
|
||||||
|
|
||||||
|
exec { 'vcpu_pin':
|
||||||
|
command => "crudini --set ${NOVA_CONF_FILE} DEFAULT vcpu_pin_set $(python /usr/local/bin/get_vcpu_pin_set.py)",
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -3,26 +3,6 @@
|
||||||
|
|
||||||
class virtual_accelerator::service inherits virtual_accelerator {
|
class virtual_accelerator::service inherits virtual_accelerator {
|
||||||
|
|
||||||
$NOVA_CONF_FILE = "/etc/nova/nova.conf"
|
|
||||||
$enable_host_cpu = $virtual_accelerator::enable_host_cpu
|
|
||||||
|
|
||||||
if $enable_host_cpu == true {
|
|
||||||
exec { 'cpu_host':
|
|
||||||
command => "crudini --set ${NOVA_CONF_FILE} libvirt cpu_mode host-passthrough",
|
|
||||||
notify => Exec['vcpu_pin'],
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
package { "6wind-openstack-extensions":
|
|
||||||
ensure => 'installed',
|
|
||||||
install_options => ['--allow-unauthenticated'],
|
|
||||||
}
|
|
||||||
|
|
||||||
exec { 'vcpu_pin':
|
|
||||||
command => "crudini --set ${NOVA_CONF_FILE} DEFAULT vcpu_pin_set $(python /usr/local/bin/get_vcpu_pin_set.py)",
|
|
||||||
notify => Service['virtual-accelerator'],
|
|
||||||
}
|
|
||||||
|
|
||||||
service { 'virtual-accelerator':
|
service { 'virtual-accelerator':
|
||||||
ensure => 'running',
|
ensure => 'running',
|
||||||
notify => Service['openvswitch-switch'],
|
notify => Service['openvswitch-switch'],
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
type: puppet
|
type: puppet
|
||||||
role: [6wind-virtual-accelerator]
|
role: [6wind-virtual-accelerator]
|
||||||
required_for: [post_deployment_end]
|
required_for: [post_deployment_end]
|
||||||
requires: [enable_nova_compute_service]
|
requires: [6wind-virtual-accelerator-nova-conf]
|
||||||
parameters:
|
parameters:
|
||||||
puppet_manifest: puppet/manifests/start_va.pp
|
puppet_manifest: puppet/manifests/start_va.pp
|
||||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||||
|
@ -66,3 +66,13 @@
|
||||||
puppet_manifest: puppet/manifests/neutron_conf.pp
|
puppet_manifest: puppet/manifests/neutron_conf.pp
|
||||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||||
timeout: 3600
|
timeout: 3600
|
||||||
|
|
||||||
|
- id: 6wind-virtual-accelerator-nova-conf
|
||||||
|
type: puppet
|
||||||
|
role: [6wind-virtual-accelerator]
|
||||||
|
required_for: [6wind-virtual-accelerator-start]
|
||||||
|
requires: [enable_nova_compute_service]
|
||||||
|
parameters:
|
||||||
|
puppet_manifest: puppet/manifests/nova_conf.pp
|
||||||
|
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||||
|
timeout: 3600
|
||||||
|
|
Loading…
Reference in New Issue