4b5df0d866
Some services look for /etc/timezone on Debian/Ubuntu, so we should introduce it to the containers. In addition, added prechecks for /etc/localtime and /etc/timezone. Closes-Bug: #1821592 Change-Id: I9fef14643d1bcc7eee9547eb87fa1fb436d8a6b3
52 lines
1.9 KiB
YAML
52 lines
1.9 KiB
YAML
---
|
|
project_name: "memcached"
|
|
|
|
memcached_services:
|
|
memcached:
|
|
container_name: "memcached"
|
|
image: "{{ memcached_image_full }}"
|
|
enabled: true
|
|
group: "memcached"
|
|
volumes: "{{ memcached_default_volumes + memcached_extra_volumes }}"
|
|
dimensions: "{{ memcached_dimensions }}"
|
|
haproxy:
|
|
memcached:
|
|
enabled: "{{ enable_memcached|bool and enable_haproxy_memcached|bool }}"
|
|
mode: "tcp"
|
|
port: "{{ memcached_port }}"
|
|
frontend_tcp_extra:
|
|
- "option clitcpka"
|
|
- "timeout client 3600s"
|
|
backend_tcp_extra:
|
|
- "option srvtcpka"
|
|
- "timeout server 3600s"
|
|
custom_member_list: "{{ haproxy_members.split(';') }}"
|
|
|
|
####################
|
|
# HAProxy
|
|
####################
|
|
haproxy_members: "{% for host in groups['memcached'] %}server {{ hostvars[host]['ansible_hostname'] }} {{ 'api' | kolla_address(host) }}:{{ memcached_port }} check inter 2000 rise 2 fall 5{% if not loop.first %} backup{% endif %};{% endfor %}"
|
|
|
|
####################
|
|
# Docker
|
|
####################
|
|
memcached_install_type: "{{ kolla_install_type }}"
|
|
memcached_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ memcached_install_type }}-memcached"
|
|
memcached_tag: "{{ openstack_tag }}"
|
|
memcached_image_full: "{{ memcached_image }}:{{ memcached_tag }}"
|
|
memcached_dimensions: "{{ default_container_dimensions }}"
|
|
|
|
memcached_default_volumes:
|
|
- "{{ node_config_directory }}/memcached/:{{ container_config_directory }}/:ro"
|
|
- "/etc/localtime:/etc/localtime:ro"
|
|
- "{{ '/etc/timezone:/etc/timezone:ro' if kolla_base_distro in ['debian', 'ubuntu'] else '' }}"
|
|
memcached_extra_volumes: "{{ default_extra_volumes }}"
|
|
|
|
####################
|
|
# Memcached options
|
|
####################
|
|
memcached_connection_limit: "5000"
|
|
# NOTE(jeffrey4l): max memory to use for items in megabytes. default is 64MB,
|
|
# which is too small for production environment.
|
|
memcached_max_memory: "256"
|