29cf8baba5
Change-Id: I22a46b7c61f9ea4f449bc68a244caed2f6705d96
47 lines
1.7 KiB
YAML
47 lines
1.7 KiB
YAML
---
|
|
project_name: "memcached"
|
|
|
|
memcached_services:
|
|
memcached:
|
|
container_name: "memcached"
|
|
image: "{{ memcached_image_full }}"
|
|
enabled: true
|
|
group: "memcached"
|
|
volumes:
|
|
- "{{ node_config_directory }}/memcached/:{{ container_config_directory }}/:ro"
|
|
- "/etc/localtime:/etc/localtime:ro"
|
|
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'] }} {{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ memcached_port }} check inter 2000 rise 2 fall 5{% if not loop.first %} backup{% endif %};{% endfor %}"
|
|
|
|
####################
|
|
# Docker
|
|
####################
|
|
memcached_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-memcached"
|
|
memcached_tag: "{{ openstack_release }}"
|
|
memcached_image_full: "{{ memcached_image }}:{{ memcached_tag }}"
|
|
memcached_dimensions: "{{ default_container_dimensions }}"
|
|
|
|
####################
|
|
# 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"
|