Add healthcheck middleware to pipelines
This introduces the oslo healt check middleware http://docs.openstack.org/developer/oslo.middleware/healthcheck_plugins.html into the pipelines. This middleware is useful for load balancers and http servers, which can use it to validate that the keystone services are operational. This middleware is being used in other services such as glance and magnum. This patch provides it for keystone, in an effort to spread the usage across all major projects. This is one less item that operators will have to patch locally. DocImpact Change-Id: I19e4fc8f6c6a227068ba7191c1e9c453fc08f061
This commit is contained in:
parent
3c41421596
commit
eeac2cb6d1
|
@ -1143,6 +1143,35 @@ status code of 401 (Unauthorized).
|
|||
It is recommended that installations take the steps necessary to where they
|
||||
can run with both options set to ``strict`` as soon as is practical.
|
||||
|
||||
Configuring the Health Check
|
||||
----------------------------
|
||||
|
||||
This health check middleware allows an operator to configure the endpoint URL
|
||||
that will provide information to a load balancer if the given API endpoint at
|
||||
the node should be available or not.
|
||||
|
||||
To enable the health check middleware, it must occur in the beginning of the
|
||||
application pipeline.
|
||||
|
||||
The health check middleware should be placed in your
|
||||
``keystone-paste.ini`` in a section titled ``[filter:healthcheck]``.
|
||||
It should look like this::
|
||||
|
||||
[filter:healthcheck]
|
||||
use = egg:oslo.middleware#healthcheck
|
||||
|
||||
Desired keystone application pipelines have been defined with this filter,
|
||||
looking like so::
|
||||
|
||||
[pipeline:public_version_api]
|
||||
pipeline = healthcheck cors sizelimit osprofiler url_normalize public_version_service
|
||||
|
||||
It's important that the healthcheck go to the front of the pipeline for the
|
||||
most efficient checks.
|
||||
|
||||
For more information and configuration options for the middleware see
|
||||
`oslo.middleware <http://docs.openstack.org/developer/oslo.middleware/api.html#oslo_middleware.Healthcheck>`_.
|
||||
|
||||
Sample Configuration Files
|
||||
--------------------------
|
||||
|
||||
|
|
|
@ -27,6 +27,9 @@ oslo_config_project = keystone
|
|||
[filter:http_proxy_to_wsgi]
|
||||
use = egg:oslo.middleware#http_proxy_to_wsgi
|
||||
|
||||
[filter:healthcheck]
|
||||
use = egg:oslo.middleware#healthcheck
|
||||
|
||||
[filter:ec2_extension]
|
||||
use = egg:keystone#ec2_extension
|
||||
|
||||
|
@ -57,17 +60,17 @@ use = egg:keystone#admin_service
|
|||
[pipeline:public_api]
|
||||
# The last item in this pipeline must be public_service or an equivalent
|
||||
# application. It cannot be a filter.
|
||||
pipeline = cors sizelimit http_proxy_to_wsgi osprofiler url_normalize request_id admin_token_auth build_auth_context token_auth json_body ec2_extension public_service
|
||||
pipeline = healthcheck cors sizelimit http_proxy_to_wsgi osprofiler url_normalize request_id admin_token_auth build_auth_context token_auth json_body ec2_extension public_service
|
||||
|
||||
[pipeline:admin_api]
|
||||
# The last item in this pipeline must be admin_service or an equivalent
|
||||
# application. It cannot be a filter.
|
||||
pipeline = cors sizelimit http_proxy_to_wsgi osprofiler url_normalize request_id admin_token_auth build_auth_context token_auth json_body ec2_extension s3_extension admin_service
|
||||
pipeline = healthcheck cors sizelimit http_proxy_to_wsgi osprofiler url_normalize request_id admin_token_auth build_auth_context token_auth json_body ec2_extension s3_extension admin_service
|
||||
|
||||
[pipeline:api_v3]
|
||||
# The last item in this pipeline must be service_v3 or an equivalent
|
||||
# application. It cannot be a filter.
|
||||
pipeline = cors sizelimit http_proxy_to_wsgi osprofiler url_normalize request_id admin_token_auth build_auth_context token_auth json_body ec2_extension_v3 s3_extension service_v3
|
||||
pipeline = healthcheck cors sizelimit http_proxy_to_wsgi osprofiler url_normalize request_id admin_token_auth build_auth_context token_auth json_body ec2_extension_v3 s3_extension service_v3
|
||||
|
||||
[app:public_version_service]
|
||||
use = egg:keystone#public_version_service
|
||||
|
@ -76,10 +79,10 @@ use = egg:keystone#public_version_service
|
|||
use = egg:keystone#admin_version_service
|
||||
|
||||
[pipeline:public_version_api]
|
||||
pipeline = cors sizelimit osprofiler url_normalize public_version_service
|
||||
pipeline = healthcheck cors sizelimit osprofiler url_normalize public_version_service
|
||||
|
||||
[pipeline:admin_version_api]
|
||||
pipeline = cors sizelimit osprofiler url_normalize admin_version_service
|
||||
pipeline = healthcheck cors sizelimit osprofiler url_normalize admin_version_service
|
||||
|
||||
[composite:main]
|
||||
use = egg:Paste#urlmap
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
features:
|
||||
- >
|
||||
The healthcheck middleware from Oslo has been added to the keystone
|
||||
application pipelines in the example ``keystone-paste.ini`` file. This
|
||||
middleware provides a common method to check the health of a particular
|
||||
application provided by keystone.
|
Loading…
Reference in New Issue