[Keystone] Fix keystone url
With switch to keystone::resource::service_identity we lost api version string from keystone url. We now have CONFIG_KEYSTONE_API_VERSION option which defaults to v2.0 but can be set to v3. Change-Id: I6a8ebc18268a06c1eebffc78d9374e907cf92b4f
This commit is contained in:
@@ -92,6 +92,19 @@ def initConfig(controller):
|
|||||||
"NEED_CONFIRM": True,
|
"NEED_CONFIRM": True,
|
||||||
"CONDITION": False},
|
"CONDITION": False},
|
||||||
|
|
||||||
|
{"CMD_OPTION": "keystone-api-version",
|
||||||
|
"USAGE": "Keystone API version string",
|
||||||
|
"PROMPT": "Enter the Keystone API version string.",
|
||||||
|
"OPTION_LIST": ['v2.0', 'v3'],
|
||||||
|
"VALIDATORS": [validators.validate_options],
|
||||||
|
"DEFAULT_VALUE": 'v2.0',
|
||||||
|
"MASK_INPUT": False,
|
||||||
|
"LOOSE_VALIDATION": False,
|
||||||
|
"CONF_NAME": 'CONFIG_KEYSTONE_API_VERSION',
|
||||||
|
"USE_DEFAULT": True,
|
||||||
|
"NEED_CONFIRM": False,
|
||||||
|
"CONDITION": False},
|
||||||
|
|
||||||
{"CMD_OPTION": "keystone-token-format",
|
{"CMD_OPTION": "keystone-token-format",
|
||||||
"USAGE": "Keystone token format. Use either UUID or PKI",
|
"USAGE": "Keystone token format. Use either UUID or PKI",
|
||||||
"PROMPT": "Enter the Keystone token format.",
|
"PROMPT": "Enter the Keystone token format.",
|
||||||
|
|||||||
@@ -4,6 +4,9 @@ $keystone_cfg_ks_db_pw = hiera('CONFIG_KEYSTONE_DB_PW')
|
|||||||
$keystone_cfg_mariadb_host = hiera('CONFIG_MARIADB_HOST')
|
$keystone_cfg_mariadb_host = hiera('CONFIG_MARIADB_HOST')
|
||||||
$keystone_endpoint_cfg_ctrl_host = hiera('CONFIG_CONTROLLER_HOST')
|
$keystone_endpoint_cfg_ctrl_host = hiera('CONFIG_CONTROLLER_HOST')
|
||||||
$keystone_token_provider_str = downcase(hiera('CONFIG_KEYSTONE_TOKEN_FORMAT'))
|
$keystone_token_provider_str = downcase(hiera('CONFIG_KEYSTONE_TOKEN_FORMAT'))
|
||||||
|
$keystone_api_version_str = hiera('CONFIG_KEYSTONE_API_VERSION')
|
||||||
|
$keystone_url = "http://${keystone_endpoint_cfg_ctrl_host}:5000/${keystone_api_version_str}"
|
||||||
|
$keystone_admin_url = "http://${keystone_endpoint_cfg_ctrl_host}:35357/${keystone_api_version_str}"
|
||||||
|
|
||||||
class { 'keystone':
|
class { 'keystone':
|
||||||
admin_token => hiera('CONFIG_KEYSTONE_ADMIN_TOKEN'),
|
admin_token => hiera('CONFIG_KEYSTONE_ADMIN_TOKEN'),
|
||||||
@@ -30,9 +33,9 @@ class { 'keystone::roles::admin':
|
|||||||
}
|
}
|
||||||
|
|
||||||
keystone::resource::service_identity { 'keystone':
|
keystone::resource::service_identity { 'keystone':
|
||||||
public_url => "http://${keystone_endpoint_cfg_ctrl_host}:5000",
|
public_url => $keystone_url,
|
||||||
internal_url => "http://${keystone_endpoint_cfg_ctrl_host}:5000",
|
internal_url => $keystone_url,
|
||||||
admin_url => "http://${keystone_endpoint_cfg_ctrl_host}:35357",
|
admin_url => $keystone_admin_url,
|
||||||
region => hiera('CONFIG_KEYSTONE_REGION'),
|
region => hiera('CONFIG_KEYSTONE_REGION'),
|
||||||
service_type => 'identity',
|
service_type => 'identity',
|
||||||
service_description => 'OpenStack Identity Service',
|
service_description => 'OpenStack Identity Service',
|
||||||
|
|||||||
Reference in New Issue
Block a user