kolla-ansible/ansible/roles/kafka/defaults/main.yml
Doug Szumski e689f951f4 Support explicit creation of Monasca Kafka topics
With this patch, Monasca no longer relies on automatic topic creation
in Kafka, and instead pre-creates all topics before bringing up the
containers. If the topic already exists then it will not be
changed, therefore existing users are not affected.

This patch allows per topic customisations, such as increasing the
number of partitions on particular topics and also works around
a race condition in automatic topic creation where multiple instances
of the same service could race to create a topic causing some of the
services to restart and throw an error before resuming normal
operation.

Change-Id: Ib15c95bb72cf79e9e55945d757b248e06f5f4065
2021-01-11 09:47:31 +00:00

40 lines
1.4 KiB
YAML

---
project_name: "kafka"
kafka_services:
kafka:
container_name: kafka
group: kafka
enabled: true
image: "{{ kafka_image_full }}"
environment:
LOG_DIR: "{{ kafka_log_dir }}"
KAFKA_HEAP_OPTS: "{{ kafka_heap_opts }}"
volumes: "{{ kafka_default_volumes + kafka_extra_volumes }}"
dimensions: "{{ kafka_dimensions }}"
####################
# Kafka
####################
kafka_cluster_name: "kolla_kafka"
kafka_log_dir: "/var/log/kolla/kafka"
kafka_heap_opts: "-Xmx1G -Xms1G"
kafka_zookeeper: "{% for host in groups['zookeeper'] %}{{ 'api' | kolla_address(host) | put_address_in_context('url') }}:{{ zookeeper_client_port }}{% if not loop.last %},{% endif %}{% endfor %}"
####################
# Docker
####################
kafka_install_type: "{{ kolla_install_type }}"
kafka_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kafka_install_type }}-kafka"
kafka_tag: "{{ openstack_tag }}"
kafka_image_full: "{{ kafka_image }}:{{ kafka_tag }}"
kafka_dimensions: "{{ default_container_dimensions }}"
kafka_default_volumes:
- "{{ node_config_directory }}/kafka/:{{ container_config_directory }}/"
- "/etc/localtime:/etc/localtime:ro"
- "{{ '/etc/timezone:/etc/timezone:ro' if ansible_os_family == 'Debian' else '' }}"
- "{{ kafka_datadir_volume }}:/var/lib/kafka/data"
- "kolla_logs:/var/log/kolla/"
kafka_extra_volumes: "{{ default_extra_volumes }}"