Install Confluent Platform with Ansible Playbooks
This topic describes the installation steps for Confluent Platform.
Install all Confluent Platform components
Configure required settings in the
hosts.ymlfile as described in Configure Ansible Playbooks for Confluent Platform.(Optional) Validate hosts before installing Confluent Platform:
ansible-playbook -i hosts.yml confluent.platform.validate_hosts
To validate hosts for an individual component, use the
--tagflag as below:ansible-playbook -i hosts.yml confluent.platform.validate_hosts --tags=<component-name>
<component-name>can bezookeeper,kafka_broker,schema_registry,kafka_rest,kafka_connect,ksql, orcontrol_center.Install or update all Confluent Platform by running the
all.ymlplaybook:ansible-playbook -i hosts.yml all.yml
Install individual Confluent Platform components
You can use the Ansible tags to install individual components. 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.
Generate the certificate authority (CA) if TLS encryption is enabled and using self-signed certificates.
ansible-playbook -i hosts.yml confluent.platform.all --tags=certificate_authority
Install ZooKeeper.
ansible-playbook -i hosts.yml confluent.platform.all --tags=zookeeper
Install Kafka.
ansible-playbook -i hosts.yml confluent.platform.all --tags=kafka_broker
Install Schema Registry, REST Proxy, Connect, and ksqlDB in any order.
ansible-playbook -i hosts.yml confluent.platform.all --tags=schema_registry ansible-playbook -i hosts.yml confluent.platform.all --tags=kafka_rest ansible-playbook -i hosts.yml confluent.platform.all --tags=kafka_connect ansible-playbook -i hosts.yml confluent.platform.all --tags=ksql
Install Control Center (Legacy).
ansible-playbook -i hosts.yml confluent.platform.all --tags=control_center
Install Confluent Platform without root access
Ansible Playbooks for Confluent Platform is a collection of tasks, some of which do not require root access. You can run those tasks as a non-privileged user. However, there are certain steps where you do need root access.
If you do not have root access, you can use Ansible tags to filter out and skip running the tasks that need root access.
The skipped tasks that need root access are still required to be executed, for example, using a customized script or another Ansible tower that has root access.
The following tags are used to separate out tasks that require root and non-root access:
systemd: Tag for systemd-related taskssysctl: Tag for sysctl-related tasks on the Kafka brokersprivileged: Tag for tasks that require elevated permissionsfilesystem: Tag for filesystem-related tasks across componentsUse this tag to skip configuration folder management, such as creating, updating, and changing permissions on files and folders, usually along with the other tags, such as
privilegedandsystemd.configuration: Tag for configuration-related tasks, such as creating, editing, changing permissions for component config files
If you do not have root access, skip the root access tasks with the
--skip-tags flag and the above tags, for example, --skip-tags
privileged,sysctl,systemd,filesystem,configuration.
For details on Ansible tags, see Confluent Ansible Playbook tags.
For a sample inventory, see non-root sample inventory.