openstack-ansible-os_glance/templates/glance-registry.conf.j2
Jesse Pretorius 1416013cd4 Allow deployment without glance-registry
The glance v1 API is deprecated and intended to be removed
from the glance code within the Queens or Rocky cycles.

When using the glance v2 API the glance-registry service is
optional, and the intention is to remove the glance-registry
service in the S cycle. The glance-registry service is required
when using the v1 API though.

Furthermore, when using the glance-registry service it is not
possible to execute a rolling upgrade without losing API
transactions.

Given the above information, this patch enables the deployment
of glance with only the v2 API enabled, and without the
glance-registry service. It adds a per-commit test to validate
that this configuration works.

This patch also corrects a previous misconfiguration which
enabled the v2 registry service, but did not set the data_api
correctly for the API service to inform it that the registry
was operating.

The glance_enable_v1_registry variable is also removed as it
is meaningless. The v1 API *requires* the registry to be
enabled, so we just enable it if glance_enable_v1_api is
enabled.

Change-Id: Ie95daed286798d139f0a35ffdd2a4dd1cdda6ff9
2017-11-20 12:48:02 +00:00

69 lines
2.6 KiB
Django/Jinja

# {{ ansible_managed }}
[DEFAULT]
# Disable stderr logging
use_stderr = False
debug = {{ debug }}
fatal_deprecations = {{ glance_fatal_deprecations }}
log_file = /var/log/glance/glance-registry.log
bind_host = {{ glance_registry_bind_address }}
bind_port = {{ glance_registry_service_port }}
http_keepalive = {{ glance_http_keepalive }}
backlog = 4096
workers = {{ glance_registry_workers | default(glance_api_threads) }}
api_limit_max = 1000
limit_param_default = 25
enable_v1_api = {{ glance_enable_v1_api }}
enable_v1_registry = {{ glance_enable_v1_api }}
enable_v2_api = {{ glance_enable_v2_api }}
enable_v2_registry = {{ glance_enable_v2_registry }}
transport_url = rabbit://{% for host in glance_rabbitmq_servers.split(',') %}{{ glance_rabbitmq_userid }}:{{ glance_rabbitmq_password }}@{{ host }}:{{ glance_rabbitmq_port }}{% if not loop.last %},{% else %}/{{ glance_rabbitmq_vhost }}{% endif %}{% endfor %}
[database]
connection = mysql+pymysql://{{ glance_galera_user }}:{{ glance_container_mysql_password }}@{{ glance_galera_address }}/{{ glance_galera_database }}?charset=utf8
[keystone_authtoken]
insecure = {{ keystone_service_internaluri_insecure | bool }}
auth_type = {{ glance_keystone_auth_plugin }}
auth_url = {{ keystone_service_adminurl }}
auth_uri = {{ keystone_service_internaluri }}
project_domain_id = {{ glance_service_project_domain_id }}
user_domain_id = {{ glance_service_user_domain_id }}
project_name = {{ glance_service_project_name }}
username = {{ glance_service_user_name }}
password = {{ glance_service_password }}
region_name = {{ keystone_service_region }}
memcached_servers = {{ memcached_servers }}
token_cache_time = 300
# if your memcached server is shared, use these settings to avoid cache poisoning
memcache_security_strategy = ENCRYPT
memcache_secret_key = {{ memcached_encryption_key }}
[oslo_messaging_rabbit]
ssl = {{ glance_rabbitmq_use_ssl }}
rabbit_notification_exchange = glance
rabbit_notification_topic = notifications
{% if glance_ceilometer_enabled %}
[oslo_messaging_notifications]
driver = messagingv2
transport_url = rabbit://{% for host in glance_rabbitmq_telemetry_servers.split(',') %}{{ glance_rabbitmq_telemetry_userid }}:{{ glance_rabbitmq_telemetry_password }}@{{ host }}:{{ glance_rabbitmq_telemetry_port }}{% if not loop.last %},{% else %}/{{ glance_rabbitmq_telemetry_vhost }}{% endif %}{% endfor %}
{% endif %}
[oslo_policy]
policy_file = {{ glance_policy_file }}
policy_default_rule = {{ glance_policy_default_rule }}
policy_dirs = {{ glance_policy_dirs }}
[paste_deploy]
flavor = keystone
[profiler]
enabled = {{ glance_profiler_enabled }}