fd9501197f
Currently we are using wrong service_type for Sahara, it was introduced because of bug in Tempest in upstream during Kilo cycle and now this bug is fixed and we should use proper service_type as well. Change-Id: I890cf8bb8e15b568e72f42327c22ed4d852ea6e4 Closes-bug: #1356053
35 lines
1.2 KiB
Puppet
35 lines
1.2 KiB
Puppet
notice('MODULAR: sahara/keystone.pp')
|
|
|
|
$sahara_hash = hiera_hash('sahara_hash', {})
|
|
$public_ssl_hash = hiera('public_ssl')
|
|
$public_vip = hiera('public_vip')
|
|
$admin_address = hiera('management_vip')
|
|
$api_bind_port = '8386'
|
|
$sahara_user = pick($sahara_hash['user'], 'sahara')
|
|
$sahara_password = pick($sahara_hash['user_password'])
|
|
$tenant = pick($sahara_hash['tenant'], 'services')
|
|
$region = pick($sahara_hash['region'], hiera('region', 'RegionOne'))
|
|
$service_name = pick($sahara_hash['service_name'], 'sahara')
|
|
$public_address = $public_ssl_hash['services'] ? {
|
|
true => $public_ssl_hash['hostname'],
|
|
default => $public_vip,
|
|
}
|
|
$public_protocol = $public_ssl_hash['services'] ? {
|
|
true => 'https',
|
|
default => 'http',
|
|
}
|
|
$public_url = "${public_protocol}://${public_address}:${api_bind_port}/v1.1/%(tenant_id)s"
|
|
$admin_url = "http://${admin_address}:${api_bind_port}/v1.1/%(tenant_id)s"
|
|
|
|
class { 'sahara::keystone::auth':
|
|
auth_name => $sahara_user,
|
|
password => $sahara_password,
|
|
service_type => 'data-processing',
|
|
service_name => $service_name,
|
|
region => $region,
|
|
tenant => $tenant,
|
|
public_url => $public_url,
|
|
admin_url => $admin_url,
|
|
internal_url => $admin_url,
|
|
}
|