Provision and deploy via Ansible a Red Hat AMQ broker cluster with replication on three nodes.
The primary use case of the amq_broker_ha_replication collection is to install Red Hat AMQ Broker with high availability (HA) across multiple virtual machines. This ensures that the messaging service is resilient, fault-tolerant, and capable of serving users even in the event of a failure.
- three virtual machines or containers with proper name resolution and network access.
- keypair ssh access to the virtual machines, with privilege escalation
- ansible-core >= 2.15
[defaults]
remote_user=<ssh_user_account>
private_key_file=<path_to_private_key>
host_key_checking=False
gathering=smart
pipelining=True
[galaxy]
server_list=galaxy,automation_hub
[galaxy_server.galaxy]
url=https://galaxy.ansible.com/
[galaxy_server.automation_hub]
url=https://cloud.redhat.com/api/automation-hub/
auth_url=https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token
token=<automation_hub_token>
- Set the
token
to the value you get after authentication on automation hub. - Set <ssh_user_account> to the posix account that can ssh into the target virtual machines
- Set <path_to_private_key> to the absolute path to the private key used for ssh
The following command will download and install the dependencies.
# pip install -r requirements.txt
# ansible-galaxy collection install -r requirements.yml
This key pair will be used by ansible to connect to the EC2 instances.
- Paste the path to the private key in ansible.cfg option
private_key_file
- Copy the public key file to
files/id_rsa_aws.pub
Execute the install.yml playbook to deploy the amq_broker setup.