Refactor memcached_servers

This patch aims to add a prefix for memcached_server
on each role to give the ability for deployers to
override the location of memcached cluster. I.e users
wants to create a single memcached cluster with k8s
for each service.

We also add pymemcache based on [1] and fix zun-docker
systemd config.

[1] https://review.opendev.org/711429

Change-Id: Ic7b31506177ebb0f4f24eaff4db134aace5c0b1a
This commit is contained in:
Dmitriy Rabotyagov 2020-03-25 18:59:19 +02:00
parent 399db8a94e
commit 7ee1939c1c
3 changed files with 5 additions and 2 deletions

View File

@ -263,6 +263,7 @@ zun_pip_packages:
- oslo_rootwrap
- osprofiler
- python-memcached
- pymemcache
- python-zunclient
- pymysql
- systemd-python
@ -272,6 +273,8 @@ zun_pip_packages:
# TODO(ansmith): Change structure when more backends will be supported
zun_oslomsg_amqp1_enabled: "{{ zun_oslomsg_rpc_transport == 'amqp' }}"
zun_memcached_servers: "{{ memcached_servers }}"
zun_optional_oslomsg_amqp1_pip_packages:
- oslo.messaging[amqp1]

View File

@ -1,3 +1,3 @@
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd --group {{ zun_system_group_name }} -H tcp://localhost:2375 -H unix:///var/run/docker.sock --cluster-store etcd://{% for item in groups['zun_api'] %}{{ hostvars[item]['ansible_host'] }}:2379{% if not loop.last %},{% endif %}{% endfor %}
ExecStart=/usr/bin/dockerd --group {{ zun_system_group_name }} -H tcp://127.0.0.1:2375 -H unix:///var/run/docker.sock --cluster-store etcd://{% for item in groups['zun_api'] %}{{ hostvars[item]['ansible_host'] }}:2379{% if not loop.last %},{% endif %}{% endfor %}

View File

@ -1071,7 +1071,7 @@ region_name = {{ keystone_service_region }}
# undefined, tokens will instead be cached in-process. (list value)
# Deprecated group/name - [keystone_authtoken]/memcache_servers
#memcached_servers = <None>
memcached_servers = {{ memcached_servers }}
memcached_servers = {{ zun_memcached_servers }}
# In order to prevent excessive effort spent validating tokens, the middleware
# caches previously-seen tokens for a configurable duration (in seconds). Set