summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Alvarez <pedro.alvarez@codethink.co.uk>2015-03-12 18:29:05 +0000
committerPedro Alvarez <pedro.alvarez@codethink.co.uk>2015-03-12 19:36:53 +0000
commit6d249ec9394fbeb25519d38db1bd85239ed4f35c (patch)
tree9bfd8a50941c9829c573fee5b1c2c1a8db61f581
parent29af8873c999f2a982eed1467da343b1326f3d68 (diff)
downloaddefinitions-6d249ec9394fbeb25519d38db1bd85239ed4f35c.tar.gz
Minimize cinder conf variables
-rw-r--r--openstack-cinder.configure36
-rw-r--r--openstack/usr/share/openstack/cinder.yml12
-rw-r--r--openstack/usr/share/openstack/cinder/cinder.conf67
3 files changed, 17 insertions, 98 deletions
diff --git a/openstack-cinder.configure b/openstack-cinder.configure
index 50590037..f3d07477 100644
--- a/openstack-cinder.configure
+++ b/openstack-cinder.configure
@@ -33,21 +33,13 @@ if [ -z "$RABBITMQ_HOST" -a \
-z "$RABBITMQ_USER" -a \
-z "$RABBITMQ_PASSWORD" -a \
-z "$KEYSTONE_TEMPORARY_ADMIN_TOKEN" -a \
- -z "$GLANCE_HOST" -a \
-z "$CINDER_DB_USER" -a \
-z "$CINDER_DB_PASSWORD" -a \
- -z "$CONTROLLER_HOST" -a \
- -z "$OPENSTACK_AUTH_HOST" -a \
- -z "$OPENSTACK_AUTH_PORT" -a \
+ -z "$CONTROLLER_HOST_ADDRESS" -a \
-z "$CINDER_USER" -a \
-z "$CINDER_PASSWORD" -a \
-z "$CINDER_DEVICE" -a \
- -z "$CINDER_PUBLIC_URL" -a \
- -z "$CINDER_INTERNAL_URL" -a \
- -z "$CINDER_ADMIN_URL" -a \
- -z "$CINDER_PUBLIC_URL_V2" -a \
- -z "$CINDER_INTERNAL_URL_V2" -a \
- -z "$CINDER_ADMIN_URL_V2" ]; then
+ -z "$MANAGEMENT_INTERFACE_IP_ADDRESS" ]; then
# No Cinder options defined, do nothing.
exit 0
fi
@@ -57,21 +49,13 @@ if [ -z "$RABBITMQ_HOST" -o \
-z "$RABBITMQ_USER" -o \
-z "$RABBITMQ_PASSWORD" -o \
-z "$KEYSTONE_TEMPORARY_ADMIN_TOKEN" -o \
- -z "$GLANCE_HOST" -o \
-z "$CINDER_DB_USER" -o \
-z "$CINDER_DB_PASSWORD" -o \
- -z "$CONTROLLER_HOST" -o \
- -z "$OPENSTACK_AUTH_HOST" -o \
- -z "$OPENSTACK_AUTH_PORT" -o \
+ -z "$CONTROLLER_HOST_ADDRESS" -o \
-z "$CINDER_USER" -o \
-z "$CINDER_PASSWORD" -o \
-z "$CINDER_DEVICE" -o \
- -z "$CINDER_PUBLIC_URL" -o \
- -z "$CINDER_INTERNAL_URL" -o \
- -z "$CINDER_ADMIN_URL" -o \
- -z "$CINDER_PUBLIC_URL_V2" -o \
- -z "$CINDER_INTERNAL_URL_V2" -o \
- -z "$CINDER_ADMIN_URL_V2" ]; then
+ -z "$MANAGEMENT_INTERFACE_IP_ADDRESS" ]; then
echo Some options required for Cinder were defined, but not all.
exit 1
fi
@@ -92,21 +76,13 @@ cinder_configuration={
'RABBITMQ_USER':os.environ['RABBITMQ_USER'],
'RABBITMQ_PASSWORD':os.environ['RABBITMQ_PASSWORD'],
'KEYSTONE_TEMPORARY_ADMIN_TOKEN':os.environ['KEYSTONE_TEMPORARY_ADMIN_TOKEN'],
- 'GLANCE_HOST':os.environ['GLANCE_HOST'],
'CINDER_DB_USER':os.environ['CINDER_DB_USER'],
'CINDER_DB_PASSWORD':os.environ['CINDER_DB_PASSWORD'],
- 'CONTROLLER_HOST':os.environ['CONTROLLER_HOST'],
- 'OPENSTACK_AUTH_HOST':os.environ['OPENSTACK_AUTH_HOST'],
- 'OPENSTACK_AUTH_PORT':os.environ['OPENSTACK_AUTH_PORT'],
+ 'CONTROLLER_HOST_ADDRESS':os.environ['CONTROLLER_HOST_ADDRESS'],
'CINDER_USER':os.environ['CINDER_USER'],
'CINDER_PASSWORD':os.environ['CINDER_PASSWORD'],
'CINDER_DEVICE':os.environ['CINDER_DEVICE'],
- 'CINDER_PUBLIC_URL':os.environ['CINDER_PUBLIC_URL'],
- 'CINDER_INTERNAL_URL':os.environ['CINDER_INTERNAL_URL'],
- 'CINDER_ADMIN_URL':os.environ['CINDER_ADMIN_URL'],
- 'CINDER_PUBLIC_URL_V2':os.environ['CINDER_PUBLIC_URL_V2'],
- 'CINDER_INTERNAL_URL_V2':os.environ['CINDER_INTERNAL_URL_V2'],
- 'CINDER_ADMIN_URL_V2':os.environ['CINDER_ADMIN_URL_V2'],
+ 'MANAGEMENT_INTERFACE_IP_ADDRESS':os.environ['MANAGEMENT_INTERFACE_IP_ADDRESS'],
}
yaml.dump(cinder_configuration, sys.stdout, default_flow_style=False)
diff --git a/openstack/usr/share/openstack/cinder.yml b/openstack/usr/share/openstack/cinder.yml
index c926ea3b..35e7a4f8 100644
--- a/openstack/usr/share/openstack/cinder.yml
+++ b/openstack/usr/share/openstack/cinder.yml
@@ -37,9 +37,9 @@
name=cinderv1
type=volume
description="Openstack Block Storage"
- publicurl={{ CINDER_PUBLIC_URL }}
- internalurl={{ CINDER_INTERNAL_URL | default('http://127.0.0.1:8776/v1/%(tenant_id)s') }}
- adminurl={{ CINDER_ADMIN_URL }}
+ publicurl='http://{{ CONTROLLER_HOST_ADDRESS }}:8776/v1/%(tenant_id)s'
+ internalurl='http://{{ CONTROLLER_HOST_ADDRESS }}:8776/v1/%(tenant_id)s'
+ adminurl='http://{{ CONTROLLER_HOST_ADDRESS }}:8776/v1/%(tenant_id)s'
region='RegionOne'
token={{ KEYSTONE_TEMPORARY_ADMIN_TOKEN }}
@@ -47,9 +47,9 @@
name=cinderv2
type=volume
description="Openstack Block Storage"
- publicurl={{ CINDER_PUBLIC_URL_V2 }}
- internalurl={{ CINDER_INTERNAL_URL_V2 | default('http://127.0.0.1:8776/v2/%(tenant_id)s') }}
- adminurl={{ CINDER_ADMIN_URL_V2 }}
+ publicurl='http://{{ CONTROLLER_HOST_ADDRESS }}:8776/v2/%(tenant_id)s'
+ internalurl='http://{{ CONTROLLER_HOST_ADDRESS }}:8776/v2/%(tenant_id)s'
+ adminurl='http://{{ CONTROLLER_HOST_ADDRESS }}:8776/v2/%(tenant_id)s'
region='RegionOne'
token={{ KEYSTONE_TEMPORARY_ADMIN_TOKEN }}
diff --git a/openstack/usr/share/openstack/cinder/cinder.conf b/openstack/usr/share/openstack/cinder/cinder.conf
index b79a2ed4..924140f7 100644
--- a/openstack/usr/share/openstack/cinder/cinder.conf
+++ b/openstack/usr/share/openstack/cinder/cinder.conf
@@ -495,10 +495,10 @@ api_paste_config=api-paste.ini
#state_path=/var/lib/cinder
# IP address of this host (string value)
-my_ip={{ GLANCE_HOST }}
+my_ip={{ MANAGEMENT_INTERFACE_IP_ADDRESS }}
# Default glance host name or IP (string value)
-glance_host=$my_ip
+glance_host={{ CONTROLLER_HOST_ADDRESS }}
# Default glance port (integer value)
#glance_port=9292
@@ -2363,7 +2363,7 @@ volume_group=cinder-volumes
# Deprecated group/name - [DEFAULT]/sql_connection
# Deprecated group/name - [DATABASE]/sql_connection
# Deprecated group/name - [sql]/connection
-connection=postgresql://{{ CINDER_DB_USER }}:{{ CINDER_DB_PASSWORD }}@{{ CONTROLLER_HOST }}/cinder
+connection=postgresql://{{ CINDER_DB_USER }}:{{ CINDER_DB_PASSWORD }}@{{ CONTROLLER_HOST_ADDRESS }}/cinder
# The SQLAlchemy connection string to use to connect to the
# slave database. (string value)
@@ -2531,67 +2531,10 @@ connection=postgresql://{{ CINDER_DB_USER }}:{{ CINDER_DB_PASSWORD }}@{{ CONTROL
[keystone_authtoken]
-#
-# Options defined in keystonemiddleware.auth_token
-#
-
-# Prefix to prepend at the beginning of the path. Deprecated,
-# use identity_uri. (string value)
-#auth_admin_prefix=
-
-# Host providing the admin Identity API endpoint. Deprecated,
-# use identity_uri. (string value)
-auth_host={{ OPENSTACK_AUTH_HOST }}
-
-# Port of the admin Identity API endpoint. Deprecated, use
-# identity_uri. (integer value)
-auth_port={{ OPENSTACK_AUTH_PORT }}
-
-# Protocol of the admin Identity API endpoint (http or https).
-# Deprecated, use identity_uri. (string value)
-auth_protocol=http
-
-# Complete public Identity API endpoint (string value)
-auth_uri=$auth_protocol://$auth_host:$auth_port
-
-# Complete admin Identity API endpoint. This should specify
-# the unversioned root endpoint e.g. https://localhost:35357/
-# (string value)
-#identity_uri=<None>
-
-# API version of the admin Identity API endpoint (string
-# value)
-auth_version=v2.0
-
-# Do not handle authorization requests within the middleware,
-# but delegate the authorization decision to downstream WSGI
-# components (boolean value)
-#delay_auth_decision=false
-
-# Request timeout value for communicating with Identity API
-# server. (boolean value)
-#http_connect_timeout=<None>
-
-# How many times are we trying to reconnect when communicating
-# with Identity API Server. (integer value)
-#http_request_max_retries=3
-
-# This option is deprecated and may be removed in a future
-# release. Single shared secret with the Keystone
-# configuration used for bootstrapping a Keystone
-# installation, or otherwise bypassing the normal
-# authentication process. This option should not be used, use
-# `admin_user` and `admin_password` instead. (string value)
-#admin_token=<None>
-
-# Keystone account username (string value)
+identity_uri = http://{{ CONTROLLER_HOST_ADDRESS }}:35357
+auth_uri = http://{{ CONTROLLER_HOST_ADDRESS }}:5000/v2.0
admin_user={{ CINDER_USER }}
-
-# Keystone account password (string value)
admin_password={{ CINDER_PASSWORD }}
-
-# Keystone service account tenant name to validate user tokens
-# (string value)
admin_tenant_name=service
# Env key for the swift cache (string value)