diff --git a/molecule/default/vars.yml b/molecule/default/vars.yml index cd8ebf3e..b4741994 100644 --- a/molecule/default/vars.yml +++ b/molecule/default/vars.yml @@ -10,3 +10,4 @@ amq_streams_broker_config_files_requires_privilege_escalation: "{{ amq_streams_i amq_streams_cruise_control_path_to_capacity_file_require_priv_escalation: "{{ amq_streams_install_requires_become | default(true) }}" amq_streams_cruise_control_logfiles_requires_priv_escalation: "{{ amq_streams_install_requires_become | default(true) }}" amq_streams_connect_source_file_require_priv_escalation: "{{ amq_streams_install_requires_become | default(true) }}" +amq_streams_common_product_version: 3.9.0 diff --git a/roles/amq_streams_common/README.md b/roles/amq_streams_common/README.md index db62d789..a1e8553b 100644 --- a/roles/amq_streams_common/README.md +++ b/roles/amq_streams_common/README.md @@ -6,7 +6,7 @@ Common tasks for the collection. | Variable | Description | Default | |:---------|:------------|:--------| -|`amq_streams_common_product_version` | Kafka version | `3.4.0` | +|`amq_streams_common_product_version` | Kafka version | `4.1.1` | |`amq_streams_common_scala_version` | Scala version | `2.13` | |`amq_streams_common_version` | Combination version | `{{ amq_streams_common_scala_version }}-{{ amq_streams_common_product_version }}` | |`amq_streams_common_archive_file` | Kafka binary package | `kafka_{{ amq_streams_common_version }}.tgz` | diff --git a/roles/amq_streams_common/defaults/main.yml b/roles/amq_streams_common/defaults/main.yml index 1b412c5a..07f09a84 100644 --- a/roles/amq_streams_common/defaults/main.yml +++ b/roles/amq_streams_common/defaults/main.yml @@ -1,5 +1,5 @@ --- -amq_streams_common_product_version: 3.6.0 +amq_streams_common_product_version: 4.1.1 amq_streams_common_rhn_product_version: 2.6.0 amq_streams_common_rhn_home_dir: "kafka_2.13-{{ amq_streams_common_product_version }}.redhat-00005" amq_streams_common_rhn_product_path: /opt diff --git a/roles/amq_streams_common/meta/argument_specs.yml b/roles/amq_streams_common/meta/argument_specs.yml index 1c60254b..0a394de9 100644 --- a/roles/amq_streams_common/meta/argument_specs.yml +++ b/roles/amq_streams_common/meta/argument_specs.yml @@ -2,7 +2,7 @@ argument_specs: main: options: amq_streams_common_product_version: - default: 3.4.0 + default: 4.1.1 description: "Version of Apache Kafka to download and install" type: "str" amq_streams_common_scala_version: diff --git a/roles/amq_streams_zookeeper/README.md b/roles/amq_streams_zookeeper/README.md index cb1557b1..352458cb 100644 --- a/roles/amq_streams_zookeeper/README.md +++ b/roles/amq_streams_zookeeper/README.md @@ -1,5 +1,7 @@ # Zookeeper Role +> NOTE: *Starting with Kafka 4.0.0, ZooKeeper support has been removed in favor of KRaft (Kafka Raft Metadata) mode. Consequently, this role includes a version check mechanism. To use this role, ensure you are targeting a Kafka version `<= 3.9.x`. More can be found in [Apache Kafka 4.0.0 Release Announcement](https://kafka.apache.org/blog#apache_kafka_400_release_announcement)* + Perform installation and configuration of Zookeeper ensemble. This role requires to have a `zookeepers` group (identified by the @@ -72,3 +74,4 @@ Apache License v2.0 or later * [Romain Pelisse](https://github.com/rpelisse) * [Guido Grazioli](https://github.com/guidograzioli) * [Roman Martin](https://github.com/rmarting) +* [Ranabir Chakraborty](https://github.com/RanabirChakraborty) diff --git a/roles/amq_streams_zookeeper/tasks/main.yml b/roles/amq_streams_zookeeper/tasks/main.yml index 6d635ed1..5f9ba92e 100644 --- a/roles/amq_streams_zookeeper/tasks/main.yml +++ b/roles/amq_streams_zookeeper/tasks/main.yml @@ -1,4 +1,11 @@ --- +- name: "Validate Kafka version is compatible with Zookeeper (< 4.0.0)" + ansible.builtin.assert: + that: + - amq_streams_common_product_version is version('4.0.0', '<') + fail_msg: "ERROR: You are trying to run Zookeeper with Kafka {{ amq_streams_common_product_version }}. Zookeeper is removed from Kafka 4.0.0 (KRaft mode is required)." + success_msg: "Kafka version {{ amq_streams_common_product_version }} is compatible with Zookeeper." + - name: "Ensure user for zookeeper exists (if provided)." ansible.builtin.include_role: name: amq_streams_common