diff options
author | Jenkins <jenkins@review.openstack.org> | 2016-07-01 16:26:23 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2016-07-01 16:26:24 +0000 |
commit | f733b2edd1721fb187d3f261e2d8d8ab3f40c9f1 (patch) | |
tree | 7647b51e84befa9c314b326fc3244d0c3317b404 | |
parent | 337d2c62038bde10cfb48d6c1bd09f3cbf72ba6a (diff) | |
parent | 9f1b58e8ac3825a9668a1dcb8d24f6aa9c5e3d3a (diff) |
Merge "First iteration of libvirt and nova-compute as a composable services"
-rw-r--r-- | overcloud-resource-registry-puppet.yaml | 1 | ||||
-rw-r--r-- | overcloud.yaml | 3 | ||||
-rw-r--r-- | puppet/compute.yaml | 4 | ||||
-rw-r--r-- | puppet/hieradata/compute.yaml | 2 | ||||
-rw-r--r-- | puppet/manifests/overcloud_compute.pp | 40 | ||||
-rw-r--r-- | puppet/services/nova-compute.yaml | 12 | ||||
-rw-r--r-- | puppet/services/nova-libvirt.yaml | 31 |
7 files changed, 50 insertions, 43 deletions
diff --git a/overcloud-resource-registry-puppet.yaml b/overcloud-resource-registry-puppet.yaml index 8091a9a8..cb67c7ec 100644 --- a/overcloud-resource-registry-puppet.yaml +++ b/overcloud-resource-registry-puppet.yaml @@ -160,6 +160,7 @@ resource_registry: OS::TripleO::Services::NovaConsoleauth: puppet/services/nova-consoleauth.yaml OS::TripleO::Services::NovaVncproxy: puppet/services/nova-vncproxy.yaml OS::TripleO::Services::NovaCompute: puppet/services/nova-compute.yaml + OS::TripleO::Services::NovaLibvirt: puppet/services/nova-libvirt.yaml OS::TripleO::Services::Ntp: puppet/services/time/ntp.yaml OS::TripleO::Services::SwiftProxy: puppet/services/swift-proxy.yaml OS::TripleO::Services::SwiftStorage: puppet/services/swift-storage.yaml diff --git a/overcloud.yaml b/overcloud.yaml index 3b52acdc..1d5fd8b1 100644 --- a/overcloud.yaml +++ b/overcloud.yaml @@ -567,9 +567,10 @@ parameters: ComputeServices: default: - OS::TripleO::Services::Timezone - - OS::TripleO::Services::NovaCompute - OS::TripleO::Services::Ntp - OS::TripleO::Services::Snmp + - OS::TripleO::Services::NovaCompute + - OS::TripleO::Services::NovaLibvirt description: A list of service resources (configured in the Heat resource_registry) which represent nested stacks for each service that should get installed on the Compute Nodes. diff --git a/puppet/compute.yaml b/puppet/compute.yaml index 3730faf8..f800cca6 100644 --- a/puppet/compute.yaml +++ b/puppet/compute.yaml @@ -500,6 +500,10 @@ resources: nova::rabbit_port: {get_input: rabbit_client_port} nova::upgrade_level_compute: {get_input: upgrade_level_nova_compute} nova_compute_driver: {get_input: nova_compute_driver} + # TODO(emilien): move libvirt & migration parameters in libvirt profile + # used to deploy libvirt/kvm dependencies: + nova::compute::libvirt::services::libvirt_virt_type: {get_input: nova_compute_libvirt_type} + # used to configured nova.conf: nova::compute::libvirt::libvirt_virt_type: {get_input: nova_compute_libvirt_type} nova::compute::neutron::libvirt_vif_driver: {get_input: nova_compute_libvirt_vif_driver} nova_api_host: {get_input: nova_api_host} diff --git a/puppet/hieradata/compute.yaml b/puppet/hieradata/compute.yaml index 2d928cbf..62728332 100644 --- a/puppet/hieradata/compute.yaml +++ b/puppet/hieradata/compute.yaml @@ -6,8 +6,6 @@ nova::notification_driver: messagingv2 nova::compute::instance_usage_audit: true nova::compute::instance_usage_audit_period: 'hour' -nova::compute::libvirt::migration_support: true - nova::compute::rbd::libvirt_rbd_secret_uuid: "%{hiera('ceph::profile::params::fsid')}" nova::network::neutron::neutron_auth_type: 'v3password' diff --git a/puppet/manifests/overcloud_compute.pp b/puppet/manifests/overcloud_compute.pp index af04d657..1ec376b1 100644 --- a/puppet/manifests/overcloud_compute.pp +++ b/puppet/manifests/overcloud_compute.pp @@ -22,19 +22,6 @@ Exec <| tag == 'kmod::load' |> -> Sysctl <| |> if hiera('step') >= 4 { - file { ['/etc/libvirt/qemu/networks/autostart/default.xml', - '/etc/libvirt/qemu/networks/default.xml']: - ensure => absent, - before => Service['libvirt'], - } - # in case libvirt has been already running before the Puppet run, make - # sure the default network is destroyed - exec { 'libvirt-default-net-destroy': - command => '/usr/bin/virsh net-destroy default', - onlyif => '/usr/bin/virsh net-info default | /bin/grep -i "^active:\s*yes"', - before => Service['libvirt'], - } - # When utilising images for deployment, we need to reset the iSCSI initiator name to make it unique exec { 'reset-iscsi-initiator-name': command => '/bin/echo InitiatorName=$(/usr/sbin/iscsi-iname) > /etc/iscsi/initiatorname.iscsi', @@ -58,12 +45,6 @@ if hiera('step') >= 4 { } include ::ceph::conf include ::ceph::profile::client - - $client_keys = hiera('ceph::profile::params::client_keys') - $client_user = join(['client.', hiera('tripleo::profile::base::cinder::volume::rbd::cinder_rbd_user_name')]) - class { '::nova::compute::rbd': - libvirt_rbd_secret_key => $client_keys[$client_user]['secret'], - } } if hiera('cinder_enable_nfs_backend', false) { @@ -77,24 +58,7 @@ if hiera('step') >= 4 { package { 'nfs-utils': } -> Service['nova-compute'] } - if str2bool(hiera('nova::use_ipv6', false)) { - $vncserver_listen = '::0' - } else { - $vncserver_listen = '0.0.0.0' - } - - if $rbd_ephemeral_storage { - class { '::nova::compute::libvirt': - libvirt_disk_cachemodes => ['network=writeback'], - libvirt_hw_disk_discard => 'unmap', - vncserver_listen => $vncserver_listen, - } - } else { - class { '::nova::compute::libvirt' : - vncserver_listen => $vncserver_listen, - } - } - + # TODO(emilien): figure if we *really* need those 2 parameters: nova_config { 'DEFAULT/my_ip': value => $ipaddress; 'DEFAULT/linuxnet_interface_driver': value => 'nova.network.linux_net.LinuxOVSInterfaceDriver'; @@ -106,7 +70,7 @@ if hiera('step') >= 4 { content => hiera('midonet_libvirt_qemu_data') } } - include ::nova::network::neutron + include ::neutron include ::neutron::config diff --git a/puppet/services/nova-compute.yaml b/puppet/services/nova-compute.yaml index 0844aa85..679586f7 100644 --- a/puppet/services/nova-compute.yaml +++ b/puppet/services/nova-compute.yaml @@ -16,10 +16,18 @@ resources: outputs: role_data: - description: Role data for the Nova Conductor service. + description: Role data for the Nova Compute service. value: config_settings: map_merge: - get_attr: [NovaBase, role_data, config_settings] + - nova::compute::libvirt::manage_libvirt_services: false + # we manage migration in nova common puppet profile + nova::compute::libvirt::migration_support: false + tripleo::profile::base::nova::manage_migration: true + tripleo::profile::base::nova::nova_compute_enabled: true step_config: | - include tripleo::profile::base::nova::compute + # TODO(emilien): figure how to deal with libvirt profile. + # We'll probably threat it like we do with Neutron plugins. + # Until then, just include it in the default nova-compute role. + include tripleo::profile::base::nova::compute::libvirt diff --git a/puppet/services/nova-libvirt.yaml b/puppet/services/nova-libvirt.yaml new file mode 100644 index 00000000..e3309c32 --- /dev/null +++ b/puppet/services/nova-libvirt.yaml @@ -0,0 +1,31 @@ +heat_template_version: 2016-04-08 + +description: > + Libvirt service configured with Puppet + +parameters: + EndpointMap: + default: {} + description: Mapping of service endpoint -> protocol. Typically set + via parameter_defaults in the resource registry. + type: json + +resources: + NovaBase: + type: ./nova-base.yaml + +outputs: + role_data: + description: Role data for the Libvirt service. + value: + config_settings: + map_merge: + - get_attr: [NovaBase, role_data, config_settings] + # we include ::nova::compute::libvirt::services in nova/libvirt profile + - nova::compute::libvirt::manage_libvirt_services: false + # we manage migration in nova common puppet profile + nova::compute::libvirt::migration_support: false + tripleo::profile::base::nova::manage_migration: true + tripleo::profile::base::nova::libvirt_enabled: true + step_config: | + include tripleo::profile::base::nova::libvirt |