Merge "scenario001: deploy Cinder and Nova with RBD backend"

This commit is contained in:
Jenkins 2016-02-23 20:32:58 +00:00 committed by Gerrit Code Review
commit 1cfb185bd4
6 changed files with 115 additions and 52 deletions

View File

@ -35,9 +35,9 @@ scenario](#All-In-One).
|:----------:|:-----------:|:-----------:|:-----------:| |:----------:|:-----------:|:-----------:|:-----------:|
| keystone | X | X | X | | keystone | X | X | X |
| glance | rbd | file | file | | glance | rbd | file | file |
| nova | X | X | X | | nova | rbd | X | X |
| neutron | X | X | X | | neutron | X | X | X |
| cinder | X | | X | | cinder | rbd | iscsi | iscsi |
| ceilometer | X | | | | ceilometer | X | | |
| aodh | X | | | | aodh | X | | |
| gnocchi | X | | | | gnocchi | X | | |

View File

@ -22,8 +22,12 @@ class { '::openstack_integration::glance':
backend => 'rbd', backend => 'rbd',
} }
include ::openstack_integration::neutron include ::openstack_integration::neutron
include ::openstack_integration::nova class { '::openstack_integration::nova':
include ::openstack_integration::cinder libvirt_rbd => true,
}
class { '::openstack_integration::cinder':
backend => 'rbd',
}
include ::openstack_integration::ceilometer include ::openstack_integration::ceilometer
include ::openstack_integration::aodh include ::openstack_integration::aodh
include ::openstack_integration::gnocchi include ::openstack_integration::gnocchi

View File

@ -39,4 +39,11 @@ class openstack_integration::ceph {
class { '::ceph::profile::mon': } class { '::ceph::profile::mon': }
class { '::ceph::profile::osd': } 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,
}
} }

View File

@ -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': rabbitmq_user { 'cinder':
admin => true, admin => true,
@ -37,17 +46,36 @@ class openstack_integration::cinder {
class { '::cinder::quota': } class { '::cinder::quota': }
class { '::cinder::scheduler': } class { '::cinder::scheduler': }
class { '::cinder::scheduler::filter': } class { '::cinder::scheduler::filter': }
class { '::cinder::volume': } class { '::cinder::volume':
volume_clear => 'none',
}
class { '::cinder::cron::db_purge': } class { '::cinder::cron::db_purge': }
class { '::cinder::glance': class { '::cinder::glance':
glance_api_servers => 'localhost:9292', glance_api_servers => 'localhost:9292',
} }
case $backend {
'iscsi': {
class { '::cinder::setup_test_volume': class { '::cinder::setup_test_volume':
size => '15G', size => '15G',
} }
cinder::backend::iscsi { 'BACKEND_1': cinder::backend::iscsi { 'BACKEND_1':
iscsi_ip_address => '127.0.0.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': class { '::cinder::backends':
enabled_backends => ['BACKEND_1'], enabled_backends => ['BACKEND_1'],
} }

View File

@ -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': rabbitmq_user { 'nova':
admin => true, admin => true,
@ -60,6 +69,19 @@ class openstack_integration::nova {
migration_support => true, migration_support => true,
vncserver_listen => '0.0.0.0', 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::scheduler': }
class { '::nova::vncproxy': } class { '::nova::vncproxy': }

View File

@ -102,9 +102,11 @@ class openstack_integration::tempest (
image_ssh_user => 'cirros', image_ssh_user => 'cirros',
image_alt_ssh_user => 'cirros', image_alt_ssh_user => 'cirros',
img_file => 'cirros-0.3.4-x86_64-disk.img', 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 # 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. # and 2/ if running in the gate, use /home/jenkins/cache/files/ cirros image.
# img_dir => '/home/jenkins/cache/files', # img_dir => '/home/jenkins/cache/files',
img_dir => '/tmp/openstack/tempest', img_dir => '/tmp/openstack/tempest',
} }
} }