146b00efa7
Previously we mounted /etc/timezone if the kolla_base_distro is debian or ubuntu. This would fail prechecks if debian or ubuntu images were deployed on CentOS. While this is not a supported combination, for correctness we should fix the condition to reference the host OS rather than the container OS, since that is where the /etc/timezone file is located. Change-Id: Ifc252ae793e6974356fcdca810b373f362d24ba5 Closes-Bug: #1882553
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 ansible_os_family == 'Debian' 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"
|