aboutsummaryrefslogtreecommitdiffstats
path: root/manifests/profile/base/glance
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/profile/base/glance')
-rw-r--r--manifests/profile/base/glance/api.pp24
-rw-r--r--manifests/profile/base/glance/registry.pp14
2 files changed, 22 insertions, 16 deletions
diff --git a/manifests/profile/base/glance/api.pp b/manifests/profile/base/glance/api.pp
index af3b0ac..8945fff 100644
--- a/manifests/profile/base/glance/api.pp
+++ b/manifests/profile/base/glance/api.pp
@@ -18,6 +18,10 @@
#
# === Parameters
#
+# [*bootstrap_node*]
+# (Optional) The hostname of the node responsible for bootstrapping tasks
+# Defaults to hiera('bootstrap_nodeid')
+#
# [*glance_backend*]
# (Optional) Glance backend(s) to use.
# Defaults to downcase(hiera('glance_backend', 'swift'))
@@ -32,26 +36,33 @@
# Defaults to hiera('step')
#
# [*rabbit_hosts*]
-# list of the rabbbit host IPs
-# Defaults to hiera('rabbitmq_node_ips')
+# list of the rabbbit host fqdns
+# Defaults to hiera('rabbitmq_node_names')
#
# [*rabbit_port*]
# IP port for rabbitmq service
# Defaults to hiera('glance::notify::rabbitmq::rabbit_port', 5672)
class tripleo::profile::base::glance::api (
+ $bootstrap_node = hiera('bootstrap_nodeid', undef),
$glance_backend = downcase(hiera('glance_backend', 'swift')),
$glance_nfs_enabled = false,
$step = hiera('step'),
- $rabbit_hosts = hiera('rabbitmq_node_ips', undef),
+ $rabbit_hosts = hiera('rabbitmq_node_names', undef),
$rabbit_port = hiera('glance::notify::rabbitmq::rabbit_port', 5672),
) {
+ if $::hostname == downcase($bootstrap_node) {
+ $sync_db = true
+ } else {
+ $sync_db = false
+ }
+
if $step >= 1 and $glance_nfs_enabled {
include ::tripleo::glance::nfs_mount
}
- if $step >= 4 {
+ if $step >= 4 or ($step >= 3 and $sync_db) {
case $glance_backend {
'swift': { $backend_store = 'glance.store.swift.Store' }
'file': { $backend_store = 'glance.store.filesystem.Store' }
@@ -65,9 +76,10 @@ class tripleo::profile::base::glance::api (
include ::glance
include ::glance::config
class { '::glance::api':
- stores => $glance_store,
+ stores => $glance_store,
+ sync_db => $sync_db,
}
- $rabbit_endpoints = suffix(any2array(normalize_ip_for_uri($rabbit_hosts)), ":${rabbit_port}")
+ $rabbit_endpoints = suffix(any2array($rabbit_hosts), ":${rabbit_port}")
class { '::glance::notify::rabbitmq' :
rabbit_hosts => $rabbit_endpoints,
}
diff --git a/manifests/profile/base/glance/registry.pp b/manifests/profile/base/glance/registry.pp
index 9e2be9d..cd40aeb 100644
--- a/manifests/profile/base/glance/registry.pp
+++ b/manifests/profile/base/glance/registry.pp
@@ -19,6 +19,7 @@
# === Parameters
#
# [*bootstrap_node*]
+# DEPRECATED
# (Optional) The hostname of the node responsible for bootstrapping tasks
# Defaults to hiera('bootstrap_nodeid')
#
@@ -32,23 +33,16 @@
# Defaults to hiera('step')
#
class tripleo::profile::base::glance::registry (
- $bootstrap_node = hiera('bootstrap_nodeid', undef),
+ $bootstrap_node = undef,
$glance_backend = downcase(hiera('glance_backend', 'swift')),
$step = hiera('step'),
) {
- if $::hostname == downcase($bootstrap_node) {
- $sync_db = true
- } else {
- $sync_db = false
- }
- if $step >= 4 or ( $step >= 3 and $sync_db ) {
+ if $step >= 4 {
# TODO: notifications, scrubber, etc.
include ::glance
include ::glance::config
- class { '::glance::registry' :
- sync_db => $sync_db,
- }
+ include ::glance::registry
include ::glance::notify::rabbitmq
include join(['::glance::backend::', $glance_backend])
}