Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sansible/kafka
https://github.com/sansible/kafka
ansible ansible-role ansible-roles kafka
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/sansible/kafka
- Owner: sansible
- License: mit
- Created: 2016-02-08T20:31:19.000Z (almost 9 years ago)
- Default Branch: develop
- Last Pushed: 2020-09-09T08:29:53.000Z (about 4 years ago)
- Last Synced: 2024-09-30T17:42:16.686Z (about 2 months ago)
- Topics: ansible, ansible-role, ansible-roles, kafka
- Language: HTML
- Size: 91.8 KB
- Stars: 14
- Watchers: 9
- Forks: 15
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Kafka
Master: [![Build Status](https://travis-ci.org/sansible/kafka.svg?branch=master)](https://travis-ci.org/sansible/kafka)
Develop: [![Build Status](https://travis-ci.org/sansible/kafka.svg?branch=develop)](https://travis-ci.org/sansible/kafka)* [Installation and Dependencies](#installation-and-dependencies)
* [Tags](#tags)
* [Examples](#examples)This roles installs Apache Kafka server.
For more information about Kafka please visit
[zookeeper.apache.org/](http://kafka.apache.org/).## Installation and Dependencies
This role will install `sansible.users_and_groups` for managing `kafka`
user.To install run `ansible-galaxy install sansible.kafka` or add this to your
`roles.yml````YAML
- name: sansible.kafka
version: v2.0
```and run `ansible-galaxy install -p ./roles -r roles.yml`
### AWS Setup
This role has AWS support built in for deployment/discovery.
#### AWS Tag Discovery
Designed for instances that are statically defined either as direct EC2
instances or via a single ASG per instance.The broker.id is derived from a tag attached to the instance, you can turn on
this behaviour and specify the tag to lookup like so:```YAML
- role: sansible.kafka
sansible_kafka_aws_cluster_assigned_id_enabled: yes
sansible_kafka_aws_cluster_assigned_id_tag_name: instanceindex
# A ZK cluster behind an ELB
sansible_kafka_zookeeper_hosts:
- zookeeper.app.internal
```## Tags
This role uses two tags: **build** and **configure**
* `build` - Installs Kafka server and all its dependencies.
* `configure` - Configure and ensures that the Kafka service is running.## Examples
```YAML
- name: Install Kafka Server
hosts: sandboxpre_tasks:
- name: Update apt
become: yes
apt:
cache_valid_time: 1800
update_cache: yes
tags:
- buildroles:
- name: sansible.kafka
sansible_kafka_zookeeper_hosts:
- my.zookeeper.host
``````YAML
- name: Install Kafka with NewRelic integration
hosts: sandboxpre_tasks:
- name: Update apt
become: yes
apt:
cache_valid_time: 1800
update_cache: yes
tags:
- buildroles:
- name: sansible.kafka
sansible_kafka_environment_vars:
- "NEWRELIC_OPTS=\"-javaagent:/home/{{ sansible_kafka_user }}/newrelic/newrelic.jar\""
- "export KAFKA_OPTS=\"${KAFKA_OPTS} ${NEWRELIC_OPTS}\""
```If you just want to test Kafka service build both Zookeeper and Kafka on the
same machine.```YAML
- name: Install Kafka Server
hosts: sandboxpre_tasks:
- name: Update apt
become: yes
apt:
cache_valid_time: 1800
update_cache: yes
tags:
- buildroles:
- name: sansible.zookeeper
- name: sansible.kafka
```Logging access denied. These access logs will be placed in `{{ sansible_kafka_log_dir }}/kafka-authorizer.log`.
```YAML
- role: sansible.kafka
sansible_kafka_authorizer_log_level: INFO
```