sleighzy / ansible-kafka Goto Github PK
View Code? Open in Web Editor NEWAnsible role for installing and configuring Apache Kafka on RedHat and Debian platforms.
License: MIT License
Ansible role for installing and configuring Apache Kafka on RedHat and Debian platforms.
License: MIT License
similar to sleighzy/ansible-zookeeper#39
PR is #27
FAILED! => {"changed": false, "msg": "Failed to validate the SSL certificate for dlcdn.apache.org:443. Make sure your managed systems have a valid CA certificate installed. You can use validate_certs=False if you do not need to confirm the servers identity but this is unsafe and not recommended. Paths checked for this platform: /etc/ssl/certs, /etc/pki/ca-trust/extracted/pem, /etc/pki/tls/certs, /usr/share/ca-certificates/cacert.org, /etc/ansible. The exception msg was: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:618).", "status": -1, "url": "https://dlcdn.apache.org/kafka/3.0.0/kafka_2.13-3.0.0.tgz
I want to set up advertised.listeners
, but the value won't resolve. Even though the variable is set in the config, one can see the following:
#advertised.listeners=PLAINTEXT://your.host.name:9092
Here's the complete playbook:
- name: Install openjdk-8-jdk on all nodes
hosts: kafka-nodes
become: true
tasks:
- name: Install openjdk-8-jdk
apt:
name: openjdk-8-jdk
state: present
update_cache: yes
- name: Setup zookeeper
hosts: kafka-nodes
roles:
- role: sleighzy.zookeeper
vars:
zookeeper_servers:
- kafka1
zookeeper_mirror: https://archive.apache.org/dist/zookeeper
zookeeper_version: 3.6.4
zookeeper_package: apache-zookeeper-3.6.4-bin.tar.gz
zookeeper_servers_use_inventory_hostname: true
- name: Setup kafka
hosts: kafka-nodes
become: true
roles:
- role: sleighzy.kafka
vars:
kafka_download_base_url: https://archive.apache.org/dist/kafka
kafka_broker_id: "{{ inventory_hostname.split('kafka')[-1] }}"
kafka_advertised_listeners: "[\"PLAINTEXT://{{ansible_ssh_host}}:9092\"]"
kafka_version: 2.7.0
kafka_scala_version: 2.13
The way the value is passed seems correct. When I run the following task, it gives me the value correctly:
- name: Print kafka_advertised_listeners value
hosts: kafka-nodes
tasks:
- name: Print value
debug:
msg: "[\"PLAINTEXT://{{ansible_ssh_host}}:9092\"]"
->
ok: [kafka1] => {
"msg": [
"PLAINTEXT://1.2.3.4:9092"
]
}
hi
just see only copy template without anything to start zookeeper service
we should have
bin/zookeeper-server-start.sh config/zookeeper.properties
on centos
we have
sudo systemctl start zookeeper
Mot de passe :
Failed to start zookeeper.service: Unit not found.
with kafka-scala versison
regards
hi
just a question,
it seems missing loading jaas file, for connect with zookeeper in OPTS when start kafka-server-start.sh ?
Hello,
i'm trying to add ''kafka_advertised_listeners" for each node in my custom inventory file
example:
0.0.0.0 zookeeper_id=1 kafka_broker_id=1 kafka_advertised_listeners='PLAINTEXT://HOSTNAME:9092'
and the output value in server.properties file is separeting each letter with a comma!
output example:
advertised.listeners=P,L,A,I,N,T,E,X,T,:,/,/H,O,S,T,N,A,M,E:,9,0,9,2
it works fine when adding the var to the main file anyway.
thanks.
I use this role to install Kafka-cluster on Ubuntu 22.04
My kafka_root_dir is /data/kafka
When run ansible-playbook, I got error:
TASK [sleighzy.kafka : Unpack Apache Kafka] **********************************************************************************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: NoneType: None
fatal: [kafka-0]: FAILED! => {"changed": false, "msg": "dest '/data/kafka' must be an existing dir"}
Should we create kafka_root_dir before [Unpack Apache Kafka] task
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.