Generic definition for service-specific Keystone endpoints
This commit is contained in:
parent
73781b16b3
commit
9ce26d4f55
@ -1,4 +1,6 @@
|
|||||||
class kickstack::apinode inherits kickstack {
|
class kickstack::apinode inherits kickstack {
|
||||||
include kickstack::api::keystone
|
include kickstack::api::keystone
|
||||||
include kickstack::endpoints::keystone
|
include kickstack::endpoints::keystone
|
||||||
|
|
||||||
|
kickstack::endpoints::service { [ "glance"]: }
|
||||||
}
|
}
|
||||||
|
29
manifests/endpoints/service.pp
Normal file
29
manifests/endpoints/service.pp
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
define kickstack::endpoints::service {
|
||||||
|
|
||||||
|
include pwgen
|
||||||
|
|
||||||
|
$servicename = $name
|
||||||
|
$factname = "${servicename}_keystone_password"
|
||||||
|
$classname = "${servicename}::keystone::auth"
|
||||||
|
|
||||||
|
# Grab the service's keystone user password from a kickstack fact and configure
|
||||||
|
# Keystone accordingly. If no fact has been set, generate a password.
|
||||||
|
$service_password = pick(getvar("${::kickstack::fact_prefix}${factname}"),pwgen())
|
||||||
|
|
||||||
|
# Installs the service user endpoint.
|
||||||
|
class { "${classname}":
|
||||||
|
password => "$service_password",
|
||||||
|
public_address => "${hostname}${keystone_public_suffix}",
|
||||||
|
admin_address => "${hostname}${keystone_admin_suffix}",
|
||||||
|
internal_address => "$hostname",
|
||||||
|
region => "$::kickstack::keystone_region",
|
||||||
|
require => Class['::keystone'],
|
||||||
|
}
|
||||||
|
|
||||||
|
kickstack::exportfact::export { "${factname}":
|
||||||
|
value => "${service_password}",
|
||||||
|
tag => "${servicename}",
|
||||||
|
require => Class["${classname}"]
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user