Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![Build Status](https://github.com/ansible-middleware/amq_streams/workflows/CI/badge.svg)](https://github.com/ansible-middleware/amq_streams/actions/workflows/ci.yml)

Collection to install and configure [Apache Kafka](https://kafka.apache.org/) / [Red Hat AMQ Streams](https://access.redhat.com/documentation/en-us/red_hat_amq_streams).
Collection to install and configure [Apache Kafka](https://kafka.apache.org/) / [Red Hat Streams for Apache Kafka](https://access.redhat.com/documentation/en-us/red_hat_amq_streams).

<!--start requires_ansible-->
## Ansible version compatibility
Expand Down Expand Up @@ -88,7 +88,7 @@ It is possible to perform downloads from alternate sources (like corporate Nexus
described by the `amq_streams_common_archive_file` variable (ie. *kafka_-a.b.c-x.y.z.tgz*).

<!--start support -->
For Red Hat customers, this collection is released as a [Technology Preview](https://access.redhat.com/support/offerings/techpreview) feature as the [Red Hat Ansible certified content collection for AMQ Streams](https://console.redhat.com/ansible/automation-hub/repo/published/redhat/amq_streams). If you have any issues or questions related to this collection, please contact <[email protected]> or open an issue at https://github.com/ansible-middleware/amq_streams/issues.
For Red Hat customers, this collection is released as a [Technology Preview](https://access.redhat.com/support/offerings/techpreview) feature as the [Red Hat Ansible certified content collection for Red Hat Streams for Apache Kafka](https://console.redhat.com/ansible/automation-hub/repo/published/redhat/amq_streams). If you have any issues or questions related to this collection, please contact <[email protected]> or open an issue at https://github.com/ansible-middleware/amq_streams/issues.
<!--end support -->

## License
Expand Down
Binary file added amq_results.txt
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -46,36 +46,36 @@ producer.sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModul
# Consumer
consumer.sasl.mechanism=PLAIN
consumer.sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required username="{{ amq_streams_connect_broker_auth_username }}" password="{{ amq_streams_connect_broker_auth_password }}";
{% elif amq_streams_connect_broker_admin_mechanism == "SCRAM-SHA-512" %}
{% elif redhat_streams_connect_broker_admin_mechanism == "SCRAM-SHA-512" %}
# SCRAM Login Module
sasl.mechanism=SCRAM-SHA-512
sasl.jaas.config=org.apache.kafka.common.security.scram.ScramLoginModule required username="{{ amq_streams_connect_broker_auth_username }}" password="{{ amq_streams_connect_broker_auth_password }}";
sasl.jaas.config=org.apache.kafka.common.security.scram.ScramLoginModule required username="{{ redhat_streams_connect_broker_auth_username }}" password="{{ redhat_streams_connect_broker_auth_password }}";
# Producer
producer.sasl.mechanism=SCRAM-SHA-512
producer.sasl.jaas.config=org.apache.kafka.common.security.scram.ScramLoginModule required username="{{ amq_streams_connect_broker_auth_username }}" password="{{ amq_streams_connect_broker_auth_password }}";
producer.sasl.jaas.config=org.apache.kafka.common.security.scram.ScramLoginModule required username="{{ redhat_streams_connect_broker_auth_username }}" password="{{ redhat_streams_connect_broker_auth_password }}";
# Consumer
consumer.sasl.mechanism=SCRAM-SHA-512
consumer.sasl.jaas.config=org.apache.kafka.common.security.scram.ScramLoginModule required username="{{ amq_streams_connect_broker_auth_username }}" password="{{ amq_streams_connect_broker_auth_password }}";
consumer.sasl.jaas.config=org.apache.kafka.common.security.scram.ScramLoginModule required username="{{ redhat_streams_connect_broker_auth_username }}" password="{{ redhat_streams_connect_broker_auth_password }}";
{% endif %}
{% endif %}

{% if amq_streams_connect_broker_tls_enabled %}
ssl.truststore.location={{ amq_streams_connect_broker_tls_truststore_client_location }}/{{ amq_streams_connect_broker_tls_truststore_client }}
ssl.truststore.password={{ amq_streams_connect_broker_tls_truststore_client_password }}
{% if redhat_streams_connect_broker_tls_enabled %}
ssl.truststore.location={{ redhat_streams_connect_broker_tls_truststore_client_location }}/{{ redhat_streams_connect_broker_tls_truststore_client }}
ssl.truststore.password={{ redhat_streams_connect_broker_tls_truststore_client_password }}
# Disable hostname verification
ssl.endpoint.identification.algorithm=
# Producer
producer.ssl.truststore.location={{ amq_streams_connect_broker_tls_truststore_client_location }}/{{ amq_streams_connect_broker_tls_truststore_client }}
producer.ssl.truststore.password={{ amq_streams_connect_broker_tls_truststore_client_password }}
producer.ssl.truststore.location={{ redhat_streams_connect_broker_tls_truststore_client_location }}/{{ redhat_streams_connect_broker_tls_truststore_client }}
producer.ssl.truststore.password={{ redhat_streams_connect_broker_tls_truststore_client_password }}
# Disable hostname verification
producer.ssl.endpoint.identification.algorithm=
# Consumer
consumer.ssl.truststore.location={{ amq_streams_connect_broker_tls_truststore_client_location }}/{{ amq_streams_connect_broker_tls_truststore_client }}
consumer.ssl.truststore.password={{ amq_streams_connect_broker_tls_truststore_client_password }}
consumer.ssl.truststore.location={{ redhat_streams_connect_broker_tls_truststore_client_location }}/{{ redhat_streams_connect_broker_tls_truststore_client }}
consumer.ssl.truststore.password={{ redhat_streams_connect_broker_tls_truststore_client_password }}
# Disable hostname verification
consumer.ssl.endpoint.identification.algorithm=
{% endif %}


# The converters specify the format of data in Kafka and how to translate it into Connect data. Every Connect user will
# need to configure these based on the format they want their data in when loaded from or stored into Kafka
key.converter=org.apache.kafka.connect.json.JsonConverter
Expand Down
31 changes: 16 additions & 15 deletions roles/amq_streams_cruise_control/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,22 @@ Perform installation and configuration of Cruise Control.

| Variable | Description | Default |
|:---------|:------------|:--------|
|`amq_streams_cruise_control_home`| Path to folder where Cruise Control has been installed | `/opt/cruise-control/` |
|`amq_streams_cruise_control_service_name`| Name of the systemd service running Cruise Control | `amq_streams_cruise_control` |
|`amq_streams_cruise_control_server_start`| Path to start script for systemd service managing Cruise Control | `{{ amq_streams_cruise_control_home }}/kafka-cruise-control-start.sh` |
|`amq_streams_cruise_control_server_stop`| Path to stop script for systemd service managing Cruise Control | `{{ amq_streams_cruise_control_home }}/kafka-cruise-control-stop.sh` |
|`amq_streams_cruise_control_server_config`| Path to config file for Cruise Control service | `/etc/amq_streams_cruise_control.properties` |
|`amq_streams_cruise_control_config_template`| Path to template defining the systemd service for Cruise Control | `templates/service.conf.j2` |
|`amq_streams_cruise_control_config_properties_template`| Path to template defining the config file for Cruise Control | `templates/cruisecontrol.properties.j2` |
|`amq_streams_cruise_control_user`| User account running the Cruise Control service | `root` |
|`amq_streams_cruise_control_group`| Groupname of the account running the Cruise Control service | `root` |
|`amq_streams_cruise_control_zk_host`| Hostname of the Zookeeper instance used by Cruise Control to communicate with the ensemble | `{{ groups['zookeepers'][0] }}` |
|`amq_streams_cruise_control_broker_host`| Hostname of the Zookeeper instance used by Cruise Control to communicate with the ensemble | `{{ groups['brokers'][0] }}` |
|`amq_streams_cruise_control_host`| Name of the host system running Cruise Control | `localhost` |
|`amq_streams_cruise_control_port`| Port used communicate with Cruise Control | `9090` |
|`amq_streams_cruise_control_api_path`| Context of the HTTP API call to Cruise Control (don't modify unless you know what you are doing) | `kafkacruisecontrol` |
|`amq_streams_cruise_control_operation_exec`| Set to False to display the URL built, but do not execute it (debug) | `True` |
|`redhat_streams_cruise_control_home`| Path to folder where Cruise Control has been installed | `/opt/cruise-control/` |
|`redhat_streams_cruise_control_service_name`| Name of the systemd service running Cruise Control | `redhat_streams_cruise_control` |
|`redhat_streams_cruise_control_server_start`| Path to start script for systemd service managing Cruise Control | `{{ redhat_streams_cruise_control_home }}/kafka-cruise-control-start.sh` |
|`redhat_streams_cruise_control_server_stop`| Path to stop script for systemd service managing Cruise Control | `{{ redhat_streams_cruise_control_home }}/kafka-cruise-control-stop.sh` |
|`redhat_streams_cruise_control_server_config`| Path to config file for Cruise Control service | `/etc/redhat_streams_cruise_control.properties` |
|`redhat_streams_cruise_control_config_template`| Path to template defining the systemd service for Cruise Control | `templates/service.conf.j2` |
|`redhat_streams_cruise_control_config_properties_template`| Path to template defining the config file for Cruise Control | `templates/cruisecontrol.properties.j2` |
|`redhat_streams_cruise_control_user`| User account running the Cruise Control service | `root` |
|`redhat_streams_cruise_control_group`| Groupname of the account running the Cruise Control service | `root` |
|`redhat_streams_cruise_control_zk_host`| Hostname of the Zookeeper instance used by Cruise Control to communicate with the ensemble | `{{ groups['zookeepers'][0] }}` |
|`redhat_streams_cruise_control_broker_host`| Hostname of the broker instance used by Cruise Control to communicate with the ensemble | `{{ groups['brokers'][0] }}` |
|`redhat_streams_cruise_control_host`| Name of the host system running Cruise Control | `localhost` |
|`redhat_streams_cruise_control_port`| Port used to communicate with Cruise Control | `9090` |
|`redhat_streams_cruise_control_api_path`| Context of the HTTP API call to Cruise Control (don't modify unless you know what you are doing) | `kafkacruisecontrol` |
|`redhat_streams_cruise_control_operation_exec`| Set to False to display the URL built, but do not execute it (debug) | `True` |


## License

Expand Down
54 changes: 27 additions & 27 deletions roles/amq_streams_cruise_control/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
---
amq_streams_cruise_control_enabled: false
amq_streams_cruise_control_home: /opt/cruise-control/
amq_streams_cruise_control_rhn_product_archive_file_pattern: '^.*/amq-streams-[0-9.]*-cruise-control-bin.zip'
amq_streams_cruise_control_service_name: amq_streams_cruise_control
amq_streams_cruise_control_server_start: "{{ amq_streams_cruise_control_home }}/kafka-cruise-control-start.sh"
amq_streams_cruise_control_server_stop: "{{ amq_streams_cruise_control_home }}/kafka-cruise-control-stop.sh"
amq_streams_cruise_control_version: 2.6.0
amq_streams_cruise_control_archive_file: "amq-streams-{{ amq_streams_cruise_control_version }}-cruise-control-bin.zip"
amq_streams_cruise_control_server_config: "/etc/amq_streams_cruise_control.properties"
amq_streams_cruise_control_config_template: 'templates/service.conf.j2'
amq_streams_cruise_control_config_properties_template: 'templates/cruisecontrol.properties.j2'
amq_streams_cruise_control_path_to_log4j_properties: "{{ amq_streams_cruise_control_home }}/config/log4j.properties"
amq_streams_cruise_control_log4j_template: 'templates/log4j.properties.j2'
amq_streams_cruise_control_logfilename: '/var/log/cruise-control'
amq_streams_cruise_control_logfiles_requires_priv_escalation: yes
amq_streams_cruise_control_capacity_template: 'templates/capacity.json.j2'
amq_streams_cruise_control_path_to_capacity_file: "{{ amq_streams_cruise_control_home }}/config/capacity.json"
amq_streams_cruise_control_path_to_capacity_file_require_priv_escalation: yes
amq_streams_cruise_control_user: root
amq_streams_cruise_control_group: root
amq_streams_cruise_control_zk_host: "{{ groups['zookeepers'][0] }}"
amq_streams_cruise_control_broker_host: "{{ groups['brokers'][0] }}"
amq_streams_cruise_control_replicator_factor: 1
redhat_streams_cruise_control_enabled: false
redhat_streams_cruise_control_home: /opt/cruise-control/
redhat_streams_cruise_control_rhn_product_archive_file_pattern: '^.*/redhat-streams-[0-9.]*-cruise-control-bin.zip'
redhat_streams_cruise_control_service_name: redhat_streams_cruise_control
redhat_streams_cruise_control_server_start: "{{ redhat_streams_cruise_control_home }}/kafka-cruise-control-start.sh"
redhat_streams_cruise_control_server_stop: "{{ redhat_streams_cruise_control_home }}/kafka-cruise-control-stop.sh"
redhat_streams_cruise_control_version: 2.6.0
redhat_streams_cruise_control_archive_file: "redhat-streams-{{ redhat_streams_cruise_control_version }}-cruise-control-bin.zip"
redhat_streams_cruise_control_server_config: "/etc/redhat_streams_cruise_control.properties"
redhat_streams_cruise_control_config_template: 'templates/service.conf.j2'
redhat_streams_cruise_control_config_properties_template: 'templates/cruisecontrol.properties.j2'
redhat_streams_cruise_control_path_to_log4j_properties: "{{ redhat_streams_cruise_control_home }}/config/log4j.properties"
redhat_streams_cruise_control_log4j_template: 'templates/log4j.properties.j2'
redhat_streams_cruise_control_logfilename: '/var/log/cruise-control'
redhat_streams_cruise_control_logfiles_requires_priv_escalation: yes
redhat_streams_cruise_control_capacity_template: 'templates/capacity.json.j2'
redhat_streams_cruise_control_path_to_capacity_file: "{{ redhat_streams_cruise_control_home }}/config/capacity.json"
redhat_streams_cruise_control_path_to_capacity_file_require_priv_escalation: yes
redhat_streams_cruise_control_user: root
redhat_streams_cruise_control_group: root
redhat_streams_cruise_control_zk_host: "{{ groups['zookeepers'][0] }}"
redhat_streams_cruise_control_broker_host: "{{ groups['brokers'][0] }}"
redhat_streams_cruise_control_replicator_factor: 1
# Cruise Control HTTP API
amq_streams_cruise_control_host: 'localhost'
amq_streams_cruise_control_port: 9090
amq_streams_cruise_control_api_path: 'kafkacruisecontrol'
redhat_streams_cruise_control_host: 'localhost'
redhat_streams_cruise_control_port: 9090
redhat_streams_cruise_control_api_path: 'kafkacruisecontrol'
# Switch next var to False to display the HTTP request
amq_streams_cruise_control_operation_exec: True
redhat_streams_cruise_control_operation_exec: True
Loading
Loading