diff options
Diffstat (limited to 'puppet')
-rw-r--r-- | puppet/ceph-storage-post-puppet.yaml | 2 | ||||
-rw-r--r-- | puppet/cinder-storage-post.yaml | 3 | ||||
-rw-r--r-- | puppet/compute-puppet.yaml | 10 | ||||
-rw-r--r-- | puppet/controller-post-puppet.yaml | 15 | ||||
-rw-r--r-- | puppet/controller-puppet.yaml | 6 | ||||
-rw-r--r-- | puppet/hieradata/ceph.yaml | 6 | ||||
-rw-r--r-- | puppet/hieradata/compute.yaml | 5 | ||||
-rw-r--r-- | puppet/manifests/overcloud_compute.pp | 12 | ||||
-rw-r--r-- | puppet/manifests/overcloud_controller.pp | 45 | ||||
-rw-r--r-- | puppet/swift-storage-post.yaml | 7 |
10 files changed, 93 insertions, 18 deletions
diff --git a/puppet/ceph-storage-post-puppet.yaml b/puppet/ceph-storage-post-puppet.yaml index dd01d4fd..5e1c42fa 100644 --- a/puppet/ceph-storage-post-puppet.yaml +++ b/puppet/ceph-storage-post-puppet.yaml @@ -17,7 +17,7 @@ resources: config: get_file: manifests/overcloud_cephstorage.pp - CephStoragePuppetDeployment: + CephStorageDeployment_Step1: type: OS::Heat::StructuredDeployments properties: servers: {get_param: servers} diff --git a/puppet/cinder-storage-post.yaml b/puppet/cinder-storage-post.yaml index 960cc5b3..28e87800 100644 --- a/puppet/cinder-storage-post.yaml +++ b/puppet/cinder-storage-post.yaml @@ -18,9 +18,8 @@ resources: config: get_file: manifests/overcloud_volume.pp - VolumePuppetDeployment: + VolumeDeployment_Step1: type: OS::Heat::StructuredDeployments properties: - name: puppet_1 servers: {get_param: servers} config: {get_resource: VolumePuppetConfig} diff --git a/puppet/compute-puppet.yaml b/puppet/compute-puppet.yaml index e6b5a78b..ae2689d3 100644 --- a/puppet/compute-puppet.yaml +++ b/puppet/compute-puppet.yaml @@ -195,6 +195,10 @@ parameters: NovaComputeLibvirtType: type: string default: '' + NovaEnableRbdBackend: + default: false + description: Whether to enable or not the Rbd backend for Nova + type: boolean NovaPassword: default: unset description: The password for the nova service account, used by nova-api. @@ -269,10 +273,14 @@ resources: hierarchy: - heat_config_%{::deploy_config_name} - compute + - ceph_cluster # provided by CephClusterConfig + - ceph - common datafiles: common: raw_data: {get_file: hieradata/common.yaml} + ceph: + raw_data: {get_file: hieradata/ceph.yaml} compute: raw_data: {get_file: hieradata/compute.yaml} oac_data: @@ -283,6 +291,7 @@ resources: nova::compute::libvirt::libvirt_virt_type: {get_input: nova_compute_libvirt_type} nova_api_host: {get_input: nova_api_host} nova::compute::vncproxy_host: {get_input: nova_public_ip} + nova_enable_rbd_backend: {get_input: nova_enable_rbd_backend} nova_password: {get_input: nova_password} #ceilometer::debug: {get_input: debug} ceilometer::metering_secret: {get_input: ceilometer_metering_secret} @@ -339,6 +348,7 @@ resources: nova_public_ip: {get_param: NovaPublicIP} nova_api_host: {get_param: NovaApiHost} nova_password: {get_param: NovaPassword} + nova_enable_rbd_backend: {get_param: NovaEnableRbdBackend} ceilometer_metering_secret: {get_param: CeilometerMeteringSecret} ceilometer_password: {get_param: CeilometerPassword} ceilometer_compute_agent: {get_param: CeilometerComputeAgent} diff --git a/puppet/controller-post-puppet.yaml b/puppet/controller-post-puppet.yaml index 38a7e599..009a10ae 100644 --- a/puppet/controller-post-puppet.yaml +++ b/puppet/controller-post-puppet.yaml @@ -24,20 +24,19 @@ resources: # Step through a series of Puppet runs using the same manifest. # NOTE(dprince): Heat breakpoints would make for a really cool way to step # through breakpoints in a controlled manner across the entire cluster - ControllerPuppetDeploymentLoadBalancer: + ControllerDeploymentLoadBalancer_Step1: type: OS::Heat::StructuredDeployments properties: - name: puppet_1 servers: {get_param: servers} config: {get_resource: ControllerPuppetConfig} input_values: step: 1 actions: ['CREATE'] # no need for two passes on an UPDATE - ControllerPuppetDeploymentServicesBase: + ControllerDeploymentServicesBase_Step2: type: OS::Heat::StructuredDeployments + depends_on: ControllerDeploymentLoadBalancer_Step1 properties: - name: puppet_2 servers: {get_param: servers} config: {get_resource: ControllerPuppetConfig} input_values: @@ -57,17 +56,17 @@ resources: config: get_file: manifests/ringbuilder.pp - ControllerRingbuilderPuppetDeployment: + ControllerRingbuilderDeployment_Step3: type: OS::Heat::StructuredDeployments + depends_on: ControllerDeploymentServicesBase_Step2 properties: - name: puppet_3 servers: {get_param: servers} config: {get_resource: ControllerRingbuilderPuppetConfig} - ControllerPuppetDeploymentOvercloudServices: + ControllerDeploymentOvercloudServices_Step4: type: OS::Heat::StructuredDeployments + depends_on: ControllerRingbuilderDeployment_Step3 properties: - name: puppet_4 servers: {get_param: servers} config: {get_resource: ControllerPuppetConfig} input_values: diff --git a/puppet/controller-puppet.yaml b/puppet/controller-puppet.yaml index 9388a388..0c623aaf 100644 --- a/puppet/controller-puppet.yaml +++ b/puppet/controller-puppet.yaml @@ -28,6 +28,10 @@ parameters: default: true description: Whether to enable or not the Iscsi backend for Cinder type: boolean + CinderEnableRbdBackend: + default: false + description: Whether to enable or not the Rbd backend for Cinder + type: boolean CinderISCSIHelper: default: tgtadm description: The iSCSI helper to use with cinder. @@ -445,6 +449,7 @@ resources: admin_token: {get_param: AdminToken} neutron_public_interface_ip: {get_param: NeutronPublicInterfaceIP} debug: {get_param: Debug} + cinder_enable_rbd_backend: {get_param: CinderEnableRbdBackend} cinder_lvm_loop_device_size: {get_param: CinderLVMLoopDeviceSize} cinder_password: {get_param: CinderPassword} cinder_enable_iscsi_backend: {get_param: CinderEnableIscsiBackend} @@ -623,6 +628,7 @@ resources: # See: https://review.openstack.org/#/c/109225/ tripleo::ringbuilder::build_ring: True # Cinder + cinder_enable_rbd_backend: {get_input: cinder_enable_rbd_backend} cinder_lvm_loop_device_size: {get_input: cinder_lvm_loop_device_size} cinder_iscsi_helper: {get_input: cinder_iscsi_helper} cinder_iscsi_ip_address: {get_input: controller_host} diff --git a/puppet/hieradata/ceph.yaml b/puppet/hieradata/ceph.yaml index 995de2cf..a908b43b 100644 --- a/puppet/hieradata/ceph.yaml +++ b/puppet/hieradata/ceph.yaml @@ -5,3 +5,9 @@ ceph::profile::params::osd_pool_default_size: 3 ceph::profile::params::osd_pool_default_min_size: 1 ceph::profile::params::manage_repo: false ceph::profile::params::authentication_type: cephx + +ceph_openstack_default_cap_mon: 'allow r' +ceph_openstack_default_cap_osd: 'allow class-read object_prefix rbd_children, allow rwx pool=volumes, allow rwx pool=vms' +ceph_pools: + - volumes + - vms diff --git a/puppet/hieradata/compute.yaml b/puppet/hieradata/compute.yaml index 8d5c88fd..a72c4850 100644 --- a/puppet/hieradata/compute.yaml +++ b/puppet/hieradata/compute.yaml @@ -10,6 +10,11 @@ nova::compute::vnc_enabled: true nova::compute::libvirt::vncserver_listen: '0.0.0.0' nova::compute::libvirt::migration_support: true +nova::compute::rbd::libvirt_rbd_user: 'openstack' +nova::compute::rbd::rbd_keyring: 'client.openstack' +nova::compute::rbd::libvirt_images_rbd_pool: 'vms' +nova::compute::rbd::libvirt_rbd_secret_uuid: "%{hiera('ceph::profile::params::fsid')}" + neutron::plugins::ml2::tunnel_id_ranges: ['1:1000'] ceilometer::agent::auth::auth_tenant_name: 'service' diff --git a/puppet/manifests/overcloud_compute.pp b/puppet/manifests/overcloud_compute.pp index 0d2790b2..0c870c35 100644 --- a/puppet/manifests/overcloud_compute.pp +++ b/puppet/manifests/overcloud_compute.pp @@ -45,6 +45,18 @@ nova_config { 'DEFAULT/linuxnet_interface_driver': value => 'nova.network.linux_net.LinuxOVSInterfaceDriver'; } +$nova_enable_rbd_backend = hiera('nova_enable_rbd_backend', false) +if $nova_enable_rbd_backend { + include ::ceph::profile::client + include ::nova::compute::rbd + ceph::key { 'client.openstack' : + secret => hiera('ceph::profile::params::mon_key'), + cap_mon => hiera('ceph_openstack_default_cap_mon'), + cap_osd => hiera('ceph_openstack_default_cap_osd'), + user => 'nova', + } +} + include ::nova::compute::libvirt class { 'nova::network::neutron': diff --git a/puppet/manifests/overcloud_controller.pp b/puppet/manifests/overcloud_controller.pp index 87cc7ec0..41363039 100644 --- a/puppet/manifests/overcloud_controller.pp +++ b/puppet/manifests/overcloud_controller.pp @@ -156,14 +156,26 @@ if hiera('step') >= 2 { # pre-install swift here so we can build rings include ::swift - # don't install Ceph if FSID is not provided - if hiera('ceph::profile::params::fsid', false) { + $cinder_enable_rbd_backend = hiera('cinder_enable_rbd_backend', false) + $enable_ceph = $cinder_enable_rbd_backend + + if $enable_ceph { class { 'ceph::profile::params': mon_initial_members => downcase(hiera('ceph_mon_initial_members')) } include ::ceph::profile::mon } + if $cinder_enable_rbd_backend { + ceph::key { 'client.openstack' : + secret => hiera('ceph::profile::params::mon_key'), + cap_mon => hiera('ceph_openstack_default_cap_mon'), + cap_osd => hiera('ceph_openstack_default_cap_osd'), + user => 'cinder', + inject => 'true', + } + } + } #END STEP 2 if hiera('step') >= 3 { @@ -278,7 +290,34 @@ if hiera('step') >= 3 { } } - $cinder_enabled_backends = any2array($cinder_iscsi_backend) + if $enable_ceph { + + Ceph_pool { + pg_num => hiera('ceph::profile::params::osd_pool_default_pg_num'), + pgp_num => hiera('ceph::profile::params::osd_pool_default_pgp_num'), + size => hiera('ceph::profile::params::osd_pool_default_size'), + } + + $ceph_pools = hiera('ceph_pools') + ceph::pool { $ceph_pools : } + } + + if $cinder_enable_rbd_backend { + $cinder_rbd_backend = 'tripleo_ceph' + + cinder_config { + "${cinder_rbd_backend}/host": value => 'hostgroup'; + } + + cinder::backend::rbd { $cinder_rbd_backend : + rbd_pool => 'volumes', + rbd_user => 'openstack', + rbd_secret_uuid => hiera('ceph::profile::params::fsid'), + require => Ceph::Pool['volumes'], + } + } + + $cinder_enabled_backends = concat(any2array($cinder_iscsi_backend), $cinder_rbd_backend) class { '::cinder::backends' : enabled_backends => $cinder_enabled_backends, } diff --git a/puppet/swift-storage-post.yaml b/puppet/swift-storage-post.yaml index 89cf9733..3f069319 100644 --- a/puppet/swift-storage-post.yaml +++ b/puppet/swift-storage-post.yaml @@ -18,10 +18,9 @@ resources: config: get_file: manifests/overcloud_object.pp - StoragePuppetDeployment: + StorageDeployment_Step1: type: OS::Heat::StructuredDeployments properties: - name: puppet_1 servers: {get_param: servers} config: {get_resource: StoragePuppetConfig} @@ -34,9 +33,9 @@ resources: config: get_file: manifests/ringbuilder.pp - StorageRingbuilderPuppetDeployment: + StorageRingbuilderDeployment_Step2: type: OS::Heat::StructuredDeployments + depends_on: StorageDeployment_Step1 properties: - name: puppet_2 servers: {get_param: servers} config: {get_resource: StorageRingbuilderPuppetConfig} |