summaryrefslogtreecommitdiffstats
path: root/puppet
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2015-09-05 11:24:58 +0000
committerGerrit Code Review <review@openstack.org>2015-09-05 11:24:58 +0000
commitf498e7f3c05f1d7df34251a2c16d870f7d12d521 (patch)
treedba95c29ae09c77dfde62acaa66753d70ee5da5f /puppet
parent24f4146cbb2959c849a3396c36e7e89ae6334843 (diff)
parentbc9368fd91ca29b5c86caa3ddc88d8ff76009250 (diff)
Merge "Support for using external Ceph clusters"
Diffstat (limited to 'puppet')
-rw-r--r--puppet/ceph-cluster-config.yaml13
-rw-r--r--puppet/extraconfig/ceph/ceph-external-config.yaml65
-rw-r--r--puppet/manifests/overcloud_controller.pp17
-rw-r--r--puppet/manifests/overcloud_controller_pacemaker.pp17
4 files changed, 102 insertions, 10 deletions
diff --git a/puppet/ceph-cluster-config.yaml b/puppet/ceph-cluster-config.yaml
index 33b18574..99265493 100644
--- a/puppet/ceph-cluster-config.yaml
+++ b/puppet/ceph-cluster-config.yaml
@@ -2,6 +2,18 @@ heat_template_version: 2015-04-30
description: 'Ceph Cluster config data for Puppet'
parameters:
+ ceph_storage_count:
+ default: 0
+ type: number
+ description: Number of Ceph storage nodes. Used to enable/disable managed Ceph installation.
+ ceph_external_mon_ips:
+ default: ''
+ type: string
+ description: List of external Ceph Mon host IPs.
+ ceph_client_key:
+ default: ''
+ type: string
+ description: Ceph key used to create the 'openstack' user keyring.
ceph_fsid:
default: ''
type: string
@@ -26,6 +38,7 @@ resources:
datafiles:
ceph_cluster:
mapped_data:
+ ceph_storage_count: {get_param: ceph_storage_count}
ceph_mon_initial_members:
list_join:
- ','
diff --git a/puppet/extraconfig/ceph/ceph-external-config.yaml b/puppet/extraconfig/ceph/ceph-external-config.yaml
new file mode 100644
index 00000000..62907104
--- /dev/null
+++ b/puppet/extraconfig/ceph/ceph-external-config.yaml
@@ -0,0 +1,65 @@
+heat_template_version: 2015-04-30
+description: 'Configure parameters for an external Ceph cluster via Puppet.'
+
+parameters:
+ ceph_storage_count:
+ default: 0
+ type: number
+ description: Number of Ceph storage nodes. Used to enable/disable managed Ceph installation.
+ ceph_external_mon_ips:
+ default: ''
+ type: string
+ description: List of external Ceph Mon host IPs.
+ ceph_client_key:
+ default: ''
+ type: string
+ description: Ceph key used to create the 'openstack' user keyring.
+ ceph_fsid:
+ default: ''
+ type: string
+ # The following parameters are unused for external Ceph clusters and
+ # are here and exist for compatibility
+ ceph_admin_key:
+ default: ''
+ type: string
+ ceph_mon_key:
+ default: ''
+ type: string
+ ceph_mon_names:
+ type: comma_delimited_list
+ ceph_mon_ips:
+ type: comma_delimited_list
+
+resources:
+ CephClusterConfigImpl:
+ type: OS::Heat::StructuredConfig
+ properties:
+ group: os-apply-config
+ config:
+ hiera:
+ datafiles:
+ ceph_cluster:
+ mapped_data:
+ ceph_storage_count: {get_param: ceph_storage_count}
+ enable_external_ceph: true
+ ceph::profile::params::mon_host: {get_param: ceph_external_mon_ips}
+ ceph::profile::params::fsid: {get_param: ceph_fsid}
+ ceph::profile::params::client_keys:
+ str_replace:
+ template: "{
+ client.openstack: {
+ secret: 'CLIENT_KEY',
+ mode: '0644',
+ cap_mon: 'allow r',
+ cap_osd: 'allow class-read object_prefix rbd_children, allow rwx pool=volumes, allow rwx pool=vms, allow rwx pool=images'
+ }
+ }"
+ params:
+ CLIENT_KEY: {get_param: ceph_client_key}
+
+
+outputs:
+ config_id:
+ description: The ID of the CephClusterConfigImpl resource.
+ value:
+ {get_resource: CephClusterConfigImpl}
diff --git a/puppet/manifests/overcloud_controller.pp b/puppet/manifests/overcloud_controller.pp
index b001d667..4a1b0e60 100644
--- a/puppet/manifests/overcloud_controller.pp
+++ b/puppet/manifests/overcloud_controller.pp
@@ -122,8 +122,7 @@ if hiera('step') >= 2 {
# pre-install swift here so we can build rings
include ::swift
- $cinder_enable_rbd_backend = hiera('cinder_enable_rbd_backend', false)
- $enable_ceph = $cinder_enable_rbd_backend
+ $enable_ceph = hiera('ceph_storage_count', 0) > 0
if $enable_ceph {
class { 'ceph::profile::params':
@@ -147,10 +146,13 @@ if hiera('step') >= 2 {
} -> Class['ceph::profile::osd']
}
- include ::ceph::profile::client
include ::ceph::profile::osd
}
+ if str2bool(hiera('enable_external_ceph', 'false')) {
+ include ::ceph::profile::client
+ }
+
} #END STEP 2
if hiera('step') >= 3 {
@@ -276,9 +278,14 @@ if hiera('step') >= 3 {
$ceph_pools = hiera('ceph_pools')
ceph::pool { $ceph_pools : }
+
+ $cinder_pool_requires = [Ceph::Pool['volumes']]
+
+ } else {
+ $cinder_pool_requires = []
}
- if $cinder_enable_rbd_backend {
+ if hiera('cinder_enable_rbd_backend', false) {
$cinder_rbd_backend = 'tripleo_ceph'
cinder_config {
@@ -289,7 +296,7 @@ if hiera('step') >= 3 {
rbd_pool => 'volumes',
rbd_user => 'openstack',
rbd_secret_uuid => hiera('ceph::profile::params::fsid'),
- require => Ceph::Pool['volumes'],
+ require => $cinder_pool_requires,
}
}
diff --git a/puppet/manifests/overcloud_controller_pacemaker.pp b/puppet/manifests/overcloud_controller_pacemaker.pp
index cfd30f13..9f6a38fb 100644
--- a/puppet/manifests/overcloud_controller_pacemaker.pp
+++ b/puppet/manifests/overcloud_controller_pacemaker.pp
@@ -438,8 +438,7 @@ MYSQL_HOST=localhost\n",
include ::swift
# Ceph
- $cinder_enable_rbd_backend = hiera('cinder_enable_rbd_backend', false)
- $enable_ceph = $cinder_enable_rbd_backend
+ $enable_ceph = hiera('ceph_storage_count', 0) > 0
if $enable_ceph {
class { 'ceph::profile::params':
@@ -463,10 +462,13 @@ MYSQL_HOST=localhost\n",
} -> Class['ceph::profile::osd']
}
- include ::ceph::profile::client
include ::ceph::profile::osd
}
+ if str2bool(hiera('enable_external_ceph', 'false')) {
+ include ::ceph::profile::client
+ }
+
} #END STEP 2
@@ -643,9 +645,14 @@ if hiera('step') >= 3 {
$ceph_pools = hiera('ceph_pools')
ceph::pool { $ceph_pools : }
+
+ $cinder_pool_requires = [Ceph::Pool['volumes']]
+
+ } else {
+ $cinder_pool_requires = []
}
- if $cinder_enable_rbd_backend {
+ if hiera('cinder_enable_rbd_backend', false) {
$cinder_rbd_backend = 'tripleo_ceph'
cinder_config {
@@ -656,7 +663,7 @@ if hiera('step') >= 3 {
rbd_pool => 'volumes',
rbd_user => 'openstack',
rbd_secret_uuid => hiera('ceph::profile::params::fsid'),
- require => Ceph::Pool['volumes'],
+ require => $cinder_pool_requires,
}
}