-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Kafka: * upgrade to 2.8.1 version * move upgrade tasks to Kafka role * refactor installation and upgrade tasks * refactor: rename 'kafka_var' setting Zookeeper: * refactor installation and upgrade * move upgrade tasks to Zookeeper role Kafka-exporter: * verify if service definition needs to be updated even if exporter itself was not updated * remove `kafka.version` from configuration
- Loading branch information
Showing
50 changed files
with
742 additions
and
716 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
kafka_version: 2.6.0 | ||
kafka_version: 2.8.1 | ||
scala_version: 2.12 | ||
kafka_bin_filename: "kafka_2.12-2.6.0.tgz" | ||
kafka_bin_filename: "kafka_2.12-2.8.1.tgz" | ||
kafka_install_dir: "/opt/kafka_{{ scala_version }}-{{ kafka_version }}" | ||
|
||
prometheus_jmx_exporter_path: /opt/jmx-exporter/jmx_prometheus_javaagent.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -85,4 +85,4 @@ rules: | |
name: kafka_$1_$2_$3 | ||
type: GAUGE | ||
labels: | ||
quantile: "0.$4" | ||
quantile: "0.$4" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,22 @@ | ||
--- | ||
# Handlers for Kafka | ||
|
||
- name: restart kafka | ||
- name: Restart kafka | ||
service: | ||
name: kafka | ||
state: restarted | ||
enabled: yes | ||
enabled: true | ||
retries: 10 | ||
delay: 10 | ||
|
||
- name: restart prometheus | ||
- name: Restart prometheus | ||
become: true | ||
systemd: | ||
daemon_reload: true | ||
name: prometheus | ||
state: restarted | ||
delegate_to: "{{ item }}" | ||
with_inventory_hostnames: | ||
- prometheus | ||
delegate_to: "{{ node }}" | ||
loop_control: | ||
loop_var: node | ||
loop: "{{ groups.prometheus }}" | ||
when: groups.prometheus is defined |
22 changes: 22 additions & 0 deletions
22
ansible/playbooks/roles/kafka/tasks/common/download_and_unpack_binary.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
- name: Download Kafka binaries | ||
include_role: | ||
name: download | ||
tasks_from: download_file | ||
vars: | ||
file_name: "{{ kafka_bin_filename }}" | ||
|
||
- name: Uncompress the Kafka tar | ||
unarchive: | ||
remote_src: true | ||
creates: "{{ kafka_install_dir }}" | ||
src: "{{ download_directory }}/{{ kafka_bin_filename }}" | ||
dest: /opt | ||
|
||
- name: Change ownership on Kafka directory | ||
file: | ||
path: "{{ kafka_install_dir }}" | ||
state: directory | ||
mode: u=rwx,go=rx | ||
owner: "{{ specification.user }}" | ||
group: "{{ specification.group }}" |
4 changes: 2 additions & 2 deletions
4
...ble/playbooks/roles/kafka/tasks/start.yml → ...ybooks/roles/kafka/tasks/common/start.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
- name: Stop Kafka | ||
systemd: | ||
name: kafka | ||
state: stopped |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.