From 478f8208adc9758b9e0171330a0f6bbcd9c82ac5 Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Wed, 17 Feb 2016 23:26:02 -0500 Subject: [PATCH] scenario001: deploy Cinder and Nova with RBD backend This patch enables robust and complete testing of a compute scenario where RBD is used for Cinder and Nova. * Allow cinder.pp and nova.pp to configure RBD backend. * Switch scenario001 to run Cinder and Nova with RBD backend. * Update README with more documentation about Cinder & Nova backends. * Configure volume_clear option to 'none' so volumes are quickly deleted. * Enable rbd_default_features to 15 to increase ceph performances. * Increase compute build_interval in Tempest to 60s, useful for Bootfromvolume test where instance deletion can take time with RBD backend. Depends-On: I69a7d40e7d1847be06a843986ace4f0602272fe1 Depends-On: I7302b89da5a995e779ec349ab0c0f519c69a3a98 Depends-On: Ic410cb66e7620b6ca6acbea38360d8dd890000c9 Change-Id: I5c8d9cf2ff8fc361553b3eed73b697ad87170434 --- README.md | 4 +- fixtures/scenario001.pp | 8 +++- manifests/ceph.pp | 7 ++++ manifests/cinder.pp | 42 +++++++++++++++++---- manifests/nova.pp | 24 +++++++++++- manifests/tempest.pp | 82 +++++++++++++++++++++-------------------- 6 files changed, 115 insertions(+), 52 deletions(-) diff --git a/README.md b/README.md index b309c3b19..24e10f31f 100644 --- a/README.md +++ b/README.md @@ -35,9 +35,9 @@ scenario](#All-In-One). |:----------:|:-----------:|:-----------:|:-----------:| | keystone | X | X | X | | glance | rbd | file | file | -| nova | X | X | X | +| nova | rbd | X | X | | neutron | X | X | X | -| cinder | X | | X | +| cinder | rbd | iscsi | iscsi | | ceilometer | X | | | | aodh | X | | | | gnocchi | X | | | diff --git a/fixtures/scenario001.pp b/fixtures/scenario001.pp index a7da5f595..89db0bc0c 100644 --- a/fixtures/scenario001.pp +++ b/fixtures/scenario001.pp @@ -22,8 +22,12 @@ class { '::openstack_integration::glance': backend => 'rbd', } include ::openstack_integration::neutron -include ::openstack_integration::nova -include ::openstack_integration::cinder +class { '::openstack_integration::nova': + libvirt_rbd => true, +} +class { '::openstack_integration::cinder': + backend => 'rbd', +} include ::openstack_integration::ceilometer include ::openstack_integration::aodh include ::openstack_integration::gnocchi diff --git a/manifests/ceph.pp b/manifests/ceph.pp index 92ca9f78b..fc3b8c03a 100644 --- a/manifests/ceph.pp +++ b/manifests/ceph.pp @@ -39,4 +39,11 @@ class openstack_integration::ceph { class { '::ceph::profile::mon': } class { '::ceph::profile::osd': } + # Extra Ceph configuration to increase performances + $ceph_extra_config = { + 'client/rbd_default_features' => { value => '15' }, + } + class { '::ceph::conf': + args => $ceph_extra_config, + } } diff --git a/manifests/cinder.pp b/manifests/cinder.pp index f0ad47323..43732f85d 100644 --- a/manifests/cinder.pp +++ b/manifests/cinder.pp @@ -1,4 +1,13 @@ -class openstack_integration::cinder { +# Configure the Cinder service +# +# [*backend*] +# (optional) Cinder backend to use. +# Can be 'iscsi' or 'rbd'. +# Defaults to 'iscsi'. +# +class openstack_integration::cinder ( + $backend = 'iscsi', +) { rabbitmq_user { 'cinder': admin => true, @@ -37,16 +46,35 @@ class openstack_integration::cinder { class { '::cinder::quota': } class { '::cinder::scheduler': } class { '::cinder::scheduler::filter': } - class { '::cinder::volume': } + class { '::cinder::volume': + volume_clear => 'none', + } class { '::cinder::cron::db_purge': } class { '::cinder::glance': glance_api_servers => 'localhost:9292', } - class { '::cinder::setup_test_volume': - size => '15G', - } - cinder::backend::iscsi { 'BACKEND_1': - iscsi_ip_address => '127.0.0.1', + case $backend { + 'iscsi': { + class { '::cinder::setup_test_volume': + size => '15G', + } + cinder::backend::iscsi { 'BACKEND_1': + iscsi_ip_address => '127.0.0.1', + } + } + 'rbd': { + cinder::backend::rbd { 'BACKEND_1': + rbd_user => 'openstack', + rbd_pool => 'cinder', + rbd_secret_uuid => '7200aea0-2ddd-4a32-aa2a-d49f66ab554c', + } + # make sure ceph pool exists before running Cinder API & Volume + Exec['create-cinder'] -> Service['cinder-api'] + Exec['create-cinder'] -> Service['cinder-volume'] + } + default: { + fail("Unsupported backend (${backend})") + } } class { '::cinder::backends': enabled_backends => ['BACKEND_1'], diff --git a/manifests/nova.pp b/manifests/nova.pp index 8d7e15b3a..6c72fc7ce 100644 --- a/manifests/nova.pp +++ b/manifests/nova.pp @@ -1,4 +1,13 @@ -class openstack_integration::nova { +# Configure the Cinder service +# +# [*libvirt_rbd*] +# (optional) Boolean to configure or not Nova +# to use Libvirt RBD backend. +# Defaults to false. +# +class openstack_integration::nova ( + $libvirt_rbd = false, +) { rabbitmq_user { 'nova': admin => true, @@ -60,6 +69,19 @@ class openstack_integration::nova { migration_support => true, vncserver_listen => '0.0.0.0', } + if $libvirt_rbd { + class { '::nova::compute::rbd': + libvirt_rbd_user => 'openstack', + libvirt_rbd_secret_uuid => '7200aea0-2ddd-4a32-aa2a-d49f66ab554c', + libvirt_rbd_secret_key => 'AQD7kyJQQGoOBhAAqrPAqSopSwPrrfMMomzVdw==', + libvirt_images_rbd_pool => 'nova', + rbd_keyring => 'client.openstack', + # ceph packaging is already managed by puppet-ceph + manage_ceph_client => false, + } + # make sure ceph pool exists before running nova-compute + Exec['create-nova'] -> Service['nova-compute'] + } class { '::nova::scheduler': } class { '::nova::vncproxy': } diff --git a/manifests/tempest.pp b/manifests/tempest.pp index 1dee34fbb..4c0c722e4 100644 --- a/manifests/tempest.pp +++ b/manifests/tempest.pp @@ -64,47 +64,49 @@ class openstack_integration::tempest ( ) { class { '::tempest': - debug => true, - use_stderr => false, - log_file => 'tempest.log', - tempest_clone_owner => $::id, - git_clone => false, - tempest_clone_path => '/tmp/openstack/tempest', - lock_path => '/tmp/openstack/tempest', - tempest_config_file => '/tmp/openstack/tempest/etc/tempest.conf', - configure_images => true, - configure_networks => true, - identity_uri => 'http://127.0.0.1:5000/v2.0', - identity_uri_v3 => 'http://127.0.0.1:5000/v3', - admin_username => 'admin', - admin_tenant_name => 'openstack', - admin_password => 'a_big_secret', - admin_domain_name => 'Default', - auth_version => 'v3', - image_name => 'cirros', - image_name_alt => 'cirros_alt', - cinder_available => $cinder, - glance_available => $glance, - horizon_available => $horizon, - nova_available => $nova, - neutron_available => $neutron, - ceilometer_available => $ceilometer, - aodh_available => $aodh, - trove_available => $trove, - sahara_available => $sahara, - heat_available => $heat, - swift_available => $swift, - ironic_available => $ironic, - public_network_name => 'public', - dashboard_url => "http://${::hostname}/", - flavor_ref => '42', - flavor_ref_alt => '84', - image_ssh_user => 'cirros', - image_alt_ssh_user => 'cirros', - img_file => 'cirros-0.3.4-x86_64-disk.img', + debug => true, + use_stderr => false, + log_file => 'tempest.log', + tempest_clone_owner => $::id, + git_clone => false, + tempest_clone_path => '/tmp/openstack/tempest', + lock_path => '/tmp/openstack/tempest', + tempest_config_file => '/tmp/openstack/tempest/etc/tempest.conf', + configure_images => true, + configure_networks => true, + identity_uri => 'http://127.0.0.1:5000/v2.0', + identity_uri_v3 => 'http://127.0.0.1:5000/v3', + admin_username => 'admin', + admin_tenant_name => 'openstack', + admin_password => 'a_big_secret', + admin_domain_name => 'Default', + auth_version => 'v3', + image_name => 'cirros', + image_name_alt => 'cirros_alt', + cinder_available => $cinder, + glance_available => $glance, + horizon_available => $horizon, + nova_available => $nova, + neutron_available => $neutron, + ceilometer_available => $ceilometer, + aodh_available => $aodh, + trove_available => $trove, + sahara_available => $sahara, + heat_available => $heat, + swift_available => $swift, + ironic_available => $ironic, + public_network_name => 'public', + dashboard_url => "http://${::hostname}/", + flavor_ref => '42', + flavor_ref_alt => '84', + image_ssh_user => 'cirros', + image_alt_ssh_user => 'cirros', + img_file => 'cirros-0.3.4-x86_64-disk.img', + compute_build_interval => 60, # TODO(emilien) optimization by 1/ using Hiera to configure Glance image source # and 2/ if running in the gate, use /home/jenkins/cache/files/ cirros image. - # img_dir => '/home/jenkins/cache/files', - img_dir => '/tmp/openstack/tempest', + # img_dir => '/home/jenkins/cache/files', + img_dir => '/tmp/openstack/tempest', } + }