Install Confluent Platform with Ansible Playbooks

Use Ansible Playbooks for Confluent Platform to install Confluent Platform as following:

  1. If using Ansible 2.9, install the community.general collection. Ansible Playbooks for Confluent Platform uses this collection for a string operation:

    ansible-galaxy collection install community.general:==4.8.1
    
  2. Configure required settings in the hosts.yml file as described in Configure Ansible Playbooks for Confluent Platform.

  3. Install or update all Confluent Platform by running the all.yml playbook:

    ansible-playbook -i hosts.yml all.yml
    

Important

Ansible Playbooks for Confluent Platform requires hash merging to be enabled in your Ansible configuration file. The ansible.cfg file at the base level of the cp-ansible repo enables hash merging. To make use of it, run the ansible-playbook command with your current directory at the base level of the cp-ansible repo.

Install individual Confluent Platform components

Install individual components, using the Ansible tags. You must follow the correct order given below to satisfy the dependencies among the components. For example, Kafka will not install until the certificate authority is generated and ZooKeeper is installed.

Similarly, when you update a component section in the hosts.yml file, you can optionally update the component and the preceding components in the order.

  1. Generate the certificate authority (CA) if TLS encryption is enabled and using self-signed certificates.
ansible-playbook -i hosts.yml all.yml --tags=certificate_authority

1.5. Generate secrets protection masterkey if secrets protection enabled.

ansible-playbook -i hosts.yml all.yml --tags=masterkey
  1. Install ZooKeeper.
ansible-playbook -i hosts.yml all.yml --tags=zookeeper
  1. Install Kafka.
ansible-playbook -i hosts.yml all.yml --tags=kafka_broker
  1. Install Schema Registry, REST Proxy, Connect, and ksqlDB in any order.
ansible-playbook -i hosts.yml all.yml --tags=schema_registry
ansible-playbook -i hosts.yml all.yml --tags=kafka_rest
ansible-playbook -i hosts.yml all.yml --tags=kafka_connect
ansible-playbook -i hosts.yml all.yml --tags=ksql
  1. Install Control Center.
ansible-playbook -i hosts.yml all.yml --tags=control_center