parametrize endpoints
Change-Id: I0f4d48e7856f9e46cd1c532d284460b3c455c400
diff --git a/glance/files/juno/glance-api.conf.Debian b/glance/files/juno/glance-api.conf.Debian
index 7f8b7f7..b0e68a7 100644
--- a/glance/files/juno/glance-api.conf.Debian
+++ b/glance/files/juno/glance-api.conf.Debian
@@ -407,7 +407,7 @@
# Info to match when looking for cinder in the service catalog
# Format is : separated values of the form:
# <service_type>:<service_name>:<endpoint_type> (string value)
-#cinder_catalog_info = volume:cinder:publicURL
+cinder_catalog_info = volume:cinder:{{ server.identity.get('endpoint_type', 'publicURL') }}
# Override service catalog lookup with template for cinder endpoint
# e.g. http://localhost:8776/v1/%(project_id)s (string value)
@@ -699,7 +699,7 @@
# Info to match when looking for cinder in the service catalog
# Format is : separated values of the form:
# <service_type>:<service_name>:<endpoint_type> (string value)
-#cinder_catalog_info = volume:cinder:publicURL
+cinder_catalog_info = volume:cinder:{{ server.identity.get('endpoint_type', 'publicURL') }}
# Override service catalog lookup with template for cinder endpoint
# e.g. http://localhost:8776/v1/%(project_id)s (string value)
diff --git a/glance/files/juno/glance-cache.conf.Debian b/glance/files/juno/glance-cache.conf.Debian
index d660c7a..ab7a87f 100644
--- a/glance/files/juno/glance-cache.conf.Debian
+++ b/glance/files/juno/glance-cache.conf.Debian
@@ -148,7 +148,7 @@
# Info to match when looking for cinder in the service catalog
# Format is : separated values of the form:
# <service_type>:<service_name>:<endpoint_type> (string value)
-#cinder_catalog_info = volume:cinder:publicURL
+cinder_catalog_info = volume:cinder:{{ server.identity.get('endpoint_type', 'publicURL') }}
# Override service catalog lookup with template for cinder endpoint
# e.g. http://localhost:8776/v1/%(project_id)s (string value)
diff --git a/glance/files/kilo/glance-api.conf.Debian b/glance/files/kilo/glance-api.conf.Debian
index 74cdb60..b1d32f7 100644
--- a/glance/files/kilo/glance-api.conf.Debian
+++ b/glance/files/kilo/glance-api.conf.Debian
@@ -807,7 +807,7 @@
# Info to match when looking for cinder in the service catalog
# Format is : separated values of the form:
# <service_type>:<service_name>:<endpoint_type> (string value)
-#cinder_catalog_info = volume:cinder:publicURL
+cinder_catalog_info = volume:cinder:{{ server.identity.get('endpoint_type', 'publicURL') }}
# Override service catalog lookup with template for cinder endpoint
# e.g. http://localhost:8776/v1/%(project_id)s (string value)
diff --git a/glance/files/kilo/glance-cache.conf.Debian b/glance/files/kilo/glance-cache.conf.Debian
index 2b835fe..c8c8f37 100644
--- a/glance/files/kilo/glance-cache.conf.Debian
+++ b/glance/files/kilo/glance-cache.conf.Debian
@@ -185,7 +185,7 @@
# Info to match when looking for cinder in the service catalog
# Format is : separated values of the form:
# <service_type>:<service_name>:<endpoint_type> (string value)
-#cinder_catalog_info = volume:cinder:publicURL
+cinder_catalog_info = volume:cinder:{{ server.identity.get('endpoint_type', 'publicURL') }}
# Override service catalog lookup with template for cinder endpoint
# e.g. http://localhost:8776/v1/%(project_id)s (string value)
diff --git a/glance/files/liberty/glance-api.conf.Debian b/glance/files/liberty/glance-api.conf.Debian
index 82d5470..db1ef1c 100644
--- a/glance/files/liberty/glance-api.conf.Debian
+++ b/glance/files/liberty/glance-api.conf.Debian
@@ -816,7 +816,7 @@
# Info to match when looking for cinder in the service catalog
# Format is : separated values of the form:
# <service_type>:<service_name>:<endpoint_type> (string value)
-#cinder_catalog_info = volume:cinder:publicURL
+cinder_catalog_info = volume:cinder:{{ server.identity.get('endpoint_type', 'publicURL') }}
# Override service catalog lookup with template for cinder endpoint
# e.g. http://localhost:8776/v1/%(project_id)s (string value)
diff --git a/glance/files/liberty/glance-cache.conf.Debian b/glance/files/liberty/glance-cache.conf.Debian
index 2b835fe..c8c8f37 100644
--- a/glance/files/liberty/glance-cache.conf.Debian
+++ b/glance/files/liberty/glance-cache.conf.Debian
@@ -185,7 +185,7 @@
# Info to match when looking for cinder in the service catalog
# Format is : separated values of the form:
# <service_type>:<service_name>:<endpoint_type> (string value)
-#cinder_catalog_info = volume:cinder:publicURL
+cinder_catalog_info = volume:cinder:{{ server.identity.get('endpoint_type', 'publicURL') }}
# Override service catalog lookup with template for cinder endpoint
# e.g. http://localhost:8776/v1/%(project_id)s (string value)
diff --git a/glance/files/mitaka/glance-api.conf.Debian b/glance/files/mitaka/glance-api.conf.Debian
index 7eaaea2..e523f84 100644
--- a/glance/files/mitaka/glance-api.conf.Debian
+++ b/glance/files/mitaka/glance-api.conf.Debian
@@ -819,7 +819,7 @@
# A string giving the endpoint type of the swift service to use
# (publicURL, adminURL or internalURL). This setting is only used if
# swift_store_auth_version is 2. (string value)
-#swift_store_endpoint_type = publicURL
+swift_store_endpoint_type = {{ server.identity.get('endpoint_type', 'publicURL') }}
# A string giving the service type of the swift service to use. This
# setting is only used if swift_store_auth_version is 2. (string
@@ -947,7 +947,7 @@
# Info to match when looking for cinder in the service catalog. Format
# is : separated values of the form:
# <service_type>:<service_name>:<endpoint_type> (string value)
-#cinder_catalog_info = volumev2::publicURL
+cinder_catalog_info = volumev2::{{ server.identity.get('endpoint_type', 'publicURL') }}
# Override service catalog lookup with template for cinder endpoint
# e.g. http://localhost:8776/v2/%(tenant)s (string value)
diff --git a/glance/files/mitaka/glance-registry.conf.Debian b/glance/files/mitaka/glance-registry.conf.Debian
index 83fe12f..a32a399 100644
--- a/glance/files/mitaka/glance-registry.conf.Debian
+++ b/glance/files/mitaka/glance-registry.conf.Debian
@@ -547,7 +547,7 @@
# A string giving the endpoint type of the swift service to use
# (publicURL, adminURL or internalURL). This setting is only used if
# swift_store_auth_version is 2. (string value)
-#swift_store_endpoint_type = publicURL
+swift_store_endpoint_type = {{ server.identity.get('endpoint_type', 'publicURL') }}
# A string giving the service type of the swift service to use. This
# setting is only used if swift_store_auth_version is 2. (string
@@ -669,7 +669,7 @@
# Info to match when looking for cinder in the service catalog. Format
# is : separated values of the form:
# <service_type>:<service_name>:<endpoint_type> (string value)
-#cinder_catalog_info = volumev2::publicURL
+cinder_catalog_info = volumev2::{{ server.identity.get('endpoint_type', 'publicURL') }}
# Override service catalog lookup with template for cinder endpoint
# e.g. http://localhost:8776/v2/%(tenant)s (string value)
diff --git a/metadata/service/control/cluster.yml b/metadata/service/control/cluster.yml
index 463a426..2ede4d7 100644
--- a/metadata/service/control/cluster.yml
+++ b/metadata/service/control/cluster.yml
@@ -3,6 +3,8 @@
classes:
- service.glance.support
parameters:
+ _param:
+ keystone_glance_endpoint_type: internalURL
glance:
server:
enabled: true
@@ -31,6 +33,7 @@
password: ${_param:keystone_glance_password}
region: RegionOne
tenant: service
+ endpoint_type: ${_param:keystone_glance_endpoint_type}
message_queue:
engine: rabbitmq
host: ${_param:cluster_vip_address}
diff --git a/metadata/service/control/container.yml b/metadata/service/control/container.yml
index f8d0f98..7e19b51 100644
--- a/metadata/service/control/container.yml
+++ b/metadata/service/control/container.yml
@@ -1,4 +1,6 @@
parameters:
+ _param:
+ keystone_glance_endpoint_type: internalURL
kubernetes:
control:
configmap:
@@ -32,6 +34,7 @@
password: ${_param:keystone_glance_password}
region: RegionOne
tenant: service
+ endpoint_type: ${_param:keystone_glance_endpoint_type}
message_queue:
engine: rabbitmq
host: ${_param:rabbitmq_service_host}
diff --git a/metadata/service/control/single.yml b/metadata/service/control/single.yml
index 2f23a6b..2abc3bd 100644
--- a/metadata/service/control/single.yml
+++ b/metadata/service/control/single.yml
@@ -3,6 +3,8 @@
classes:
- service.glance.support
parameters:
+ _param:
+ keystone_glance_endpoint_type: internalURL
glance:
server:
enabled: true
@@ -29,6 +31,7 @@
password: ${_param:keystone_glance_password}
region: RegionOne
tenant: service
+ endpoint_type: ${_param:keystone_glance_endpoint_type}
message_queue:
engine: rabbitmq
host: ${_param:single_address}
diff --git a/tests/pillar/single.sls b/tests/pillar/single.sls
index 89dd253..772aab0 100644
--- a/tests/pillar/single.sls
+++ b/tests/pillar/single.sls
@@ -24,6 +24,7 @@
password: password
region: RegionOne
tenant: service
+ endpoint_type: internalURL
message_queue:
engine: rabbitmq
host: 127.0.0.1
diff --git a/tests/pillar/single_ceph.sls b/tests/pillar/single_ceph.sls
index bbee546..7d6d4e0 100644
--- a/tests/pillar/single_ceph.sls
+++ b/tests/pillar/single_ceph.sls
@@ -24,6 +24,7 @@
password: password
region: RegionOne
tenant: service
+ endpoint_type: internalURL
message_queue:
engine: rabbitmq
host: 127.0.0.1