TODO
The system running Ansible needs to have the appropriate package install. In case of RHEL9 system, you'll need first to enable the appropriate subscription ansible-automation-platform. On x86_64 system, this can be achieved with the following command, run as root:
# subscription-manager repos --enable=ansible-automation-platform-2.4-for-rhel-9-x86_64-rpms
Then, install Ansible using DNF:
# dnf install ansible-core
Please refer to the following documentation on how to configure Ansible to Automation Hub and then execute the following command to install the Red Hat provided collection for AMQ Streams:
$ ansible-galaxy collection install redhat.amq_streams
For any systems managed by Ansible, SSHd must be running and a SSH pubkey, associated to root user needs to have been deployed to ensure that Ansible can connect ot it. For RHEL system, the required subscription for AMQ Streams (and RHEL) needs to be enabled.
For Ansible to know which systems to manage an inventory needs to be provided. In the context of this demo, this list must follows a few naming conventions. Host running AMQ Streams Broker should belong to the 'brokers' group while the ones running Zookeepers should belong to 'zookeepers', and the same logic applies for Cruise Control.
[all]
[brokers]
broker.example.com
[zookeepers]
zk.example.com
[cruise_controllers]
cc.example.com
For testing purpose, you can use localhost, which also remove the need to setup SSHd (as there will be no SSH connection between Ansible and localhost):
[all]
localhost ansible_connection=local
[brokers]
localhost ansible_connection=local
[zookeepers]
localhost ansible_connection=local
You can now run the playbooks to deploy Zk on the targets belonging to the 'zookeepers' group:
$ ansible-playbook -i inventory playbooks/zookeepers -e amq_streams_zookeeper_auth_pass=<password>
You can now run the playbooks to deploy Zk on the targets belonging to the 'zookeepers' group:
$ ansible-playbook -i inventory playbooks/brokers -e amq_streams_zookeeper_auth_pass=<password>