aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Prince <dprince@redhat.com>2015-04-09 08:41:24 -0400
committerDan Prince <dprince@redhat.com>2015-05-04 10:23:06 -0400
commitfd212bdd5ae421beda147d934c3a638c1444143c (patch)
tree70d1a400ba7de51d8ff3199726b3e61d1fa70053
parent723db1317cd62a8772c764847c80a339eae4c03f (diff)
Add support for Glance RBD backend
This patch adds support for a new GlanceBackend setting which can be set to one of swift, rbd, or file to control which Glance backend is configured for use by default. Change-Id: Id6a3fbc3477e85e8e2446e3dc13d424f9535d0ff
-rw-r--r--controller.yaml7
-rw-r--r--overcloud-without-mergepy.yaml8
-rw-r--r--puppet/ceph-cluster-config.yaml2
-rw-r--r--puppet/controller-puppet.yaml9
-rw-r--r--puppet/hieradata/ceph.yaml1
-rw-r--r--puppet/hieradata/controller.yaml4
-rw-r--r--puppet/manifests/overcloud_controller.pp14
7 files changed, 39 insertions, 6 deletions
diff --git a/controller.yaml b/controller.yaml
index 37c0debe..6aaaecc1 100644
--- a/controller.yaml
+++ b/controller.yaml
@@ -144,6 +144,13 @@ parameters:
default: http
description: Protocol to use when connecting to glance, set to https for SSL.
type: string
+ GlanceBackend:
+ default: swift
+ description: The short name of the Glance backend to use. Should be one
+ of swift, rbd, or file
+ type: string
+ constraints:
+ - allowed_values: ['swift', 'file', 'rbd']
HeatPassword:
default: unset
description: The password for the Heat service account, used by the Heat services.
diff --git a/overcloud-without-mergepy.yaml b/overcloud-without-mergepy.yaml
index 142e502e..6c7a54e5 100644
--- a/overcloud-without-mergepy.yaml
+++ b/overcloud-without-mergepy.yaml
@@ -327,6 +327,13 @@ parameters:
description: The password for the glance service account, used by the glance services.
type: string
hidden: true
+ GlanceBackend:
+ default: swift
+ description: The short name of the Glance backend to use. Should be one
+ of swift, rbd or file
+ type: string
+ constraints:
+ - allowed_values: ['swift', 'file', 'rbd']
HeatPassword:
default: unset
description: The password for the Heat service account, used by the Heat services.
@@ -563,6 +570,7 @@ resources:
GlancePort: {get_param: GlancePort}
GlanceProtocol: {get_param: GlanceProtocol}
GlancePassword: {get_param: GlancePassword}
+ GlanceBackend: {get_param: GlanceBackend}
GlanceNotifierStrategy: {get_param: GlanceNotifierStrategy}
GlanceLogFile: {get_param: GlanceLogFile}
HeatPassword: {get_param: HeatPassword}
diff --git a/puppet/ceph-cluster-config.yaml b/puppet/ceph-cluster-config.yaml
index e01bd19d..f4673122 100644
--- a/puppet/ceph-cluster-config.yaml
+++ b/puppet/ceph-cluster-config.yaml
@@ -57,7 +57,7 @@ resources:
secret: 'ADMIN_KEY',
mode: '0644',
cap_mon: 'allow r',
- cap_osd: 'allow class-read object_prefix rbd_children, allow rwx pool=volumes, allow rwx pool=vms'
+ cap_osd: 'allow class-read object_prefix rbd_children, allow rwx pool=volumes, allow rwx pool=vms, allow rwx pool=images'
}
}"
params:
diff --git a/puppet/controller-puppet.yaml b/puppet/controller-puppet.yaml
index a904e041..8831cba8 100644
--- a/puppet/controller-puppet.yaml
+++ b/puppet/controller-puppet.yaml
@@ -144,6 +144,13 @@ parameters:
default: http
description: Protocol to use when connecting to glance, set to https for SSL.
type: string
+ GlanceBackend:
+ default: swift
+ description: The short name of the Glance backend to use. Should be one
+ of swift, rbd, or file
+ type: string
+ constraints:
+ - allowed_values: ['swift', 'file', 'rbd']
HeatPassword:
default: unset
description: The password for the Heat service account, used by the Heat services.
@@ -491,6 +498,7 @@ resources:
glance_port: {get_param: GlancePort}
glance_protocol: {get_param: GlanceProtocol}
glance_password: {get_param: GlancePassword}
+ glance_backend: {get_param: GlanceBackend}
glance_swift_store_auth_address: {list_join: ['', ['http://', {get_param: VirtualIP} , ':5000/v2.0']]}
glance_notifier_strategy: {get_param: GlanceNotifierStrategy}
glance_log_file: {get_param: GlanceLogFile}
@@ -708,6 +716,7 @@ resources:
glance::backend::swift::swift_store_auth_address: {get_input: glance_swift_store_auth_address}
glance::backend::swift::swift_store_user: service:glance
glance::backend::swift::swift_store_key: {get_input: glance_password}
+ glance_backend: {get_input: glance_backend}
# Heat
heat_stack_domain_admin_password: {get_input: heat_stack_domain_admin_password}
diff --git a/puppet/hieradata/ceph.yaml b/puppet/hieradata/ceph.yaml
index e43b0da5..33ce5efe 100644
--- a/puppet/hieradata/ceph.yaml
+++ b/puppet/hieradata/ceph.yaml
@@ -9,3 +9,4 @@ ceph::profile::params::authentication_type: cephx
ceph_pools:
- volumes
- vms
+ - images
diff --git a/puppet/hieradata/controller.yaml b/puppet/hieradata/controller.yaml
index 5cf9f350..0256cbc9 100644
--- a/puppet/hieradata/controller.yaml
+++ b/puppet/hieradata/controller.yaml
@@ -48,12 +48,10 @@ swift::proxy::account_autocreate: true
# glance
glance::api::pipeline: 'keystone'
-glance::api::known_stores:
- - glance.store.filesystem.Store
- - glance.store.swift.Store
glance::registry::pipeline: 'keystone'
glance::registry::manage_service: true
glance::backend::swift::swift_store_create_container_on_put: true
+glance::backend::rbd::rbd_store_user: 'openstack'
# neutron
neutron::core_plugin: 'ml2'
diff --git a/puppet/manifests/overcloud_controller.pp b/puppet/manifests/overcloud_controller.pp
index b1ccf3d7..cf2f21a5 100644
--- a/puppet/manifests/overcloud_controller.pp
+++ b/puppet/manifests/overcloud_controller.pp
@@ -249,11 +249,21 @@ if hiera('step') >= 3 {
require => File['/etc/keystone/ssl/certs'],
}
+ $glance_backend = downcase(hiera('glance_backend', 'swift'))
+ case $glance_backend {
+ swift: { $glance_store = 'glance.store.swift.Store' }
+ file: { $glance_store = 'glance.store.filesystem.Store' }
+ rbd: { $glance_store = 'glance.store.rbd.Store' }
+ default: { fail('Unrecognized glance_backend parameter.') }
+ }
+
# TODO: notifications, scrubber, etc.
include ::glance
- include ::glance::api
+ class { 'glance::api':
+ known_stores => [$glance_store]
+ }
include ::glance::registry
- include ::glance::backend::swift
+ include join(['::glance::backend::', $glance_backend])
class { 'nova':
glance_api_servers => join([hiera('glance_protocol'), '://', hiera('controller_virtual_ip'), ':', hiera('glance_port')]),